' . floor($sn['mpNow']) . '/' . (0 + $sn['mpAll']) . '
- ' . floor($sn['mpNow']) . '/' . (0 + $sn['mpAll']) . '
+ ' . floor($sn['hpNow']) . '/' . (0 + $sn['hpAll']) . '
- ' . floor($sn['hpNow']) . '/' . (0 + $sn['hpAll']) . '
+ ' . $hpmp . '
';
} elseif ($type_info == 2) {
$hptop = 0;
@@ -9584,24 +7825,24 @@ LIMIT 1'));
}
if ($sn['mpAll'] > 0) {
- //
+ //мана
$lm = [0 => 'hp_none', 1 => 1];
$lm[1] = floor($sn['mpNow'] / $sn['mpAll'] * 200);
if ($lm[1] > 0) {
$lm[0] = 'hp_mp';
}
- $hpmp .= ' ' . floor($sn['mpNow']) . '/' . (0 + $sn['mpAll']) . '
- ' . floor($sn['mpNow']) . '/' . (0 + $sn['mpAll']) . '
+ ' . floor($sn['hpNow']) . '/' . (0 + $sn['hpAll']) . '
- ' . floor($sn['hpNow']) . '/' . (0 + $sn['hpAll']) . '
+ ' . $hpmp . '
';
}
@@ -9619,30 +7860,30 @@ LIMIT 1'));
}
$pb = '';
if ($u['banned'] > 0) {
- $pb .= '' . $witm[$j2] . '
';
$j2++;
}
- $eff = $eff;
-
}
//
if ($type_info == 1) {
@@ -9753,36 +7977,36 @@ LIMIT 1'));
if ($zag == '') {
if ($i1 == 0) {
if (!isset($_GET['inv'])) {
- $invg = [0 => 'main.php?inv=1', 1 => ''];
+ $invg = [0 => 'main.php?inv=1', 1 => 'Рюкзак'];
} else {
- $invg = [0 => 'main.php?skills=1', 1 => ''];
+ $invg = [0 => 'main.php?skills=1', 1 => 'Умения'];
}
} else {
$o = mysql_fetch_array(mysql_query('SELECT `id` FROM `obraz` WHERE `img` = "' . mysql_real_escape_string($this->info['obraz']) . '" AND `sex` = "' . $this->info['sex'] . '" LIMIT 1'));
- $invg = [0 => 'https://new-combats.com/shadow/' . $o['id'] . '" target="_blank', 1 => ' '];
+ $invg = [0 => 'https://new-combats.com/shadow/' . $o['id'] . '" target="_blank', 1 => 'Галерея образов'];
}
$uobr = 'i/obraz/' . $u['sex'] . '/' . $u['obraz'] . '';
if (isset($sn['items_img'][1])) {
$uobr = 'rimg/r' . $sn['items_img'][1];
}
$rt[0] .= '
-
-
+
+
' . $eff . '
' . $anml . '
';
} else {
if ($i1 == 0) {
if (!isset($_GET['inv'])) {
- $invg = [0 => 'main.php?inv=1', 1 => ''];
+ $invg = [0 => 'main.php?inv=1', 1 => 'Рюкзак'];
} else {
- $invg = [0 => 'main.php?skills=1', 1 => ''];
+ $invg = [0 => 'main.php?skills=1', 1 => 'Умения'];
}
} else {
- $invg = [0 => 'https://lib.new-combats.com/obraz.php?namez=' . $u['zag'] . '" target="_blank', 1 => ' '];
+ $invg = [0 => 'https://lib.new-combats.com/obraz.php?namez=' . $u['zag'] . '" target="_blank', 1 => 'Галерея образов'];
}
$rt[0] .= '
-
-
+
+
' . $eff . '
' . $anml . '
';
}
@@ -9872,12 +8096,12 @@ LIMIT 1'));
if ($zag == '') {
if ($i1 == 0) {
if (!isset($_GET['inv'])) {
- $invg = [0 => 'main.php?inv=1', 1 => ''];
+ $invg = [0 => 'main.php?inv=1', 1 => 'Рюкзак'];
} else {
- $invg = [0 => 'main.php?skills=1', 1 => ''];
+ $invg = [0 => 'main.php?skills=1', 1 => 'Умения'];
}
} else {
- $invg = [0 => 'https://lib.new-combats.com/obraz.php?name=' . $u['obraz'] . '" target="_blank', 1 => ' '];
+ $invg = [0 => 'https://lib.new-combats.com/obraz.php?name=' . $u['obraz'] . '" target="_blank', 1 => 'Галерея образов'];
}
$u['obraz'] = '0.gif';
$uobr = 'i/obraz/' . $u['sex'] . '/old/' . $u['obraz'] . '';
@@ -9885,8 +8109,8 @@ LIMIT 1'));
$uobr = 'rimg/r' . $sn['items_img'][1];
}
$rt[0] .= '
-
-
+
+
' . $eff . '
' . $anml . '
';
}
@@ -9941,8 +8165,8 @@ LIMIT 1'));
if (isset($e['id'])) {
$sleep = $this->testAction('`vars` = "sleep" AND `uid` = "' . $e['uid'] . '" LIMIT 1', 1);
if ($e['id_eff'] == 2) {
- //
- $ev = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_main` WHERE `name` = "' . mysql_real_escape_string(str_replace(': ', '', $e['name'])) . '" LIMIT 1'));
+ //Проверка
+ $ev = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_main` WHERE `name` = "' . mysql_real_escape_string(str_replace('Изучение: ', '', $e['name'])) . '" LIMIT 1'));
$et = mysql_fetch_array(mysql_query('SELECT `id` FROM `actions` WHERE `uid` = "' . $e['uid'] . '" AND `vars` LIKE "%read%" AND `vals` = "' . $ev['id'] . '" LIMIT 1'));
if (isset($et['id'])) {
if ($et['time'] < time()) {
@@ -9969,7 +8193,7 @@ LIMIT 1'));
}
}
if (isset($u['id']) && ($e['type1'] < 11 || ($e['type1'] > 16 && $e['type1'] < 23)) && $e['noch'] == 0) {
- $text = ' "
' . $e['name'] . '"';
+ $text = 'Закончилось действие эффекта "
' . $e['name'] . '"';
mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`new`) VALUES ('" . $u['city'] . "','" . $u['room'] . "','','" . $u['login'] . "','" . $text . "','-1','6','0',1)");
if ($u['battle'] > 0) {
$lastHOD = mysql_fetch_array(mysql_query('SELECT `id`,`time`,`battle`,`id_hod`,`text`,`vars`,`zona1`,`zonb1`,`zona2`,`zonb2`,`type` FROM `battle_logs` WHERE `battle` = "' . $u['battle'] . '" ORDER BY `id_hod` DESC LIMIT 1'));
@@ -9978,7 +8202,7 @@ LIMIT 1'));
if ($lastHOD['type'] != 6) {
$id_hod++;
}
- mysql_query('INSERT INTO `battle_logs` (`time`,`battle`,`id_hod`,`text`,`vars`,`zona1`,`zonb1`,`zona2`,`zonb2`,`type`) VALUES ("' . time() . '","' . $u['battle'] . '","' . ($id_hod) . '","{tm1} ' . $text . ' {u1}.","login1=' . $u['login'] . '||t1=' . $u['team'] . '||time1=' . time() . '","","","","","6")');
+ mysql_query('INSERT INTO `battle_logs` (`time`,`battle`,`id_hod`,`text`,`vars`,`zona1`,`zonb1`,`zona2`,`zonb2`,`type`) VALUES ("' . time() . '","' . $u['battle'] . '","' . ($id_hod) . '","{tm1} ' . $text . ' у персонажа {u1}.","login1=' . $u['login'] . '||t1=' . $u['team'] . '||time1=' . time() . '","","","","","6")');
}
}
}
@@ -10067,16 +8291,6 @@ LIMIT 1'));
if ($itm['group'] == 1) {
if ($this->itemsX($itm['id']) > 1) {
$this->unstack($itm['id'], 1);
- /*$itm = mysql_fetch_array(mysql_query('SELECT
- `im`.`id`,`im`.`name`,`im`.`img`,`im`.`type`,`im`.`inslot`,`im`.`2h`,`im`.`2too`,`im`.`iznosMAXi`,`im`.`inRazdel`,`im`.`price1`,`im`.`price2`,`im`.`pricerep`,`im`.`magic_chance`,`im`.`info`,`im`.`massa`,`im`.`level`,`im`.`magic_inci`,`im`.`overTypei`,`im`.`group`,`im`.`group_max`,`im`.`geni`,`im`.`ts`,`im`.`srok`,`im`.`class`,`im`.`class_point`,`im`.`anti_class`,`im`.`anti_class_point`,`im`.`max_text`,`im`.`useInBattle`,`im`.`lbtl`,`im`.`lvl_itm`,`im`.`lvl_exp`,`im`.`lvl_aexp`,
- `iu`.`id`,`iu`.`item_id`,`iu`.`1price`,`iu`.`2price`,`iu`.`uid`,`iu`.`use_text`,`iu`.`data`,`iu`.`inOdet`,`iu`.`inShop`,`iu`.`delete`,`iu`.`iznosNOW`,`iu`.`iznosMAX`,`iu`.`gift`,`iu`.`gtxt1`,`iu`.`gtxt2`,`iu`.`kolvo`,`iu`.`geniration`,`iu`.`magic_inc`,`iu`.`maidin`,`iu`.`lastUPD`,`iu`.`timeOver`,`iu`.`overType`,`iu`.`secret_id`,`iu`.`time_create`,`iu`.`time_sleep`,`iu`.`inGroup`,`iu`.`dn_delete`,`iu`.`inTransfer`,`iu`.`post_delivery`,`iu`.`lbtl_`,`iu`.`bexp`,`iu`.`so`,`iu`.`blvl`
- FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE `iu`.`inOdet`="0" AND `iu`.`inShop`="0" '.$au.' AND `iu`.`delete`="1000" AND `iu`.`inGroup` = "'.$itm['id'].'" LIMIT 1'));
- if(!isset($itm['id'])) {
- $this->error = ' ...';
- $notr++;
- } else {
- $itm['delete'] = 0;
- }*/
}
}
@@ -10087,16 +8301,16 @@ LIMIT 1'));
if (isset($tr['maks_itm_one']) && $tr['maks_itm_one'] > 0) {
$test = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `uid` = "' . $this->info['id'] . '" AND `inOdet` > 0 AND `delete` = 0 AND `data` LIKE "%maks_itm_one=' . $tr['maks_itm_one'] . '%" LIMIT 1'));
if (isset($test['id'])) {
- $this->error = ' !';
+ $this->error = 'Возможное использование максимум одного предмета!';
$notr++;
}
}
if ($this->info['twink'] > 0) {
- // 100 .
+ //Не дороже 100 екр.
if ($itm['price2'] > 100 || $itm['2price'] > 100) {
$notr++;
}
- // +
+ //Нельзя руны + чарки
if (isset($tr['rune']) && $tr['rune'] > 0) {
$notr++;
}
@@ -10134,11 +8348,11 @@ LIMIT 1'));
}
}
if ($notr > 0) {
- //
+ //Не хватает характеристик или не совпадают условия
if (isset($tr['open']) && isset($_GET['open'])) {
- $this->error = ' ';
+ $this->error = 'Вы не можете открыть данный предмет';
} else {
- $this->error = ' ';
+ $this->error = 'Нельзя одеть больше одного предмета данного типа';
}
return 0;
} elseif (isset($tr['open']) && isset($_GET['open']) && isset($tr['items_in_file'])) {
@@ -10150,45 +8364,45 @@ LIMIT 1'));
require('_incl_data/class/magic/' . $tr['items_in_file'] . '.php');
if (!isset($no_open_itm)) {
$this->deleteItem($itm['id'], $this->info['id']);
- $this->error = ' "' . $itm['name'] . '":
' . $io . '...';
+ $this->error = 'Вы успешно открыли "' . $itm['name'] . '":
' . $io . '...';
} else {
unset($no_open_itm);
}
} else {
- $this->error = ' "' . $itm['name'] . '" ...';
+ $this->error = 'Предмет "' . $itm['name'] . '" невозможно открыть...';
}
} elseif (isset($tr['open']) && isset($_GET['open'])) {
- //
+ //открываем предмет
$io = '';
$i = 0;
$itms = explode(',', $tr['items_in']);
if ($itm['type'] == 37) {
- //
+ //Распаковываем упаковку
$io = '';
$itmin = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `id` = "' . $tr['item_inbox'] . '" LIMIT 1'));
$itmmn = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "' . $itmin['item_id'] . '" LIMIT 1'));
//
if ($itm['gift'] == '' || $itm['gift'] == '0') {
- $this->error = ' , !';
+ $this->error = 'Предмет должен быть подарен, прежде чем его открывать!';
} elseif (!isset($itmin['id'])) {
- $this->error = ' , - ...';
+ $this->error = 'В упаковке ничего нет, скорее всего предмет кто-то вытащил от туда...';
} else {
$io .= $itmmn['name'];
if ($itmin['item_id'] == 4867) {
- //
+ //Не откроешь
$this->deleteItem($itm['id'], $this->info['id']);
$this->deleteItem($itmin['id'], $this->info['id']);
- $this->error = ' . .';
+ $this->error = 'Не удалось открыть подарок. Содержимое испорчено.';
} elseif ($itmin['item_id'] == 4868) {
- //
+ //Летучая мышь
mysql_query('UPDATE `stats` SET `hpNow` = 1,`mpNow` = 1 WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
$this->deleteItem($itm['id'], $this->info['id']);
$this->deleteItem($itmin['id'], $this->info['id']);
- $this->error = ' HP...';
+ $this->error = 'Вы потеряли все HP...';
} elseif ($itmin['item_id'] == 4870) {
- //
+ //Минута молчания
if ($this->info['molch1'] > time()) {
$this->info['molch1'] += 3600;
} else {
@@ -10197,90 +8411,90 @@ LIMIT 1'));
mysql_query('UPDATE `users` SET `molch1` = "' . $this->info['molch1'] . '" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
$this->deleteItem($itm['id'], $this->info['id']);
$this->deleteItem($itmin['id'], $this->info['id']);
- $this->error = ' ...';
+ $this->error = 'Вы оказались под действие заклятия молчания...';
} elseif ($itmin['item_id'] == 4873) {
- //
+ //Крысиный яд
$a = mysql_fetch_array(mysql_query('SELECT `id`,`type`,`name`,`uid`,`delete`,`inBattle`,`eda`,`exp`,`obraz`,`stats`,`level`,`sex`,`levelUp`,`pet_in_cage`,`max_exp`,`priems`,`bonus` FROM `users_animal` WHERE `uid` = "' . $this->info['id'] . '" AND `id` = "' . $this->info['animal'] . '" AND `pet_in_cage` = "0" AND `delete` = "0" LIMIT 1'));
$this->deleteItem($itm['id'], $this->info['id']);
$this->deleteItem($itmin['id'], $this->info['id']);
if (isset($a['id'])) {
- $this->error = ' "' . $a['name'] . '" ...';
+ $this->error = 'Ваш зверь "' . $a['name'] . '" странно позеленел...';
mysql_query('UPDATE `users_animal` SET `eda` = 0, `yad` = "' . (time() + 86400 * 7) . '" WHERE `id` = "' . $a['id'] . '" LIMIT 1');
} else {
- $this->error = '- , :)';
+ $this->error = 'Кто-то пытался отравить вашего зверя, которого у вас нет :)';
}
} elseif ($itmin['item_id'] == 4869) {
- // ( 1 )
+ //Неасчастный случай (легкая травма на 1 час)
$this->deleteItem($itm['id'], $this->info['id']);
$this->deleteItem($itmin['id'], $this->info['id']);
mysql_query('INSERT INTO `eff_users`
(`overType`,`timeUse`,`hod`,`name`,`data`,`uid`, `id_eff`, `img2`, `timeAce`, `v1`) VALUES (
"0","' . (time() + 3600) . '","-1",
- " ","add_s' . rand(1, 3) . '=-' . rand(5, 15) . '","' . $this->info['id'] . '",
+ "Неверие в человечество","add_s' . rand(1, 3) . '=-' . rand(5, 15) . '","' . $this->info['id'] . '",
"4", "bad_present_travma1.gif","0", "1"
)');
- $this->error = ' . ...';
+ $this->error = 'Вы травмированы. В том числе и физически...';
} elseif ($itmin['item_id'] == 4872) {
- // ( 1 )
+ //Трагедия (средняя травма на 1 час)
$this->deleteItem($itm['id'], $this->info['id']);
$this->deleteItem($itmin['id'], $this->info['id']);
mysql_query('INSERT INTO `eff_users`
(`overType`,`timeUse`,`hod`,`name`,`data`,`uid`, `id_eff`, `img2`, `timeAce`, `v1`) VALUES (
"0","' . (time() + 3600) . '","-1",
- " ","add_s' . rand(1, 3) . '=-' . rand(16, 25) . '","' . $this->info['id'] . '",
+ "Неверие в человечество","add_s' . rand(1, 3) . '=-' . rand(16, 25) . '","' . $this->info['id'] . '",
"4", "bad_present_travma2.gif","0", "2"
)');
- $this->error = ' . ...';
+ $this->error = 'Вы травмированы. В том числе и физически...';
} elseif ($itmin['item_id'] == 4876) {
- // ( 1 )
+ //Катастрофа (тяжелая травма на 1 час)
$this->deleteItem($itm['id'], $this->info['id']);
$this->deleteItem($itmin['id'], $this->info['id']);
mysql_query('INSERT INTO `eff_users`
(`overType`,`timeUse`,`hod`,`name`,`data`,`uid`, `id_eff`, `img2`, `timeAce`, `v1`) VALUES (
"0","' . (time() + 3600) . '","-1",
- " ","add_s' . rand(1, 3) . '=-' . rand(26, 35) . '","' . $this->info['id'] . '",
+ "Неверие в человечество","add_s' . rand(1, 3) . '=-' . rand(26, 35) . '","' . $this->info['id'] . '",
"4", "bad_present_travma3.gif","0", "3"
)');
- $this->error = ' . ...';
+ $this->error = 'Вы травмированы. В том числе и физически...';
} elseif ($itmin['item_id'] == 4878) {
- // (add_puti=7200)
+ //Недвижимость (add_puti=7200)
$this->deleteItem($itm['id'], $this->info['id']);
$this->deleteItem($itmin['id'], $this->info['id']);
mysql_query('INSERT INTO `eff_users`
(`overType`,`timeUse`,`hod`,`name`,`data`,`uid`, `id_eff`, `img2`, `timeAce`, `v1`) VALUES (
"0","' . (time() + 7200) . '","-1",
- "","add_puti=1","' . $this->info['id'] . '",
+ "Недвижимость","add_puti=1","' . $this->info['id'] . '",
"4", "bad_present_chains.gif","0", "3"
)');
- $this->error = ' ...';
+ $this->error = 'Вы не можете передвигаться...';
} elseif ($itmin['item_id'] == 4874) {
- //
+ //Сюрприз для мага на час
$this->deleteItem($itm['id'], $this->info['id']);
$this->deleteItem($itmin['id'], $this->info['id']);
mysql_query('INSERT INTO `eff_users`
(`overType`,`timeUse`,`hod`,`name`,`data`,`uid`, `id_eff`, `img2`, `timeAce`, `v1`) VALUES (
"0","' . (time() + 3600) . '","-1",
- " ","add_s5=-50","' . $this->info['id'] . '",
+ "Сюрприз для Мага","add_s5=-50","' . $this->info['id'] . '",
"4", "bad_present_dmage.gif","0", "3"
)');
- $this->error = ' ...';
+ $this->error = 'Вам нехорошо...';
} elseif ($itmin['item_id'] == 4871) {
- //
+ //Сюрприз для воина на час
$this->deleteItem($itm['id'], $this->info['id']);
$this->deleteItem($itmin['id'], $this->info['id']);
mysql_query('INSERT INTO `eff_users`
(`overType`,`timeUse`,`hod`,`name`,`data`,`uid`, `id_eff`, `img2`, `timeAce`, `v1`) VALUES (
"0","' . (time() + 3600) . '","-1",
- " ","add_s1=-50","' . $this->info['id'] . '",
+ "Сюрприз для Воина","add_s1=-50","' . $this->info['id'] . '",
"4", "bad_present_dfighter.gif","0", "3"
)');
- $this->error = ' ...';
- } elseif (mysql_query('UPDATE `items_users` SET `uid` = "' . $this->info['id'] . '",`lastUPD` = "' . time() . '",`gift` = "' . $itm['gift'] . '",`gtxt1` = "' . $itm['gtxt1'] . '",`gtxt2` = " . : ' . date('d.m.Y H:i:s', $itmin['time_create']) . '" WHERE `id` = "' . $itmin['id'] . '" LIMIT 1')) {
- //
+ $this->error = 'Вам нехорошо...';
+ } elseif (mysql_query('UPDATE `items_users` SET `uid` = "' . $this->info['id'] . '",`lastUPD` = "' . time() . '",`gift` = "' . $itm['gift'] . '",`gtxt1` = "' . $itm['gtxt1'] . '",`gtxt2` = "Предмет из упаковки. Дата запаковки: ' . date('d.m.Y H:i:s', $itmin['time_create']) . '" WHERE `id` = "' . $itmin['id'] . '" LIMIT 1')) {
+ //Удаляем упаковку
$this->deleteItem($itm['id'], $this->info['id']);
- $this->error = ' "' . $itm['name'] . '", :
' . $io . '...';
+ $this->error = 'Вы успешно открыли "' . $itm['name'] . '", внутри было найдено:
' . $io . '...';
} else {
- $this->error = ' , ?';
+ $this->error = 'Неудалось открыть подарок, что же там?';
}
//
}
@@ -10312,7 +8526,7 @@ LIMIT 1'));
mysql_query('UPDATE `items_users` SET `lastUPD` = "' . time() . '",`inGroup` = "0", `delete` = "0" WHERE `id` = "' . $itm['id'] . '" LIMIT 1');
}
$this->deleteItem($itm['id'], $this->info['id']);
- $this->error = ' "' . $itm['name'] . '", :
' . $io . '...';
+ $this->error = 'Вы успешно открыли "' . $itm['name'] . '", внутри было найдено:
' . $io . '...';
}
} else {
$inSlot = $itm['inslot'];
@@ -10322,13 +8536,13 @@ LIMIT 1'));
$d[$p['inOdet']] = $p['id'];
}
- //
+ //Если в слот оружия и можно одеть в левую руку
if ($itm['2too'] == 1 && $inSlot == 3 && isset($d[3])) {
$inSlot = 14;
}
if ($inSlot == 3 || $inSlot == 14) {
- // -
+ //Проверяем есть-ли двуручное оружие
if ($this->stats['items'][$this->stats['wp3id']]['2h'] == 1 || $this->stats['items'][$this->stats['wp14id']]['2h'] == 1 || $itm['2h'] == 1) {
$this->snatItem($this->stats['items'][$this->stats['wp3id']]['id'], $uid);
$this->snatItem($this->stats['items'][$this->stats['wp14id']]['id'], $uid);
@@ -10391,7 +8605,7 @@ LIMIT 1'));
mysql_query('UPDATE `items_users` SET `lastUPD` = "' . time() . '", `inGroup` = 0, `delete` = 0 WHERE `id` = "' . $itm['id'] . '" LIMIT 1');
}
if ($upd) {
- //
+ //Если предмет привязывается после одевания
//if($itm[''])
//{
//
@@ -10400,12 +8614,12 @@ LIMIT 1'));
mysql_query('UPDATE `users` SET `autospell` = "1" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
return 1;
} else {
- $this->error = '(!) ';
+ $this->error = '(!) Ошибка обновления данных';
return 0;
}
}
} else {
- $this->error = ' ';
+ $this->error = 'Предмет не найден в вашем рюкзаке';
return 0;
}
}
@@ -10422,14 +8636,14 @@ LIMIT 1'));
if (isset($itm['id'])) {
if ($coldel == 0) {
- //
+ //Удаляем целиком
$upd = mysql_query('UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time() . '" WHERE `id`="' . $itm['id'] . '" LIMIT 1');
$col = $this->itemsX($itm['id']);
if ($col > 0) {
mysql_query('UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time() . '",`inGroup` = "0" WHERE `inGroup`="' . $itm['id'] . '" LIMIT ' . $col);
}
} else {
- // -
+ //Удаляем конкретное кол-во
$col = $this->itemsX($itm['id']);
if ($col > 1) {
if ($col <= $coldel) {
@@ -10437,7 +8651,7 @@ LIMIT 1'));
}
$upd = mysql_query('UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time() . '",`inGroup` = "0" WHERE `inGroup`="' . $itm['id'] . '" AND `delete` = "1000" LIMIT ' . $coldel);
} else {
- //
+ //Удаляем целиком
$upd = mysql_query('UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time() . '" WHERE `id`="' . $itm['id'] . '" LIMIT 1');
$upd = mysql_query('UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time() . '",`inGroup` = "0" WHERE `inGroup`="' . $itm['id'] . '" AND `delete` = "1000" LIMIT ' . $col);
}
@@ -10452,18 +8666,18 @@ LIMIT 1'));
$col = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `item_id`="' . $itm['item_id'] . '" AND `inOdet` = 0 AND `delete` < 100000 AND `uid` = "' . $itm['uid'] . '" AND `data` NOT LIKE "%nodelete%"' . $whr));
$col = $col[0];
mysql_query('UPDATE `items_users` SET `lastUPD`="' . time() . '",`delete`="' . time() . '" WHERE `item_id`="' . $itm['item_id'] . '" AND `inOdet` = 0 AND `delete` < 100000 AND `uid` = "' . $itm['uid'] . '" AND `data` NOT LIKE "%nodelete%"' . $whr);
- $this->error = ' "' . $itm['name'] . ' (x' . ($col + 1) . ')" ';
- $this->addDelo(1, $uid, '"
System.inventory": "
' . $itm['name'] . ' (x' . $col . ')" [itm:' . $itm['id'] . '=' . time() . ']
.', time(), $this->info['city'], 'System.inventory', 0, 0);
+ $this->error = 'Предметы "' . $itm['name'] . ' (x' . ($col + 1) . ')" выброшены';
+ $this->addDelo(1, $uid, '"
System.inventory": Предметы "
' . $itm['name'] . ' (x' . $col . ')" [itm:' . $itm['id'] . '=' . time() . '] были
выброшены.', time(), $this->info['city'], 'System.inventory', 0, 0);
} else {
- $this->error = ' "' . $itm['name'] . '" ';
- $this->addDelo(1, $uid, '"
System.inventory": "
' . $itm['name'] . '" [itm:' . $itm['id'] . ']
.', time(), $this->info['city'], 'System.inventory', 0, 0);
+ $this->error = 'Предмет "' . $itm['name'] . '" выброшен';
+ $this->addDelo(1, $uid, '"
System.inventory": Предмет "
' . $itm['name'] . '" [itm:' . $itm['id'] . '] был
выброшен.', time(), $this->info['city'], 'System.inventory', 0, 0);
}
return 1;
} else {
return 0;
}
} else {
- $this->error = ' ';
+ $this->error = 'Предмет не найден в вашем рюкзаке';
}
}
@@ -10510,25 +8724,6 @@ LIMIT 1'));
$u = $this->info;
}
- /*if( $btl_cache == true ) {
- $cache = $this->get_battle_cache( $u['id'],$u['battle'] );
- if( $cache == false ) {
- unset($cache);
- }else{
- $cache['st'] = $u + $cache['st'];
- }
- }*/
-
- /*if( $u['battle'] > 0 ) {
- $cache_items = $this->get_battle_cache( $u['id'],$u['battle'] );
- if( $cache_items == false ) {
- unset($cache_items);
- }else{
- $cache_items['st']['hpNow'] = $u['hpNow'];
- $cache_items['st']['mpNow'] = $u['mpNow'];
- }
- }*/
-
if (isset($u['id'], $u['stats']) && !isset($cache)) {
$st = [];
$s_vi = [];
@@ -10543,9 +8738,7 @@ LIMIT 1'));
}
if (!isset($cache_items)) {
- //
- //$st = new SplFixedArray(1024000);
- //
+
$lvl = mysql_fetch_array(mysql_query('SELECT `bprice`,`upLevel`,`nextLevel`,`exp`,`money`,`money_bonus1`,`money_bonus2`,`ability`,`skills`,`nskills`,`sskills`,`expBtlMax`,`hpRegen`,`mpRegen`,`money2` FROM `levels` WHERE `upLevel` = "' . $u['upLevel'] . '" LIMIT 1'));
if (isset($lvl['upLevel'])) {
$st['levels'] = $lvl;
@@ -10570,7 +8763,7 @@ LIMIT 1'));
$sts = explode('|', $u['stats']);
$i = 0;
$ste = '';
- //
+ //Родные характеристики
while ($i < count($sts)) {
$ste = explode('=', $sts[$i]);
if (isset($ste[1])) {
@@ -10601,7 +8794,7 @@ LIMIT 1'));
');
}
- //
+ //Шаблонные картинки
if ($this->info['id'] == $u['id'] || $reimg != false) {
$sp_img = mysql_query('SELECT * FROM `items_img` WHERE `uid` = "' . $u['id'] . '" AND `img_id` != "0" LIMIT 16');
while ($pl_img = mysql_fetch_array($sp_img)) {
@@ -10614,7 +8807,7 @@ LIMIT 1'));
}
}
- // // tr_lvl
+ //Характеристики от предметов //ТУТ tr_lvl
$cl = mysql_query('SELECT
`im`.`id`,`im`.`name`,`im`.`img`,`im`.`type`,`im`.`inslot`,`im`.`2h`,`im`.`2too`,`im`.`iznosMAXi`,`im`.`inRazdel`,`im`.`price1`,`im`.`price2`,`im`.`pricerep`,`im`.`magic_chance`,`im`.`info`,`im`.`massa`,`im`.`level`,`im`.`magic_inci`,`im`.`overTypei`,`im`.`group`,`im`.`group_max`,`im`.`geni`,`im`.`ts`,`im`.`srok`,`im`.`class`,`im`.`class_point`,`im`.`anti_class`,`im`.`anti_class_point`,`im`.`max_text`,`im`.`useInBattle`,`im`.`lbtl`,`im`.`lvl_itm`,`im`.`lvl_exp`,`im`.`lvl_aexp`,
`iu`.`id`,`iu`.`item_id`,`iu`.`1price`,`iu`.`2price`,`iu`.`uid`,`iu`.`use_text`,`iu`.`data`,`iu`.`inOdet`,`iu`.`inShop`,`iu`.`delete`,`iu`.`iznosNOW`,`iu`.`iznosMAX`,`iu`.`gift`,`iu`.`gtxt1`,`iu`.`gtxt2`,`iu`.`kolvo`,`iu`.`geniration`,`iu`.`magic_inc`,`iu`.`maidin`,`iu`.`lastUPD`,`iu`.`timeOver`,`iu`.`overType`,`iu`.`secret_id`,`iu`.`time_create`,`iu`.`time_sleep`,`iu`.`inGroup`,`iu`.`dn_delete`,`iu`.`inTransfer`,`iu`.`post_delivery`,`iu`.`lbtl_`,`iu`.`bexp`,`iu`.`so`,`iu`.`blvl`
@@ -10625,7 +8818,7 @@ LIMIT 1'));
$hnd2 = 0;
$sht1 = 0;
$reitm = [];
- $coms = []; //
+ $coms = []; // комплекты
$dom = [];
$btl_cof = 0;
$oza = [
@@ -10633,13 +8826,13 @@ LIMIT 1'));
2 => [0, 0],
3 => [0, 0],
4 => [0, 0]
- ]; //
+ ]; //особенности защиты
$ozm = [
1 => [0, 0],
2 => [0, 0],
3 => [0, 0],
4 => [0, 0]
- ]; //
+ ]; //особенности магии
$itmslvl = 0;
$itmsCfc = 0;
@@ -10652,21 +8845,6 @@ LIMIT 1'));
$st['irka'] += $pl['price1'];
}
}
- /* */
- //$dom[count($dom)] = array($pl['inOdet'],$pl['class'],$pl['class_point'],$pl['anti_class'],$pl['anti_class_point'],$pl['level'],$u['level'],$pl['price2']);
-
-
- if ($pl['inOdet'] <= 18 && $pl['inOdet'] > 0) {
- /*if( $pl['2price'] > 0 ) {
- $st['reting'] += $pl['2price']*12.5;
- }elseif( $pl['price2'] > 0 ) {
- $st['reting'] += $pl['price2']*12.5;
- }elseif( $pl['1price'] > 0 ) {
- $st['reting'] += $pl['1price'];
- }elseif( $pl['price1'] > 0 ) {
- $st['reting'] += $pl['price1'];
- }*/
- }
$st['wp' . $pl['inOdet'] . 'id'] = $h;
@@ -10715,16 +8893,6 @@ LIMIT 1'));
}
}
}
- } else {
- if ($pl['inOdet'] < 18 && $pl['inOdet'] > 0) {
- if ($pl['2price'] == 0 && $pl['price2'] == 0) {
- if ($pl['1price'] > 0) {
- //$st['prckr'] += round($pl['1price']/3);
- } else {
- //$st['prckr'] += round($pl['price1']/3);
- }
- }
- }
}
if ($pl['inOdet'] <= 18 && $pl['inOdet'] > 0) {
@@ -10732,55 +8900,51 @@ LIMIT 1'));
$st['reting'] += 1;
}
- if (isset($sti['add_oza'])) {
-
- }
-
$ko = 1;
while ($ko <= 4) {
if (isset($sti['add_oza' . $ko])) {
if (isset($sti['add_oza'])) {
if ($sti['add_oza'] == 1) {
- //
+ //Слабая
$oza[$ko][0] += 1;
$oza[$ko][1] += 9;
} elseif ($sti['add_oza'] == 2) {
- //
+ //Нормальная
$oza[$ko][0] += 20;
$oza[$ko][1] += 39;
} elseif ($sti['add_oza'] == 3) {
- //
+ //Хорошая
$oza[$ko][0] += 40;
$oza[$ko][1] += 69;
} elseif ($sti['add_oza'] == 4) {
- //
+ //Посредственная
$oza[$ko][0] += 10;
$oza[$ko][1] += 19;
} elseif ($sti['add_oza'] == 5) {
- //
+ //Великолепная
$oza[$ko][0] += 70;
$oza[$ko][1] += 89;
}
}
if (isset($sti['add_ozm'])) {
if ($sti['add_ozm'] == 1) {
- //
+ //Слабая
$ozm[$ko][0] += 1;
$ozm[$ko][1] += 9;
} elseif ($sti['add_ozm'] == 2) {
- //
+ //Нормальная
$ozm[$ko][0] += 20;
$ozm[$ko][1] += 39;
} elseif ($sti['add_ozm'] == 3) {
- //
+ //Хорошая
$ozm[$ko][0] += 40;
$ozm[$ko][1] += 69;
} elseif ($sti['add_ozm'] == 4) {
- //
+ //Посредственная
$ozm[$ko][0] += 10;
$ozm[$ko][1] += 19;
} elseif ($sti['add_ozm'] == 5) {
- //
+ //Великолепная
$ozm[$ko][0] += 70;
$ozm[$ko][1] += 89;
}
@@ -10789,45 +8953,45 @@ LIMIT 1'));
$ozm[$ko][1] += 9;
}
if ($sti['add_oza' . $ko] == 1) {
- //
+ //Слабая
$oza[$ko][0] += 1;
$oza[$ko][1] += 9;
} elseif ($sti['add_oza' . $ko] == 2) {
- //
+ //Нормальная
$oza[$ko][0] += 20;
$oza[$ko][1] += 39;
} elseif ($sti['add_oza' . $ko] == 3) {
- //
+ //Хорошая
$oza[$ko][0] += 40;
$oza[$ko][1] += 69;
} elseif ($sti['add_oza' . $ko] == 4) {
- //
+ //Посредственная
$oza[$ko][0] += 10;
$oza[$ko][1] += 19;
} elseif ($sti['add_oza' . $ko] == 5) {
- //
+ //Великолепная
$oza[$ko][0] += 70;
$oza[$ko][1] += 89;
}
if (isset($sti['add_ozm' . $ko])) {
if ($sti['add_ozm' . $ko] == 1) {
- //
+ //Слабая
$ozm[$ko][0] += 1;
$ozm[$ko][1] += 9;
} elseif ($sti['add_ozm' . $ko] == 2) {
- //
+ //Нормальная
$ozm[$ko][0] += 20;
$ozm[$ko][1] += 39;
} elseif ($sti['add_ozm' . $ko] == 3) {
- //
+ //Хорошая
$ozm[$ko][0] += 40;
$ozm[$ko][1] += 69;
} elseif ($sti['add_ozm' . $ko] == 4) {
- //
+ //Посредственная
$ozm[$ko][0] += 10;
$ozm[$ko][1] += 19;
} elseif ($sti['add_ozm' . $ko] == 5) {
- //
+ //Великолепная
$ozm[$ko][0] += 70;
$ozm[$ko][1] += 89;
}
@@ -10908,13 +9072,13 @@ LIMIT 1'));
$st['zona'] += $sti['zona'];
}
- //
+ //Добавляем статы от данного предмета
if (!isset($sti['restart_stats'])) {
$i = 0;
while ($i < count($ia)) {
if (isset($ia[$i])) {
- // ( )
+ //Действует на (Действует на)
if (isset($sti['add_' . $ia[$i]])) {
if ($ia[$i] != 'zmproc' && $ia[$i] != 'zaproc') {
@@ -10954,13 +9118,13 @@ LIMIT 1'));
}
}
- // -
+ //Сохраненные хар-ки и умения
if (count($reitm) > 0) {
$i39 = [0 => 0, 1 => 0, 2 => 0];
$i = 0;
while ($i < count($reitm)) {
if (isset($reitm[$i]['sm_skill']) && $i39[0] == 0) {
- //
+ //умения
$i9 = 1;
$i39[0] = 1;
while ($i9 <= 7) {
@@ -10969,7 +9133,7 @@ LIMIT 1'));
$i9++;
}
} elseif (isset($reitm[$i]['sm_abil']) && $i39[1] == 0) {
- //
+ //статы
$i9 = 1;
$i39[1] = 1;
while ($i9 <= 12) {
@@ -10977,7 +9141,7 @@ LIMIT 1'));
$i9++;
}
} elseif (isset($reitm[$i]['sm_skill2']) && $i39[2] == 0) {
- //
+ //навыки
$i39[2] = 1;
}
@@ -10985,7 +9149,7 @@ LIMIT 1'));
}
}
- //
+ //Харки от иконок
$efs = mysql_query('SELECT * FROM `users_ico` WHERE `uid`="' . mysql_real_escape_string($u['id']) . '" AND (`endTime` > "' . time() . '" OR `endTime` = 0)');
while ($e = mysql_fetch_array($efs)) {
$sts = $this->lookStats($e['bonus']);
@@ -11010,27 +9174,6 @@ LIMIT 1'));
$i++;
}
}
- /*if( $u['battle'] > 0 ) {
- //
- $cache_items = array(
- 'st' => $st,
- 'sti' => $sti,
- 's_v' => $s_v,
- 's_vi' => $s_vi
- );
- $cache_items = json_encode($cache_items);
- mysql_query('INSERT INTO `battle_cache` (`uid`,`battle`,`data`,`time`) VALUES ("'.$u['id'].'","'.$u['battle'].'","'.mysql_real_escape_string($cache_items).'","'.time().'")');
- unset($cache_items);
- }*/
- } else {
- /*$st = $cache_items['st'];
- unset($cache_items['st']);
- $sti = $cache_items['sti'];
- unset($cache_items['sti']);
- $s_v = $cache_items['s_v'];
- unset($cache_items['s_v']);
- $s_vi = $cache_items['s_vi'];
- unset($cache_items);*/
}
//
@@ -11040,7 +9183,7 @@ LIMIT 1'));
$test_noef = mysql_fetch_array(mysql_query('SELECT `id` FROM `battle_actions` WHERE `uid` = "' . $u['id'] . '" AND `vars` = "noeffectbattle1" AND `btl` = "' . $u['battle'] . '" LIMIT 1'));
}
//}
- //
+ //Характеристики от эффектов
$h = 0;
$nbs = [];
$prsu = [];
@@ -11052,7 +9195,7 @@ LIMIT 1'));
if ($u['dnow'] == 0) {
if ($u['battle'] == 0) {
mysql_query('DELETE FROM `eff_users` WHERE `id_eff` = "' . $e['id_eff'] . '" AND `uid` = "' . $u['id'] . '" AND `id` != "' . $e['id'] . '" ORDER BY `id` ASC');
- //
+ //Переводим в заряды
if ($e['v1'] != 'priem') {
if ($e['hod'] != -1) {
mysql_query('UPDATE `eff_users` SET `hod` = "-1",`timeUse` = "' . (time() + ($e['hod'] * $c['effz']) - $e['actionTime']) . '" WHERE `id` = "' . $e['id'] . '" LIMIT 1');
@@ -11069,12 +9212,7 @@ LIMIT 1'));
}
}
}
- //echo '['.date( 'd.m.Y H:i:s' , time() + round((($e['timeUse']+$e['timeAce']+$e['actionTime'])-time())/$c['effz'])*$c['effz']).']';
- if (true == false && $test_btl_info['noeff'] == 1 && isset($this->ekrcast[$e['id_eff']])) {
- //
- } elseif ($e['sleeptime'] != 0 && substr_count($e['v1'], 'pgb') > 0) {
- //
- } elseif (($e['timeUse'] + $e['timeAce'] + $e['actionTime'] > time() || $e['timeUse'] == 77)) {
+ if (($e['timeUse'] + $e['timeAce'] + $e['actionTime'] > time() || $e['timeUse'] == 77)) {
if ($e['v1'] == 'priem') {
$prsu[$e['v2']] = 0 + $prsu['x'];
}
@@ -11136,7 +9274,7 @@ LIMIT 1'));
$i++;
}
} elseif ($e['timeUse'] != 77) {
- //
+ //удаляем эффект
if ($e['img2'] != 'tz.gif' || $u['id'] == $this->info['id']) {
if ($e['sleeptime'] == 0) {
$this->endEffect($e['id'], $u);
@@ -11149,38 +9287,38 @@ LIMIT 1'));
$st['noeffectbattle1'] = 1;
}
- //
+ //Заглушки от эффектов
//$st['items_img'][$pl_img['type']] = $pl_img_r['id'].'.'.$pl_img_r['format'];
if ($nbs[4899] > 0) {
- //
+ //Зеленый комплект
$st['items_img'][8] = 'robe_illusion4.gif';
$st['items_img'][11] = 'leg_illusion4.gif';
} elseif ($nbs[4900] > 0) {
- //
+ //Золото комплект
$st['items_img'][8] = 'robe_illusion5.gif';
$st['items_img'][11] = 'leg_illusion5.gif';
} elseif ($nbs[4901] > 0) {
- //
+ //Голубой комплект
$st['items_img'][8] = 'robe_illusion3.gif';
$st['items_img'][11] = 'leg_illusion3.gif';
} elseif ($nbs[4902] > 0) {
- //
+ //Синий комплект
$st['items_img'][8] = 'robe_illusion6.gif';
$st['items_img'][11] = 'leg_illusion6.gif';
} elseif ($nbs[4903] > 0) {
- //
+ //Желтый комплект
$st['items_img'][8] = 'robe_illusion8.gif';
$st['items_img'][11] = 'leg_illusion8.gif';
} elseif ($nbs[4904] > 0) {
- //
+ //Сиреневое платье
$st['items_img'][8] = 'robe_illusion7.gif';
$st['items_img'][11] = 'leg_illusion7.gif';
} elseif ($nbs[4905] > 0) {
- //
+ //Оранжевое платье
$st['items_img'][8] = 'robe_illusion9.gif';
$st['items_img'][11] = 'leg_illusion9.gif';
} elseif ($nbs[4908] > 0) {
- //
+ //Набор Темной Одежды
$st['items_img'][8] = 'robe_illusion2.gif';
$st['items_img'][11] = 'leg_illusion2.gif';
$st['items_img'][10] = 'boots_illusion2.gif';
@@ -11189,7 +9327,7 @@ LIMIT 1'));
$st['items_img'][4] = 'helmet_illusion2.gif';
$st['items_img'][12] = 'perchi_illusion2.gif';
} elseif ($nbs[4906] > 0) {
- //
+ //Набор Бриллиантовой Одежды
$st['items_img'][8] = 'robe_illusion1.gif';
$st['items_img'][11] = 'leg_illusion1.gif';
$st['items_img'][10] = 'boots_illusion1.gif';
@@ -11199,14 +9337,14 @@ LIMIT 1'));
$st['items_img'][12] = 'perchi_illusion1.gif';
}
if ($nbs[4909] > 0) {
- //
+ //Набор Золотых украшений
$st['items_img'][13] = 'ring_illusion2.gif';
$st['items_img'][17] = 'ring_illusion2.gif';
$st['items_img'][18] = 'ring_illusion2.gif';
$st['items_img'][14] = 'amulet_illusion2.gif';
$st['items_img'][15] = 'earrings_illusion2.gif';
} elseif ($nbs[4907] > 0) {
- //
+ //Набор Золотых украшений
$st['items_img'][13] = 'ring_illusion1.gif';
$st['items_img'][17] = 'ring_illusion1.gif';
$st['items_img'][18] = 'ring_illusion1.gif';
@@ -11215,7 +9353,7 @@ LIMIT 1'));
}
if ($itmslvl < 5) {
- //
+ //Эффект ослабления
$st['itmslvl'] = 0;
} else {
$st['itmslvl'] = 1;
@@ -11226,7 +9364,7 @@ LIMIT 1'));
unset($test_btl_info);
if ($u['battle'] > 0) {
- //
+ //Характеристики от приемов
$efs = mysql_query('SELECT `eu`.`id`,`eu`.`id_eff`,`eu`.`uid`,`eu`.`name`,`eu`.`data`,`eu`.`overType`,`eu`.`timeUse`,`eu`.`timeAce`,`eu`.`user_use`,`eu`.`tr_life_user`,`eu`.`delete`,`eu`.`v1`,`eu`.`v2`,`eu`.`img2`,`eu`.`x`,`eu`.`hod`,`eu`.`bj`,`eu`.`sleeptime`,`eu`.`no_Ace` FROM `eff_users` AS `eu` WHERE `eu`.`uid`="' . mysql_real_escape_string($u['id']) . '" AND `eu`.`delete`="0" AND `eu`.`deactiveTime` < "' . time() . '" AND `eu`.`v1` = "priem" ORDER BY `eu`.`id` ASC');
$st['set_pog'] = [];
$st['set_pog2'] = [];
@@ -11315,90 +9453,45 @@ LIMIT 1'));
$i++;
}
} elseif ($e['timeUse'] != 77) {
- //
+ //удаляем эффект
$this->endEffect($e['id'], $u);
$st['act'] = 1;
}
}
}
- //
- /*$bl = mysql_fetch_array(mysql_query('SELECT `id`,`level` FROM `users_paybonus` WHERE `id` = "'.$u['id'].'" LIMIT 1'));
- $st['pbe'] = 0+$bl['level'];
- if( $st['pbe'] > 1000 ) {
- $st['pbe'] = 1000;
- }
- unset($bl);*/
-
- //
- /*
- if( $st['clanpos'] > 0 ) {
- if( $st['clanpos'] == 1 ) {
- $st['s1'] += 5;
- $st['s2'] += 5;
- $st['s3'] += 5;
- $st['s4'] += 0;
- $st['s5'] += 5;
- $st['s6'] += 0;
- $st['m10'] += 10;
- $st['m11'] += 10;
- }elseif( $st['clanpos'] == 2 ) {
- $st['s1'] += 3;
- $st['s2'] += 3;
- $st['s3'] += 3;
- $st['s4'] += 0;
- $st['s5'] += 3;
- $st['s6'] += 0;
- $st['m10'] += 5;
- $st['m11'] += 5;
- }elseif( $st['clanpos'] == 3 ) {
- $st['s1'] += 1;
- $st['s2'] += 1;
- $st['s3'] += 1;
- $st['s4'] += 0;
- $st['s5'] += 1;
- $st['s6'] += 0;
- $st['m10'] += 3;
- $st['m11'] += 3;
- }
- }*/
-
- //
+ //Характеристики от статов
if (!isset($st['hpAll'])) {
$st['hpAll'] = 0;
}
$st['hpAll'] += $st['s4'] * 5;
- //$st['enAll'] += 10;
- //$st['enAll'] += floor($st['s11']*10);
- //$st['enAll'] += round($st['s4']*0.09);
-
if (!isset($st['mpAll'])) {
$st['mpAll'] = 0;
}
@$st['mpAll'] += @$st['s6'] * 10;
- //
+ //Турнир
if (!isset($st['m1'])) {
$st['m1'] = 0;
}
$st['m1'] += $st['s3'] * 5;
- // .- = 2.5
+ // мф.анти-крит = 2.5
if (!isset($st['m2'])) {
$st['m2'] = 0;
}
$st['m2'] += $st['s3'] * 5;
- // . = 2.5
+ // мф.уворот = 2.5
if (!isset($st['m4'])) {
$st['m4'] = 0;
}
$st['m4'] += $st['s2'] * 5;
- // .- = 2.5
+ // мф.анти-уворот = 2.5
if (!isset($st['m5'])) {
$st['m5'] = 0;
}
@@ -11414,27 +9507,7 @@ LIMIT 1'));
}
$st['zm'] += $st['s4'] * 1.0;
- /*if(!isset($st['pa1'])) {
- $st['pa1'] = 0;
- }
- $st['pa1'] += $st['s2']*0.1;
-
- if(!isset($st['pa4'])) {
- $st['pa4'] = 0;
- }
- $st['pa4'] += $st['s3']*0.1;
-
- if(!isset($st['pa3'])) {
- $st['pa3'] = 0;
- }
- $st['pa3'] += $st['s4']*0.1;
-
- if(!isset($st['pa2'])) {
- $st['pa2'] = 0;
- }
- $st['pa2'] += $st['s1']*0.1;*/
-
- if (!isset($st['zaproc'])) { // 'zaproc'=>' (%)','zmproc'=>' (%)
+ if (!isset($st['zaproc'])) { //Тут зм 'zaproc'=>'Защита от урона (%)','zmproc'=>'Защита от магии стихий (%)
$st['zaproc'] = 0;
}
$st['zaproc'] += round($st['s5'] * 0);
@@ -11444,8 +9517,8 @@ LIMIT 1'));
}
$st['m19'] += round($st['s3'] * 0.03);
- //
- // " . ".
+ //Мощности
+ //Мощность против "Мощность крит. урона". Гамс
if (!isset($st['antm3'])) {
$st['antm3'] = 0;
}
@@ -11473,15 +9546,15 @@ LIMIT 1'));
}
$st['m8'] += 0;
- //
+ //Бонусы комплектов
$i = 0;
while ($i <= count(@$coms['new'])) {
if (@isset($coms['new'][$i])) {
- //$coms[$i]['id'] - id , $j - -
+ //$coms[$i]['id'] - id комплекта, $j - кол-во предметов данного комплекта
$j = @$coms['com'][$coms['new'][$i]];
$com = mysql_fetch_array(mysql_query('SELECT `id`,`com`,`name`,`x`,`data` FROM `complects` WHERE `com` = "' . ((int)$coms['new'][$i]) . '" AND `x` <= ' . ((int)$j) . ' ORDER BY `x` DESC LIMIT 1'));
if (isset($com['id'])) {
- //
+ //добавляем действия комплекта
$ij = 0;
$sti = $this->lookStats($com['data']);
while ($ij < count($ia)) {
@@ -11495,10 +9568,10 @@ LIMIT 1'));
$i++;
}
- //
- //
+ //Бонусы статов
+ //Замена свитков
if ($u['autospell'] != '' && $u['autospell'] != 0 && $u['battle'] == 0) {
- //
+ //проверяем свитки
$splink = '';
$spi = mysql_query('SELECT `id`,`item_id`,`inOdet` FROM `items_users` WHERE `inOdet` >= 40 AND `inOdet` <= 50 AND `uid` = "' . $u['id'] . '" AND `delete` = 0 ORDER BY `item_id` DESC LIMIT 20');
while ($pli = mysql_fetch_array($spi)) {
@@ -11506,13 +9579,13 @@ LIMIT 1'));
}
$splink = rtrim($splink, ',');
- //
+ //Запоминаем новый комплект свитков
if ($u['autospell'] == 1) {
$u['autospell'] = $splink;
mysql_query('UPDATE `users` SET `autospell` = "' . $splink . '" WHERE `id` = "' . $u['id'] . '" LIMIT 1');
}
- // ,
+ //Выдаем нужный свиток, если он есть в инвентаре
if ($u['autospell'] != $splink) {
$spe1 = explode(',', $splink);
$spe2 = explode(',', $u['autospell']);
@@ -11546,16 +9619,9 @@ LIMIT 1'));
}
- //
- //
- //
- /*if($st['s1']>24 && $st['s1']<50){ $st['m10'] += 5; }
- if($st['s1']>49 && $st['s1']<75){ $st['m10'] += 10; }
- if($st['s1']>74 && $st['s1']<100){ $st['m10'] += 17; }
- if($st['s1']>99 && $st['s1']<125){ $st['m10'] += 25; }
- if($st['s1']>124 && $st['s1']<150){ $st['m10'] += 25; $st['minAtack'] += 10; $st['maxAtack'] += 10; }
- if($st['s1']>149 && $st['s1']<175){ $st['m10'] += 30; $st['minAtack'] += 10; $st['maxAtack'] += 10; }
- if($st['s1']>174){ $st['m10'] += 30; $st['minAtack'] += 15; $st['maxAtack'] += 15; }*/
+ //Бонусы статов
+ //ТУТ
+ //сила
if ($st['s1'] > 24 && $st['s1'] < 50) {
$st['m2'] += 15;
@@ -11589,14 +9655,7 @@ LIMIT 1'));
$st['m7'] += 7;
}
- // $st[1]['pa1'] += 2; $st['m7'] += 35;
- /*if($st['s2']>24 && $st['s2']<50){ $st[1]['pa1'] += 2; }
- if($st['s2']>49 && $st['s2']<75){ $st['m7'] += 5; $st['m4'] += 35; $st['m2'] += 15; }
- if($st['s2']>74 && $st['s2']<100){ $st['m7'] += 15; $st['m4'] += 35; $st['m2'] += 15; }
- if($st['s2']>99 && $st['s2']<125){ $st['m7'] += 15; $st['m4'] += 105; $st['m2'] += 40; }
- if($st['s2']>124 && $st['s2']<150) { $st['m7'] += 15; $st['m4'] += 105; $st['m2'] += 40; $st['m15'] += 5; }
- if($st['s2']>149 && $st['s2']<175){ $st['m7'] += 20; $st['m4'] += 115; $st['m2'] += 40; $st['m15'] += 5; }
- if($st['s2']>174){ $st['m7'] += 20; $st['m4'] += 120; $st['m2'] += 50; $st['m15'] += 7; }*/
+ //ловкость $st[1]['pa1'] += 2; $st['m7'] += 35;
if ($st['s2'] > 24 && $st['s2'] < 50) {
$st['pa1'] += 2;
@@ -11642,14 +9701,8 @@ LIMIT 1'));
$st['m15'] += 5;
}
- //
- /*if($st['s3']>24 && $st['s3']<50){ $st['m3'] += 10; }
- if($st['s3']>49 && $st['s3']<75){ $st['m3'] += 10; $st['m1'] += 35; $st['m5'] += 15; }
- if($st['s3']>74 && $st['s3']<100){ $st['m3'] += 25; $st['m1'] += 35; $st['m5'] += 15; }
- if($st['s3']>99 && $st['s3']<125){ $st['m3'] += 25; $st['m1'] += 105; $st['m5'] += 45; }
- if($st['s3']>124 && $st['s3']<150){ $st['m3'] += 25; $st['m1'] += 105; $st['m5'] += 45; $st['m14'] += 5; }
- if($st['s3']>149 && $st['s3']<175){ $st['m3'] += 30; $st['m1'] += 105; $st['m5'] += 45; $st['m14'] += 5; }
- if($st['s3']>174){ $st['m3'] += 30; $st['m1'] += 120; $st['m5'] += 45; $st['m14'] += 7; }*/
+ //интуиция
+
if ($st['s3'] > 24 && $st['s3'] < 50) {
$st['pa4'] += 2;
$st['m3'] += 2;
@@ -11701,15 +9754,8 @@ LIMIT 1'));
$st['m14'] += 5;
}
- //
- /*if($st['s4']>0){ $st['hpAll'] += 30; }
- if($st['s4']>24 && $st['s4']<50){ $st['hpAll'] += 50; }
- if($st['s4']>49 && $st['s4']<75){ $st['hpAll'] += 100; }
- if($st['s4']>74 && $st['s4']<100){ $st['hpAll'] += 175; }
- if($st['s4']>99 && $st['s4']<125){ $st['hpAll'] += 250; }
- if($st['s4']>124 && $st['s4']<150){ $st['hpAll'] += 250; $st['za'] += 25; }
- if($st['s4']>149 && $st['s4']<175){ $st['hpAll'] += 350; $st['za'] += 50; }
- if($st['s4']>174){ $st['hpAll'] += 400; $st['za'] += 100; }*/
+ //выносливость
+
if ($st['s4'] > 0) {
$st['hpAll'] += 30;
}
@@ -11747,14 +9793,8 @@ LIMIT 1'));
$st['za'] += 125;
$st['zm'] += 125;
}
- //
- /*if($st['s5']>24 && $st['s5']<50){ $st['m11'] += 5; }
- if($st['s5']>49 && $st['s5']<75){ $st['m11'] += 10; }
- if($st['s5']>74 && $st['s5']<100){ $st['m11'] += 17; }
- if($st['s5']>99 && $st['s5']<125){ $st['m11'] += 25; }
- if($st['s5']>124 && $st['s5']<150){ $st['m11'] += 35; }
- if($st['s5']>149 && $st['s5']<175){ $st['m11'] += 45; }
- if($st['s5']>174){ $st['m11'] += 60; }*/
+ //интелект
+
if ($st['s5'] > 24 && $st['s5'] < 50) {
$st['m11'] += 10;
}
@@ -11780,14 +9820,8 @@ LIMIT 1'));
if ($st['s5'] > 199) {
$st['pzm'] += 5;
}
- //
- /*if($st['s6']>24 && $st['s6']<50){ $st['mpAll'] += 50; $st['speedmp'] +=100; }
- if($st['s6']>49 && $st['s6']<75){ $st['mpAll'] += 100; $st['speedmp'] +=200; }
- if($st['s6']>74 && $st['s6']<100){ $st['mpAll'] += 175; $st['speedmp'] += 350; }
- if($st['s6']>99 && $st['s6']<125){ $st['mpAll'] += 250; $st['speedmp'] += 500; }
- if($st['s6']>124 && $st['s6']<150) { $st['mpAll'] += 250; $st['speedmp'] += 500; $st['pzm'] += 3; }
- if($st['s6']>149 && $st['s6']<175){ $st['mpAll'] += 300; $st['speedmp'] += 600; $st['pzm'] += 3; }
- if($st['s6']>174){ $st['mpAll'] += 450; $st['speedmp'] += 700; $st['pzm'] += 5; }*/
+ //мудрость
+
if ($st['s6'] > 24 && $st['s6'] < 50) {
$st['mpAll'] += 150;
$st['speedmp'] += 100;
@@ -11825,7 +9859,7 @@ LIMIT 1'));
$st['pzm'] += 7;
}
- //
+ //если второе оружие одето
if ($hnd2 == 1 && $hnd1 == 1) {
$st['zona']++;
}
@@ -11834,10 +9868,7 @@ LIMIT 1'));
$st['zonb']++;
}
- //$st['speedhp'] += $st['pbe'];
- //$st['speedmp'] += $st['pbe'];
-
- /* */
+ /* Владения */
$i = 1;
while ($i <= 7) {
if (!isset($st['pm' . $i])) {
@@ -11907,23 +9938,23 @@ LIMIT 1'));
$i++;
}
- //
+ //Уязвимость оружие и магиям
$i = 1;
while ($i <= 7) {
@$st['yzm' . $i] += @$st['yzma'];
if ($i <= 4) {
- @$st['yzm' . $i] += @$st['yzm'];//
- @$st['yza' . $i] += @$st['yza']; //
+ @$st['yzm' . $i] += @$st['yzm'];//стихийный урон только
+ @$st['yza' . $i] += @$st['yza']; //урон оружия
}
- //
+ //Отнимает от защиты от урона
if (isset($st['yza' . $i]) && $i <= 4) {
$st['za' . $i] = ($st['za' . $i] / 100 * (100 + ($st['yza' . $i])));
if ($st['za' . $i] < 0) {
$st['za' . $i] = 0;
}
}
- //
+ //Отнимает от защиты от магии
if (isset($st['yzm' . $i])) {
$st['zm' . $i] = ($st['zm' . $i] / 100 * (100 + ($st['yzm' . $i])));
if ($st['zm' . $i] < 0) {
@@ -11950,13 +9981,10 @@ LIMIT 1'));
$st['mpAll'] += round($st['mpAll'] / 100 * $st['mpProc']);
}
- //. - 250 .
- /*if( $u['level'] > 7 ) {
- $st['speedhp'] -= 240;
- $st['speedmp'] -= 240;
- }*/
+ //Реген. - 250 ед.
- //
+
+ //конец бонусов
if ($st['hpNow'] < 0) {
$st['hpNow'] = 0;
} elseif ($st['hpNow'] > $st['hpAll']) {
@@ -11968,7 +9996,7 @@ LIMIT 1'));
$st['mpNow'] = $st['mpAll'];
}
- //
+ //зоны блока и удара
if ($st['zona'] < 1) {
$st['zona'] = 1;
}
@@ -11996,62 +10024,6 @@ LIMIT 1'));
$st['y'] = $u['y'];
$st['s'] = $u['s'];
- //
- /*$st['reting'] = 0;
- //
- $st['reting'] += $st['hpAll'];
- $st['reting'] += $st['mpAll'];
- //
- $st['reting'] += $st['m1'];
- $st['reting'] += $st['m2'];
- $st['reting'] += $st['m4'];
- $st['reting'] += $st['m5'];
- //
- $st['reting'] += $st['m6']*10;
- $st['reting'] += $st['m7']*10;
- $st['reting'] += $st['m8']*10;
- $st['reting'] += $st['m9']*10;
- //
- $st['reting'] += $st['a1']*7;
- $st['reting'] += $st['a2']*7;
- $st['reting'] += $st['a3']*7;
- $st['reting'] += $st['a4']*7;
- $st['reting'] += $st['a5']*7;
- $st['reting'] += $st['a6']*7;
- $st['reting'] += $st['a7']*7;
- //
- $st['reting'] += $st['mg1']*7;
- $st['reting'] += $st['mg2']*7;
- $st['reting'] += $st['mg3']*7;
- $st['reting'] += $st['mg4']*7;
- $st['reting'] += $st['mg5']*7;
- $st['reting'] += $st['mg6']*7;
- $st['reting'] += $st['mg7']*7;
- //
- $st['reting'] += $st['m3']*5;
- $i8 = 1;
- $st['reting'] += $st['za']*5;
- $st['reting'] += $st['zm']*5;
- //
- $st['reting'] += $st['s5']*5;
- $st['reting'] += $st['s6']*5;
- //
- while( $i8 < 8 ) {
- $st['reting'] += $st['pa'.$i]*5;
- $st['reting'] += $st['pm'.$i]*5;
- //
- $st['reting'] += $st['za'.$i]*10;
- $st['reting'] += $st['zm'.$i]*10;
- $i8++;
- }
- //
- $i8 = 1;
- while( $i8 < 5 ) {
- $st['reting'] += $st['mib'.$i];
- $st['reting'] += $st['mab'.$i];
- $i8++;
- }*/
-
$st['reting'] = 1 + ceil($st['reting']);
$st['reting'] = 1 + $st['irka'];
@@ -12063,7 +10035,7 @@ LIMIT 1'));
$st['pzm'] += 5;
}
- //
+ //Бонус от медалей
$rep1 = mysql_fetch_array(mysql_query('SELECT
`add_slot`,`nu_sandcity`,`n_sandcity`,
`dl1`,`id`,`rep1`,`rep2`,`repcapitalcity`,`repdemonscity`,`repangelscity`,`repabandonedplain`,
@@ -12084,49 +10056,49 @@ LIMIT 1'));
$st['hpAll'] += 250;
}
- //
+ //Водосток
if ($rep1['repdreamscity'] >= 24999) {
$st['m10'] += 10;
$st['pzm'] += 1;
}
- //
+ //излом
if ($rep1['repizlom'] == 9999) {
$st['m10'] += 10;
$st['pzm'] += 1;
}
- //
+ //Бездна
if ($rep1['repangelscity'] == 25000) {
$st['m10'] += 10;
$st['pzm'] += 1;
}
- //
+ //Катакомбы
if ($rep1['repdemonscity'] == 25000) {
$st['m10'] += 10;
$st['pzm'] += 1;
}
- //
+ //Грибница
if ($rep1['repdemonscity'] == 25000) {
$st['m10'] += 10;
$st['pzm'] += 1;
}
- //
+ //Пещера тысячи проклятий
if ($rep1['repcapitalcity'] == 25000) {
$st['m10'] += 10;
$st['pzm'] += 1;
}
- //
+ //Санд
if ($rep1['repsandcity'] == 25000) {
$st['m10'] += 10;
$st['pzm'] += 1;
}
- //
+ //Гора легиона
if ($rep1['repabandonedplain'] == 24999) {
$st['m10'] += 10;
$st['pzm'] += 1;
}
- //
+ //Добавочный подьем для игроков
$st['maxves'] += 500;
if ($st['silver'] >= 5) {
@@ -12137,21 +10109,14 @@ LIMIT 1'));
$st['speed_dungeon'] += 1000;
$st['speedhp'] += 1000000000000000;
}
- /*if( date('H') >= 22 && date('H') <= 24 ) {
- if($u['room']==9 && $u['room']==323 && $u['room']==1) {
- $st['exp'] +=150;
- }
- }else*/
+
if (date('H') >= 22 && date('H') <= 10) {
$st['exp'] += 25;
}
- //
+ //Сохраняем рейтинг игрока
$st['reting'] = floor($st['reting']);
- //if(@$st['btl_cof'] != @$st['reting']) {
- //$st['btl_cof'] = $st['reting'];
- //mysql_query('UPDATE `stats` SET `btl_cof` = "'.$st['reting'].'" WHERE `id` = "'.$st['id'].'" LIMIT 1');
- //}
+
if (@$st['btl_cof'] != @$st['prckr']) {
$st['btl_cof'] = $st['prckr'];
mysql_query('UPDATE `stats` SET `btl_cof` = "' . $st['prckr'] . '" WHERE `id` = "' . $st['id'] . '" LIMIT 1');
@@ -12166,14 +10131,14 @@ LIMIT 1'));
}
if ($u['room'] == 411) {
- //, -25%
+ //Хоккей, эффект от шайбы -25% НР
$shb = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `uid` = "' . $u['id'] . '" AND `item_id` = 4910 AND `delete` = 0 LIMIT 1'));
if (isset($shb['id'])) {
$st['hpAll'] = round($st['hpAll'] / 100 * 75);
}
}
- if (stristr($u['login'], '( ') == true || (stristr($u['login'], ' ') && $u['ip'] == '0')) {
+ if (stristr($u['login'], '(зверь ') == true || (stristr($u['login'], 'Каменный страж') && $u['ip'] == '0')) {
$st['this_animal'] = 1;
} else {
$st['this_animal'] = 0;
@@ -12182,7 +10147,7 @@ LIMIT 1'));
$rt = [];
if ($i1 == 1) {
$rt[0] = $st;
- $rt[1] = $st2; //
+ $rt[1] = $st2; //родные статы
} else {
$rt = $st;
}
@@ -12220,7 +10185,7 @@ LIMIT 1'));
return $msg_id;
}
- //
+ //получаем уровень
public function testLevel()
{
global $c;
@@ -12253,17 +10218,17 @@ LIMIT 1'));
if ($this->info['exp'] >= $telvl[$this->info['upLevel']]) {
$lvl = mysql_fetch_array(mysql_query('SELECT `duh`,`vinos`,`bprice`,`upLevel`,`nextLevel`,`exp`,`money`,`money_bonus1`,`money_bonus2`,`ability`,`skills`,`nskills`,`sskills`,`expBtlMax`,`hpRegen`,`mpRegen`,`money2` FROM `levels` WHERE `upLevel`="' . $this->info['upLevel'] . '" LIMIT 1'));
$lvln = mysql_fetch_array(mysql_query('SELECT `duh`,`vinos`,`bprice`,`upLevel`,`nextLevel`,`exp`,`money`,`money_bonus1`,`money_bonus2`,`ability`,`skills`,`nskills`,`sskills`,`expBtlMax`,`hpRegen`,`mpRegen`,`money2` FROM `levels` WHERE `upLevel`="' . ($lvl['upLevel'] + 1) . '" LIMIT 1'));
- //
+ //Кристал вечности
if ($this->info['exp'] > 12499 && $this->info['level'] <= 5 && $c['infinity5level'] == true) {
$itm = mysql_fetch_array(mysql_query('SELECT `id`,`item_id`,`1price`,`2price`,`3price`,`uid`,`use_text`,`data`,`inOdet`,`inShop`,`delete`,`iznosNOW`,`iznosMAX`,`gift`,`gtxt1`,`gtxt2`,`kolvo`,`geniration`,`magic_inc`,`maidin`,`lastUPD`,`timeOver`,`overType`,`secret_id`,`time_create`,`inGroup`,`dn_delete`,`inTransfer`,`post_delivery`,`lbtl_`,`bexp`,`so`,`blvl` FROM `items_users` WHERE `item_id` = "1204" AND `delete` = "0" AND `uid` = "' . $this->info['id'] . '" AND `inShop` = "0" AND `inTransfer` = "0" LIMIT 1'));
if (!isset($itm['id']) && $this->info['host_reg'] != 'noinfinity5' && $this->info['twink'] == 0) {
$this->info['exp'] = 12499;
mysql_query('UPDATE `stats` SET `exp` = "12499" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
- echo '';
+ echo '';
} else {
mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $itm['id'] . '" LIMIT 1');
- $text = ' "
[6]" .';
+ $text = 'Предмет "
Кристалл Вечности [6]" был успешно использован.';
echo '';
//mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1',".$this->info['city']."','".$this->info['room']."','','".$this->info['login']."','".$text."','".time()."','6','0')");
}
@@ -12276,30 +10241,17 @@ LIMIT 1'));
while ($i != 1) {
if ($c['nolevel'] == true && $this->info['exp'] >= $lvl['exp'] && isset($lvln['upLevel'])) {
$tlus = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `users` WHERE `real` = 1 AND `level` = "' . $this->info['level'] . '" LIMIT 1'));
- // , $lvln
+ //берем апп или уровень, $lvln
if ($tlus[0] < $this->info['level'] * 5) {
- // / 100
+ //Нельзя получать лвл/аппы пока не будет 100 персонажей текущего уровня
$this->info['exp'] = $lvl['exp'] - 1;
mysql_query('UPDATE `stats` SET `exp` = "' . $this->info['exp'] . '" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
}
}
if ($this->info['exp'] >= $lvl['exp'] && isset($lvln['upLevel'])) {
if ($lvl['nextLevel'] > $this->info['level']) {
- /*
- if($lvl['nextLevel']==9){
- $this->addItem(5021,$this->info['id'],'|sudba='.$this->info['login']);
- }
- if($lvl['nextLevel']==10){
- $this->addItem(5022,$this->info['id'],'|sudba='.$this->info['login']);
- }
- if($lvl['nextLevel']==11){
- $this->addItem(5023,$this->info['id'],'|sudba='.$this->info['login']);
- }
- if($lvl['nextLevel']==12){
- $this->addItem(5023,$this->info['id'],'|sudba='.$this->info['login']);
- $this->addItem(5023,$this->info['id'],'|sudba='.$this->info['login']);
- }*/
- //
+
+ //повышаем выносливость
$a4 = 1;
if ($lvl['nextLevel'] == 9) {
$a4 = 2;
@@ -12314,12 +10266,12 @@ LIMIT 1'));
$this->stats['s4'] += $a4;
$sex1 = '';
if ($this->info['sex'] == 1) {
- $sex1 = '';
+ $sex1 = 'ла';
}
$ult = 1;
- //
+ //Рефералы
if ($this->info['twink'] == 0 && (round($this->info['host_reg']) > 0 && ($this->info['dieline'] == 0 || $this->info['dieline'] < $lvl['exp']))) {
$mtest = mysql_fetch_array(mysql_query('SELECT `id`,`uid`,`uid2`,`ip` FROM `mults` WHERE (`uid` = "' . $this->info['id'] . '" AND `uid2` = "' . ((int)$this->info['host_reg']) . '") OR (`uid2` = "' . $this->info['id'] . '" AND `uid` = "' . ((int)$this->info['host_reg']) . '") LIMIT 1'));
$rlog = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`catch`,`host_reg` FROM `users` WHERE `id` = "' . ((int)$this->info['host_reg']) . '" LIMIT 1'));
@@ -12353,23 +10305,23 @@ LIMIT 1'));
$up = mysql_query('UPDATE `users` SET `money` = `money` + ' . $kr . ',`money2` = `money2` + ' . $ekr . ' WHERE `id` = "' . mysql_real_escape_string($rlog['id']) . '" LIMIT 1');
if ($up) {
- // 1-
+ //Реферал 1-го уровня
$krtxt = '';
if ($kr > 0) {
- $krtxt .= '' . $kr . ' ';
+ $krtxt .= '' . $kr . ' КР';
if ($ekr > 0) {
$krtxt .= ', ';
}
}
if ($ekr > 0) {
- $krtxt .= '' . $ekr . ' ';
+ $krtxt .= '' . $ekr . ' ЕКР';
}
- $this->send('', $this->info['room'], $this->info['city'], '', $rlog['login'], '
' . $this->info['login'] . ' ' . $sex1 . ' ' . $lvl['nextLevel'] . '! ' . $krtxt, -1, 6, 0, 0, 0, 1);
+ $this->send('', $this->info['room'], $this->info['city'], '', $rlog['login'], 'Ваш реферал
' . $this->info['login'] . ' достиг' . $sex1 . ' уровня ' . $lvl['nextLevel'] . '! Вам зачисленно ' . $krtxt, -1, 6, 0, 0, 0, 1);
$rlog['catch'] += $bn['add_bank'];
mysql_query('UPDATE `users` SET `catch` = "' . $rlog['catch'] . '" WHERE `id` = "' . $rlog['id'] . '" LIMIT 1');
//
if ((int)$rlog['host_reg'] > 0) {
- // 2-
+ //Реферал 2-го уровня
$llogin = $rlog['login'];
$ekr = round($bn['add_bank'] * 0.4, 2);
$kr = round($bn['add_money'] * 0.4, 2);
@@ -12377,20 +10329,20 @@ LIMIT 1'));
if (isset($rlog['id'])) {
$krtxt = '';
if ($kr > 0) {
- $krtxt .= '' . $kr . ' ';
+ $krtxt .= '' . $kr . ' КР';
if ($ekr > 0) {
$krtxt .= ', ';
}
}
if ($ekr > 0) {
- $krtxt .= '' . $ekr . ' ';
+ $krtxt .= '' . $ekr . ' ЕКР';
}
- $this->send('', $this->info['room'], $this->info['city'], '', $rlog['login'], '
' . $this->info['login'] . ' (2- "' . $llogin . '" ) ' . $sex1 . ' ' . $lvl['nextLevel'] . '! ' . $krtxt, -1, 6, 0, 0, 0, 1);
+ $this->send('', $this->info['room'], $this->info['city'], '', $rlog['login'], 'Ваш реферал
' . $this->info['login'] . ' (2-го уровня от "' . $llogin . '" ) достиг' . $sex1 . ' уровня ' . $lvl['nextLevel'] . '! Вам зачисленно ' . $krtxt, -1, 6, 0, 0, 0, 1);
$rlog['catch'] += $bn['add_bank'];
mysql_query('UPDATE `users` SET `money` = `money` + ' . $kr . ',`money2` = `money2` + ' . $ekr . ' WHERE `id` = "' . $rlog['id'] . '" LIMIT 1');
//
if ((int)$rlog['host_reg'] > 0) {
- // 3-
+ //Реферал 3-го уровня
$llogin2 = $rlog['login'];
$ekr = round($bn['add_bank'] * 0.2, 2);
$kr = round($bn['add_money'] * 0.2, 2);
@@ -12398,15 +10350,15 @@ LIMIT 1'));
if (isset($rlog['id'])) {
$krtxt = '';
if ($kr > 0) {
- $krtxt .= '' . $kr . ' ';
+ $krtxt .= '' . $kr . ' КР';
if ($ekr > 0) {
$krtxt .= ', ';
}
}
if ($ekr > 0) {
- $krtxt .= '' . $ekr . ' ';
+ $krtxt .= '' . $ekr . ' ЕКР';
}
- $this->send('', $this->info['room'], $this->info['city'], '', $rlog['login'], '
' . $this->info['login'] . ' (3- "' . $llogin2 . '" ( ' . $llogin . ') ) ' . $sex1 . ' ' . $lvl['nextLevel'] . '! ' . $krtxt, -1, 6, 0, 0, 0, 1);
+ $this->send('', $this->info['room'], $this->info['city'], '', $rlog['login'], 'Ваш реферал
' . $this->info['login'] . ' (3-го уровня от "' . $llogin2 . '" (Реферал ' . $llogin . ') ) достиг' . $sex1 . ' уровня ' . $lvl['nextLevel'] . '! Вам зачисленно ' . $krtxt, -1, 6, 0, 0, 0, 1);
$rlog['catch'] += $bn['add_bank'];
mysql_query('UPDATE `users` SET `money` = `money` + ' . $kr . ',`money2` = `money2` + ' . $ekr . ' WHERE `id` = "' . $rlog['id'] . '" LIMIT 1');
//
@@ -12417,32 +10369,18 @@ LIMIT 1'));
}
} else {
- $this->send('', $this->info['room'], $this->info['city'], '', $rlog['login'], '
' . $this->info['login'] . ' ' . $sex1 . ' ' . $lvl['nextLevel'] . '! ( , ) ' . $bnk . ' ' . $ekr . ' .', -1, 6, 0, 0, 0, 1);
+ $this->send('', $this->info['room'], $this->info['city'], '', $rlog['login'], 'Ваш реферал
' . $this->info['login'] . ' достиг' . $sex1 . ' уровня ' . $lvl['nextLevel'] . '! (Ошибка зачисления, обратитесь с Администрации проекта) На Ваш банковский счет №' . $bnk . ' зачисленно ' . $ekr . ' кр.', -1, 6, 0, 0, 0, 1);
}
}
//
mysql_query("UPDATE `users` SET `referals` = `referals` + 5 WHERE `id` = '" . mysql_real_escape_string($rlog['id']) . "' LIMIT 1");
//
} elseif (isset($rlog['id'])) {
- $this->send('', $this->info['room'], $this->info['city'], '', $rlog['login'], '
' . $this->info['login'] . ' ' . $sex1 . ' ' . $lvl['nextLevel'] . '!
( , IP! 1 !)', -1, 6, 0, 0, 0, 1);
+ $this->send('', $this->info['room'], $this->info['city'], '', $rlog['login'], 'Ваш реферал
' . $this->info['login'] . ' достиг' . $sex1 . ' уровня ' . $lvl['nextLevel'] . '!
(Персонаж не активирован, либо у вас совпадают IP! Разрешено не более 1 такого реферала!)', -1, 6, 0, 0, 0, 1);
}
}
-
-
- /*
- $tst = $this->lookStats($this->info['stats']);
- $tst['s4'] += $a4;
- $tst['s7'] += $lvl['duh'];
- $this->info['stats'] = $this->impStats($tst);
- */
}
- /*if( $this->info['twink'] == 0 ) {
- if( $this->info['exp'] >= 300000 ) {
- $this->send('',$this->info['room'],$this->info['city'],'',$this->info['login'],' /, :
'.$lvl['money'].' .',-1,6,0,0,0,1);
- }
- }*/
-
$tst = $this->lookStats($this->info['stats']);
$tst['s4'] += $lvl['vinos'];
$tst['s7'] += $lvl['duh'];
@@ -12455,10 +10393,6 @@ LIMIT 1'));
$this->info['sskills'] += $lvl['sskills'];
$this->info['nskills'] += $lvl['nskills'];
if ($this->info['twink'] == 0) {
- //if( $this->info['level'] < 8 ) {
- // 0-7
- //$this->info['money4'] = $lvl['money']+$this->info['money4'];
- //}else{
$this->info['money'] = $lvl['money'] + $this->info['money'];
$this->info['money2'] = $lvl['money2'] + $this->info['money2'];
//}
@@ -12473,41 +10407,23 @@ LIMIT 1'));
}
if ($ult == 1) {
if ($this->info['level'] == 4 || $this->info['level'] == 8) {
- //
+ //Убрать задержки на пещеры
mysql_query('DELETE FROM `actions` WHERE `uid` = "' . $this->info['id'] . '" AND `vars` LIKE "psh%"');
- $this->send('', $this->info['room'], $this->info['city'], '', $this->info['login'], ' !!!!!!!!!!!!!!!.', -1, 6, 0, 0, 0, 1);
+ $this->send('', $this->info['room'], $this->info['city'], '', $this->info['login'], 'Обязательно используйте свитки и эликсиры в своем инвентаре!!!!!!!!!!!!!!!.', -1, 6, 0, 0, 0, 1);
}
- /*if( $this->info['level'] > 0 && $this->info['level'] <= 5 ) {
- $this->info['money4'] += 100;
- mysql_query('UPDATE `users` SET `money4` = "'.$this->info['money4'].'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- $this->send('',$this->info['room'],$this->info['city'],'',$this->info['login'],' '.$this->zuby(100,1).'',-1,6,0,0,0,1);
- }*/
- //if( isset($itm['id']) || $lvl['nextLevel'] != 6 ) {
+
//
- /*$txti = '';
- if( $this->info['sex'] == 1 ) {
- $txti .= '';
- }
- $txti .= ' '.$this->info['level'].' !
'.date('d.m.Y H:i').'';
- //
- mysql_query('INSERT INTO `users_ico` (
- `uid`,`time`,`text`,`img`,`type`,`x`,`see`
- ) VALUES (
- "'.$this->info['id'].'","'.time().'","'.$txti.'","pod_lvl'.$this->info['level'].'.gif","2","1","1"
- )');*/
- //
- $this->send('', $this->info['room'], $this->info['city'], '', '', '
' . $this->info['login'] . ' ' . $sex1 . ' ' . $this->info['level'] . '!', time(), 6, 0, 0, 0, 1, 2); //
+ $this->send('', $this->info['room'], $this->info['city'], '', '', '
' . $this->info['login'] . ' достиг' . $sex1 . ' уровня ' . $this->info['level'] . '!', time(), 6, 0, 0, 0, 1, 2); // Наверно тут
//}
}
//mysql_query('UNLOCK TABLES');
if ($rt > 0) {
if ($this->info['level'] >= 11) {
- //$this->info['stopexp'] = 1; //
+ //$this->info['stopexp'] = 1; //Блокировка опыта
$this->info['stopexp'] = 0;
} else {
$this->info['stopexp'] = 0;
}
- $upd = mysql_query('UPDATE `users` SET `stopexp` = "' . $this->info['stopexp'] . '" , `level` = "' . $this->info['level'] . '",`money` = "' . $this->info['money'] . '",`money2` = "' . $this->info['money2'] . '",`money4` = "' . $this->info['money4'] . '" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
$upd = mysql_query('UPDATE `users_twink` SET `stopexp` = "' . $this->info['stopexp'] . '" WHERE `uid` = "' . $this->info['id'] . '" LIMIT 1');
if ($upd) {
mysql_query('UPDATE `stats` SET `ability` = "' . $this->info['ability'] . '",`skills` = "' . $this->info['skills'] . '",`nskills` = "' . $this->info['nskills'] . '",`sskills` = "' . $this->info['sskills'] . '",`stats` = "' . $this->info['stats'] . '",`upLevel` = "' . $this->info['upLevel'] . '" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
@@ -12520,7 +10436,7 @@ LIMIT 1'));
}
/*------------*/
if ($this->info['animal'] > 0) {
- //
+ //уровень зверя
$a = mysql_fetch_array(mysql_query('SELECT `id`,`type`,`name`,`uid`,`delete`,`inBattle`,`eda`,`exp`,`obraz`,`stats`,`level`,`sex`,`levelUp`,`pet_in_cage`,`max_exp`,`priems`,`bonus` FROM `users_animal` WHERE `uid` = "' . $this->info['id'] . '" AND `id` = "' . $this->info['animal'] . '" AND `pet_in_cage` = "0" AND `delete` = "0" LIMIT 1'));
if (isset($a['id']) && $a['level'] < 12) {
$ea = [
@@ -12556,14 +10472,14 @@ LIMIT 1'));
$iz = 0;
while ($iz != -1) {
if ($ea[$a['level'] + 1] <= $a['exp']) {
- //
+ //поднимаем уровень
$a['level']++;
$a['max_exp'] = $mx[$a['level']];
} else {
if ($iz > 0) {
$a['stats'] = mysql_fetch_array(mysql_query('SELECT `id`,`type`,`exp`,`level`,`stats`,`bonus` FROM `levels_animal` WHERE `type` = "' . $a['type'] . '" AND `level` = "' . $a['level'] . '" LIMIT 1'));
$a['stats'] = $a['stats']['stats'];
- $this->send('', $this->info['room'], $this->info['city'], '', $this->info['login'], '
' . $a['name'] . ' ' . $a['level'] . ' !', time(), 6, 0, 0, 0, 1);
+ $this->send('', $this->info['room'], $this->info['city'], '', $this->info['login'], '
' . $a['name'] . ' достиг ' . $a['level'] . ' уровня!', time(), 6, 0, 0, 0, 1);
mysql_query('UPDATE `users_animal` SET `stats` = "' . $a['stats'] . '",`level`="' . $a['level'] . '",`max_exp`="' . $a['max_exp'] . '" WHERE `id` = "' . $a['id'] . '" LIMIT 1');
}
$iz = -2;
@@ -12595,40 +10511,36 @@ LIMIT 1'));
$u = $this->info;
if (isset($this->stats['hpAll'])) {
$st = $this->stats;
- } elseif ($st != 0) {
-
} else {
$st = $this->getStats($uid, $i1);
}
}
$btl = 0;
- if ($u['battle'] > 0) {
- //$btl = mysql_fetch_array(mysql_query('SELECT `id`,`time_start` FROM `battle` WHERE `id` = "'.$u['battle'].'" AND `team_win` = "-1" LIMIT 1'));
- }
+
if ($u['battle'] == 0 || (isset($btl['id']) && $btl['time_start'] > $this->info['timereg'])) {
- $sth = $u['minHP']; // HP
- $stm = $u['minMP']; // MP
- $sh = 0; // 1 .
- $sm = 0; // M 1 .
- /*---()---*/
+ $sth = $u['minHP']; //Стандартное время восстановления в минутах HP
+ $stm = $u['minMP']; //Стандартное время восстановления в минутах MP
+ $sh = 0; //Скорость регенерации НР в 1 сек.
+ $sm = 0; //Скорость регенерации MР в 1 сек.
+ /*---Двужильный(Особенность)---*/
if (@$st['os9'] > 0) {
if (@$st['os9'] == 5) {
@$st['os9'] = 6;
}
$sth = floor($u['minHP'] - ($u['minHP'] / 100) * ($st['os9'] * 5));
}
- /*---()---*/
- /*---()---*/
+ /*---Двужильный(Особенность)---*/
+ /*---Здравомыслящий(Особенность)---*/
if (@$st['os10'] > 0) {
$stm = floor($u['minMP'] - ($u['minMP'] / 100) * ($st['os10'] * 5));
}
- /*---()---*/
+ /*---Здравомыслящий(Особенность)---*/
if ($u['battle'] > 0) {
$this->info['timereg'] = $btl['time_start'];
}
- //
- //
+ //Тестеры первой волны
+ //тесты боев
$st['speedhp'] += 150;
$st['speedmp'] += 150;
@@ -12660,7 +10572,7 @@ LIMIT 1'));
} elseif ($st['mpNow'] > $st['mpAll']) {
$st['mpNow'] = $st['mpAll'];
}
- //
+ //Заносим новые данные в базу
$upd = mysql_query('UPDATE `stats` SET `regHP`="' . time() . '",`regMP`="' . time() . '",`hpNow`="' . $st['hpNow'] . '",`mpNow`="' . $st['mpNow'] . '" WHERE `id` = "' . $u['id'] . '" LIMIT 1');
if (!$upd) {
return [0 => 0, 1 => 0];
@@ -12676,38 +10588,6 @@ LIMIT 1'));
}
}
- public function send_mime_mail($name_from, //
- $email_from, // email
- $name_to, //
- $email_to, // email
- $data_charset, //
- $send_charset, //
- $subject, //
- $body //
- )
- {
- $to = $this->mime_header_encode($name_to, $data_charset, $send_charset)
- . ' <' . $email_to . '>';
- $subject = $this->mime_header_encode($subject, $data_charset, $send_charset);
- $from = $this->mime_header_encode($name_from, $data_charset, $send_charset)
- . ' <' . $email_from . '>';
- if ($data_charset != $send_charset) {
- $body = iconv($data_charset, $send_charset, $body);
- }
- $headers = "From: $from\r\n";
- $headers .= "Content-type: text/html; charset=$send_charset\r\n";
-
- return mail($to, $subject, $body, $headers);
- }
-
- public function mime_header_encode($str, $data_charset, $send_charset)
- {
- if ($data_charset != $send_charset) {
- $str = iconv($data_charset, $send_charset, $str);
- }
- return '=?' . $send_charset . '?B?' . base64_encode($str) . '?=';
- }
-
public function set_cl_item($id, $user, $cl)
{
$item_ = mysql_fetch_array(mysql_query('SELECT `iu`.*, `im`.* FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON `iu`.`item_id` = `im`.`id` WHERE `iu`.`uid` = "' . $user['id'] . '" AND `iu`.`delete` = 0 AND `iu`.`inOdet` = 0 AND `iu`.`inShop` = 0 AND `im`.`inslot` > 0 AND `iu`.`gift` = "" AND `iu`.`data` NOT LIKE "%frompisher=%" AND `iu`.`id` = "' . $id . '" LIMIT 1'));
@@ -12719,37 +10599,37 @@ LIMIT 1'));
$po['toclan1'] = $po['toclan1'][0];
}
if (isset($po['sudba']) && $po['sudba'] != '0') {
- $r = '
';
+ $r = '
Предмет связан с вами судьбой';
} elseif (isset($po['toclan']) && $po['toclan1'] != $user['clan']) {
- $r = '
...';
+ $r = '
Предмет и так пренадлежит клану...';
} elseif ($user['inTurnir'] > 0 || $user['inTurnirnew'] > 0) {
- $r = '
.';
+ $r = '
Во время участия в турнире запрещено использовать клановое хранилище.';
} else {
if ((isset($po['sudba']) && $po['sudba'] != '0') || isset($po['icos']) || isset($po['frompisher']) || isset($po['fromlaba']) || ($item_['gift'] != '' && $item_['gift'] != 0)) {
- $r = ' ';
+ $r = 'Не удалось';
} elseif (!isset($po['toclan'])) {
$po['toclan'] = $user['clan'] . '#' . $user['id'];
$item_['data'] = $this->impStats($po);
if (mysql_query('UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "-21' . $user['clan'] . '", `data` = "' . $item_['data'] . '" WHERE `id` = "' . $id . '" LIMIT 1')) {
- $r = '
"' . $item_['name'] . '" ';
+ $r = '
Вы успешно пожертвовали предмет "' . $item_['name'] . '" клану';
$col = $this->itemsX(((int)$id));
- $this->addDelo(2, $user['id'], '"
System.transfer.MONEY": "' . $item_['name'] . '" (#id : "' . $id . '") (x' . $col . ') "' . $res['name'] . '" (' . $res['id'] . ').', time(), $user['city'], 'System.transfer.clan', 0, 0);
- mysql_query('INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "4", "' . $user['login'] . '", "' . $item_['name'] . ' (x' . $col . ') : [' . $id . ']", "' . $user['id'] . '")');
+ $this->addDelo(2, $user['id'], '"
System.transfer.MONEY": Предмет "' . $item_['name'] . '" (#id : "' . $id . '") (x' . $col . ') был пожертвован клану "' . $res['name'] . '" (' . $res['id'] . ').', time(), $user['city'], 'System.transfer.clan', 0, 0);
+ mysql_query('INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "4", "' . $user['login'] . '", "' . $item_['name'] . ' (x' . $col . ') Ид : [' . $id . ']", "' . $user['id'] . '")');
} else {
- $r = '
...';
+ $r = '
Не удалось...';
}
} else {
if (mysql_query('UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "-21' . $user['clan'] . '" WHERE `id` = "' . $id . '" LIMIT 1')) {
$col = $this->itemsX(((int)$id));
- mysql_query('INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "3", "' . $user['login'] . '", "' . $item_['name'] . '" (x' . $col . ') : [' . $id . '], "' . $user['id'] . '")');
- $r = '
"' . $item_['name'] . '" ';
+ mysql_query('INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "3", "' . $user['login'] . '", "' . $item_['name'] . '" (x' . $col . ') Ид : [' . $id . '], "' . $user['id'] . '")');
+ $r = '
Вы успешно вернули предмет "' . $item_['name'] . '" в хранилище клана';
} else {
- $r = '
...';
+ $r = '
Не удалось...';
}
}
}
} else {
- $r = '
.';
+ $r = '
Предмет не найден.';
}
return $r;
}
@@ -12761,7 +10641,7 @@ LIMIT 1'));
$res = mysql_fetch_array(mysql_query('SELECT * FROM `clan` WHERE `id` = "' . $cl . '" LIMIT 1'));
$user_itm = mysql_fetch_array(mysql_query('SELECT `id`,`bot`,`clone` FROM `stats` WHERE `id` = "' . $itm_['uid'] . '" LIMIT 1'));
if ($user_itm['bot'] > 0 || $user_itm['clone'] > 0 || !isset($user_itm['id'])) {
- $r = '
, ';
+ $r = '
Вы не можете изьять данный предмет, он не принадлежит клану';
} elseif (isset($itm_['id'])) {
if ($user['inTurnir'] == 0 && $user['inTurnirnew'] == 0) {
if ($itm_['inOdet'] != 0) {
@@ -12769,15 +10649,15 @@ LIMIT 1'));
} else {
$o = '';
}
- $r = '
"' . $itm_['name'] . '"';
+ $r = '
Вы успешно изъяли предмет "' . $itm_['name'] . '"';
$col = $this->itemsX(((int)$id));
- mysql_query('INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "6", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') : [' . $id . '] | : [' . $itm_['uid'] . ']", "' . $user['id'] . '")');
+ mysql_query('INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "6", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') Ид : [' . $id . '] | У персонажа : [' . $itm_['uid'] . ']", "' . $user['id'] . '")');
mysql_query('UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "-21' . $res['id'] . '" ' . $o . ' WHERE `id` = "' . $id . '" LIMIT 1');
} else {
- $r = '
.';
+ $r = '
Во время участия в турнире запрещено использовать клановое хранилище.';
}
} else {
- $r = '
.';
+ $r = '
Предмет не найден.';
}
return $r;
}
@@ -12794,14 +10674,14 @@ LIMIT 1'));
}
if ($user['inTurnir'] == 0 && $user['inTurnirnew'] == 0) {
$col = $this->itemsX(((int)$id));
- mysql_query('INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "5", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') : [' . $id . '] : [' . $cls . ']", "' . $user['id'] . '")');
+ mysql_query('INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "5", "' . $user['login'] . '", "' . $itm_['name'] . ' (x' . $col . ') Ид : [' . $id . '] Хозяин : [' . $cls . ']", "' . $user['id'] . '")');
mysql_query('UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "' . $user['id'] . '" WHERE `id` = "' . $id . '" LIMIT 1');
- $r = '
"' . $itm_['name'] . '" ';
+ $r = '
Вы успешно взяли предмет "' . $itm_['name'] . '" из хранилища';
} else {
- $r = '
.';
+ $r = '
Во время участия в турнире запрещено использовать клановое хранилище.';
}
} else {
- $r = '
.' . $id;
+ $r = '
Предмет не найден.' . $id;
}
return $r;
}
@@ -12826,35 +10706,19 @@ LIMIT 1'));
$col = $this->itemsX(((int)$pl['id']));
$it_n = mysql_fetch_array(mysql_query('SELECT `name` FROM `items_main` WHERE `id` = "' . $pl['item_id'] . '"'));
mysql_query('UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "' . $user['id'] . '", `data` = "' . $pl['data'] . '" WHERE `id` = "' . $pl['id'] . '"');
- mysql_query('INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "' . $type . '", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') : [' . $pl['id'] . ']", "' . $user['id'] . '")');
+ mysql_query('INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "' . $type . '", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') Ид : [' . $pl['id'] . ']", "' . $user['id'] . '")');
} elseif ($cls != $user['id'] && $pl['uid'] == $user['id']) {
$col = $this->itemsX(((int)$pl['id']));
$it_n = mysql_fetch_array(mysql_query('SELECT `name` FROM `items_main` WHERE `id` = "' . $pl['item_id'] . '"'));
mysql_query('UPDATE `items_users` SET `lastUPD` = "' . time() . '", `uid` = "-21' . $user['clan'] . '" WHERE `id` = "' . $pl['id'] . '"');
- mysql_query('INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "9", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') : [' . $pl['id'] . ']", "' . $user['id'] . '")');
+ mysql_query('INSERT INTO `clan_operations` (`clan`, `time`, `type`, `text`, `val`, `uid`) VALUES ("' . $res['id'] . '", "' . time() . '", "9", "' . $user['login'] . '", "' . $it_n['name'] . ' (x' . $col . ') Ид : [' . $pl['id'] . ']", "' . $user['id'] . '")');
}
}
}
- public function send_mail($to, $to_name, $from = 'support@new-combats.com', $name = '
2', $title, $text)
- {
- $this->send_mime_mail($name,
- $from,
- $to_name,
- $to,
- 'CP1251', // ,
- 'KOI8-R', // ,
- $title,
- $text); // \r\n
- }
-
public function roomInfo($id, $short = false)
{
- if ($short == true) {
- $select = ' `id`, `name`, `code`, `city`, `timeGO`, `level`,`roomGo` ';
- } else {
- $select = ' * ';
- }
+ $select = $short ? ' `id`, `name`, `code`, `city`, `timeGO`, `level`,`roomGo` ' : ' * ';
$roomInfo = mysql_fetch_array(mysql_query('SELECT ' . $select . ' FROM `room` WHERE `id` = "' . $id . '" LIMIT 1'));
if ($roomInfo['roomGo']) $roomInfo['roomGo'] = explode(',', $roomInfo['roomGo']);
if ($roomInfo['level']) $roomInfo['level'] = explode('-', $roomInfo['level']);
@@ -12875,6 +10739,4 @@ LIMIT 1'));
}
-
$u = user::start();
-?>
\ No newline at end of file
diff --git a/_incl_data/class/__userOLD.php b/_incl_data/class/__userOLD.php
deleted file mode 100644
index 5a5bf0b1..00000000
--- a/_incl_data/class/__userOLD.php
+++ /dev/null
@@ -1,12519 +0,0 @@
- true, //
-
- 33 => true, //
- 34 => true, //
- 35 => true, //
-
- 42 => true, //
- 43 => true, //
-
- 296 => true
-
- );
- public $aves = array('now'=>0,'max'=>0),$rep,$tfer,$error2 = '', $room = array(), $bank = array(), $align_nm = array(
- 1 => '',
- 2 => '',
- 3 => '',
- 7 => ''
- ), $mod_nm = array(
- 0=>array(0=>''),
- 1=>array('1'=>'','1.1'=>' ','1.4'=>' ','1.5'=>' ','1.6'=>'','1.7'=>' ','1.75'=>'-','1.9'=>' ','1.91'=>' ','1.92'=>' ','1.99'=>' '),
- 3=>array('3'=>'','3.01'=>'-','3.05'=>'-','3.06'=>'','3.07'=>'-','3.075'=>'-','3.09'=>'-','3.091'=>'-','3.092'=>' ','3.99'=>' ')
- );
- public $btl_txt = '',$rgd = array(0=>0,1=>0),$error = '',
-
- $city_unid = array(0,'capitalcity','angelscity','abandonedplain','newcapitalcity','demonscity','fallenearth','emeraldscity','dreamscity','suncity'),
- $city_id = array('capitalcity'=>1,'angelscity'=>2,'abandonedplain'=>3,'newcapitalcity'=>4,'demonscity'=>5,'fallenearth'=>6,'emeraldscity'=>6,'suncity'=>7,'dreamscity'=>8),
- $city_name = array('emeraldscity' => 'Emeralds city','abandonedplain'=>'Abandoned Plain','capitalcity'=>'Capital city','angelscity'=>'Angels city','newcapitalcity'=>'New Capital city','demonscity'=>'Demons city','fallenearth'=>'Fallen Earth','dreamscity'=>'Dreams City','suncity'=>'Sun City'),
- $city_name2 = array('emeraldscity' => 'Emeraldscity', 'abandonedplain'=>'Abandonedplain','capitalcity'=>'Capitalcity','angelscity'=>'Angelscity','newcapitalcity'=>'Newcapitalcity','demonscity'=>'Demonscity','fallenearth'=>'FallenEarth','dreamscity'=>'Dreams City','suncity'=>'Sun City'),
-
- $stats,$info,$map,$mapUsers,$is = array(
- 'acestar' => ' ', 'spasenie' => ' ','more_awards' => ' %', 'exp' => ' (%)', 'align_bs' => ' ',
- 'nopryh' => ' ', 'puti'=>' ','align'=>'','hpAll'=>'
(HP)','mpAll'=>'
(P)','enAll'=>' ','sex'=>'','lvl'=>'','s1'=>'','s2'=>'','s3'=>'','s4'=>'','s5'=>'','s6'=>'','s7'=>'','s8'=>'','s9'=>' ','s10'=>'','s11'=>'','m1'=>'. (%)','m2'=>'. (%)','m3'=>'. . (%)','m4'=>'. (%)','m5'=>'. (%)','m6'=>'. (%)','m7'=>'. (%)','m8'=>'. (%)','m9'=>'. (%)','m14'=>'. . (%)','m15'=>'. . (%)','m16'=>'. . (%)','m17'=>'. . (%)','m18'=>'. . (%)','m19'=>'. . (%)','m20'=>'. (%)','a1'=>' , ','a2'=>' , ','a3'=>' , ','a4'=>' ','a5'=>' ','a6'=>' ','a7'=>' ','aall'=>' ','mall'=>' ','m2all'=>' ','mg1'=>' ','mg2'=>' ','mg3'=>' ','mg4'=>' ','mg5'=>' ','mg6'=>' ','mg7'=>' ','tj'=>' ','lh'=>' ','minAtack'=>' ','maxAtack'=>' ','m10'=>'. ','m11'=>'. ','m11a'=>'. ','pa1'=>'. ','pa2'=>'. ','pa3'=>'. ','pa4'=>'. ','pm1'=>'. ','pm2'=>'. ','pm3'=>'. ','pm4'=>'. ','pm5'=>'. ','pm6'=>'. ','pm7'=>'. ','za'=>' ','zm'=>' ','zma'=>' ','za1'=>' ','za2'=>' ','za3'=>' ','za4'=>' ','zm1'=>' ','zm2'=>' ','zm3'=>' ','zm4'=>' ','zm5'=>' ','zm6'=>' ','zm7'=>' ','magic_cast'=>' ','pza'=>' ','pzm'=>' ','pza1'=>' ','min_heal_proc'=>' (%)','notravma'=>' ','yron_min'=>' ','yron_max'=>' ','zaproc'=>' (%)','zmproc'=>' (%)','zm2proc'=>' (%)','pza2'=>' ','pza3'=>' ','pza4'=>' ','pzm1'=>' ','pzm2'=>' ','pzm3'=>' ','pzm4'=>' ','pzm5'=>' ','pzm6'=>' ','pzm7'=>' ','speedhp'=>' (%)','speedmp'=>' (%)','tya1'=>' ','tya2'=>' ','tya3'=>' ','tya4'=>' ','tym1'=>' ','mg2static_points'=>' ()','tym2'=>' ','tym3'=>' ','tym4'=>' ','hpProc'=>' (%)','mpProc'=>' (%)','tym5'=>' ','tym6'=>' ','tym7'=>' ','min_use_mp'=>' ','pog'=>' ','pog2'=>' ','pog2p'=>' ','pog2mp'=>' ','maxves'=>' ','bonusexp'=>' ','speeden'=>' (%)',
- 'antm3' => '. ','repair_z' => ' ','repair_r' => ' ',
-'yza' => ' (%)','yzm' => ' (%)','yzma' => ' (%)'
-,'yza1' => ' (%)','yza2' => ' (%)','yza3' => ' (%)','yza4' => ' (%)'
-,'yzm1' => ' (%)','yzm2' => ' (%)','yzm3' => ' (%)','yzm4' => ' (%)','yzm5' => ' (%)','yzm6' => ' (%)','yzm7' => ' (%)','rep'=> ' '
-,'repair_discount' => ' ','hpVinos' => ' ','bronze' => 'Bronze Premium Account','silvers' => 'Silver Premium Account','gold' => 'Gold Premium Account','speed_dungeon' => ' '
-);
- public $items = array(
- 'tr' => array('sex','align','lvl','s1','s2','s3','s4','s5','s6','s7','s8','s9','s10','s11','a1','a2','a3','a4','a5','a6','a7','mg1','mg2','mg3','mg4','mg5','mg6','mg7','mall','m2all','aall','rep', 'align_bs'),
- 'add' => array(
- 'no_vor','antm3','acestar','spasenie','exp','enemy_am1','hod_minmana','yhod','noshock_voda','bronze','silvers','gold','repair_discount',
- 'yza','yzm','yzma','yza1','yza2','yza3','yza4','yzm1','yzm2','yzm3','yzm4','yzm5','yzm6','yzm7','repair_z','repair_r',
- 'notuse_last_pr','yrn_mg_first','antishock','nopryh','speed_dungeon','naemnik','mg2static_points','yrnhealmpprocmg3','nousepriem','notactic','seeAllEff','100proboi1','pog2','pog2p','magic_cast','min_heal_proc','no_yv1','no_krit1','no_krit2','no_contr1','no_contr2','no_bl1','no_pr1','no_yv2','no_bl2','no_pr2','silver','pza','pza1','pza2','pza3','pza4','pzm','pzm1','pzm2','pzm3','pzm4','pzm5','pzm6','pzm7','yron_min','yron_max','notravma','min_zonb','min_zona','nokrit','pog','min_use_mp','za1proc','za2proc','za3proc','za4proc','zaproc','zmproc','zm1proc','zm2proc','zm3proc','zm4proc','shopSale','shopSaleEkr','s1','s2','s3','s4','s5','s6','s7','s8','s9','s10','s11','aall','a1','a2','a3','a4','a5','a6','a7','m2all','mall','mg1','mg2','mg3','mg4','mg5','mg6','mg7','hpAll','hpVinos','mpVinos','mpAll','enAll','hpProc','mpProc','m1','m2','m3','m4','m5','m6','m7','m8','m9','m14','m15','m16','m17','m18','m19','m20','pa1','pa2','pa3','pa4','pm1','pm2','pm3','pm4','pm5','pm6','pm7','za','za1','za2','za3','za4','zma','zm','zm1','zm2','zm3','zm4','zm5','zm6','zm7','mib1','mab1','mib2','mab2','mib3','mab3','mib4','mab4','speedhp','speedmp','m10','m11','m11a','zona','zonb','maxves','minAtack','maxAtack','bonusexp','speeden'),
- 'sv' => array('pza','pza1','pza2','pza3','pza4','pzm','pzm1','pzm2','pzm3','pzm4','pzm5','pzm6','pzm7','notravma','min_zonb','min_zona','nokrit','pog','min_use_mp','za1proc','za2proc','za3proc','za4proc','zaproc','zmproc','zm1proc','zm2proc','zm3proc','zm4proc','shopSale','shopSaleEkr','s1','s2','s3','s4','s5','s6','s7','s8','s9','s10','s11','aall','a1','a2','a3','a4','a5','a6','a7','m2all','mall','mg1','mg2','mg3','mg4','mg5','mg6','mg7','hpAll','mpAll','enAll','m1','m2','m3','m4','m5','m6','m7','m8','m9','m14','m15','m16','m17','m18','m19','m20','pa1','pa2','pa3','pa4','pm1','pm2','pm3','pm4','pm5','pm6','pm7','min_use_mp','za','za1','za2','za3','za4','zma','zm','zm1','zm2','zm3','zm4','zm5','zm6','zm7','mib1','mab1','mib2','mab2','mib3','mab3','mib4','mab4','speedhp','speedmp','m10','m11','zona','zonb','maxves','minAtack','maxAtack','speeden')
- );
-
- /*
- yrnhealmpprocmg3 - , % ( )
- */
-
- public function sys_add($uid,$time,$type,$text,$data,$time_see) {
- /*if(mysql_query('INSERT INTO `a_system` (`uid`,`time`,`type`,`text`,`data`,`time_see`) VALUES ("'.$uid.'","'.$time.'","'.$type.'","'.$text.'","'.$data.'","'.$time_see.'")')){
-
- }else{
- echo '.';
- }
- */
- }
-
- public function pensia($type) {
- if( $type == false ) {
- if( ( $this->info['align'] > 0 || $this->info['clan'] > 0 || $this->info['level'] >8) && $this->info['align'] != 2 ) {
- $r = ($this->info['level']-6) * 0.04;
- if( date('m') >= 6 || date('m') <= 8 ) {
- $r = round($r * 2,2);
- }elseif( date('w') == 0 || date('w') == 6 ) {
- $r = round($r * 2,2);
- }
- $r = $r.' .';
- }else{
- $r = $this->info['level'];
- if( date('m') >= 6 || date('m') <= 8 ) {
- $r = round($r * 2,2);
- }elseif( date('w') == 0 || date('w') == 6 ) {
- $r = round($r * 2,2);
- }
- $r = $r .' .';
- }
- }else{
- if( ($this->info['align'] > 0 || $this->info['clan'] > 0 || $this->info['level'] >8) && $this->info['align'] != 2 ) {
- $r = ($this->info['level']-6) * 0.04;
- if( date('m') >= 6 || date('m') <= 8 ) {
- $r = round($r * 2,2);
- }elseif( date('w') == 0 || date('w') == 6 ) {
- $r = round($r * 2,2);
- }
- $r = array(2,$r);
- }else{
- $r = $this->info['level'];
- if( date('m') >= 6 || date('m') <= 8 ) {
- $r = round($r * 2,2);
- }elseif( date('w') == 0 || date('w') == 6 ) {
- $r = round($r * 2,2);
- }
- $r = array(1,$r);
- }
- }
- return $r;
- }
-
- public function testAlign( $an , $uid ) {
- $r = 1;
- if( floor($an) > 0 ) {
- $a = mysql_fetch_array(mysql_query('SELECT * FROM `users_align` WHERE `uid` = "'.$uid.'" AND (`delete` = "0" OR `delete` > "'.time().'") LIMIT 1'));
- if(isset($a['id'])) {
- if( floor($a['align']) > 0 ) {
- if( floor($a['align']) != $an ) {
- $r = 0;
- }
- }
- }
- }
- return $r;
- }
-
- public function abilsRoom($type) {
- $r = '';
- //
- if( $this->info['clan'] > 0 ) {
- //
- }elseif( $type == 'test' ) {
- if( $this->room['name'] == ' ' || $this->room['name'] == ' ' || $this->room['name'] == ' ' ) {
- if(isset($_GET['vhp'])) {
- $v = mysql_fetch_array(mysql_query('SELECT * FROM `vortex` WHERE `uid` = "'.$this->info['id'].'" AND `type` = 1 ORDER BY `time` DESC LIMIT 1'));
- if( isset($v['id']) && $v['time'] > time() - 60 * 60 ) {
- //
- $this->error = ' '.$this->timeOut( $v['time'] + 60 * 60 - time() );
- }else{
- if( $this->stats['hpNow'] < 1 ) { $this->stats['hpNow'] = 0; }
- $this->error = ' '.round($this->stats['hpAll'] - $this->stats['hpNow']).' HP.';
- mysql_query('INSERT INTO `vortex` ( `uid`,`time`,`room`,`val`,`type` ) VALUES (
- "'.$this->info['id'].'","'.time().'","'.$this->info['room'].'","'.round($this->stats['hpAll'] - $this->stats['hpNow']).'","1"
- )');
- $this->stats['hpNow'] = $this->stats['hpAll'];
- mysql_query('UPDATE `stats` SET `hpNow` = "'.$this->stats['hpNow'].'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- }
- }elseif(isset($_GET['vmp'])) {
- $v = mysql_fetch_array(mysql_query('SELECT * FROM `vortex` WHERE `uid` = "'.$this->info['id'].'" AND `type` = 2 ORDER BY `time` DESC LIMIT 1'));
- if( isset($v['id']) && $v['time'] > time() - 60 * 60 ) {
- //
- $this->error = ' '.$this->timeOut( $v['time'] + 60 * 60 - time() );
- }else{
- if( $this->stats['mpNow'] < 1 ) { $this->stats['mpNow'] = 0; }
- $this->error = ' '.round($this->stats['mpAll'] - $this->stats['mpNow']).' MP.';
- mysql_query('INSERT INTO `vortex` ( `uid`,`time`,`room`,`val`,`type` ) VALUES (
- "'.$this->info['id'].'","'.time().'","'.$this->info['room'].'","'.round($this->stats['mpAll'] - $this->stats['mpNow']).'","2"
- )');
- $this->stats['hpNow'] = $this->stats['hpAll'];
- mysql_query('UPDATE `stats` SET `mpNow` = "'.$this->stats['mpNow'].'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- }
- }
- }
- }elseif( $type == 'look' ) {
- //
- if( $this->room['name'] == ' ' || $this->room['name'] == ' ' || $this->room['name'] == ' ' ) {
- $vid = 0;
- //
- if( $this->room['name'] == ' ' ) {
- $vid = 6;
- }elseif( $this->room['name'] == ' ' ) {
- $vid = 7;
- }elseif( $this->room['name'] == ' ' ) {
- $vid = 10;
- }
- //
- $v = mysql_fetch_array(mysql_query('SELECT * FROM `vortex` WHERE `uid` = "'.$this->info['id'].'" AND `type` = 1 ORDER BY `time` DESC LIMIT 1'));
- if(isset($v['id']) && $v['time'] + 60 * 60 > time() ) {
- $r .= '
';
- }else{
- $r .= '
';
- }
- $v = mysql_fetch_array(mysql_query('SELECT * FROM `vortex` WHERE `uid` = "'.$this->info['id'].'" AND `type` = 2 ORDER BY `time` DESC LIMIT 1'));
- if(isset($v['id']) && $v['time'] + 60 * 60 > time() ) {
- $r .= '
';
- }else{
- $r .= '
';
- }
- }
- //
- }
- return $r;
- }
-
- public function insertAlign( $an , $uid ) {
- if( $an > 0 ) {
- mysql_query('UPDATE `users_align` SET `delete` = "'.(time()+1).'" WHERE `uid` = "'.mysql_real_escape_string($uid).'" AND `align` = "'.mysql_real_escape_string(floor($an)).'"');
- mysql_query('INSERT INTO `users_align` (`uid`,`time`,`delete`,`align`) VALUES (
- "'.mysql_real_escape_string($uid).'","'.time().'","0","'.mysql_real_escape_string(floor($an)).'"
- ) ');
- }
- }
-
- public function deleteAlign( $an , $uid ) {
- if( $an > 0 ) {
- mysql_query('UPDATE `users_align` SET `delete` = "'.(time()+86400*60).'" WHERE `uid` = "'.mysql_real_escape_string($uid).'" AND `align` = "'.mysql_real_escape_string(floor($an)).'"');
- }
- }
-
- public function shopSaleM( $val, $itm ) {
- global $c;
- /*$proc = array(
- 0,0,0,0,0,0,0,0,
- 5,30,30,30,30,30,30,30,30,30,30,30,30,30
- );
- $po = $this->lookStats($itm['data']);
- $proc = $proc[$po['tr_lvl']];*/
- $proc = 0;
- //
- $proc = array(
- 0, //0
- 0, //1
- 0, //2
- 0, //3
- 0, //4
- 0, //5
- 0, //6
- 0, //7
- 5,30,30,30,30,30,30,30,30,30,30,30,30,30
- );
- $po = $this->lookStats($itm['data']);
- $proc = $proc[$po['tr_lvl']];
- //
- if( $itm['type'] >= 28 ) {
- $proc = 50;
- }
- if($itm['type']==46){
- $proc = 0;
- }
- if( $c['shop_all'] > 0 ) {
- $proc = 100-$c['shop_all'];
- }elseif( $c['shop_all_type1'] > 0 && !isset($this->info['inBerezka']) ) {
- $proc = 100-$c['shop_all_type1'];
- }elseif( $c['shop_all_type2'] > 0 && isset($this->info['inBerezka'])) {
- $proc = 100-$c['shop_all_type2'];
- }
- $val = round(($val/100*(100-$proc)),2);
- return $val;
- }
-
- //
- public function deleteItemID($id, $uid, $coldel) {
- $sp = mysql_query('SELECT * FROM `items_users` WHERE `item_id` = "'.mysql_real_escape_string($id).'" AND `uid` = "'.mysql_real_escape_string($uid).'" AND (`delete` = 0 OR `delete` = 1000) ORDER BY `inGroup` DESC LIMIT '.$coldel);
- $delitm = array();
- while($pl = mysql_fetch_array($sp)) {
- if(count($delitm) < $coldel) {
- $delitm[] = $pl['id'];
- }
- }
- $i = 0;
- while($i < count($delitm)) {
- mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$delitm[$i].'" LIMIT 1');
- $i++;
- }
- }
-
- public function count_items($id, $uid, $coldel) {
- $sp = mysql_query('SELECT * FROM `items_users` WHERE `item_id` = "'.mysql_real_escape_string($id).'" AND `uid` = "'.mysql_real_escape_string($uid).'" AND (`delete` = 0 OR `delete` = 1000) ORDER BY `inGroup` DESC LIMIT '.$coldel);
- $delitm = array();
- while($pl = mysql_fetch_array($sp)) {
- if(count($delitm) < $coldel) {
- $delitm[] = $pl['id'];
- }
- }
- $i = 0;
- while($i < count($delitm)) {
- $i++;
- }
- return $i;
- }
-
- public function repobmen($id,$type)
- {
- //echo '';
- $pl = mysql_fetch_array(mysql_query('SELECT `im`.*,`iu`.* FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE `iu`.`uid`="'.$this->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`id` = "'.((int)$id).'" LIMIT 1;'));
- $d = mysql_fetch_array(mysql_query('SELECT * FROM `items_main_data` WHERE `items_id` = "'.$pl['item_id'].'" LIMIT 1'));
- $po = $this->lookStats($pl['data']);
- //echo $po['dungeon'].' '.$po['tr_lvl'];
- if((!isset($po['frompisher']) or $po['tr_lvl']<4) and $pl['type']!=31){
- $e = ' .';
- }else{
- $e = ' "'.$pl['name'].'" apitalcity .';
- mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
- $this->rep['repcapitalcity'] += 1;
- mysql_query('UPDATE `rep` SET `repcapitalcity` = "'.$this->rep['repcapitalcity'].'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- }
- return $e;
- }
-
- public function add_buf($id,$tp,$uid = NULL,$mod = NULL) {
- /*if($this->info['admin'] > 0) {
- if($tp == 1) {
-
- $cache = ob_get_contents();
- ob_end_clean ();
-
- //
- if($uid != '') {
- $uid_f = floor($uid/1000);
- }else{
- $uid_f = '_m';
- }
-
- //
- if(!is_dir($id.'~a/'.$uid_f.'/') ) {
- //
- mkdir($id.'~a/'.$uid_f.'/', 0700);
- }
-
- //
- if(!is_dir($id.'~a/'.$uid_f.'/'.$uid.'/') ) {
- //
- mkdir($id.'~a/'.$uid_f.'/'.$uid.'/', 0700);
- }
-
- $id = $id.'~a/'.$uid_f.'/'.$uid.'/'.$mod.'_'.md5($mod).'.cach';
-
- //
- if(file_exists($id)) {
- $this->del_buf($id);
- }
-
- //
- $fp = @fopen ($id, "w");
- @fwrite($fp, $cache);
- @fclose($fp);
-
- }elseif($tp == 0) {
- ob_start();
- }
- }*/
- }
-
- public function del_buf($id,$uid = NULL,$mod = NULL) {
- /*if($uid != NULL && $mod != NULL) {
- //
- if((int)$uid > 0 && $uid != '') {
- $uid_f = floor($uid/1000);
- }else{
- $uid_f = '_m_'.$uid;
- }
- $id = $id.'~a/'.$uid_f.'/'.$uid.'/'.$mod.'_'.md5($mod).'.cach';
- }
- if(file_exists($id)) {
- unlink($id);
- }*/
- }
-
- public function see_buf($id,$uid = NULL,$mod = NULL) {
- /*if(file_exists($id)) {
- if($uid != NULL && $mod != NULL) {
- //
- if($uid != '') {
- $uid_f = floor($uid/1000);
- }else{
- $uid_f = '_m';
- }
- $id = $id.'~a/'.$uid_f.'/'.$uid.'/'.$mod.'_'.md5($mod).'.cach';
- }
- return file_get_contents($id);
- }else{
- return false;
- }*/
- }
-
- public function sys_see($type) {
- /*
- $r = ''; $lid = $this->info['sys'];
- $sp = mysql_query('SELECT `id`,`uid`,`time`,`type`,`text`,`data`,`time_see` FROM `a_system` WHERE `uid` = "'.$this->info['id'].'" AND `id` > "'.$this->info['sys'].'" ORDER BY `time` DESC LIMIT 20');
- while($pl = mysql_fetch_array($sp)) {
- $r .= 'top.tow('.$pl['id'].',"'.$pl['text'].'",'.$pl['time_see'].','.$pl['data'].');';
- if($pl['id'] > $lid) {
- $lid = $pl['id'];
- }
- }
- if($lid > $this->info['sys']) {
- mysql_query('UPDATE `users` SET `sys` = "'.$lid.'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- }
- return $r;
- */
- }
-
- public static function start()
- {
- if (!isset(self::$flag_one))
- {
- $c = __CLASS__;
- self::$flag_one = new $c();
- }
- return self::$flag_one;
- }
-
- public function lookKeys($m,$i)
- {
- $e = explode('|',$m);
- $r = array();
- while($i
0 || $bu[$i]['nich']) {
- mysql_query('UPDATE `users` SET `lose` = "'.$bu[$i]['lose'].'", `nick` = "'.$bu[$i]['nich'].'" WHERE `id` = "'.$bu[$i]['id'].'" LIMIT 1');
- mysql_query('UPDATE `bs_turnirs` SET `users_finish` = `users_finish` + 1 WHERE `id` = "'.$id['id'].'" LIMIT 1');
- /* */
- if($bu['inBot'] == 0) {
- $pls1 = mysql_fetch_array(mysql_query('SELECT `id`, `bsid`, `money`, `finish`, `time`, `inBot`, `uid` FROM `bs_zv` WHERE `bsid` = "'.$id['id'].'" AND `finish` = 0 AND `time` = "'.$id['time_start'].'" AND `inBot` = "'.$bu[$i]['id'].'" LIMIT 1'));
- if(isset($pls1['id'])) {
- mysql_query('DELETE FROM `users` WHERE `id` = "'.$bu[$i]['id'].'" LIMIT 1');
- mysql_query('DELETE FROM `stats` WHERE `id` = "'.$bu[$i]['id'].'" LIMIT 1');
-
- //
- $spi = mysql_query('SELECT `id`,`item_id` FROM `items_users` WHERE `uid` = "'.$bu[$i]['id'].'" LIMIT 500');
- $ins = '';
- while($pli = mysql_fetch_array($spi))
- {
- $ins .= '("'.$di['dn_id'].'","'.$pli['item_id'].'","'.time().'","'.$di['x'].'","'.$di['y'].'"),';
- }
-
- $ins = rtrim($ins,',');
- mysql_query('INSERT INTO `dungeon_items` (`dn`,`item_id`,`time`,`x`,`y`) VALUES '.$ins.'');
- mysql_query('DELETE FROM `items_users` WHERE `uid` = "'.$pls1['inBot'].'" LIMIT 1');
- mysql_query('DELETE FROM `eff_users` WHERE `uid` = "'.$pls1['inBot'].'" LIMIT 1');
- mysql_query('UPDATE `bs_zv` SET `finish` = "'.time().'" WHERE `id` = "'.$pls1['id'].'" LIMIT 1');
- mysql_query('UPDATE `users` SET `inUser` = 0 WHERE `id` = "'.$pls1['uid'].'" LIMIT 1');
- }
- }
- $id['users_finish']++;
- }
- $i++;
- }
- }
- if($id['users']-$id['users_finish'] < 2) {
- $win = array();
- $sp = mysql_query('SELECT `id`,`bsid`,`money`,`finish`,`time`,`inBot`,`uid` FROM `bs_zv` WHERE `bsid` = "'.$id['id'].'" AND `finish` = "0" AND `time` = "'.$id['time_start'].'" ORDER BY `money` DESC LIMIT 100');
- while($pl = mysql_fetch_array($sp))
- {
- $ur = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`room`,`name`,`sex`,`inUser`,`twink`,`lose`,`nich`,`win` FROM `users` WHERE `id` = "'.$pl['uid'].'" LIMIT 1'));
- $ub = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`room`,`name`,`sex`,`inUser`,`twink`,`lose`,`nich`,`win` FROM `users` WHERE `id` = "'.$ur['inUser'].'" LIMIT 1'));
- if(isset($ur['id']) && isset($ub['id']))
- {
- if($ub['lose'] > 0 || $ub['nich'] > 0) {
- //
-
- }else{
- $win = $ub;
- $winr = $ur;
- }
- }
- }
-
- /* */
- if(isset($win['id']) && $win['lose'] == 0 && $win['nich'] == 0 && $win['id'] > 0) {
- //
- $bsep = 0;
- if($winr['level'] < 6) {
- $bsep = 2500;
- }elseif($winr['level'] < 7) {
- $bsep = 5000;
- }elseif($winr['level'] < 8) {
- $bsep = 15000;
- }elseif($winr['level'] < 9) {
- $bsep = 25000;
- }else{
- $bsep = 50000;
- }
- /* */
- $mn = (round($id['money']/100*85));
- mysql_query('UPDATE `users` SET `money` = `money` + "'.$mn.'" WHERE `id` = "'.$winr['id'].'" LIMIT 1');
- mysql_query('UPDATE `stats` SET `exp` = `exp` + "'.$bsep.'" WHERE `id` = "'.$winr['id'].'" LIMIT 1');
- /* */
- mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','".$winr['login']."','! " "! : ".$bsep.", : ".$mn." .','-1','6','0')");
- mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','','! " ", : ".$winr['login']."! !','-1','5','0')");
- $this->addDelo(1,$uid,'"WinTournament.'.$this->info['city'].'" ( ): "'.$mn.' ."',time(),$this->info['city'],'WinTournament.'.$this->info['city'].'',0,0);
- }else{
- //
- //
-
- /* */
- mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','','! " ", : .','-1','5','0')");
- }
-
- $sp = mysql_query('SELECT `id`,`bsid`,`money`,`finish`,`time`,`inBot`,`uid` FROM `bs_zv` WHERE `bsid` = "'.$id['id'].'" AND `time` = "'.$id['time_start'].'" ORDER BY `money` DESC LIMIT 100');
- while($pl = mysql_fetch_array($sp))
- {
- $ur = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`room`,`name`,`sex`,`inUser`,`lose`,`nich`,`win` FROM `users` WHERE `id` = "'.$pl['uid'].'" LIMIT 1'));
- $ub = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`room`,`name`,`sex`,`inUser`,`lose`,`nich`,`win` FROM `users` WHERE `id` = "'.$ur['inUser'].'" LIMIT 1'));
- if(isset($ub['id']))
- {
- //del
- mysql_query('DELETE FROM `users` WHERE `id` = "'.$ub['id'].'" LIMIT 1');
- mysql_query('DELETE FROM `stats` WHERE `id` = "'.$ub['id'].'" LIMIT 1');
- mysql_query('DELETE FROM `items_users` WHERE `uid` = "'.$ub['id'].'" LIMIT 500');
- mysql_query('DELETE FROM `eff_users` WHERE `uid` = "'.$ub['id'].'" LIMIT 500');
- //upd
- mysql_query('UPDATE `bs_zv` SET `finish` = "'.time().'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
- mysql_query('UPDATE `users` SET `inUser` = "0" WHERE `id` = "'.$pl['uid'].'" LIMIT 1');
- }
- }
- }
- }
-
- //
- public function ves($u)
- {
- $r = array('now'=>0,'max'=>0);
- if($u==NULL)
- {
- //
- $r['now'] = mysql_fetch_array(mysql_query('SELECT SUM(`im`.`massa`) FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON `iu`.`item_id` = `im`.`id` WHERE `iu`.`uid` = "'.$this->info['id'].'" AND (`iu`.`delete` = "0" OR (`iu`.`delete` = "1000" AND `iu`.`inGroup` > 0)) AND `iu`.`inShop` = "0" AND `iu`.`inOdet` = "0"'));
- $r['now'] = 0+$r['now'][0];
- @$r['max'] = 40+($this->stats['os7']*10)+$this->stats['s4']+$this->stats['maxves']+$this->stats['s1']*4;
- $r['items'] = mysql_fetch_array(mysql_query('SELECT COUNT(`im`.`id`) FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON `iu`.`item_id` = `im`.`id` WHERE `iu`.`uid` = "'.$this->info['id'].'" AND `iu`.`delete` = "0" AND `iu`.`inShop` = "0" AND `iu`.`inOdet` = "0"'));
- $r['items'] = $r['items'][0];
- }else{
-
- }
- return $r;
- }
-
- // \
- public function plavka($id, $type)
- {
- $e = '';
- $rn = 0; $rnn = array();
- $pl = mysql_fetch_array(mysql_query('SELECT
-`im`.`id`,`im`.`name`,`im`.`img`,`im`.`type`,`im`.`inslot`,`im`.`2h`,`im`.`2too`,`im`.`iznosMAXi`,`im`.`inRazdel`,`im`.`price1`,`im`.`price2`,`im`.`pricerep`,`im`.`magic_chance`,`im`.`info`,`im`.`massa`,`im`.`level`,`im`.`magic_inci`,`im`.`overTypei`,`im`.`group`,`im`.`group_max`,`im`.`geni`,`im`.`ts`,`im`.`srok`,`im`.`class`,`im`.`class_point`,`im`.`anti_class`,`im`.`anti_class_point`,`im`.`max_text`,`im`.`useInBattle`,`im`.`lbtl`,`im`.`lvl_itm`,`im`.`lvl_exp`,`im`.`lvl_aexp`,
-`iu`.`id`,`iu`.`item_id`,`iu`.`1price`,`iu`.`2price`,`iu`.`uid`,`iu`.`use_text`,`iu`.`data`,`iu`.`inOdet`,`iu`.`inShop`,`iu`.`delete`,`iu`.`iznosNOW`,`iu`.`iznosMAX`,`iu`.`gift`,`iu`.`gtxt1`,`iu`.`gtxt2`,`iu`.`kolvo`,`iu`.`geniration`,`iu`.`magic_inc`,`iu`.`maidin`,`iu`.`lastUPD`,`iu`.`timeOver`,`iu`.`overType`,`iu`.`secret_id`,`iu`.`time_create`,`iu`.`time_sleep`,`iu`.`inGroup`,`iu`.`dn_delete`,`iu`.`inTransfer`,`iu`.`post_delivery`,`iu`.`lbtl_`,`iu`.`bexp`,`iu`.`so`,`iu`.`blvl`
-FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE `iu`.`uid`="'.$this->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`id` = "'.((int)$id).'" LIMIT 1;'));
- $d = mysql_fetch_array(mysql_query('SELECT `id`,`items_id`,`data` FROM `items_main_data` WHERE `items_id` = "'.$pl['item_id'].'" LIMIT 1'));
- $po = $this->lookStats($d['data']);
- $rlvl = 4;
- if($pl['level'] == 0) {
- $pl['level'] = 0+$po['tr_lvl'];
- }
-
- if($pl['level']==7 || $pl['level']==8){
- $rlvl = 7;
- }elseif($pl['level']==9){
- $rlvl = 9;
- }elseif($pl['level']>=10){
- $rlvl = 9;
- }
- //
- if( ( rand(0,100) == 0 ) && $this->rep['rep1'] >= 1000 ) {
- $rlvl = 1;
- $rs = mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `type` = 31 AND `level` = "'.$rlvl.'" AND `id` >= 5024 AND `id` < 6000');
- }elseif( ( rand(0,100) <= 1 ) && $this->rep['rep1'] >= 10000 ) {
- $rlvl = 1;
- $rs = mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `type` = 31 AND `level` = "'.$rlvl.'" AND `id` >= 5024 AND `id` < 6000');
- }else{
- $rs = mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `type` = 31 AND `level` = "'.$rlvl.'" AND `id` < 5024');
- }
-
- //$rs = mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `type` = 31 AND `level` = "'.$rlvl.'"');
- while($rl = mysql_fetch_array($rs))
- {
- $nm = explode(' ',$rl['name']);
- if(($nm[0] && $nm[1] || $rlvl >= 10)) {
- $rnn[count($rnn)] = $rl['id'];
- }
- }
- $rn = $rnn[rand(0,count($rnn)-1)];
-
- $chns = round(50 + ( ( 4 - $po['tr_lvl'] ) * 5 ) ); //
- if( $chns > 90 ) {
- $chns = 90;
- }elseif( $chns < 50 ) {
- $chns = 70;
- }
-
- if($po['tr_lvl']<4 && $pl['item_id']!=1035)
- {
- $e = ' 4- ';
- }elseif($pl['type']!=1 && $pl['type']!=3 && $pl['type']!=5 && $pl['type']!=6 && $pl['type']!=8 && $pl['type']!=9 && $pl['type']!=10 && $pl['type']!=11 && $pl['type']!=12 && $pl['type']!=14 && $pl['type']!=15 && $pl['type']!=18 && $pl['type']!=19 && $pl['type']!=20 && $pl['type']!=21 && $pl['type']!=22 && $pl['type']!=13 && $pl['item_id']!=1035)
- {
- $e = ' , ! ? ! - !';
- }elseif($po['tr_lvl']>=7 && $this->rep['rep1']<100)
- {
- $e = ' 7- ';
- }elseif($po['tr_lvl']>=9 && $this->rep['rep1']<1000)
- {
- $e = ' 9- ';
- }elseif($po['tr_lvl']>=10 && $this->rep['rep1']<10000)
- {
- $e = ' 10- ';
- }elseif($rn>0)
- {
- if(isset($pl['id'],$d['id']))
- {
- $rnn = mysql_fetch_array(mysql_query('SELECT `id`,`name`,`img`,`type`,`inslot`,`2h`,`2too`,`iznosMAXi`,`inRazdel`,`price1`,`price2`,`price3`,`magic_chance`,`info`,`massa`,`level`,`magic_inci`,`overTypei`,`group`,`group_max`,`geni`,`ts`,`srok`,`class`,`class_point`,`anti_class`,`anti_class_point`,`max_text`,`useInBattle`,`lbtl`,`lvl_itm`,`lvl_exp`,`lvl_aexp` FROM `items_main` WHERE `type` = "31" AND `id` = "'.$rn.'" LIMIT 1'));
- if(isset($rnn['id'])){
- $pl['rep'] = 0;
- if( $po['tr_lvl'] >= 4 && $po['tr_lvl'] <= 6 && $this->rep['rep1'] < 100 ) {
- $pl['rep'] = 1; //4-6
- }elseif($this->rep['rep1'] > 99 && $this->rep['rep1'] < 1000){
- if( $po['tr_lvl'] >= 7 && $po['tr_lvl'] <= 8 ) { //7-8
- $pl['rep'] = 1;
- }
- if($pl['item_id']==1035){
- $pl['rep'] = 2;
- }
- }elseif($this->rep['rep1'] > 999){
- if( $po['tr_lvl'] >= 9 && $po['tr_lvl'] <= 10 ) { //9-10
- $pl['rep'] = 1;
- }
- if($pl['item_id']==1035){
- $pl['rep'] = 2;
- }
- }else{
- if($pl['item_id']==1035){
- $pl['rep'] = 2;
- }
- }
- //
- if( $chns <= rand(0,100) && $pl['item_id'] != 1035) {
- $e = ' "'.$pl['name'].'" ...';
- $ld = $this->addDelo(1, $this->info['id'],'"AddItems.'.$this->info['city'].'": ['.$pl['name'].'] .',time(),$this->info['city'],'AddItems.'.$this->info['city'].'',0,0);
- mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
- }elseif(mysql_query('UPDATE `rep` SET `rep1` = `rep1` + "'.$pl['rep'].'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1')){
-
- $e = ' "'.$pl['name'].'". '.( $pl['item_id'] != 1035 ? ' "'.$rnn['name'].'".' : '').'. : +'.$pl['rep'].' .';
- if($pl['item_id'] != 1035) {
- $irunew = $this->addItem($rnn['id'],$this->info['id'], null, null, null, null, $pl['name']);
- /*if( $rlvl == 1 ) {
- $irunew = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `id` = "'.$irunew.'" LIMIT 1'));
- if(isset($irunew['id'])) {
- $irunew['data'] .= '|sudba='.$u->info['login'].'';
- }
- mysql_query('UPDATE `items_users` SET `data` = "'.$irunew['data'].'" WHERE `id` = "'.$irunew['id'].'" LIMIT 1');
- unset($irunew);
- }*/
- }
- mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
- $this->rep['rep1'] += $pl['rep'];
- mysql_query('UPDATE `rep` SET `rep1` = "'.$this->rep['rep1'].'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- }else{
- $e = ' , ...';
- }
- }else{
- $e = ' ...';
- }
- }else{
- $e = ' , '.$pl['item_id'].'...';
- }
- }else{
- $e = ' , ...';
- }
- return $e;
- }
-
- //
- public function info_remont()
- {
- $r = '';
- $sp = mysql_query('SELECT
- `im`.`id`,`im`.`name`,`im`.`img`,`im`.`type`,`im`.`inslot`,`im`.`2h`,`im`.`2too`,`im`.`iznosMAXi`,`im`.`inRazdel`,`im`.`price1`,`im`.`price2`,`im`.`pricerep`,`im`.`magic_chance`,`im`.`info`,`im`.`massa`,`im`.`level`,`im`.`magic_inci`,`im`.`overTypei`,`im`.`group`,`im`.`group_max`,`im`.`geni`,`im`.`ts`,`im`.`srok`,`im`.`class`,`im`.`class_point`,`im`.`anti_class`,`im`.`anti_class_point`,`im`.`max_text`,`im`.`useInBattle`,`im`.`lbtl`,`im`.`lvl_itm`,`im`.`lvl_exp`,`im`.`lvl_aexp`,
- `iu`.`id`,`iu`.`item_id`,`iu`.`1price`,`iu`.`2price`,`iu`.`uid`,`iu`.`use_text`,`iu`.`data`,`iu`.`inOdet`,`iu`.`inShop`,`iu`.`delete`,`iu`.`iznosNOW`,`iu`.`iznosMAX`,`iu`.`gift`,`iu`.`gtxt1`,`iu`.`gtxt2`,`iu`.`kolvo`,`iu`.`geniration`,`iu`.`magic_inc`,`iu`.`maidin`,`iu`.`lastUPD`,`iu`.`timeOver`,`iu`.`overType`,`iu`.`secret_id`,`iu`.`time_create`,`iu`.`time_sleep`,`iu`.`inGroup`,`iu`.`dn_delete`,`iu`.`inTransfer`,`iu`.`post_delivery`,`iu`.`lbtl_`,`iu`.`bexp`,`iu`.`so`,`iu`.`blvl`
- FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE `iu`.`uid` = "'.((int)$this->info['id']).'" AND `iu`.`delete` = "0" AND `iu`.`inShop` = "0" AND `iu`.`inOdet` > "0" AND `iu`.`inOdet` < "18" LIMIT 18');
- while($pl = mysql_fetch_array($sp))
- {
- if($pl['iznosNOW']>ceil($pl['iznosMAX']*0.80))
- {
- $r .= ''.$pl['name'].' ['.floor($pl['iznosNOW']).'/'.ceil($pl['iznosMAX']).']
';
- }
- }
- $r = ''.$r.'
';
- return $r;
- }
-
- //
- public function weaponAtc($item,$st,$x)
- {
- $tp = 0;
- if(isset($item['id']))
- {
- $itm = $this->lookStats($item['data']);
- //
- if(!isset($st['minAtack'])) { $st['minAtack'] = 0; }
- if(!isset($st['maxAtack'])) { $st['maxAtack'] = 0; }
- if(!isset($st['yron_min'])) { $st['yron_min'] = 0; }
- if(!isset($st['yron_max'])) { $st['yron_max'] = 0; }
- if(!isset($itm['yron_min'])) { $itm['yron_min'] = 0; }
- if(!isset($itm['yron_max'])) { $itm['yron_max'] = 0; }
- if(!isset($itm['sv_yron_min'])) { $itm['sv_yron_min'] = 0; }
- if(!isset($itm['sv_yron_max'])) { $itm['sv_yron_max'] = 0; }
-
- $min = $itm['sv_yron_min']+$st['minAtack']+$itm['yron_min']+$st['yron_min'];
- $max = $itm['sv_yron_max']+$st['maxAtack']+$itm['yron_max']+$st['yron_max'];
-
- //if($x!=0)
- //{
- // : 0 - , 1 - , 2 - , 3 - , 4 - , 5 - , 6 - , 7 - , 8 - , 9 - , 10 - , 11 -
- if($item['type'] == 18)
- {
- //
- $sss = ceil((($st['s1']*0.45+$st['s2']*0.55)));
- }elseif($item['type'] == 19)
- {
- //
- $sss = ceil(($st['s1']*0.60+$st['s2']*0.25+$st['s3']*0.25));
- }elseif($item['type'] == 20)
- {
- //
- $sss = ceil($st['s1']*0.95);
- }elseif($item['type'] == 21)
- {
- //
- $sss = ceil(($st['s1']*0.45+$st['s3']*0.45));
- }else{
- //
- $sss = ceil($st['s1']*0.5);
- }
-
-
- //
- //$p['B'][0] = 5;
- //$p['B'][1] = 9;
-
- $p['B'][0] = ceil($st['s1']*1.4);
- $p['B'][1] = ceil(0.4+$p['B'][0]/0.9);
-
- $p['B'][0] = 2 + $st['level'] + $st['s1'] - round($st['s1']/5);
- $p['B'][1] = $p['B'][0] + 3;
-
- $p['B']['rnd'] = rand($p['B'][0],$p['B'][1]);
- //
- $p['W'][0] = $min;
- $p['W'][1] = $max;
- $p['W']['rnd'] = rand($p['W'][0],$p['W'][1]);
- // .
- $p['T'] = 1;
- //
- $bn = 0;
- if($item['type'] == 21) {
- //
- $p['M'] = $st['pa4'];
- $bn = $st['a4'];
- // $p['M'] = $st['pa'.$x];
- }elseif($item['type'] == 20) {
- //
- $p['M'] = $st['pa3'];
- $bn = $st['a3'];
- }elseif($item['type'] == 19) {
- //
- $p['M'] = $st['pa2'];
- $bn = $st['a2'];
- }elseif($item['type'] == 18) {
- //
- $p['M'] = $st['pa1'];
- $bn = $st['pa1'];
- }elseif($item['type'] == 22) {
- //
- $p['M'] = $st['pa'];
- $bn = $st['a5'];
- }
- //
- //if( $x < 5 ) {
- //$p['M'] = $st['pa'.$x];
- //}else{
- // $p['M'] = $st['pm'.($x-4)];
- //}
- $min = (($p['B'][0]+$sss+$p['W'][0])*$p['T']*(1+0.005*$bn))*(1+$p['M']/100);
- $max = (($p['B'][1]+$sss+$p['W'][1])*$p['T']*(1+0.005*$bn))*(1+$p['M']/100);
- //
- $kmin = ceil( ( 2 * ( 1 + $st['m3']/100 ) ) * $min);
- $kmax = ceil( ( 2 * ( 1 + $st['m3']/100 ) ) * $max);
- /*
- $r['Kmin'] = ceil( ( 2 * ( 1 + $p['K']/100 ) ) * $r['min']);
- $r['Kmax'] = ceil( ( 2 * ( 1 + $p['K']/100 ) ) * $r['max']);
- */
- //
- //$min = $min*0.8;
- //$max = $max*0.8;
- //}
- $tp = array(0=>ceil($min),1=>ceil($max),2=>ceil($kmin),3=>ceil($kmax));
- }
- return $tp;
- }
-
- public function yronLvl($lvl1,$lvl2) {
- $r = array(
- 1 => array(0,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200),
- 2 => array(0,600,400,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200),
- 3 => array(0,1000,800,600,400,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200),
- 4 => array(0,1400,1200,1000,800,600,400,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200),
- 5 => array(0,1800,1600,1400,1200,1000,800,600,400,200,200,200,200,200,200,200,200,200,200,200,200,200),
- 6 => array(0,2200,2000,1800,1600,1400,1200,1000,800,600,400,200,200,200,200,200,200,200,200,200,200,200),
- 7 => array(0,2600,2400,2200,2000,1800,1600,1400,1200,1000,800,600,400,200,200,200,200,200,200,200,200,200),
- 8 => array(0,3000,2800,2600,2400,2200,2000,1800,1600,1400,1200,1000,800,600,400,200,200,200,200,200,200,200),
- 9 => array(0,3400,3200,3000,2800,2600,2400,2200,2000,1800,1600,1400,1200,1000,800,600,400,200,200,200,200,200),
- 10 => array(0,3800,3600,3400,3200,3000,2800,2600,2400,2200,2000,1800,1600,1400,1200,1000,800,600,400,200,200,200),
- 11 => array(0,4200,4000,3800,3600,3400,3200,3000,2800,2600,2400,2200,2000,1800,1600,1400,1200,1000,800,600,400,200),
- 12 => array(0,4600,4400,4200,4000,3800,3600,3400,3200,3000,2800,2600,2400,2200,2000,1800,1600,1400,1200,1000,800,600),
- 13 => array(0,5000,4800,4600,4400,4200,4000,3800,3600,3400,3200,3000,2800,2600,2400,2200,2000,1800,1600,1400,1200,1000),
- 14 => array(0,5400,5200,5000,4800,4600,4400,4200,4000,3800,3600,3400,3200,3000,2800,2600,2400,2200,2000,1800,1600,1400),
- 15 => array(0,5800,5600,5400,5200,5000,4800,4600,4400,4200,4000,3800,3600,3400,3200,3000,2800,2600,2400,2200,2000,1800),
- 16 => array(0,6200,6000,5800,5600,5400,5200,5000,4800,4600,4400,4200,4000,3800,3600,3400,3200,3000,2800,2600,2400,2200),
- 17 => array(0,6600,6400,6200,6000,5800,5600,5400,5200,5000,4800,4600,4400,4200,4000,3800,3600,3400,3200,3000,2800,2600),
- 18 => array(0,7000,6800,6600,6400,6200,6000,5800,5600,5400,5200,5000,4800,4600,4400,4200,4000,3800,3600,3400,3200,3000),
- 19 => array(0,7400,7200,7000,6800,6600,6400,6200,6000,5800,5600,5400,5200,5000,4800,4600,4400,4200,4000,3800,3600,3400),
- 20 => array(0,7800,7600,7400,7200,7000,6800,6600,6400,6200,6000,5800,5600,5400,5200,5000,4800,4600,4400,4200,4000,3800),
- 21 => array(0,8200,8000,7800,7600,7400,7200,7000,6800,6600,6400,6200,6000,5800,5600,5400,5200,5000,4800,4600,4400,4200)
- );
- $r = floor($r[$lvl1][$lvl2]/100);
- $r = 0;
- return $r;
- }
-
- //
- public function zago($v) {
- /*if($v > 1000) {
- $v = 1000;
- }
- $r = (1-( pow(0.5, ($v/250) ) ))*100;
- return $r;*/
- if($v > 1700) {
- $v = 1700;
- }
- $r = round( (1-( pow(0.5, ($v/399.51) ) ))*100 , 2 );
- return $r;
- }
- // ()
- public function zmgo($v) {
- if($v > 1000) {
- $v = 1000;
- }
- $r = (1-( pow(0.5, ($v/250) ) ))*100;
- return $r;
- }
-
- public function inform($v)
-
- {
- //$this->stats['items'][13] , $this->stats['items'][14]
- $r = '';
- if($v=='yrontest' || $v=='yrontest-krit')
- {
- $y = array();
- /* */
- $w1 = 0;
- $w2 = 0;
- $i = 0;
- while($istats['items']))
- {
- if($this->stats['items'][$i]['inOdet']==3 && $w1==0 && $this->stats['items'][$i]['type'] >= 18 && $this->stats['items'][$i]['type'] <= 28)
- {
- $w1 = $this->stats['items'][$i];
- }elseif($this->stats['items'][$i]['inOdet']==14 && $w2==0 && $this->stats['items'][$i]['type'] >= 18 && $this->stats['items'][$i]['type'] <= 28)
- {
- $w2 = $this->stats['items'][$i];
- }
- $i++;
- }
- if(isset($w1['id']) && $w1['inOdet']!=14)
- {
- $tp = 0;
- $t = 0;
- $i = 1;
- $d = $this->lookStats($w1['data']);
- while($i<=4)
- {
- if(isset($d['tya'.$i]) && $t<$d['tya'.$i])
- {
- $t = $d['tya'.$i];
- $tp = $i;
- }
- $i++;
- }
- $y = $this->weaponAtc($w1,$this->stats,$tp);
- if($v=='yrontest-krit') {
- $y[0] = $y[2];
- $y[1] = $y[3];
- }
- if( $y[0] < 1 ) {
- $y[0] = 1;
- }
- if( $y[1] < 1 ) {
- $y[1] = 1;
- }
- $r .= ''.$y[0].'-'.$y[1].'';
- }else{
- //
- $y[0] = ceil( 2 + $this->info['level'] + $this->stats ['s1'] - round($this->stats['s1'] / 5) )+$this->stats['minAtack']+$this->stats['yron_min'];
- $y[1] = ceil($y[0] + 3)+$this->stats['maxAtack']+$this->stats['yron_max'];
- if( $y[0] < 1 ) {
- $y[0] = 1;
- }
- if( $y[1] < 1 ) {
- $y[1] = 1;
- }
- $r .= $y[0].'-'.$y[1];
- }
- /* */
- if(isset($w2['id']))
- {
- $tp = 0;
- $t = 0;
- $i = 1;
- $d = $this->lookStats($w2['data']);
- while($i<=4)
- {
- if($t<$d['tya'.$i])
- {
- $t = $d['tya'.$i];
- $tp = $i;
- }
- $i++;
- }
- $y = $this->weaponAtc($w2,$this->stats,$tp);
- if($v=='yrontest-krit') {
- $y[0] = $y[2];
- $y[1] = $y[3];
- }
- if( $y[0] < 1 ) {
- $y[0] = 1;
- }
- if( $y[1] < 1 ) {
- $y[1] = 1;
- }
- $r .= ' / '.$y[0].'-'.$y[1].'';
- }
- /* --- */
- }elseif($v=='yron')
- {
- $y = array();
- /* */
- $w1 = 0;
- $w2 = 0;
- $i = 0;
- while($istats['items']))
- {
- if($this->stats['items'][$i]['inOdet']==3 && $w1==0 && $this->stats['items'][$i]['type'] >= 18 && $this->stats['items'][$i]['type'] <= 28)
- {
- $w1 = $this->stats['items'][$i];
- }elseif($this->stats['items'][$i]['inOdet']==14 && $w2==0 && $this->stats['items'][$i]['type'] >= 18 && $this->stats['items'][$i]['type'] <= 28)
- {
- $w2 = $this->stats['items'][$i];
- }
- $i++;
- }
- if(isset($w1['id']) && $w1['inOdet']!=14)
- {
- $tp = 0;
- $t = 0;
- $i = 1;
- $d = $this->lookStats($w1['data']);
- while($i<=4)
- {
- if(isset($d['tya'.$i]) && $t<$d['tya'.$i])
- {
- $t = $d['tya'.$i];
- $tp = $i;
- }
- $i++;
- }
- $y = $this->weaponAtc($w1,$this->stats,$tp);
- if( $y[0] < 1 ) {
- $y[0] = 1;
- }
- if( $y[1] < 1 ) {
- $y[1] = 1;
- }
- $r .= ''.$y[0].'-'.$y[1].'';
- }else{
- //
- $y[0] = ceil($this->stats['s1']*1.4)+$this->stats['minAtack']+$this->stats['yron_min'];
- $y[1] = ceil(0.4+$y[0]/0.9)+$this->stats['maxAtack']+$this->stats['yron_max'];
- if( $y[0] < 1 ) {
- $y[0] = 1;
- }
- if( $y[1] < 1 ) {
- $y[1] = 1;
- }
- $r .= $y[0].'-'.$y[1];
- }
- /* */
- if(isset($w2['id']))
- {
- $tp = 0;
- $t = 0;
- $i = 1;
- $d = $this->lookStats($w2['data']);
- while($i<=4)
- {
- if($t<$d['tya'.$i])
- {
- $t = $d['tya'.$i];
- $tp = $i;
- }
- $i++;
- }
- $y = $this->weaponAtc($w2,$this->stats,$tp);
- if( $y[0] < 1 ) {
- $y[0] = 1;
- }
- if( $y[1] < 1 ) {
- $y[1] = 1;
- }
- $r .= ' / '.$y[0].'-'.$y[1].'';
- }
- }else{
- //
- $y = array();
- /* */
- $w1 = 0;
- $w2 = 0;
- $i = 0;
- $ry = 0;
- while($istats['items']))
- {
- if($this->stats['items'][$i]['inOdet']==3 && $w1==0 && $this->stats['items'][$i]['type'] >= 18 && $this->stats['items'][$i]['type'] <= 28)
- {
- $w1 = $this->stats['items'][$i];
- }elseif($this->stats['items'][$i]['inOdet']==14 && $w2==0 && $this->stats['items'][$i]['type'] >= 18 && $this->stats['items'][$i]['type'] <= 28)
- {
- $w2 = $this->stats['items'][$i];
- }
- $i++;
- }
- if(isset($w1['id']) && $w1['inOdet']!=14)
- {
- $tp = 0;
- $t = 0;
- $i = 1;
- $d = $this->lookStats($w1['data']);
- $y = 0;
- if(isset($d['sv_'.$v])) {
- $y += $d['sv_'.$v];
- }
- if(isset($this->stats[$v])) {
- $y += $this->stats[$v];
- }
- $ry = $y;
- $r .= ''.$y.'';
- }else{
- //
- $r .= $this->stats[$v];
- $ry = $this->stats[$v];
- }
- /* */
- if(isset($w2['id']))
- {
- $tp = 0;
- $t = 0;
- $i = 1;
- $d = $this->lookStats($w2['data']);
- $y = @$this->stats[$v]+@$d['sv_'.$v];
- if($y!=$ry)
- {
- $r .= ' / '.$y.'';
- }else{
- $r = str_replace('title="'.$w1['name'].'"','',$r);
- }
- }
- //
- }
- return $r;
- }
-
- public function timeOut($ttm)
- {
- $out = '';
- $time_still = $ttm;
- $tmp = floor($time_still/2592000);
- $id=0;
- if ($tmp > 0)
- {
- $id++;
- if ($id<3) {$out .= $tmp." . ";}
- $time_still = $time_still-$tmp*2592000;
- }
- $tmp = floor($time_still/86400);
- if ($tmp > 0)
- {
- $id++;
- if ($id<3) {$out .= $tmp." . ";}
- $time_still = $time_still-$tmp*86400;
- }
- $tmp = floor($time_still/3600);
- if ($tmp > 0)
- {
- $id++;
- if ($id<3) {$out .= $tmp." . ";}
- $time_still = $time_still-$tmp*3600;
- }
- $tmp = floor($time_still/60);
- if ($tmp > 0)
- {
- $id++;
- if ($id<3) {$out .= $tmp." . ";}
- }
- if($out=='')
- {
- if($time_still<0)
- {
- $time_still = 0;
- }
- $out = $time_still.' .';
- }
- return $out;
- }
-
- public function rep_zv($id,$e)
- {
- if($id==1)
- {
- //
- if($e>9999)
- {
- $r = ' , '.$e.' / ??';
- }elseif($e>999)
- {
- $r = ' , ' .$e.' / 9999';
- }elseif($e>99)
- {
- $r = ' , '.$e.' / 999';
- }else{
- $r = $e.' / 99';
- }
- }elseif($id==2)
- {
- //Capital city
- if($e>24999)
- {
- $r = ' , '.$e.' / ??';
- }elseif($e>9999)
- {
- $r = ' , '.$e.' / 24999';
- }else{
- $r = $e.' / 10000';
- }
- }elseif($id==3)
- {
- //Angels city
- if($e>24999)
- {
- $r = ' , '.$e.' / ??';
- }elseif($e>9999)
- {
- $r = ' , '.$e.' / 24999';
- }else{
- $r = $e.' / 10000';
- }
- }elseif($id==4)
- {
- //Demons city
- if($e>24999)
- {
- $r = ' , '.$e.' / ??';
- }elseif($e>9999)
- {
- $r = ' , '.$e.' / 24999';
- }else{
- $r = $e.' / 10000';
- }
- }elseif($id==5)
- {
- //
- if($e>99)
- {
- $r = ' '.$e.' / 999';
- }else{
- $r = $e.' / 99';
- }
- }elseif($id==6)
- {
- //Sand
- if($e>24999)
- {
- $r = ' , '.$e.' / ??';
- }elseif($e>9999)
- {
- $r = ' , '.$e.' / 24999';
- }else{
- $r = $e.' / 10000';
- }
- }elseif($id==7)
- {
- //Sun
- if($e>24999)
- {
- $r = ' , '.$e.' / ??';
- }elseif($e>9999)
- {
- $r = ' , '.$e.' / 24999';
- }else{
- $r = $e.' / 10000';
- }
- }elseif($id==8)
- {
- //Moon
- if($e>24999)
- {
- $r = ' , '.$e.' / ??';
- }elseif($e>9999)
- {
- $r = ' , '.$e.' / 24999';
- }else{
- $r = $e.' / 10000';
- }
- }elseif($id==9)
- {
- //Dreams city
- if($e>9999)
- {
- $r = ' , ['.$e.']';
- }elseif($e>4999)
- {
- $r = ' ,' .$e.' / 9999';
- }elseif($e>999)
- {
- $r = ' , '.$e.' / 4999';
- }else{
- $r = $e.' / 999';
- }
- }elseif($id==10) {
- //
- if($e>9999)
- {
- $r = ' ,['.$e.']';
- }elseif($e>999)
- {
- $r = ' , '.$e.' / 4999';
- }else{
- $r = $e.' / 999';
- }
- }elseif($id==11)
- {
- //
- if($e>9999)
- {
- $r = ' , ['.$e.']';
- }elseif($e>4999)
- {
- $r = ' ,' .$e.' / 9999';
- }elseif($e>999)
- {
- $r = ' , '.$e.' / 4999';
- }else{
- $r = $e.' / 999';
- }
- }
-
- return $r;
- }
-
- public function getInfoById($id){
- $ch = mysql_fetch_array(mysql_query("SELECT `users`.*,`stats`.* FROM `users` INNER JOIN `stats` ON (`stats`.`id`=`users`.`id`) WHERE `users`.`id`='".$id."' OR
- `users`.`login`= '".mysql_real_escape_string($id)."'"));
-
-
- return $ch;
- }
-
- public function addItem($id, $uid, $md = null, $dn = null, $mxiznos = null, $nosudba = null, $plavka = null) {
- $rt = -1;
- $i = mysql_fetch_array(mysql_query('SELECT `im`.`id`,`im`.`name`,`im`.`img`,`im`.`type`,`im`.`inslot`,`im`.`2h`,`im`.`2too`,`im`.`iznosMAXi`,`im`.`inRazdel`,`im`.`price1`,`im`.`price2`,`im`.`pricerep`,`im`.`magic_chance`,`im`.`info`,`im`.`massa`,`im`.`level`,`im`.`magic_inci`,`im`.`overTypei`,`im`.`group`,`im`.`group_max`,`im`.`geni`,`im`.`ts`,`im`.`srok`,`im`.`class`,`im`.`class_point`,`im`.`anti_class`,`im`.`anti_class_point`,`im`.`max_text`,`im`.`useInBattle`,`im`.`lbtl`,`im`.`lvl_itm`,`im`.`lvl_exp`,`im`.`lvl_aexp` FROM `items_main` AS `im` WHERE `im`.`id` = "'.mysql_real_escape_string($id).'" LIMIT 1'));
- if(isset($i['id']))
- {
- $d = mysql_fetch_array(mysql_query('SELECT `id`,`items_id`,`data` FROM `items_main_data` WHERE `items_id` = "'.$i['id'].'" LIMIT 1'));
- //
- $data = $d['data'];
- if($i['ts']>0)
- {
- if( $nosudba == NULL ) {
- $ui = mysql_fetch_array(mysql_query('SELECT `id`,`login` FROM `users` WHERE `id` = "'.mysql_real_escape_string($uid).'" LIMIT 1'));
- $data .= '|sudba='.$ui['login'];
- }
- }
- if($md!=NULL)
- {
- $data .= $md;
- $data = $this->lookStats($data); // SROK?
- $data = $this->impStats($data);
- }
-
-
- if($dn!=NULL)
- {
- //
- if($dn['dn_delete']>0)
- {
- $i['dn_delete'] = 1;
- }
- }
- if($mxiznos > 0) {
- $i['iznosMAXi'] = $mxiznos;
- }
- if($this->info['dnow'] > 0){
- $room = $this->room['city'];
- }else {
- $room = $this->info['city'];
- }
- $ins = mysql_query('INSERT INTO `items_users` (`overType`,`item_id`,`uid`,`data`,`iznosMAX`,`geniration`,`magic_inc`,`maidin`,`lastUPD`,`time_create`,`dn_delete`) VALUES (
- "'.$i['overTypei'].'",
- "'.$i['id'].'",
- "'.$uid.'",
- "'.$data.'",
- "'.$i['iznosMAXi'].'",
- "'.$i['geni'].'",
- "'.$i['magic_inci'].'",
- "'.$room.'",
- "'.time().'",
- "'.time().'",
- "'.$i['dn_delete'].'")');
- if($ins)
- {
- $rt = mysql_insert_id();
- mysql_query('UPDATE `items_users` SET `dn_delete` = "1" WHERE `id` = "'.$rt.'" AND `data` LIKE "%dn_delete=%" LIMIT 1');
- if( $uid == $this->info['id'] ) {
- $this->stack( $rt );
- }
- $ads = '';
- if($plavka != null) {
- $ads = ' : ['.$plavka.']';
- }
- //
- $ld = $this->addDelo(1,$uid,'"AddItems.'.$this->info['city'].'": "'.$i['name'].'" (x1) [#'.$i['iid'].']. '.$ads.'',time(),$this->info['city'],'AddItems.'.$this->info['city'].'',0,0);
- }else{
- $rt = 0;
- }
- }
- return $rt;
- }
-
- public function getNum($v)
- {
- $plid = $v;
- $pi = iconv_strlen($plid);
- if($pi<5)
- {
- $i = 0;
- while($i<=5-$pi)
- {
- $plid = '0'.$plid;
- $i++;
- }
- }
- return $plid;
- }
-
- public function microLogin2($bus) {
- $bus['login_BIG'] = '';
- if( $bus['align'] > 0 ) {
- $bus['login_BIG'] .= '';
- }
- if( $bus['align2'] > 0 ) {
- $bus['login_BIG'] .= '';
- }
- if( $bus['clan'] > 0 ) {
- $bus['login_BIG'] .= '';
- }
- $bus['login_BIG'] .= ''.$bus['login'].'['.$bus['level'].']';
- return $bus['login_BIG'];
- }
-
- public function microLogin($id,$t,$nnz = 1)
- {
- global $c;
- if($t==1)
- {
- $inf = mysql_fetch_array(mysql_query('SELECT
- `u`.`id`,
- `u`.`align`,`u`.`align2`,
- `u`.`login`,
- `u`.`clan`,
- `u`.`level`,
- `u`.`city`,
- `u`.`online`,
- `u`.`sex`,`u`.`design`,`u`.`autospell`,`u`.`noplaw`,
- `u`.`cityreg`,
- `u`.`palpro`,
- `u`.`invis`,
- `st`.`hpNow` FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON (`u`.`id` = `st`.`id`) WHERE `u`.`id`="'.mysql_real_escape_string($id).'" OR `u`.`login` = "'.mysql_real_escape_string((int)$id).'" LIMIT 1'));
- }else{
- $inf = $id;
- $id = $inf['id'];
- }
- $r = '';
- if(isset($inf['id']) && ( ($inf['invis'] < time() && $inf['invis'] != 1) || ($this->info['id'] == $inf['id'] && $nnz == 1) ))
- {
- if($inf['align']>0)
- {
- $r .= '';
- }
- if($inf['align2']>0)
- {
- $r .= '';
- }
- if($inf['clan']>0)
- {
- $cln = mysql_fetch_array(mysql_query('SELECT `id`,`name`,`name_mini`,`align`,`type_m`,`money1`,`exp` FROM `clan` WHERE `id` = "'.$inf['clan'].'" LIMIT 1'));
- if(isset($cln['id']))
- {
- $r .= '';
- }
- }
- if($inf['cityreg'] == '') {
- $inf['cityreg'] = 'capitalcity';
- }
- $r .= ' '.$inf['login'].' ['.$inf['level'].']';
- }else{
- $r = ' [??]';
- }
- return $r;
- }
-
- public function testHome()
- {
- /*----()----*/
- $timeforwait = 3600;
- if(isset($st['os3']) && $st['os3']>0) {
- $timeforwait = 3600-(($st['os6']*5)*60);
- }
- /*----()----*/
- $hgo = $this->testAction('`uid` = "'.$this->info['id'].'" AND `time` >= '.(time()-$timeforwait).' AND `vars` = "go_homeworld" LIMIT 1',1);
- if($this->info['level']==0 || $this->info['active']!='' || $this->info['inTurnir'] > 0 || $this->info['inTurnirnew'] > 0 || $this->info['zv'] > 0 || $this->info['dnow'] > 0) {
- $hgo['id'] = true;
- }
- if(isset($this->info['noreal']) || $this->info['dnow'] > 0) {
- $hgo['id'] = true;
- }
- if(!isset($hgo['id'])) {
- $ku = mysql_fetch_array(mysql_query('SELECT `id` FROM `katok_zv` WHERE `uid` = "'.$this->info['id'].'" LIMIT 1'));
- if(isset($ku['id'])) {
- $hgo['id'] = true;
- }
- }
- return $hgo;
- }
-
- public function telegram($uid,$text,$type = 1,$from = NULL)
- {
- if(!(int)$uid)
- {
- $uid = mysql_fetch_array(mysql_query('SELECT `id` FROM `users` WHERE `login` = "'.mysql_real_escape_string($uid).'" LIMIT 1'));
- $uid = $uid['id'];
- }
- $r = 0;
- if($uid>0)
- {
- if($from == NULL)
- {
- $from = $this->info['login'];
- }
- $ins = mysql_query('INSERT INTO `telegram` (`uid`,`from`,`time`,`fromType`,`text`) VALUES ("'.mysql_real_escape_string($uid).'","'.mysql_real_escape_string($from).'","'.time().'","'.mysql_real_escape_string($type).'","'.mysql_real_escape_string(htmlspecialchars($text,NULL,'cp1251')).'")');
- if($ins)
- {
- $r = 1;
- }else{
- $r = -2;
- }
- }else{
- $r = -1;
- }
- return $r;
- }
-
- public function functionThisData() {
- //
-
- }
-
- private function __construct()
- {
- global $c,$code,$magic;
-
- $this->info = mysql_fetch_array(mysql_query('SELECT
- `u`.`nextBonus`,`u`.`mat`,`u`.`skype`,`u`.`skype_hide`,`u`.`stopexp`,`u`.`twink`,`u`.`swin`,`u`.`slose`,`u`.`send`,`u`.`activ`,`u`.`b1`,`u`.`nadmin`,`u`.`fnq`,`u`.`id`,`u`.`login`,`u`.`login2`,`u`.`pass`,`u`.`pass2`,`u`.`repass`,`u`.`notrhod`,`u`.`emailconfirmation`,`u`.`securetime`,`u`.`sys`,`u`.`palpro`,`u`.`online`,`u`.`ip`,`u`.`ipreg`,`u`.`joinIP`,`u`.`admin`,`u`.`city`,`u`.`room`,`u`.`banned`,`u`.`auth`,`u`.`align`,`u`.`align2`,`u`.`align_lvl`,`u`.`align_exp`,`u`.`mod_zvanie`,`u`.`clan`,`u`.`nextMsg`,`u`.`molch1`,`u`.`molch2`,`u`.`molch3`,`u`.`level`,`u`.`money`,`u`.`money2`,`u`.`money4`,`u`.`money3`,`u`.`money3`,`u`.`battle`,`u`.`cityreg`,`u`.`invBlock`,`u`.`allLock`,`u`.`invBlockCode`,`u`.`zag`,`u`.`a1`,`u`.`q1`,`u`.`mail`,`u`.`name`,`u`.`bithday`,`u`.`sex`,`u`.`design`,`u`.`autospell`,`u`.`noplaw`,`u`.`city_real`,`u`.`icq`,`u`.`icq_hide`,`u`.`homepage`,`u`.`deviz`,`u`.`hobby`,`u`.`chatColor`,`u`.`timereg`,`u`.`add_smiles`,`u`.`obraz`,`u`.`win`,`u`.`lose`,`u`.`nich`,`u`.`cityreg2`,`u`.`host`,`u`.`info_delete`,`u`.`dateEnter`,`u`.`afk`,`u`.`dnd`,`u`.`timeMain`,`u`.`clan_prava`,`u`.`addpr`,`u`.`marry`,`u`.`city2`,`u`.`invis`,`u`.`bot_id`,`u`.`haos`,`u`.`host_reg`,`u`.`inUser`,`u`.`inTurnir`,`u`.`inTurnirnew`,`u`.`jail`,`u`.`animal`,`u`.`vip`,`u`.`catch`,`u`.`frg`,`u`.`no_ip`,`u`.`type_pers`,`u`.`bot_room`,`u`.`clan_delay`,`u`.`bukmeker`,`u`.`ang_g`,
- `st`.`id`,`st`.`lider`,`st`.`btl_cof`,`st`.`last_hp`,`st`.`last_pr`,`st`.`smena`,`st`.`stats`,`st`.`hpAll`,`st`.`mpAll`,`st`.`hpNow`,`st`.`mpNow`,`st`.`enNow`,`st`.`transfers`,`st`.`regHP`,`st`.`regMP`,`st`.`showmenu`,`st`.`prmenu`,`st`.`ability`,`st`.`skills`,`st`.`sskills`,`st`.`nskills`,`st`.`exp`,`st`.`minHP`,`st`.`minMP`,`st`.`zv`,`st`.`dn`,`st`.`dnow`,`st`.`team`,`st`.`battle_yron`,`st`.`battle_exp`,`st`.`enemy`,`st`.`last_a`,`st`.`last_b`,`st`.`battle_text`,`st`.`upLevel`,`st`.`wipe`,`st`.`bagStats`,`st`.`timeGo`,`st`.`timeGoL`,`st`.`nextAct`,`st`.`active`,`st`.`bot`,`st`.`lastAlign`,`st`.`tactic1`,`st`.`tactic2`,`st`.`tactic3`,`st`.`tactic4`,`st`.`tactic5`,`st`.`tactic6`,`st`.`tactic7`,`st`.`x`,`st`.`y`,`st`.`s`,`st`.`battleEnd`,`st`.`priemslot`,`st`.`priems`,`st`.`priems_z`,`st`.`bet`,`st`.`clone`,`st`.`atack`,`st`.`bbexp`,`st`.`ref_data`,`st`.`res_x`,`st`.`res_y`,`st`.`res_s`,`st`.`bn_capitalcity`,`st`.`bn_demonscity`,
- `r`.`noatack` FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON (`u`.`id` = `st`.`id`) LEFT JOIN `room` AS `r` ON (`u`.`room` = `r`.`id`) WHERE `u`.`login`="'.mysql_real_escape_string($_COOKIE['login']).'" AND `u`.`pass`="'.mysql_real_escape_string($_COOKIE['pass']).'" LIMIT 1'));
-
-
- if( $c['securetime'] > 0 ) {
- if(!defined('IP')) {
- $dip = '';
- if (!empty($_SERVER['HTTP_CLIENT_IP']))
- $dip = $_SERVER['HTTP_CLIENT_IP'];
- else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
- $dip = $_SERVER['HTTP_X_FORWARDED_FOR'];
- $dip = $_SERVER['REMOTE_ADDR'];
- define('IP',$dip);
- }
-
- if( isset($this->info['id']) && ($this->info['ip'] != IP || $this->info['banned'] > 0) ) {
- if( $_SERVER['REQUEST_URI'] != '/' ) {
- unset($this->info, $_COOKIE['login'], $_COOKIE['pass']);
- die('');
- }
- }
- }
-
- if(isset($this->info['id'])) {
- if( $this->info['exp'] > 300000 && $this->info['twink'] > 0 ) {
- $this->info['exp'] = 300000;
- mysql_query('UPDATE `users` SET `exp` = '.$this->info['exp'].' WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- }
- }
-
- if(isset($this->info['id']) && $this->info['inUser'])
- {
- $md = array($this->info['molch1'],$this->info['molch2'],$this->info['molch3'],$this->info['admin'],$this->info['nadmin'],$this->info['banned'],$this->info['activ'],$this->info['align'],$this->info['id'],$this->info['level']);
- $this->info = mysql_fetch_array(mysql_query('SELECT
- `u`.`nextBonus`,`u`.`mat`,`u`.`skype`,`u`.`skype_hide`,`u`.`stopexp`,`u`.`twink`,`u`.`swin`,`u`.`slose`,`u`.`activ`,`u`.`nadmin`,`u`.`b1`,`u`.`fnq`,`u`.`id`,`u`.`login`,`u`.`login2`,`u`.`pass`,`u`.`pass2`,`u`.`repass`,`u`.`notrhod`,`u`.`emailconfirmation`,`u`.`securetime`,`u`.`sys`,`u`.`palpro`,`u`.`online`,`u`.`ip`,`u`.`ipreg`,`u`.`joinIP`,`u`.`admin`,`u`.`city`,`u`.`room`,`u`.`banned`,`u`.`auth`,`u`.`align`,`u`.`align2`,`u`.`align_lvl`,`u`.`align_exp`,`u`.`mod_zvanie`,`u`.`clan`,`u`.`nextMsg`,`u`.`molch1`,`u`.`molch2`,`u`.`molch3`,`u`.`level`,`u`.`money`,`u`.`money2`,`u`.`money4`,`u`.`money3`,`u`.`battle`,`u`.`cityreg`,`u`.`invBlock`,`u`.`allLock`,`u`.`invBlockCode`,`u`.`zag`,`u`.`a1`,`u`.`q1`,`u`.`mail`,`u`.`name`,`u`.`bithday`,`u`.`sex`,`u`.`design`,`u`.`autospell`,`u`.`noplaw`,`u`.`city_real`,`u`.`icq`,`u`.`icq_hide`,`u`.`homepage`,`u`.`deviz`,`u`.`hobby`,`u`.`chatColor`,`u`.`timereg`,`u`.`add_smiles`,`u`.`obraz`,`u`.`win`,`u`.`lose`,`u`.`nich`,`u`.`cityreg2`,`u`.`host`,`u`.`info_delete`,`u`.`dateEnter`,`u`.`afk`,`u`.`dnd`,`u`.`timeMain`,`u`.`clan_prava`,`u`.`addpr`,`u`.`marry`,`u`.`city2`,`u`.`invis`,`u`.`bot_id`,`u`.`haos`,`u`.`host_reg`,`u`.`inUser`,`u`.`inTurnir`,`u`.`inTurnirnew`,`u`.`jail`,`u`.`animal`,`u`.`vip`,`u`.`catch`,`u`.`frg`,`u`.`no_ip`,`u`.`type_pers`,`u`.`bot_room`,`u`.`clan_delay`,`u`.`bukmeker`,
- `st`.`id`,`st`.`lider`,`st`.`btl_cof`,`st`.`last_hp`,`st`.`last_pr`,`st`.`smena`,`st`.`stats`,`st`.`hpAll`,`st`.`mpAll`,`st`.`hpNow`,`st`.`mpNow`,`st`.`enNow`,`st`.`transfers`,`st`.`regHP`,`st`.`regMP`,`st`.`showmenu`,`st`.`prmenu`,`st`.`ability`,`st`.`skills`,`st`.`sskills`,`st`.`nskills`,`st`.`exp`,`st`.`minHP`,`st`.`minMP`,`st`.`zv`,`st`.`dn`,`st`.`dnow`,`st`.`team`,`st`.`battle_yron`,`st`.`battle_exp`,`st`.`enemy`,`st`.`last_a`,`st`.`last_b`,`st`.`battle_text`,`st`.`upLevel`,`st`.`wipe`,`st`.`bagStats`,`st`.`timeGo`,`st`.`timeGoL`,`st`.`nextAct`,`st`.`active`,`st`.`bot`,`st`.`lastAlign`,`st`.`tactic1`,`st`.`tactic2`,`st`.`tactic3`,`st`.`tactic4`,`st`.`tactic5`,`st`.`tactic6`,`st`.`tactic7`,`st`.`x`,`st`.`y`,`st`.`s`,`st`.`battleEnd`,`st`.`priemslot`,`st`.`priems`,`st`.`priems_z`,`st`.`bet`,`st`.`clone`,`st`.`atack`,`st`.`bbexp`,`st`.`ref_data`,`st`.`res_x`,`st`.`res_y`,`st`.`res_s`,`st`.`bn_capitalcity`,`st`.`bn_demonscity`
- FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON (`u`.`id` = `st`.`id`) WHERE `u`.`id`="'.mysql_real_escape_string($this->info['inUser']).'" LIMIT 1'));
- if($this->info['molch1'] < $md[0]) {
- $this->info['molch1'] = $md[0];
- }
- if($this->info['molch2'] < $md[1]) {
- $this->info['molch2'] = $md[1];
- }
- if($this->info['molch3'] < $md[2]) {
- $this->info['molch3'] = $md[2];
- }
- if($this->info['admin'] < $md[3]) {
- $this->info['admin'] = $md[3];
- }
- if($this->info['nadmin'] < $md[4]) {
- $this->info['nadmin'] = $md[4];
- }
- if($this->info['banned'] < $md[5]) {
- $this->info['banned'] = $md[5];
- }
- $this->info['activ'] = $md[6];
- $this->info['noreal'] = 1;
- $this->info['align_real'] = $md[7];
- $this->info['__id'] = $md[8];
- $this->info['__level'] = $md[9];
- }
- if (isset ($_COOKIE['btl']))
- {
- if($this->info['battle'] != $_COOKIE['btl']) {
- setcookie('btl',$this->info['battle'],time()+86400);
- }
- }
- else
- {setcookie('btl',$this->info['battle'],time()+86400);}
-
- //
- /*if($this->info['banned'] == 7007001) {
- $spm_url = mysql_fetch_array(mysql_query('SELECT * FROM `_spamer` WHERE `host` = "'.$this->info['host'].'" LIMIT 1'));
- if(isset($spm_url['id'])) {
- die('');
- }else{
- die('');
- }
- }*/
-
- if(!isset($this->info['id']))
- {
- $this->info = mysql_fetch_array(mysql_query('SELECT
- `u`.`nadmin`,`u`.`id`,`u`.`login`,`u`.`login2`,`u`.`pass`,`u`.`pass2`,`u`.`repass`,`u`.`notrhod`,`u`.`emailconfirmation`,`u`.`securetime`,`u`.`sys`,`u`.`palpro`,`u`.`online`,`u`.`ip`,`u`.`ipreg`,`u`.`joinIP`,`u`.`admin`,`u`.`city`,`u`.`room`,`u`.`banned`,`u`.`auth`,`u`.`align`,`u`.`align2`,`u`.`align_lvl`,`u`.`align_exp`,`u`.`mod_zvanie`,`u`.`clan`,`u`.`nextMsg`,`u`.`molch1`,`u`.`molch2`,`u`.`molch3`,`u`.`level`,`u`.`money`,`u`.`money2`,`u`.`money4`,`u`.`money3`,`u`.`battle`,`u`.`cityreg`,`u`.`invBlock`,`u`.`allLock`,`u`.`invBlockCode`,`u`.`zag`,`u`.`a1`,`u`.`q1`,`u`.`mail`,`u`.`name`,`u`.`bithday`,`u`.`sex`,`u`.`design`,`u`.`autospell`,`u`.`noplaw`,`u`.`city_real`,`u`.`icq`,`u`.`icq_hide`,`u`.`homepage`,`u`.`deviz`,`u`.`hobby`,`u`.`chatColor`,`u`.`timereg`,`u`.`add_smiles`,`u`.`obraz`,`u`.`win`,`u`.`lose`,`u`.`nich`,`u`.`cityreg2`,`u`.`host`,`u`.`info_delete`,`u`.`dateEnter`,`u`.`afk`,`u`.`dnd`,`u`.`timeMain`,`u`.`clan_prava`,`u`.`addpr`,`u`.`marry`,`u`.`city2`,`u`.`invis`,`u`.`bot_id`,`u`.`haos`,`u`.`host_reg`,`u`.`inUser`,`u`.`inTurnir`,`u`.`inTurnirnew`,`u`.`jail`,`u`.`animal`,`u`.`vip`,`u`.`catch`,`u`.`frg`,`u`.`no_ip`,`u`.`type_pers`,`u`.`bot_room`,`u`.`clan_delay`,`u`.`bukmeker`
- FROM `users` AS `u` WHERE `u`.`login`="'.mysql_real_escape_string($_COOKIE['login']).'" AND `u`.`pass`="'.mysql_real_escape_string($_COOKIE['pass']).'" LIMIT 1'));
- if($this->info['dateEnter']!=$_SERVER['HTTP_USER_AGENT'])
- {
- unset($this->info);
- }
- $this->btl_txt = $this->info['battle_text'];
- if(!isset($this->info['id']))
- {
- unset($this->info);
- setcookie('login','',time()-60*60*24,'',$c['host']);
- setcookie('pass','',time()-60*60*24,'',$c['host']);
- }else{
- echo 'stats is lost.';
- }
- }
-
- if(isset($this->info['id'])) {
- if($this->info['invis'] == 1 || $this->info['invis'] > time()) {
- $this->info['cast_login'] = '';
- }else{
- $this->info['cast_login'] = $this->info['login'];
- }
- }
-
- if(isset($this->info['id']) && $this->info['battle'] == 0)
- {
- $sb = mysql_fetch_array(mysql_query('SELECT SUM(`money2`) FROM `bank` WHERE `uid` = "'.$this->info['id'].'" LIMIT 100'));
- $sb = $sb[0];
-
- if($sb-1 > $this->info['catch']-$this->info['frg']) {
- if($this->info['frg'] == -1) {
- $sm = $this->testAction('`uid` = "'.$this->info['id'].'" AND `vars` = "frg" LIMIT 1',1);
- }
- if(!isset($sm['id']) && $this->info['frg']==-1) {
- mysql_query('UPDATE `users` SET `catch` = "'.round($sb).'",`frg` = "0" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- $this->addAction(time(),'frg','[ '.$this->info['login'].' ] '.date('d.m.Y H:i:s').' [true] , balance: '.$sb.' / '.$this->info['catch'].' / '.$this->info['frg'].' ');
- }else{
- mysql_query('UPDATE `users` SET `catch` = "'.round($sb+$this->info['frg']).'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- if($sb-10 > $this->info['catch']-$this->info['frg']) {
- $this->addAction(time(),'frgfalse','[ '.$this->info['login'].' ] '.date('d.m.Y H:i:s').' [false] , ['.($sb-($this->info['catch']-$this->info['frg'])).'] , balance: '.$sb.' | '.$this->info['catch'].' | '.$this->info['frg'].' ');
- }
- }
- }
-
- if($this->info['login2']!='' && $this->info['battle']==0 && $this->info['zv']==0) {
- mysql_query('UPDATE `users` SET `login2` = "" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- $this->info['login2'] = '';
- }
-
- $this->rep = mysql_fetch_array(mysql_query('SELECT
- `add_slot`,`nu_sandcity`,`n_sandcity`,
- `dl1`,`id`,`rep1`,`rep2`,`repcapitalcity`,`repdemonscity`,`repangelscity`,`repabandonedplain`,
- `repdevilscity`,`repmooncity`,`repsuncity`,`repsandcity`,`repemeraldscity`,`repdreamscity`,`repizlom`,
- `n_capitalcity`,`n_demonscity`,`n_suncity`,`nu_demonscity`,`nu_angelscity`,`nu_abandonedplain`,`nu_emeraldscity`,
- `nu_capitalcity`,`nu_suncity`,`nu_devilscity`,`nu_dreamscity`,`add_stats`,`add_money`,`add_skills`,`add_skills2`,
- `rep3`,`rep3_buy`,`repdragonscity`,`n_dragonscity`,`nu_dragonscity`,
- (`repcapitalcity`+`repdemonscity`+`repangelscity`+`repsuncity`+`repdreamscity`+`repabandonedplain`+`repsandcity`+`repemeraldscity`) as allrep,
- (`nu_capitalcity`+`nu_demonscity`+`nu_angelscity`+`nu_suncity`+`nu_dreamscity`+`nu_abandonedplain`+`nu_sandcity`+`nu_emeraldscity`) as allnurep
- FROM `rep` WHERE `id` = "'.$this->info['id'].'" LIMIT 1'));
-
-
- if(!isset($this->rep['id'])){
- mysql_query('INSERT INTO `rep` (`id`) VALUES ('.$this->info['id'].')');
- }
- if($this->info['login2'] != '' && $this->info['zv'] == 0 && $this->info['battle'] == 0) {
- $this->info['login2'] = '';
- mysql_query('UPDATE `users` SET `login2` = "" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
- }
- /* */
- /*$i = $this->testAction('`time` >= "'.(time()-7129).'" AND `vars` = "reclama1" LIMIT 1',1);
- if(!isset($i['id']))
- {
- $this->addAction(time(),'reclama1','');
- //
- $t6 = array('','');
- if(date('N') == 1) {
- //
- $t6[0] = ' ';
- }elseif(date('N') == 2) {
- //
- $t6[0] = '';
- }elseif(date('N') == 3) {
- //
- if(date('H')<20) {
- $t6[0] = '';
- }else{
- $t6[0] = ' ';
- }
- }elseif(date('N') == 4) {
- //
- $t6[0] = '';
- }elseif(date('N') == 5) {
- //
- if(date('H')<20) {
- $t6[0] = '';
- }else{
- $t6[0] = ' ';
- }
- }elseif(date('N') == 6) {
- //
- $t6[0] = '';
- }elseif(date('N') == 7) {
- //
- if(date('H')<20) {
- $t6[0] = '';
- }else{
- $t6[0] = ' ';
- }
- }
- $r = '! '.$t6[0].' ( 20:00 ). Alexandr Events.new-combats.com';
- //
- mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','','','','".$r."','".time()."','6','0')");
- }
- */
- /*
- //
- mysql_query('LOCK TABLES users,stats,chat,room,test_bot,battle WRITE');
- $dasc = array('ASC','DESC');
- $sp = mysql_query('SELECT `u`.`id`,`u`.`bot_room`,`s`.`atack`,`u`.`type_pers`,`s`.`bbexp`,`s`.`timeGo`,`s`.`timeGoL`,`u`.`login`,`u`.`sex`,`u`.`design`,`u`.`autospell`,`u`.`noplaw`,`u`.`align`,`u`.`align2`,`u`.`clan`,`u`.`room`,`u`.`level`,`u`.`battle`,`s`.`hpNow`,`s`.`mpNow`,`s`.`team`,`u`.`city` FROM `users` AS `u` LEFT JOIN `stats` AS `s` ON `u`.`id` = `s`.`id` WHERE `u`.`type_pers` > 0 AND `s`.`timeGo` < '.time().' AND `s`.`timeGoL` < '.time().' ORDER BY `s`.`timeGoL` '.$dasc[rand(0,1)].' LIMIT 11');
- while($pl = mysql_fetch_array($sp)) {
- if($pl['type_pers']>0 && $pl['battle'] == 0) {
- //
- if($pl['timeGo']