dev-remove-deprecated #65

Merged
lopar merged 3 commits from dev-remove-deprecated into dev 2023-12-01 21:31:59 +00:00
74 changed files with 9583 additions and 9023 deletions

View File

@ -2667,18 +2667,20 @@ class Battle
if ($this->info['money'] > 0) { if ($this->info['money'] > 0) {
if (isset($gm[$i])) { if (isset($gm[$i])) {
$prc .= ' Вы выйграли <strong>' . $gm[$i] . ' кр.</strong> за этот бой.'; $prc .= ' Вы выйграли <strong>' . $gm[$i] . ' кр.</strong> за этот бой.';
$u->addDelo( Delo::add(
4, $this->users[$i]['id'], 4,
'&quot;<font color="olive">System.battle</font>&quot;: Персонаж выйграл <strong>' . $gm[$i] . ' кр.</strong> (В бою №' . $this->info['id'] . ').', 'System.battle',
time(), $this->info['city'], 'System.battle', 0, 0 $this->users[$i]['id'],
'&quot;<span style="color: olive; ">System.battle</span>&quot;: Персонаж выйграл <strong>' . $gm[$i] . ' кр.</strong> (В бою №' . $this->info['id'] . ').',
); );
$this->users[$i]['money'] += $gm[$i]; $this->users[$i]['money'] += $gm[$i];
} elseif (isset($bm[$i])) { } elseif (isset($bm[$i])) {
$prc .= ' Вы заплатили <strong>' . $bm[$i] . ' кр.</strong> за этот бой.'; $prc .= ' Вы заплатили <strong>' . $bm[$i] . ' кр.</strong> за этот бой.';
$u->addDelo( Delo::add(
4, $this->users[$i]['id'], 4,
'&quot;<font color="olive">System.battle</font>&quot;: Персонаж <i>проиграл</i> <strong>' . $gm[$i] . ' кр.</strong> (В бою №' . $this->info['id'] . ').', 'System.battle',
time(), $this->info['city'], 'System.battle', 0, 0 $this->users[$i]['id'],
'&quot;<span style="color: olive; ">System.battle</span>&quot;: Персонаж <i>проиграл</i> <strong>' . $gm[$i] . ' кр.</strong> (В бою №' . $this->info['id'] . ').',
); );
$this->users[$i]['money'] -= $bm[$i]; $this->users[$i]['money'] -= $bm[$i];
} }
@ -2758,10 +2760,11 @@ class Battle
if ($this->info['type'] != 33) { if ($this->info['type'] != 33) {
$prc .= ', Награда <strong>' . $admn . ' ЕКР</strong> за этот бой.'; $prc .= ', Награда <strong>' . $admn . ' ЕКР</strong> за этот бой.';
} }
$u->addDelo( Delo::add(
4, $this->users[$i]['id'], 4,
'&quot;<font color="olive">System.battle</font>&quot;: Персонаж получил <strong>' . $admn . ' ЕКР</strong> (В бою №' . $this->info['id'] . ').', 'System.battle',
time(), $this->info['city'], 'System.battle', 0, 0 $this->users[$i]['id'],
'&quot;<span style="color: olive; ">System.battle</span>&quot;: Персонаж получил <strong>' . $admn . ' ЕКР</strong> (В бою №' . $this->info['id'] . ').',
); );
$this->users[$i]['money2'] += $admn; $this->users[$i]['money2'] += $admn;
} }
@ -2770,10 +2773,11 @@ class Battle
if ($this->info['money3'] > 0) { if ($this->info['money3'] > 0) {
if (isset($gms[$i])) { if (isset($gms[$i])) {
$prc .= ' Вы выйграли <strong>' . $gms[$i] . ' $.</strong> за этот бой.'; $prc .= ' Вы выйграли <strong>' . $gms[$i] . ' $.</strong> за этот бой.';
$u->addDelo( Delo::add(
4, $this->users[$i]['id'], 4,
'&quot;<font color="olive">System.battle</font>&quot;: Персонаж выйграл <strong>' . $gms[$i] . ' $.</strong> (В бою №' . $this->info['id'] . ').', 'System.battle',
time(), $this->info['city'], 'System.battle', 0, 0 $this->users[$i]['id'],
'&quot;<span style="color: olive; ">System.battle</span>&quot;: Персонаж выйграл <strong>' . $gms[$i] . ' $.</strong> (В бою №' . $this->info['id'] . ').',
); );
$this->users[$i]['money3'] += $gms[$i]; $this->users[$i]['money3'] += $gms[$i];
mysql_query( mysql_query(
@ -2781,10 +2785,11 @@ class Battle
); );
} elseif (isset($bms[$i])) { } elseif (isset($bms[$i])) {
$prc .= ' Вы заплатили <strong>' . $bms[$i] . ' $.</strong> за этот бой.'; $prc .= ' Вы заплатили <strong>' . $bms[$i] . ' $.</strong> за этот бой.';
$u->addDelo( Delo::add(
4, $this->users[$i]['id'], 4,
'&quot;<font color="olive">System.battle</font>&quot;: Персонаж <i>проиграл</i> <strong>' . $gms[$i] . ' $.</strong> (В бою №' . $this->info['id'] . ').', 'System.battle',
time(), $this->info['city'], 'System.battle', 0, 0 $this->users[$i]['id'],
'&quot;<span style="color: olive; ">System.battle</span>&quot;: Персонаж <i>проиграл</i> <strong>' . $gms[$i] . ' $.</strong> (В бою №' . $this->info['id'] . ').',
); );
$this->users[$i]['money3'] -= $bms[$i]; $this->users[$i]['money3'] -= $bms[$i];
mysql_query( mysql_query(
@ -3796,18 +3801,20 @@ class Battle
if (!$resulttp) { if (!$resulttp) {
$cmsg->setText("<strong>Трупожор был пуст!</strong>"); $cmsg->setText("<strong>Трупожор был пуст!</strong>");
$chat->sendMsg($cmsg); $chat->sendMsg($cmsg);
$u->addDelo( Delo::add(
4, $this->users[$this->uids[$uid]]['id'], 4,
'&quot;<font color="olive">System.battle</font>&quot;: (В бою трупожор), ПУСТ!!! ', time(), 'System.battle',
$this->users[$this->uids[$uid]]['city'], 'System.battle', 0, 0 $this->users[$this->uids[$uid]]['id'],
'&quot;<span style="color: olive; ">System.battle</span>&quot;: (В бою трупожор), ПУСТ!!! ',
); );
} else { } else {
$cmsg->setText("<strong>Вы получили еврокредиты: $ecr екр.</strong>"); $cmsg->setText("<strong>Вы получили еврокредиты: $ecr екр.</strong>");
$chat->sendMsg($cmsg); $chat->sendMsg($cmsg);
$u->addDelo( Delo::add(
4, $this->users[$this->uids[$uid]]['id'], 4,
'&quot;<font color="olive">System.battle</font>&quot;: Персонаж получил <strong>' . $ecr . ' ЕКР</strong> (В бою трупожор), сейчас: <strong>' . $this->users[$this->uids[$uid]]['money2'] . ' ЕКР</strong>', 'System.battle',
time(), $this->users[$this->uids[$uid]]['city'], 'System.battle', 0, 0 $this->users[$this->uids[$uid]]['id'],
'&quot;<span style="color: olive; ">System.battle</span>&quot;: Персонаж получил <strong>' . $ecr . ' ЕКР</strong> (В бою трупожор), сейчас: <strong>' . $this->users[$this->uids[$uid]]['money2'] . ' ЕКР</strong>',
); );
} }
} }

View File

@ -3,6 +3,7 @@
namespace Clan; namespace Clan;
use Core\Db; use Core\Db;
use Delo;
use Helper\Conversion; use Helper\Conversion;
use User; use User;
use User\ItemsModel; use User\ItemsModel;
@ -27,15 +28,11 @@ class ItemStorage
if (!isset($idata['toclan'])) { if (!isset($idata['toclan'])) {
$idata['toclan'] = $user['clan'] . '#' . $user['id']; $idata['toclan'] = $user['clan'] . '#' . $user['id'];
$item['data'] = Conversion::arrayToDataString($idata); $item['data'] = Conversion::arrayToDataString($idata);
User::start()->addDelo( Delo::add(
2, 2,
'System.transfer.clan',
$user['id'], $user['id'],
'&quot;System.transfer.MONEY&quot;: Предмет &quot;' . $item['name'] . '&quot; (#id : "' . $itemId . '") (x' . $col . ') был пожертвован клану &quot;' . $clanName . '&quot; (' . $clanId . ').', '&quot;System.transfer.MONEY&quot;: Предмет &quot;' . $item['name'] . '&quot; (#id : "' . $itemId . '") (x' . $col . ') был пожертвован клану &quot;' . $clanName . '&quot; (' . $clanId . ').',
time(),
$user['city'],
'System.transfer.clan',
0,
0
); );
$sendType = 4; $sendType = 4;
} else { } else {

View File

@ -7,18 +7,19 @@ class Delo
{ {
/** /**
* Запись в личное дело персонажа. * Запись в личное дело персонажа.
* @param int $uid кому пишется * @param int $type цифровой тип лога (??)
* @param string $text текст * @param string $from отправитель записи
* @param string $from отправитель записи * @param int $uid кому пишется
* @param float $moneyOut количество денег снятых с игрока * @param string $text текст
* @param int $type цифровой тип лога (??) * @param float $moneyOut количество денег снятых с игрока
* @param float $moneyIn количество денег полученных игроком
* @return void * @return void
*/ */
public static function add(int $type, string $from, int $uid, string $text, float $moneyOut = 0): void public static function add(int $type, string $from, int $uid, string $text, float $moneyOut = 0, float $moneyIn = 0): void
{ {
$sql = 'insert into users_delo (uid, time, text, login, `delete`, no_right, ip, moneyOut, type) values (?,unix_timestamp(),?,?,0,?,?,?,?)'; $sql = 'insert into users_delo (uid, time, text, login, `delete`, no_right, ip, moneyOut, moneyIn, type) values (?,unix_timestamp(),?,?,0,?,?,?,?,?)';
Db::sql($sql, [ Db::sql($sql, [
$uid, $text, $from, '', UserIp::get(), $moneyOut, $type, $uid, $text, $from, '', UserIp::get(), $moneyOut, $moneyIn, $type,
]); ]);
} }

View File

@ -1,5 +1,8 @@
<?php <?php
use Helper\Conversion;
use User\ItemsModel;
class Dialog class Dialog
{ {
private array $info; private array $info;
@ -208,7 +211,7 @@ class Dialog
//Выдаем предмет для квеста //Выдаем предмет для квеста
$itmb = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "' . $act1[8] . '" LIMIT 1')); $itmb = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "' . $act1[8] . '" LIMIT 1'));
if (isset($itmb['id'])) { if (isset($itmb['id'])) {
\User\ItemsModel::addItem($act1[8], $u->info['id'], '|nodelete=1'); ItemsModel::addItem($act1[8], $u->info['id'], '|nodelete=1');
$txt .= '<br><b><font color=red>Вы получили предмет &quot;' . $itmb['name'] . '&quot;</font></b>'; $txt .= '<br><b><font color=red>Вы получили предмет &quot;' . $itmb['name'] . '&quot;</font></b>';
} }
} }
@ -229,16 +232,16 @@ class Dialog
$txt .= ' за ' . $act1[2] . ' екр.'; $txt .= ' за ' . $act1[2] . ' екр.';
} }
if ($act1[3] > 0) { if ($act1[3] > 0) {
$txt .= ' на срок ' . $u->timeOut($act1[3]) . ''; $txt .= ' на срок ' . Conversion::secondsToTimeout($act1[3]);
$act1dt .= '|srok=' . $act1[3] . ''; $act1dt .= '|srok=' . $act1[3];
} }
$txt .= '</font></b>'; $txt .= '</font></b>';
\User\ItemsModel::addItem($itmb['id'], $u->info['id'], $act1dt); ItemsModel::addItem($itmb['id'], $u->info['id'], $act1dt);
$pg = $act1[4]; $pg = $act1[4];
} }
} else { } else {
$txt .= '<br><b><font color=red>Неудалось приобрести предмет...</font></b>'; $txt .= '<br><b style="color: red">Неудалось приобрести предмет...</b>';
$pg = 1; $pg = 1;
} }
} elseif ($act1[0] == 'quest') { } elseif ($act1[0] == 'quest') {
@ -263,7 +266,7 @@ class Dialog
} }
$ic2 = 1; $ic2 = 1;
while ($ic2 <= $act3[2]) { while ($ic2 <= $act3[2]) {
\User\ItemsModel::addItem($itmqs['id'], $u->info['id'], '|quest_item=1', ['del' => $act3[3]]); ItemsModel::addItem($itmqs['id'], $u->info['id'], '|quest_item=1', ['del' => $act3[3]]);
$ic2++; $ic2++;
} }
} }
@ -393,7 +396,7 @@ class Dialog
if ($upd) { if ($upd) {
if ($itik > 0) { if ($itik > 0) {
//Выдаем предметы //Выдаем предметы
\User\ItemsModel::addItem($itik, $u->info['id'], '|nosale=1|srok=' . (7 * 86400) . '', null, 1); ItemsModel::addItem($itik, $u->info['id'], '|nosale=1|srok=' . (7 * 86400) . '', null, 1);
$itm_nm = mysql_fetch_array(mysql_query('SELECT `name` FROM `items_main` WHERE `id` = "' . $itik . '" LIMIT 1')); $itm_nm = mysql_fetch_array(mysql_query('SELECT `name` FROM `items_main` WHERE `id` = "' . $itik . '" LIMIT 1'));
$txt = 'Вы получили предмет &quot;' . $itm_nm['name'] . '&quot;'; $txt = 'Вы получили предмет &quot;' . $itm_nm['name'] . '&quot;';
} else { } else {
@ -413,7 +416,7 @@ class Dialog
} }
$arts_1 = $arts_1[rand(0, count($arts_1) - 1)]; $arts_1 = $arts_1[rand(0, count($arts_1) - 1)];
if ($arts_1 > 0) { if ($arts_1 > 0) {
\User\ItemsModel::addItem($arts_1, $u->info['id'], '|sroknext=1|nosale=1|sleep_moroz=1|srok=' . (86400 / 2) . '', null, 100); ItemsModel::addItem($arts_1, $u->info['id'], '|sroknext=1|nosale=1|sleep_moroz=1|srok=' . (86400 / 2) . '', null, 100);
} }
$itm_nm = mysql_fetch_array(mysql_query('SELECT `name` FROM `items_main` WHERE `id` = "' . $arts_1 . '" LIMIT 1')); $itm_nm = mysql_fetch_array(mysql_query('SELECT `name` FROM `items_main` WHERE `id` = "' . $arts_1 . '" LIMIT 1'));
@ -433,7 +436,7 @@ class Dialog
} }
$arts_1 = $arts_1[rand(0, count($arts_1) - 1)]; $arts_1 = $arts_1[rand(0, count($arts_1) - 1)];
if ($arts_1 > 0) { if ($arts_1 > 0) {
\User\ItemsModel::addItem($arts_1, $u->info['id'], '|sroknext=1|nosale=1|sleep_moroz=1|srok=' . (86400 / 2) . '', null, 100); ItemsModel::addItem($arts_1, $u->info['id'], '|sroknext=1|nosale=1|sleep_moroz=1|srok=' . (86400 / 2) . '', null, 100);
} }
$itm_nm = mysql_fetch_array(mysql_query('SELECT `name` FROM `items_main` WHERE `id` = "' . $arts_1 . '" LIMIT 1')); $itm_nm = mysql_fetch_array(mysql_query('SELECT `name` FROM `items_main` WHERE `id` = "' . $arts_1 . '" LIMIT 1'));
@ -523,7 +526,7 @@ class Dialog
$data = '|frompisher=' . $d->info['id2']; $data = '|frompisher=' . $d->info['id2'];
$e = 1; $e = 1;
while ($e <= $t[0]) { while ($e <= $t[0]) {
\User\ItemsModel::addItem($cn[$i]['add'][0], $u->info['id'], $data); ItemsModel::addItem($cn[$i]['add'][0], $u->info['id'], $data);
$e++; $e++;
} }
$txt .= $cn[$i][$j]['n'] . ' x' . ($t[0] * $this->objLevel($cn[$i][$j], $u->info['level'])) . ' = ' . $cn[$i]['add'][1] . ' x' . $t[0] . '<br>'; $txt .= $cn[$i][$j]['n'] . ' x' . ($t[0] * $this->objLevel($cn[$i][$j], $u->info['level'])) . ' = ' . $cn[$i]['add'][1] . ' x' . $t[0] . '<br>';
@ -569,7 +572,7 @@ class Dialog
$data = '|frompisher=' . $d->info['id2']; $data = '|frompisher=' . $d->info['id2'];
$e = 1; $e = 1;
while ($e <= $t[0]) { while ($e <= $t[0]) {
\User\ItemsModel::addItem($cn[$i]['add'][0], $u->info['id'], $data); ItemsModel::addItem($cn[$i]['add'][0], $u->info['id'], $data);
$e++; $e++;
} }
$txt .= $cn[$i][$j]['n'] . ' x' . ($t[0] * $this->objLevel($cn[$i][$j], $u->info['level'])) . ' = ' . $cn[$i]['add'][1] . ' x' . $t[0] . '<br>'; $txt .= $cn[$i][$j]['n'] . ' x' . ($t[0] * $this->objLevel($cn[$i][$j], $u->info['level'])) . ' = ' . $cn[$i]['add'][1] . ' x' . $t[0] . '<br>';
@ -615,7 +618,7 @@ class Dialog
$data = '|frompisher=' . $d->info['id2']; $data = '|frompisher=' . $d->info['id2'];
$e = 1; $e = 1;
while ($e <= $t[0]) { while ($e <= $t[0]) {
\User\ItemsModel::addItem($cn[$i]['add'][0], $u->info['id'], $data); ItemsModel::addItem($cn[$i]['add'][0], $u->info['id'], $data);
$e++; $e++;
} }
$txt .= $cn[$i][$j]['n'] . ' x' . ($t[0] * $this->objLevel($cn[$i][$j], $u->info['level'])) . ' = ' . $cn[$i]['add'][1] . ' x' . $t[0] . '<br>'; $txt .= $cn[$i][$j]['n'] . ' x' . ($t[0] * $this->objLevel($cn[$i][$j], $u->info['level'])) . ' = ' . $cn[$i]['add'][1] . ' x' . $t[0] . '<br>';
@ -647,7 +650,7 @@ class Dialog
if (isset($keypr1['id'], $keypr2['id'])) { if (isset($keypr1['id'], $keypr2['id'])) {
mysql_query('DELETE FROM `items_users` WHERE `id` = "' . $keypr1['id'] . '" OR `id` = "' . $keypr2['id'] . '" LIMIT 2'); mysql_query('DELETE FROM `items_users` WHERE `id` = "' . $keypr1['id'] . '" OR `id` = "' . $keypr2['id'] . '" LIMIT 2');
$data = '|frompisher=' . $d->info['id2']; $data = '|frompisher=' . $d->info['id2'];
\User\ItemsModel::addItem(2555, $u->info['id'], $data); ItemsModel::addItem(2555, $u->info['id'], $data);
$txt = 'Вы успешно получили &quot;Пирамидальный ключ&quot;'; $txt = 'Вы успешно получили &quot;Пирамидальный ключ&quot;';
} }
@ -690,7 +693,7 @@ class Dialog
$data = '|frompisher=' . $d->info['id2']; $data = '|frompisher=' . $d->info['id2'];
$e = 1; $e = 1;
while ($e <= $t[0]) { while ($e <= $t[0]) {
\User\ItemsModel::addItem($cn[$i][$j]['add'][0], $u->info['id'], $data); ItemsModel::addItem($cn[$i][$j]['add'][0], $u->info['id'], $data);
$e++; $e++;
} }
mysql_query('DELETE FROM `items_users` WHERE `id` = "' . $keypr['id'] . '" LIMIT 1'); mysql_query('DELETE FROM `items_users` WHERE `id` = "' . $keypr['id'] . '" LIMIT 1');
@ -746,7 +749,7 @@ class Dialog
$data = '|frompisher=' . $d->info['id2']; $data = '|frompisher=' . $d->info['id2'];
$e = 1; $e = 1;
while ($e <= $t[0]) { while ($e <= $t[0]) {
\User\ItemsModel::addItem($cn[$i][$j]['add'][0], $u->info['id'], $data); ItemsModel::addItem($cn[$i][$j]['add'][0], $u->info['id'], $data);
$e++; $e++;
} }
mysql_query('DELETE FROM `items_users` WHERE `id` = "' . $keypr['id'] . '" LIMIT 1'); mysql_query('DELETE FROM `items_users` WHERE `id` = "' . $keypr['id'] . '" LIMIT 1');
@ -802,7 +805,7 @@ class Dialog
$data = '|frompisher=' . $d->info['id2']; $data = '|frompisher=' . $d->info['id2'];
$e = 1; $e = 1;
while ($e <= $t[0]) { while ($e <= $t[0]) {
\User\ItemsModel::addItem($cn[$i][$j]['add'][0], $u->info['id'], $data); ItemsModel::addItem($cn[$i][$j]['add'][0], $u->info['id'], $data);
$e++; $e++;
} }
$txt .= $cn[$i][$j]['n'] . ' x' . ($t[0] * $this->objLevel($cn[$i][$j], $u->info['level'])) . ' = ' . $cn[$i][$j]['add'][1] . ' x' . $t[0] . '<br>'; $txt .= $cn[$i][$j]['n'] . ' x' . ($t[0] * $this->objLevel($cn[$i][$j], $u->info['level'])) . ' = ' . $cn[$i][$j]['add'][1] . ' x' . $t[0] . '<br>';
@ -957,7 +960,7 @@ class Dialog
$qsw = 0; $qsw = 0;
while ($qsw < $item['colvo']) { while ($qsw < $item['colvo']) {
$txt .= '<br/>Вы получили предмет'; $txt .= '<br/>Вы получили предмет';
\User\ItemsModel::addItem($item['item_id'], $u->info['id']); ItemsModel::addItem($item['item_id'], $u->info['id']);
$qsw++; $qsw++;
} }
} }
@ -1214,7 +1217,7 @@ class Dialog
$val = 4799; $val = 4799;
} }
} }
\User\ItemsModel::addItem($val, $u->info['id'], $data_itm); ItemsModel::addItem($val, $u->info['id'], $data_itm);
$i1++; $i1++;
} }
} elseif ($var == 'up') { } elseif ($var == 'up') {

View File

@ -1050,7 +1050,7 @@ class Dungeon
); );
if (isset($it['id'])) { if (isset($it['id'])) {
$r .= 'Вы обнаружили предмет &quot;<b>' . $it['name'] . '</b>&quot;.<br>'; $r .= 'Вы обнаружили предмет &quot;<b>' . $it['name'] . '</b>&quot;.<br>';
$this->addItem( ItemsModel::addItem(
['uid' => $this->userinfo['id'], 'iid' => $it['id'], 'x' => $this->userinfo['x'], 'y' => $this->userinfo['y'], 'del' => (int)$itm[4]] ['uid' => $this->userinfo['id'], 'iid' => $it['id'], 'x' => $this->userinfo['x'], 'y' => $this->userinfo['y'], 'del' => (int)$itm[4]]
); );
} }
@ -1099,7 +1099,7 @@ class Dungeon
$u->addAction( $u->addAction(
time(), 'takeit_' . $this->info['id'] . '_' . $obj['id'], $this->userinfo['city'] time(), 'takeit_' . $this->info['id'] . '_' . $obj['id'], $this->userinfo['city']
); );
$this->addItem( ItemsModel::addItem(
['uid' => $this->userinfo['id'], 'iid' => $it['id'], 'x' => $this->userinfo['x'], 'y' => $this->userinfo['y'], 'del' => (int)$itm[4]] ['uid' => $this->userinfo['id'], 'iid' => $it['id'], 'x' => $this->userinfo['x'], 'y' => $this->userinfo['y'], 'del' => (int)$itm[4]]
); );
$nj++; $nj++;
@ -1147,7 +1147,7 @@ class Dungeon
$u->addAction( $u->addAction(
time(), 'takeit_' . $this->info['id'] . '_' . $obj['id'], $this->userinfo['city'] time(), 'takeit_' . $this->info['id'] . '_' . $obj['id'], $this->userinfo['city']
); );
$this->addItem( ItemsModel::addItem(
['uid' => $this->userinfo['id'], 'iid' => $it['id'], 'x' => $this->userinfo['x'], 'y' => $this->userinfo['y'], 'del' => (int)$itm[4]] ['uid' => $this->userinfo['id'], 'iid' => $it['id'], 'x' => $this->userinfo['x'], 'y' => $this->userinfo['y'], 'del' => (int)$itm[4]]
); );
$nj++; $nj++;

View File

@ -4,6 +4,7 @@ namespace Location;
use Chat; use Chat;
use ChatMessage; use ChatMessage;
use Delo;
use User; use User;
class DeathTower class DeathTower
@ -12,7 +13,7 @@ class DeathTower
{ {
$user = User::start(); $user = User::start();
if ($bu) { if ($bu) {
/* в этом бою проверяем юзеров */ /* <EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
$i = 0; $i = 0;
while ($i < count($bu[$i])) { while ($i < count($bu[$i])) {
if ($bu[$i]['lose'] > 0 || $bu[$i]['nich']) { if ($bu[$i]['lose'] > 0 || $bu[$i]['nich']) {
@ -22,7 +23,7 @@ class DeathTower
mysql_query( mysql_query(
'UPDATE `bs_turnirs` SET `users_finish` = `users_finish` + 1 WHERE `id` = "' . $id['id'] . '" LIMIT 1' 'UPDATE `bs_turnirs` SET `users_finish` = `users_finish` + 1 WHERE `id` = "' . $id['id'] . '" LIMIT 1'
); );
/* удаляем юзера */ /* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> */
if ($bu['inBot'] == 0) { if ($bu['inBot'] == 0) {
$pls1 = mysql_fetch_array( $pls1 = mysql_fetch_array(
mysql_query( mysql_query(
@ -33,7 +34,7 @@ class DeathTower
mysql_query('DELETE FROM `users` WHERE `id` = "' . $bu[$i]['id'] . '" LIMIT 1'); mysql_query('DELETE FROM `users` WHERE `id` = "' . $bu[$i]['id'] . '" LIMIT 1');
mysql_query('DELETE FROM `stats` WHERE `id` = "' . $bu[$i]['id'] . '" LIMIT 1'); mysql_query('DELETE FROM `stats` WHERE `id` = "' . $bu[$i]['id'] . '" LIMIT 1');
//выкидываем предметы на землю //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>
$spi = mysql_query( $spi = mysql_query(
'SELECT `id`,`item_id` FROM `items_users` WHERE `uid` = "' . $bu[$i]['id'] . '" LIMIT 500' 'SELECT `id`,`item_id` FROM `items_users` WHERE `uid` = "' . $bu[$i]['id'] . '" LIMIT 500'
); );
@ -88,9 +89,9 @@ class DeathTower
$chat = new Chat(); $chat = new Chat();
$cmsg = new ChatMessage(); $cmsg = new ChatMessage();
/* завершаем БС */ /* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> */
if (isset($win['id']) && $win['lose'] == 0 && $win['nich'] == 0 && $win['id'] > 0) { if (isset($win['id']) && $win['lose'] == 0 && $win['nich'] == 0 && $win['id'] > 0) {
//есть победитель //<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
$bsep = 0; $bsep = 0;
if ($winr['level'] < 6) { if ($winr['level'] < 6) {
$bsep = 2500; $bsep = 2500;
@ -103,7 +104,7 @@ class DeathTower
} else { } else {
$bsep = 50000; $bsep = 50000;
} }
/* Выдаем приз */ /* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> */
$mn = (round($id['money'] / 100 * 85)); $mn = (round($id['money'] / 100 * 85));
mysql_query( mysql_query(
'UPDATE `users` SET `money` = `money` + "' . $mn . '" WHERE `id` = "' . $winr['id'] . '" LIMIT 1' 'UPDATE `users` SET `money` = `money` + "' . $mn . '" WHERE `id` = "' . $winr['id'] . '" LIMIT 1'
@ -111,10 +112,10 @@ class DeathTower
mysql_query( mysql_query(
'UPDATE `stats` SET `exp` = `exp` + "' . $bsep . '" WHERE `id` = "' . $winr['id'] . '" LIMIT 1' 'UPDATE `stats` SET `exp` = `exp` + "' . $bsep . '" WHERE `id` = "' . $winr['id'] . '" LIMIT 1'
); );
/* чат */ /* <EFBFBD><EFBFBD><EFBFBD> */
$cmsg->setTo($winr['login']); $cmsg->setTo($winr['login']);
$cmsg->setText( $cmsg->setText(
"Поздравляем! Вы победили в турнире &quot;Башня Смерти&quot;! Получено опыта: $bsep, деньги: $mn кр." "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>! <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> &quot;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>&quot;! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>: $bsep, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: $mn <20><>."
); );
$cmsg->setType(6); $cmsg->setType(6);
$chat->sendMsg($cmsg); $chat->sendMsg($cmsg);
@ -122,21 +123,23 @@ class DeathTower
$cmsg->setTo(''); $cmsg->setTo('');
$cmsg->setIsAlert(true); $cmsg->setIsAlert(true);
$cmsg->setText( $cmsg->setText(
"Завершился турнир &quot;Башня Смерти&quot;, победитель турнира: <strong>{$winr['login']}</strong>! Поздравляем!" "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> &quot;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>&quot;, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <strong>{$winr['login']}</strong>! <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!"
); );
$cmsg->setType(5); $cmsg->setType(5);
$chat->sendMsg($cmsg); $chat->sendMsg($cmsg);
$user->addDelo( Delo::add(
1, $uid, 1,
'&quot;<span style="color: #C65F00; ">WinTournament.' . $user->info['city'] . '</span>&quot; (Башня Смерти): Получено &quot;<strong>' . $mn . '</strong> кр.&quot;', 'WinTournament.' . $user->info['city'],
time(), $user->info['city'], 'WinTournament.' . $user->info['city'], 0, 0 $uid,
'&quot;<span style="color: #C65F00; ">WinTournament.' . $user->info['city'] . '</span>&quot; (<28><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>): <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> &quot;<strong>' . $mn . '</strong> <20><>.&quot;',
); );
} else { } else {
/* чат */ /* <EFBFBD><EFBFBD><EFBFBD> */
$cmsg->setIsAlert(true); $cmsg->setIsAlert(true);
$cmsg->setType(5); $cmsg->setType(5);
$cmsg->setText('Завершился турнир «Башня Смерти», победитель турнира: отсутствует.'); $cmsg->setText('<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.');
} }
$sp = mysql_query( $sp = mysql_query(

View File

@ -91,12 +91,12 @@ class Magic
mysql_query( mysql_query(
'UPDATE `items_users` SET `iznosNOW` = "' . $itm['iznosNOW'] . '" WHERE `id` = "' . $itm['id'] . '" AND `uid` = "' . $u->info['id'] . '" LIMIT 1' 'UPDATE `items_users` SET `iznosNOW` = "' . $itm['iznosNOW'] . '" WHERE `id` = "' . $itm['id'] . '" AND `uid` = "' . $u->info['id'] . '" LIMIT 1'
); );
$u->addDelo( Delo::add(
1, $u->info['id'], 1,
'&quot;<font color="maroon">System.inventory</font>&quot;:<B>(КАСТ СГОРЕЛ)</b> Персонаж использовал &quot;' . $itm['name'] . '&quot; (' . $us[1] . ') [itm:' . $itm['id'] . '].', 'System.inventory',
time(), $u->info['city'], 'System.inventory', 0, 0 $u->info['id'],
'&quot;<span style="color: maroon; ">System.inventory</span>&quot;:<B>(КАСТ СГОРЕЛ)</b> Персонаж использовал &quot;' . $itm['name'] . '&quot; (' . $us[1] . ') [itm:' . $itm['id'] . '].',
); );
} elseif (isset($st['usefromfile'])) { } elseif (isset($st['usefromfile'])) {
//используем заклятие //используем заклятие
@ -249,10 +249,11 @@ class Magic
mysql_query( mysql_query(
'UPDATE `stats` SET `hpNow` = "' . $u->info['hpNow'] . '", `mpNow` = "' . $u->info['mpNow'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1' 'UPDATE `stats` SET `hpNow` = "' . $u->info['hpNow'] . '", `mpNow` = "' . $u->info['mpNow'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
); );
$u->addDelo( Delo::add(
1, $u->info['id'], 1,
'&quot;<font color="maroon">System.inventory</font>&quot;: Персонаж использовал эликсир &quot;' . $itm['name'] . '&quot; (+' . $use['moment_hp'] . ' HP) [itm:' . $itm['id'] . '].', 'System.inventory',
time(), $u->info['city'], 'System.inventory', 0, 0 $u->info['id'],
'&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Персонаж использовал эликсир &quot;' . $itm['name'] . '&quot; (+' . $use['moment_hp'] . ' HP) [itm:' . $itm['id'] . '].',
); );
$this->youuse++; $this->youuse++;
$u->error = 'Вы успешно использовали эликсир &quot;' . $itm['name'] . '&quot;<br>' . $u->error . ''; $u->error = 'Вы успешно использовали эликсир &quot;' . $itm['name'] . '&quot;<br>' . $u->error . '';
@ -303,10 +304,11 @@ class Magic
mysql_query( mysql_query(
'UPDATE `items_users` SET `iznosNOW` = "' . $itm['iznosNOW'] . '" WHERE `id` = "' . $itm['id'] . '" AND `uid` = "' . $u->info['id'] . '" LIMIT 1' 'UPDATE `items_users` SET `iznosNOW` = "' . $itm['iznosNOW'] . '" WHERE `id` = "' . $itm['id'] . '" AND `uid` = "' . $u->info['id'] . '" LIMIT 1'
); );
$u->addDelo( Delo::add(
1, $u->info['id'], 1,
'&quot;<font color="maroon">System.inventory</font>&quot;: Персонаж использовал эликсир &quot;' . $itm['name'] . '&quot; (' . $us[1] . ') [itm:' . $itm['id'] . '].', 'System.inventory',
time(), $u->info['city'], 'System.inventory', 0, 0 $u->info['id'],
'&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Персонаж использовал эликсир &quot;' . $itm['name'] . '&quot; (' . $us[1] . ') [itm:' . $itm['id'] . '].',
); );
$this->youuse++; $this->youuse++;
$u->error = 'Вы успешно использовали эликсир &quot;' . $itm['name'] . '&quot;<br>' . $us[1] . ''; $u->error = 'Вы успешно использовали эликсир &quot;' . $itm['name'] . '&quot;<br>' . $us[1] . '';
@ -1418,22 +1420,26 @@ class Magic
); );
} }
if ($u->info['id'] != $usr['id']) { if ($u->info['id'] != $usr['id']) {
$u->addDelo( Delo::add(
1, $u->info['id'], 1,
'&quot;<font color="maroon">System.inventory</font>&quot;: Персонаж использовал заклинание &quot;' . $itm['name'] . '&quot; (' . $us[1] . ') на персонажа &quot;' . $usr['login'] . '&quot; (id' . $usr['id'] . ') [itm:' . $itm['id'] . '].', 'System.inventory',
time(), $u->info['city'], 'System.inventory', 0, 0 $u->info['id'],
'&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Персонаж использовал заклинание &quot;' . $itm['name'] . '&quot; (' . $us[1] . ') на персонажа &quot;' . $usr['login'] . '&quot; (id' . $usr['id'] . ') [itm:' . $itm['id'] . '].',
); );
$u->addDelo( Delo::add(
1, $usr['id'], 1,
'&quot;<font color="maroon">System.inventory</font>&quot;: Персонаж &quot;' . $u->info['login'] . '&quot; (id' . $u->info['id'] . ') использовал заклинание &quot;' . $itm['name'] . '&quot; (' . $us[1] . ') на персонажа [itm:' . $itm['id'] . '].', 'System.inventory',
time(), $usr['city'], 'System.inventory', 0, 0 $usr['id'],
'&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Персонаж &quot;' . $u->info['login'] . '&quot; (id' . $u->info['id'] . ') использовал заклинание &quot;' . $itm['name'] . '&quot; (' . $us[1] . ') на персонажа [itm:' . $itm['id'] . '].',
); );
$u->error = 'Вы успешно использовали заклинание &quot;' . $itm['name'] . '&quot; на персонажа &quot;' . $usr['login'] . '&quot;<br>' . $us[1] . ''; $u->error = 'Вы успешно использовали заклинание &quot;' . $itm['name'] . '&quot; на персонажа &quot;' . $usr['login'] . '&quot;<br>' . $us[1] . '';
} else { } else {
$u->addDelo( Delo::add(
1, $u->info['id'], 1,
'&quot;<font color="maroon">System.inventory</font>&quot;: Персонаж использовал заклинание &quot;' . $itm['name'] . '&quot; (' . $us[1] . ') на персонажа самого себя [itm:' . $itm['id'] . '].', 'System.inventory',
time(), $u->info['city'], 'System.inventory', 0, 0 $u->info['id'],
'&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Персонаж использовал заклинание &quot;' . $itm['name'] . '&quot; (' . $us[1] . ') на персонажа самого себя [itm:' . $itm['id'] . '].',
); );
$u->error = 'Вы успешно использовали заклинание &quot;' . $itm['name'] . '&quot; на самого себя<br>' . $us[1] . ''; $u->error = 'Вы успешно использовали заклинание &quot;' . $itm['name'] . '&quot; на самого себя<br>' . $us[1] . '';
@ -1566,7 +1572,7 @@ class Magic
} }
} else { } else {
$u->error = 'Задержка использования ' . $u->timeOut( $u->error = 'Задержка использования ' . Conversion::secondsToTimeout(
($sz['time'] + 4 * 60 * 60) - time() ($sz['time'] + 4 * 60 * 60) - time()
) . '.'; ) . '.';
} }
@ -1606,7 +1612,7 @@ class Magic
); );
$u->addAction(time(), 'sanich1', $u->info['battle']); $u->addAction(time(), 'sanich1', $u->info['battle']);
} else { } else {
$u->error = 'Задержка использования ' . $u->timeOut(($sz['time'] + 6 * 60) - time()) . '.'; $u->error = 'Задержка использования ' . Conversion::secondsToTimeout(($sz['time'] + 6 * 60) - time()) . '.';
} }
} elseif ($itm['magic_inci'] == 'sanich3' && $u->info['battle'] > 0) { } elseif ($itm['magic_inci'] == 'sanich3' && $u->info['battle'] > 0) {
@ -1654,7 +1660,7 @@ class Magic
} }
} else { } else {
$u->error = 'Задержка использования ' . $u->timeOut( $u->error = 'Задержка использования ' . Conversion::secondsToTimeout(
($sz['time'] + 3 * 60 * 60) - time() ($sz['time'] + 3 * 60 * 60) - time()
) . '.'; ) . '.';
} }
@ -1950,10 +1956,11 @@ class Magic
'UPDATE `items_users` SET `inGroup` = "0", `delete` = "0" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' 'UPDATE `items_users` SET `inGroup` = "0", `delete` = "0" WHERE `id` = "' . $itm['id'] . '" LIMIT 1'
); );
} }
$u->addDelo( Delo::add(
1, $u->info['id'], 1,
'&quot;<font color="maroon">System.inventory</font>&quot;: Персонаж использовал заклинание &quot;' . $itm['name'] . '&quot; (' . $us[1] . ') [itm:' . $itm['id'] . '].', 'System.inventory',
time(), $u->info['city'], 'System.inventory', 0, 0 $u->info['id'],
'&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Персонаж использовал заклинание &quot;' . $itm['name'] . '&quot; (' . $us[1] . ') [itm:' . $itm['id'] . '].',
); );
} else { } else {
$u->error = 'Не удалось использовать "' . $itm['name'] . '", что-то здесь не так ...'; $u->error = 'Не удалось использовать "' . $itm['name'] . '", что-то здесь не так ...';
@ -1974,10 +1981,11 @@ class Magic
'UPDATE `items_users` SET `inGroup` = "0", `delete` = "0" WHERE `id` = "' . $itm['id'] . '" LIMIT 1' 'UPDATE `items_users` SET `inGroup` = "0", `delete` = "0" WHERE `id` = "' . $itm['id'] . '" LIMIT 1'
); );
} }
$u->addDelo( Delo::add(
1, $u->info['id'], 1,
'&quot;<font color="maroon">System.inventory</font>&quot;: Персонаж использовал заклинание &quot;' . $itm['name'] . '&quot; (' . $us[1] . ') [itm:' . $itm['id'] . '].', 'System.inventory',
time(), $u->info['city'], 'System.inventory', 0, 0 $u->info['id'],
'&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Персонаж использовал заклинание &quot;' . $itm['name'] . '&quot; (' . $us[1] . ') [itm:' . $itm['id'] . '].',
); );
$this->youuse++; $this->youuse++;
$u->error = 'Вы успешно использовали заклинание &quot;' . $itm['name'] . '&quot;<br>' . $us[1] . ''; $u->error = 'Вы успешно использовали заклинание &quot;' . $itm['name'] . '&quot;<br>' . $us[1] . '';

View File

@ -1,56 +1,24 @@
<?php <?php
if(!defined('GAME')) { if (!defined('GAME')) {
die(); die();
} }
if($itm['magic_inci'] == 396) { if (in_array($itm['magic_inci'], [396, 397, 398])) {
$eff = mysql_fetch_array(mysql_query('SELECT `id` FROM `eff_users` WHERE `uid` = "'.$u->info['id'].'" AND `id_eff` = 396 LIMIT 1')); $eff = mysql_fetch_array(mysql_query('SELECT `id` FROM `eff_users` WHERE `uid` = "' . $u->info['id'] . '" AND `id_eff` = '. $itm['magic_inci'] .' LIMIT 1'));
if(isset($eff['id'])) {
mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'" WHERE `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `id_eff` = "'.$itm['magic_inc'].'"');
$this->add_eff($u->info['id'],$itm['magic_inc']);
$u->addDelo(1,$u->info['id'], '&quot;<font color="maroon">System.inventory</font>&quot;: Персонаж использовал эликсир &quot;'.$itm['name'].'&quot; ('.$u->info['id'].') [itm:'.$itm['id'].'].',time(), $u->info['city'], 'System.inventory', 0, 0);
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
$u->error = 'Вы успешно использовали эликсир &quot;'.$itm['name'].'&quot;';
} else {
$this->add_eff($u->info['id'], $itm['magic_inc']);
$u->addDelo(1,$u->info['id'], '&quot;<font color="maroon">System.inventory</font>&quot;: Персонаж использовал эликсир &quot;'.$itm['name'].'&quot; ('.$u->info['id'].') [itm:'.$itm['id'].'].',time(), $u->info['city'], 'System.inventory', 0, 0);
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
$u->error = 'Вы успешно использовали эликсир &quot;'.$itm['name'].'&quot;';
}
} elseif($itm['magic_inci'] == 397) {
$eff = mysql_fetch_array(mysql_query('SELECT `id` FROM `eff_users` WHERE `uid` = "'.$u->info['id'].'" AND `id_eff` = 397 LIMIT 1'));
if(isset($eff['id'])) {
mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'" WHERE `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `id_eff` = "'.$itm['magic_inc'].'"');
$this->add_eff($u->info['id'],$itm['magic_inc']);
$u->addDelo(1,$u->info['id'], '&quot;<font color="maroon">System.inventory</font>&quot;: Персонаж использовал эликсир &quot;'.$itm['name'].'&quot; ('.$u->info['id'].') [itm:'.$itm['id'].'].',time(), $u->info['city'], 'System.inventory', 0, 0);
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
$u->error = 'Вы успешно использовали эликсир &quot;'.$itm['name'].'&quot;';
} else {
$this->add_eff($u->info['id'], $itm['magic_inc']);
$u->addDelo(1,$u->info['id'], '&quot;<font color="maroon">System.inventory</font>&quot;: Персонаж использовал эликсир &quot;'.$itm['name'].'&quot; ('.$u->info['id'].') [itm:'.$itm['id'].'].',time(), $u->info['city'], 'System.inventory', 0, 0);
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
$u->error = 'Вы успешно использовали эликсир &quot;'.$itm['name'].'&quot;';
}
} elseif($itm['magic_inci'] == 398) {
$eff = mysql_fetch_array(mysql_query('SELECT `id` FROM `eff_users` WHERE `uid` = "'.$u->info['id'].'" AND `id_eff` = 398 LIMIT 1'));
if(isset($eff['id'])) {
mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'" WHERE `uid` = "'.$u->info['id'].'" AND `delete` = "0" AND `id_eff` = "'.$itm['magic_inc'].'"');
$this->add_eff($u->info['id'],$itm['magic_inc']);
$u->addDelo(1,$u->info['id'], '&quot;<font color="maroon">System.inventory</font>&quot;: Персонаж использовал эликсир &quot;'.$itm['name'].'&quot; ('.$u->info['id'].') [itm:'.$itm['id'].'].',time(), $u->info['city'], 'System.inventory', 0, 0);
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
$u->error = 'Вы успешно использовали эликсир &quot;'.$itm['name'].'&quot;';
} else {
$this->add_eff($u->info['id'], $itm['magic_inc']);
$u->addDelo(1,$u->info['id'], '&quot;<font color="maroon">System.inventory</font>&quot;: Персонаж использовал эликсир &quot;'.$itm['name'].'&quot; ('.$u->info['id'].') [itm:'.$itm['id'].'].',time(), $u->info['city'], 'System.inventory', 0, 0);
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "'.$itm['iznosNOW'].'" WHERE `id` = '.$itm['id'].' LIMIT 1');
$u->error = 'Вы успешно использовали эликсир &quot;'.$itm['name'].'&quot;';
}
}
?> if (isset($eff['id'])) {
mysql_query('UPDATE `eff_users` SET `delete` = "' . time() . '" WHERE `uid` = "' . $u->info['id'] . '" AND `delete` = "0" AND `id_eff` = "' . $itm['magic_inc'] . '"');
}
$this->add_eff($u->info['id'], $itm['magic_inc']);
Delo::add(
1,
'System.inventory',
$u->info['id'],
'&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Персонаж использовал эликсир &quot;' . $itm['name'] . '&quot; (' . $u->info['id'] . ') [itm:' . $itm['id'] . '].',
);
$itm['iznosNOW']++;
mysql_query('UPDATE `items_users` SET `iznosNOW` = "' . $itm['iznosNOW'] . '" WHERE `id` = ' . $itm['id']);
$u->error = 'Вы успешно использовали эликсир &quot;' . $itm['name'] . '&quot;';
}

View File

@ -1,9 +1,7 @@
<?php <?php
if(!defined('GAME')) if (!defined('GAME')) {
{ die();
die();
} }
//добавляем снежок в инвентарь //добавляем снежок в инвентарь
$this->addItem(1000,$this->info['id']); ItemsModel::addItem(1000, $this->info['id']);
?>

View File

@ -1,61 +1,50 @@
<?php <?php
if(!defined('GAME')) if (!defined('GAME')) {
{ die();
die();
} }
if( $itm['magic_inci'] == 'antipropuskpsh' ) { if ($itm['magic_inci'] != 'antipropuskpsh') {
return;
}
$test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "'.$usr['id'].'" AND `vars` = "psh0" AND `time` > "'.time().'" LIMIT 1')); $test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "' . $usr['id'] . '" AND `vars` = "psh0" AND `time` > "' . time() . '" LIMIT 1'));
if(!isset($usr['id']) || $usr['room'] != $u->info['room']) { if (!isset($usr['id']) || $usr['room'] != $u->info['room']) {
$u->error = 'Неудалось найти персонажа &quot;'.htmlspecialchars($_GET['login']).'&quot; или он в другой комнате.'; $u->error = 'Неудалось найти персонажа &quot;' . htmlspecialchars($_GET['login']) . '&quot; или он в другой комнате.';
}elseif( $usr['admin'] > 0 || ($usr['align'] > 3 && $usr['align'] < 4) || ($usr['align'] > 1 && $usr['align'] < 2)) { } elseif ($usr['admin'] > 0 || ($usr['align'] > 3 && $usr['align'] < 4) || ($usr['align'] > 1 && $usr['align'] < 2)) {
$u->error = 'Не удалось использовать &quot;'.htmlspecialchars($_GET['login']).'&quot; под защитой.'; $u->error = 'Не удалось использовать &quot;' . htmlspecialchars($_GET['login']) . '&quot; под защитой.';
}elseif( $u->info['align'] != 2 ) { } elseif ($u->info['align'] != 2) {
if ($u->info['money']>100) if ($u->info['money'] > 100) {
{ if (!isset($test['id'])) {
$u->addAction(time() + 300, 'psh0', $usr['id'], $usr['id']);
if( !isset($test['id']) ) { $test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "' . $usr['id'] . '" AND `vars` = "psh0" AND `time` > "' . time() . '" LIMIT 1'));
$u->addAction( time()+300 ,'psh0',$usr['id'],$usr['id']); }
$test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "'.$usr['id'].'" AND `vars` = "psh0" AND `time` > "'.time().'" LIMIT 1')); $u->addAction(time(), 'propuskpsh', '', $usr['id']);
} $u->error = 'Все прошло успешно, задержки в пещеры увеличены на 24 часа для &quot;' . $usr['login'] . '&quot;.';
$u->addAction(time(),'propuskpsh','',$usr['id']); Delo::add(
$u->error = 'Все прошло успешно, задержки в пещеры увеличены на 24 часа для &quot;'.$usr['login'].'&quot;.'; 4,
$u->addDelo(4,$usr['id'],'&quot;<font color="olive">System.magic</font>&quot;: На персонажа применил магию Клаустрофобия '.$u->info['login'],time(),$usr['id'],'System.magic',0,0); 'System.magic',
$u->info['money'] = $u->info['money'] - 100; $usr['id'],
mysql_query('UPDATE `users` SET `money` = `money` -100 WHERE `id` = '.$u->info['id'].' LIMIT 1'); '&quot;<span style="color: olive; ">System.magic</span>&quot;: На персонажа применил магию Клаустрофобия ' . $u->info['login'],
/*if($test['time'] < time()) { );
$test['time'] = time(); $u->info['money'] = $u->info['money'] - 100;
} mysql_query('UPDATE `users` SET `money` = `money` -100 WHERE `id` = ' . $u->info['id'] . ' LIMIT 1');
$test['time'] += 86400;*/
$test['time'] = time() + 86400; $test['time'] = time() + 86400;
mysql_query('UPDATE `actions` SET `time` = "' . $test['time'] . '" WHERE `uid` = ' . $usr['id'] . ' AND `id` = "' . $test['id'] . '" LIMIT 1');
mysql_query('UPDATE `actions` SET `time` = "'.$test['time'].'" WHERE `uid` = '.$usr['id'].' AND `id` = "'.$test['id'].'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1');
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1'); $eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = 476 AND `uid` = "' . $usr['id'] . '" LIMIT 1'));
$eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = 476 AND `uid` = "'.$usr['id'].'" LIMIT 1')); if (isset($eff['id'])) {
if(isset($eff['id'])) mysql_query('DELETE FROM `eff_users` WHERE `id` = ' . $eff['id'] . ' AND `id_eff` = 476');
{ }
mysql_query('DELETE FROM `eff_users` WHERE `id` = '.$eff['id'].' AND `id_eff` = 476'); $this->add_eff($usr['id'], 476);
$this->add_eff($usr['id'],476); mysql_query(
mysql_query('UPDATE `eff_users` SET `name` = "Клаустрофобия «'.$u->info['login'].'»" WHERE `uid` = '.$usr['id'].' AND `uid` = "'.$usr['id'].'" AND `delete` = 0 AND `id_eff`= "476" LIMIT 1'); 'UPDATE `eff_users` SET `name` = "Клаустрофобия «' . $u->info['login'] . '»" WHERE `uid` = ' . $usr['id'] . ' AND `uid` = "' . $usr['id'] . '" AND `delete` = 0 AND `id_eff`= "476" LIMIT 1'
} );
else } else {
{ $u->error = 'У Вас недостаточно кр! Применение стоит 100кр.';
$this->add_eff($usr['id'],476); }
mysql_query('UPDATE `eff_users` SET `name` = "Клаустрофобия «'.$u->info['login'].'»" WHERE `uid` = '.$usr['id'].' AND `uid` = "'.$usr['id'].'" AND `delete` = 0 AND `id_eff`= "476" LIMIT 1'); } else {
} $u->error = 'Хаосники не могут пользоваться этим свитком!';
}
else
{
$u->error = 'У Вас недостаточно кр! Применение стоит 100кр.';
}
}else{
$u->error = 'Хаосники не могут пользоваться этим свитком!';
}
} }
?>

View File

@ -1,4 +1,7 @@
<?php <?php
use User\ItemsModel;
if(!defined('GAME')) if(!defined('GAME'))
{ {
die(); die();
@ -15,40 +18,40 @@ if(date('Y')==2013 || $u->info['id'] == 1) {
7. Новогодний Эликсир 7. Новогодний Эликсир
*/ */
//Снежок 0/13 (x1) //Снежок 0/13 (x1)
$idit = \User\ItemsModel::addItem(1000,$u->info['id']); $idit = ItemsModel::addItem(1000,$u->info['id']);
if($idit > 0) { if($idit > 0) {
mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "13" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "13" WHERE `id` = "'.$idit.'" LIMIT 1');
//Новогодний эликсир (x1) //Новогодний эликсир (x1)
$idit = \User\ItemsModel::addItem(997,$u->info['id']); $idit = ItemsModel::addItem(997,$u->info['id']);
mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "7" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "7" WHERE `id` = "'.$idit.'" LIMIT 1');
//Новогодний эликсир (x1) //Новогодний эликсир (x1)
$idit = \User\ItemsModel::addItem(2870,$u->info['id']); $idit = ItemsModel::addItem(2870,$u->info['id']);
mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "7" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "7" WHERE `id` = "'.$idit.'" LIMIT 1');
//Звездное сияние (x1) //Звездное сияние (x1)
$idit = \User\ItemsModel::addItem(1462,$u->info['id']); $idit = ItemsModel::addItem(1462,$u->info['id']);
mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "7" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "7" WHERE `id` = "'.$idit.'" LIMIT 1');
//Открытка (x1) //Открытка (x1)
$idit = \User\ItemsModel::addItem(996,$u->info['id']); $idit = ItemsModel::addItem(996,$u->info['id']);
mysql_query('UPDATE `items_users` SET `gift` = "Новый Год" , `gtxt1` = "Администрация проекта поздравляет Вас с Новым, 2013, Годом!" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Новый Год" , `gtxt1` = "Администрация проекта поздравляет Вас с Новым, 2013, Годом!" WHERE `id` = "'.$idit.'" LIMIT 1');
//Нападалка 0/13 (x1) //Нападалка 0/13 (x1)
$idit = \User\ItemsModel::addItem(874,$u->info['id']); $idit = ItemsModel::addItem(874,$u->info['id']);
mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "13" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "13" WHERE `id` = "'.$idit.'" LIMIT 1');
//Кольцо жизни (x1) //Кольцо жизни (x1)
$idit = \User\ItemsModel::addItem(2101,$u->info['id'],'|noremont=1|srok=1209600|sudba='.$u->info['login']); $idit = ItemsModel::addItem(2101,$u->info['id'],'|noremont=1|srok=1209600|sudba='.$u->info['login']);
mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "13" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "13" WHERE `id` = "'.$idit.'" LIMIT 1');
//Восстановление Энергии 900НР (x3) //Восстановление Энергии 900НР (x3)
$idit = \User\ItemsModel::addItem(2710,$u->info['id']); $idit = ItemsModel::addItem(2710,$u->info['id']);
mysql_query('UPDATE `items_users` SET `gift` = "Старый Год" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Старый Год" WHERE `id` = "'.$idit.'" LIMIT 1');
$idit = \User\ItemsModel::addItem(2710,$u->info['id']); $idit = ItemsModel::addItem(2710,$u->info['id']);
mysql_query('UPDATE `items_users` SET `gift` = "Старый Год" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Старый Год" WHERE `id` = "'.$idit.'" LIMIT 1');
$idit = \User\ItemsModel::addItem(2710,$u->info['id']); $idit = ItemsModel::addItem(2710,$u->info['id']);
mysql_query('UPDATE `items_users` SET `gift` = "Старый Год" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Старый Год" WHERE `id` = "'.$idit.'" LIMIT 1');
$u->error = 'Вы успешно использовали &quot;'.$itm['name'].'&quot;. В инвентарь добавлены подарки. С Новым, 2013, Годом!'; $u->error = 'Вы успешно использовали &quot;'.$itm['name'].'&quot;. В инвентарь добавлены подарки. С Новым, 2013, Годом!';

View File

@ -1,4 +1,7 @@
<?php <?php
use User\ItemsModel;
if(!defined('GAME')) if(!defined('GAME'))
{ {
die(); die();
@ -15,38 +18,38 @@ if(date('Y')==2023) {
7. Новогодний Эликсир 7. Новогодний Эликсир
*/ */
//рыба (x1) //рыба (x1)
$idit = \User\ItemsModel::addItem(5009,$u->info['id']); $idit = ItemsModel::addItem(5009,$u->info['id']);
if($idit > 0) { if($idit > 0) {
mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "3" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "3" WHERE `id` = "'.$idit.'" LIMIT 1');
//мастера //мастера
$idit = \User\ItemsModel::addItem(4041,$u->info['id']); $idit = ItemsModel::addItem(4041,$u->info['id']);
mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "3" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "3" WHERE `id` = "'.$idit.'" LIMIT 1');
//искуства //искуства
$idit = \User\ItemsModel::addItem(4948,$u->info['id']); $idit = ItemsModel::addItem(4948,$u->info['id']);
mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "3" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "3" WHERE `id` = "'.$idit.'" LIMIT 1');
//жж6 //жж6
$idit = \User\ItemsModel::addItem(3101,$u->info['id']); $idit = ItemsModel::addItem(3101,$u->info['id']);
mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "5" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "5" WHERE `id` = "'.$idit.'" LIMIT 1');
//Открытка (x1) //Открытка (x1)
$idit = \User\ItemsModel::addItem(996,$u->info['id']); $idit = ItemsModel::addItem(996,$u->info['id']);
mysql_query('UPDATE `items_users` SET `gift` = "Новый Год" , `gtxt1` = "Администрация проекта поздравляет Вас с Новым, 2023, Годом!" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Новый Год" , `gtxt1` = "Администрация проекта поздравляет Вас с Новым, 2023, Годом!" WHERE `id` = "'.$idit.'" LIMIT 1');
//точилка //точилка
$idit = \User\ItemsModel::addItem(6457,$u->info['id']); $idit = ItemsModel::addItem(6457,$u->info['id']);
mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "100" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "100" WHERE `id` = "'.$idit.'" LIMIT 1');
//чек на 100 екров //чек на 100 екров
$idit = \User\ItemsModel::addItem(5023,$u->info['id']); $idit = ItemsModel::addItem(5023,$u->info['id']);
mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "1" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "1" WHERE `id` = "'.$idit.'" LIMIT 1');
//цепь защитника //цепь защитника
$idit = \User\ItemsModel::addItem(6459,$u->info['id']); $idit = ItemsModel::addItem(6459,$u->info['id']);
mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "100" WHERE `id` = "'.$idit.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `gift` = "Старый Год",`iznosMAX` = "100" WHERE `id` = "'.$idit.'" LIMIT 1');

View File

@ -1,4 +1,7 @@
<?php <?php
use User\ItemsModel;
if(!defined('GAME')) if(!defined('GAME'))
{ {
die(); die();
@ -17,13 +20,13 @@ $rnd0['itm3'] = $rnd0[rand(0,count($rnd0))];
$rnd0['itm1'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($rnd0['itm1']).'" LIMIT 1')); $rnd0['itm1'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($rnd0['itm1']).'" LIMIT 1'));
$rnd0['itm2'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($rnd0['itm2']).'" LIMIT 1')); $rnd0['itm2'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($rnd0['itm2']).'" LIMIT 1'));
\User\ItemsModel::addItem($rnd0['itm1']['id'],$u->info['id'],'|srok=1209600|sudba='.$u->info['login']); ItemsModel::addItem($rnd0['itm1']['id'],$u->info['id'],'|srok=1209600|sudba='.$u->info['login']);
\User\ItemsModel::addItem($rnd0['itm2']['id'],$u->info['id'],'|srok=1209600|sudba='.$u->info['login']); ItemsModel::addItem($rnd0['itm2']['id'],$u->info['id'],'|srok=1209600|sudba='.$u->info['login']);
if(rand(0,7) == 2) { if(rand(0,7) == 2) {
$rnd0['itm3'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($rnd0['itm3']).'" LIMIT 1')); $rnd0['itm3'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($rnd0['itm3']).'" LIMIT 1'));
}else{ }else{
\User\ItemsModel::addItem($rnd0['itm3']['id'],$u->info['id'],'|srok=1209600|sudba='.$u->info['login']); ItemsModel::addItem($rnd0['itm3']['id'],$u->info['id'],'|srok=1209600|sudba='.$u->info['login']);
} }
$u->deleteItem($itm['id'],$u->info['id']); $u->deleteItem($itm['id'],$u->info['id']);

View File

@ -1,41 +1,38 @@
<?php <?php
if(!defined('GAME'))
{ use Helper\Conversion;
die();
if (!defined('GAME')) {
die();
} }
if( $itm['magic_inci'] == 'podvig' ) { if ($itm['magic_inci'] == 'podvig') {
$test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars` = "podvig" AND `time` > "'.(time()).'" LIMIT 1')); $test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "podvig" AND `time` > "' . (time()) . '" LIMIT 1'));
if( $u->info['align'] != 2 ) { if ($u->info['align'] != 2) {
if( isset($test['id']) ) { if (isset($test['id'])) {
$u->error = 'Задержка не прошла, еще '.$u->timeOut($test['time']-time()); $u->error = 'Задержка не прошла, еще ' . Conversion::secondsToTimeout($test['time'] - time());
}else{ } else {
// //
$dngcity = array( $dngcity = [
5035 => array('angelscity','Бездна'), 5035 => ['angelscity', 'Бездна'],
5036 => array('capitalcity','Пещера Тысячи Проклятий'), 5036 => ['capitalcity', 'Пещера Тысячи Проклятий'],
5037 => array('demonscity','Катакомбы'), 5037 => ['demonscity', 'Катакомбы'],
5038 => array('abandonedplain','Гора Легиона'), //mooncity 5038 => ['abandonedplain', 'Гора Легиона'], //mooncity
5039 => array('suncity','Грибница'), 5039 => ['suncity', 'Грибница'],
5040 => array('sandcity','Пещера Мглы') 5040 => ['sandcity', 'Пещера Мглы'],
); ];
// $dngcity = $dngcity[$itm['item_id']];
$dngcity = $dngcity[$itm['item_id']]; $hgo1 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `time` > "' . (time() - 86400) . '" AND `vars` = "psh_qt_' . $dngcity[0] . '" LIMIT 1', 1);
// if (!isset($hgo1['id'])) {
$hgo1 = $u->testAction('`uid` = "'.$u->info['id'].'" AND `time` > "'.(time()-86400).'" AND `vars` = "psh_qt_'.$dngcity[0].'" LIMIT 1',1); $u->error = 'Нет задержки для подземелья ' . $dngcity[1] . '.';
if(!isset($hgo1['id'])) { } else {
$u->error = 'Нет задержки для подземелья '.$dngcity[1].'.'; $u->addAction(time(), 'podvig', '');
}else{ $u->error = 'Успешно использован свиток Право на Подвиг (' . $dngcity[1] . ')';
// mysql_query('UPDATE `actions` SET `time` = "' . (time() - 86401) . '" WHERE `id` = "' . ($hgo1['id']) . '" LIMIT 1');
$u->addAction(time(),'podvig',''); mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = "' . $itm['id'] . '" LIMIT 1');
//$u->error = 'Все прошло успешно, задержки на получение задания в пещеру '.$dngcity[1].' снята.'; }
$u->error = 'Успешно использован свиток Право на Подвиг ('.$dngcity[1].')'; }
mysql_query('UPDATE `actions` SET `time` = "'.(time()-86401).'" WHERE `id` = "'.($hgo1['id']).'" LIMIT 1'); } else {
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = "'.$itm['id'].'" LIMIT 1'); $u->error = 'Хаосники не могут пользоваться этим свитком!';
} }
}
}else{
$u->error = 'Хаосники не могут пользоваться этим свитком!';
}
} }
?>

View File

@ -1,11 +1,11 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
$io .= '<i>Акционный клановый комплект</i>, '; $io .= '<i>Акционный клановый комплект</i>, ';
$this->addItem(11128,$this->info['id'],'|nosale=1|nodelete=1|sudba=0'); ItemsModel::addItem(11128, $this->info['id'], '|nosale=1|nodelete=1|sudba=0');
$this->addItem(11128,$this->info['id'],'|nosale=1|nodelete=1|sudba=0'); ItemsModel::addItem(11128, $this->info['id'], '|nosale=1|nodelete=1|sudba=0');
?>

View File

@ -1,35 +1,38 @@
<?php <?php
if(!defined('GAME'))
{ use Helper\Conversion;
die();
if (!defined('GAME')) {
die();
} }
if( $itm['magic_inci'] == 'propuskpsh' ) { if ($itm['magic_inci'] == 'propuskpsh') {
$test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars` = "propuskpsh" AND `time` > "'.(time()-300).'" LIMIT 1')); $test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "propuskpsh" AND `time` > "' . (time() - 300) . '" LIMIT 1'));
if( $u->info['align'] != 2 ) { if ($u->info['align'] != 2) {
if( isset($test['id']) ) { if (isset($test['id'])) {
$u->error = 'Задержка не прошла, еще '.$u->timeOut($test['time']-time()+300); $u->error = 'Задержка не прошла, еще ' . Conversion::secondsToTimeout($test['time'] - time() + 300);
}else{ } else {
$u->addAction(time(),'propuskpsh',''); $u->addAction(time(), 'propuskpsh', '');
$u->error = 'Все прошло успешно, задержки в пещеры снята 6 часов.'; $u->error = 'Все прошло успешно, задержки в пещеры снята 6 часов.';
mysql_query('UPDATE `actions` SET `time` = `time` - 21600 WHERE `uid` = '.$u->info['id'].' AND `time` > "'.(time()-43200).'" AND `vars` LIKE "psh%" AND `vars` != "psh102" AND `vars` NOT LIKE "psh\_%"'); mysql_query(
'UPDATE `actions` SET `time` = `time` - 21600 WHERE `uid` = ' . $u->info['id'] . ' AND `time` > "' . (time(
) - 43200) . '" AND `vars` LIKE "psh%" AND `vars` != "psh102" AND `vars` NOT LIKE "psh\_%"'
);
$eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = 476 AND `uid` = "'.$u->info['id'].'" LIMIT 1')); $eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = 476 AND `uid` = "' . $u->info['id'] . '" LIMIT 1'));
if(isset($eff['id'])) if (isset($eff['id'])) {
{ mysql_query('UPDATE `eff_users` SET `timeUse` = `timeUse` - 21600 WHERE `id` = ' . $eff['id'] . ' ');
mysql_query('UPDATE `eff_users` SET `timeUse` = `timeUse` - 21600 WHERE `id` = '.$eff['id'].' '); }
}
// Действует только на: // Действует только на:
// 1) где таймер меньше 12 часов. (чтобы очень старые походы не меняли время похода 4 свитка, и сутки назад, история походов некорректная). // 1) где таймер меньше 12 часов. (чтобы очень старые походы не меняли время похода 4 свитка, и сутки назад, история походов некорректная).
// 2) не сработает на Пещеру Драконов. // 2) не сработает на Пещеру Драконов.
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1');
} }
}else{ } else {
$u->error = 'Хаосники не могут пользоваться пропуском!'; $u->error = 'Хаосники не могут пользоваться пропуском!';
} }
} }
?>

View File

@ -1,37 +1,38 @@
<?php <?php
if(!defined('GAME'))
{ use Helper\Conversion;
die();
if (!defined('GAME')) {
die();
} }
if( $itm['magic_inci'] == 'propuskpsh2' ) { if ($itm['magic_inci'] == 'propuskpsh2') {
$test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars` = "propuskpsh" AND `time` > "'.(time()-300).'" LIMIT 1')); $test = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "propuskpsh" AND `time` > "' . (time() - 300) . '" LIMIT 1'));
if( $u->info['align'] != 2 ) { if ($u->info['align'] != 2) {
if( isset($test['id']) ) { if (isset($test['id'])) {
$u->error = 'Задержка не прошла, еще '.$u->timeOut($test['time']-time()+300); $u->error = 'Задержка не прошла, еще ' . Conversion::secondsToTimeout($test['time'] - time() + 300);
}else{ } else {
$u->addAction(time(),'propuskpsh2',''); $u->addAction(time(), 'propuskpsh2', '');
$u->error = 'Все прошло успешно, задержки в пещеры снята 24 часа.'; $u->error = 'Все прошло успешно, задержки в пещеры снята 24 часа.';
mysql_query('UPDATE `actions` SET `time` = `time` - 86400 WHERE `uid` = '.$u->info['id'].' AND `time` > "'.(time()-86400).'" AND `vars` LIKE "psh%" AND `vars` != "psh102" AND `vars` NOT LIKE "psh\_%"'); mysql_query(
'UPDATE `actions` SET `time` = `time` - 86400 WHERE `uid` = ' . $u->info['id'] . ' AND `time` > "' . (time(
) - 86400) . '" AND `vars` LIKE "psh%" AND `vars` != "psh102" AND `vars` NOT LIKE "psh\_%"'
);
$eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = 476 AND `uid` = "'.$u->info['id'].'" LIMIT 1')); $eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = 476 AND `uid` = "' . $u->info['id'] . '" LIMIT 1'));
if(isset($eff['id'])) if (isset($eff['id'])) {
{ mysql_query('UPDATE `eff_users` SET `timeUse` = `timeUse` - 86400 WHERE `id` = ' . $eff['id'] . ' ');
mysql_query('UPDATE `eff_users` SET `timeUse` = `timeUse` - 86400 WHERE `id` = '.$eff['id'].' '); }
}
// Действует только на:
// 1) где таймер меньше 12 часов. (чтобы очень старые походы не меняли время похода 4 свитка, и сутки назад, история походов некорректная).
// Действует только на: // 2) не сработает на Пещеру Драконов.
// 1) где таймер меньше 12 часов. (чтобы очень старые походы не меняли время похода 4 свитка, и сутки назад, история походов некорректная). mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1');
// 2) не сработает на Пещеру Драконов. }
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1'); } else {
} $u->error = 'Хаосники не могут пользоваться пропуском!';
}else{ }
$u->error = 'Хаосники не могут пользоваться пропуском!';
}
} }
?>

View File

@ -1,106 +1,108 @@
<?php <?php
if(!defined('GAME'))
{
die();
}
$tomorrow = mktime(0, 0, 0, date("m") , date("d")+1, date("Y"));
if( $tomorrow = 0 ){ use Helper\Conversion;
echo 'Вы еще не справились с текущим заданием.'; use User\ItemsModel;
} elseif( !isset( $tomorrow['id'] ) && $tomorrow == 0 ) {
?> if (!defined('GAME')) {
<br /> die();
<input type='button' value='Крутить' /> }
<?php $tomorrow = mktime(0, 0, 0, idate("m"), idate("d") + 1, idate("Y"));
} else {
echo 'Покрутить еще раз вы сможете <b>'.$tomorrow.'</b> <font color="">( Через '.$u->timeOut($tomorrow['time']+60*60*24-time()).' )</font>'; if ($tomorrow = 0) {
} echo 'Вы еще не справились с текущим заданием.';
if($itm['magic_inci']=='ruletka') { } elseif (!isset($tomorrow['id'])) {
$idv=array( ?>
0 => '4349', <br/>
1 => '4306', <input type='button' value='Крутить'/>
2 => '4327', <?php
3 => '4342', } else {
4 => '4297', echo 'Покрутить еще раз вы сможете <b>' . $tomorrow . '</b> ( Через ' . Conversion::secondsToTimeout($tomorrow['time'] + 60 * 60 * 24 - time()) . ' )';
5 => '4316', }
6 => '4361', if ($itm['magic_inci'] == 'ruletka') {
7 => '4359', $idv = [
8 => '4340', 0 => '4349',
9 => '4324', 1 => '4306',
10 => '4314', 2 => '4327',
11 => '4351', 3 => '4342',
12 => '4303', 4 => '4297',
13 => '4294', 5 => '4316',
14 => '4353', 6 => '4361',
15 => '4335', 7 => '4359',
16 => '4364', 8 => '4340',
17 => '4319', 9 => '4324',
18 => '4330', 10 => '4314',
19 => '4289', 11 => '4351',
20 => '4309', 12 => '4303',
21 => '4355', 13 => '4294',
22 => '4333', 14 => '4353',
23 => '4317', 15 => '4335',
24 => '4362', 16 => '4364',
25 => '4328', 17 => '4319',
26 => '4287', 18 => '4330',
27 => '4307', 19 => '4289',
28 => '4334', 20 => '4309',
29 => '4288', 21 => '4355',
30 => '4363', 22 => '4333',
31 => '4354', 23 => '4317',
32 => '4329', 24 => '4362',
33 => '4318', 25 => '4328',
34 => '4308', 26 => '4287',
35 => '4366', 27 => '4307',
36 => '4352', 28 => '4334',
37 => '4336', 29 => '4288',
38 => '4331', 30 => '4363',
39 => '4320', 31 => '4354',
40 => '4290', 32 => '4329',
41 => '4310', 33 => '4318',
42 => '4350', 34 => '4308',
43 => '4305', 35 => '4366',
44 => '4360', 36 => '4352',
45 => '4341', 37 => '4336',
46 => '4326', 38 => '4331',
47 => '4296', 39 => '4320',
48 => '4315', 40 => '4290',
49 => '4356', 41 => '4310',
50 => '4337', 42 => '4350',
51 => '4351', 43 => '4305',
52 => '4311', 44 => '4360',
53 => '4299', 45 => '4341',
54 => '4291', 46 => '4326',
55 => '4292', 47 => '4296',
56 => '4300', 48 => '4315',
57 => '4312', 49 => '4356',
58 => '4322', 50 => '4337',
59 => '4338', 51 => '4351',
60 => '4357', 52 => '4311',
61 => '4293', 53 => '4299',
62 => '4302', 54 => '4291',
63 => '4313', 55 => '4292',
64 => '4323', 56 => '4300',
65 => '4339', 57 => '4312',
66 => '4358', 58 => '4322',
67 => '865', 59 => '4338',
68 => '4781', 60 => '4357',
69 => '2545', 61 => '4293',
70 => '4684', 62 => '4302',
71 => '1035', 63 => '4313',
72 => '6168', 64 => '4323',
73 => '4920', 65 => '4339',
74 => '10015', 66 => '4358',
75 => '10016', 67 => '865',
76 => '10017', 68 => '4781',
77 => '10018', 69 => '2545',
78 => '10035' 70 => '4684',
); 71 => '1035',
$idve=$idv[rand(0,count($idv)-1)]; 72 => '6168',
\User\ItemsModel::addItem($idve,$u->info['id'],'|frompisher=1|sudba='.$u->info['login']); 73 => '4920',
$inf = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.$idve.'" LIMIT 1')); 74 => '10015',
$u->error = 'Вы получили:'.$inf['name'].''; 75 => '10016',
76 => '10017',
77 => '10018',
78 => '10035',
];
$idve = $idv[rand(0, count($idv) - 1)];
ItemsModel::addItem($idve, $u->info['id'], '|frompisher=1|sudba=' . $u->info['login']);
$inf = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "' . $idve . '" LIMIT 1'));
$u->error = 'Вы получили:' . $inf['name'];
} }
?>

View File

@ -1,91 +1,69 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
if($tr['var_id'] == 1) { if ($tr['var_id'] == 1) {
//Бронзовая книга //Бронзовая книга
$pgs = array('all' => 0, 'sudba' => 0); $pgs = ['all' => 0, 'sudba' => 0];
$sp_pg = mysql_query('SELECT `id`,`item_id`,`gift` FROM `items_users` WHERE `item_id` >= 3143 AND `item_id` <= 3192 AND `delete` = 0 AND `inSHop` = 0 AND `inTransfer` = 0 AND `uid` = "'.$this->info['id'].'"'); $sp_pg = mysql_query(
while($pl_pg = mysql_fetch_array($sp_pg)) { 'SELECT `id`,`item_id`,`gift` FROM `items_users` WHERE `item_id` >= 3143 AND `item_id` <= 3192 AND `delete` = 0 AND `inSHop` = 0 AND `inTransfer` = 0 AND `uid` = "' . $this->info['id'] . '"'
$pg_id = $pl_pg['item_id']-3142; );
if(!isset($pgs[$pg_id])) { while ($pl_pg = mysql_fetch_array($sp_pg)) {
$pgs[$pg_id] = $pl_pg['id']; $pg_id = $pl_pg['item_id'] - 3142;
if($pl_pg['gift'] != '') { if (!isset($pgs[$pg_id])) {
$pgs['sudba']++; $pgs[$pg_id] = $pl_pg['id'];
} if ($pl_pg['gift'] != '') {
$pgs['all']++; $pgs['sudba']++;
} }
} $pgs['all']++;
$lk = 1; }
while($lk <= 50) { }
if($pgs[$lk] < 1) { $lk = 1;
$npgs .= ', '.$lk; while ($lk <= 50) {
} if ($pgs[$lk] < 1) {
$lk++; $npgs .= ', ' . $lk;
} }
$lk++;
}
if($pgs['all'] < 50) { if ($pgs['all'] < 50) {
$npgs = ltrim($npgs,', '); $npgs = ltrim($npgs, ', ');
$io .= 'Не удалось собрать книгу, необходимо наличие всех страниц. ['.$pgs['all'].'/50]<br>Недостающие страницы: '.$npgs; $io .= 'Не удалось собрать книгу, необходимо наличие всех страниц. [' . $pgs['all'] . '/50]<br>Недостающие страницы: ' . $npgs;
$no_open_itm = true; $no_open_itm = true;
}else{ } else {
//забираем страницы //забираем страницы
$pgs['delete'] = ''; $pgs['delete'] = '';
$sp_pg = 1; $sp_pg = 1;
while($sp_pg <= 50) { while ($sp_pg <= 50) {
$pgs['delete'] .= '`id` = "'.$pgs[$sp_pg].'" OR '; $pgs['delete'] .= '`id` = "' . $pgs[$sp_pg] . '" OR ';
$sp_pg++; $sp_pg++;
} }
if($pgs['delete'] != '') { if ($pgs['delete'] != '') {
$pgs['delete'] = rtrim($pgs['delete'],' OR '); $pgs['delete'] = rtrim($pgs['delete'], ' OR ');
$pgs['delete'] = '('.$pgs['delete'].') AND `uid` = "'.$this->info['id'].'" LIMIT 50'; $pgs['delete'] = '(' . $pgs['delete'] . ') AND `uid` = "' . $this->info['id'] . '" LIMIT 50';
mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE '.$pgs['delete']); mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE ' . $pgs['delete']);
} }
$sz = $this->testAction('`vars` = "gold_sanich_bonus" LIMIT 1',1); $sz = $this->testAction('`vars` = "gold_sanich_bonus" LIMIT 1', 1);
/*if(!isset($sz['id'])) { //выдаем книгу
$this->addAction(time(),'gold_sanich_bonus','gold_sanich_bonus'); if ($pgs['sudba'] > 0) {
//выдаем книгу //привязанная
if($pgs['sudba'] > 0) { ItemsModel::addItem(3196, $this->info['id'], '|sudba=' . $this->info['login']);
//привязанная } else {
$this->addItem(3198,$this->info['id'],'|sudba='.$this->info['login']); //не привязанная
}else{ ItemsModel::addItem(3196, $this->info['id']);
//не привязанная }
$this->addItem(3198,$this->info['id']); $io .= 'Вы получили предмет &quot;Бронзовая Книга&quot;';
} //}
$io .= 'Вы получили предмет &quot;Золотая Книга&quot;<br>Вы собрали книгу Саныча одним из первых поэтому получаете Золотую книгу вместо Бронзовой! ;)'; //}
}else{
$sz = $this->testAction('`vars` = "silver_sanich_bonus" LIMIT 1',1);
if(!isset($sz['id'])) {
$this->addAction(time(),'silver_sanich_bonus','silver_sanich_bonus');
//выдаем книгу
if($pgs['sudba'] > 0) {
//привязанная
$this->addItem(3197,$this->info['id'],'|sudba='.$this->info['login']);
}else{
//не привязанная
$this->addItem(3197,$this->info['id']);
}
$io .= 'Вы получили предмет &quot;Серебряная Книга&quot;<br>Вы собрали книгу Саныча одним из первых поэтому получаете Серебряную книгу вместо Бронзовой! ;)';
}else{*/
//выдаем книгу
if($pgs['sudba'] > 0) {
//привязанная
$this->addItem(3196,$this->info['id'],'|sudba='.$this->info['login']);
}else{
//не привязанная
$this->addItem(3196,$this->info['id']);
}
$io .= 'Вы получили предмет &quot;Бронзовая Книга&quot;';
//}
//}
} }
}else{ } else {
$io .= 'Данный предмет нельзя использовать!'; $io .= 'Данный предмет нельзя использовать!';
$no_open_itm = true; $no_open_itm = true;
} }
?>

View File

@ -1,46 +1,47 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
$io .= '<i>Подарочный комплект Критовика</i>, '; $io .= '<i>Подарочный комплект Критовика</i>, ';
$this->addItem(842,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(842, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(842,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(842, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(749,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(749, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(666,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(666, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2469,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2469, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(580,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(580, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(594,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(594, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(642,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(642, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(814,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(814, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(777,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(777, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(787,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(787, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(803,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(803, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(803,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(803, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(803,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(803, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4401,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4401, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$io .= '<i>Свитки и прочие материалы....</i>, '; $io .= '<i>Свитки и прочие материалы....</i>, ';
$this->addItem(2712,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2712, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2621,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2621, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2621,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2621, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(871,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(871, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2139,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2139, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2140,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2140, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5046,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5046, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4941,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4941, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(994,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(994, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(1001,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1001, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(3102,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(3102, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
?>

View File

@ -1,46 +1,46 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
$io .= '<i>Подарочный комплект Уворота</i>, '; $io .= '<i>Подарочный комплект Уворота</i>, ';
$this->addItem(4953,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4953, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4953,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4953, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4596,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4596, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4598,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4598, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2469,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2469, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4961,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4961, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4967,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4967, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4969,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4969, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4601,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4601, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4599,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4599, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4986,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4986, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4595,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4595, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4597,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4597, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4597,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4597, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4597,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4597, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4401,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4401, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$io .= '<i>Свитки и прочие материалы....</i>, '; $io .= '<i>Свитки и прочие материалы....</i>, ';
$this->addItem(2712,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2712, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2643,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2643, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2643,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2643, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(872,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(872, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2139,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2139, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2140,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2140, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5046,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5046, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4941,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4941, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(994,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(994, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(1001,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1001, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(3102,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(3102, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
?>

View File

@ -1,45 +1,46 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
$io .= '<i>Подарочный комплект Мага Огня</i>, '; $io .= '<i>Подарочный комплект Мага Огня</i>, ';
$this->addItem(850,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(850, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(751,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(751, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(669,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(669, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(1176,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1176, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(822,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(822, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(583,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(583, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(597,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(597, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(644,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(644, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(810,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(810, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4983,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4983, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4543,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4543, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5003,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5003, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5003,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5003, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5003,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5003, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4401,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4401, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$io .= '<i>Свитки и прочие материалы....</i>, '; $io .= '<i>Свитки и прочие материалы....</i>, ';
$this->addItem(2712,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2712, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2687,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2687, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(873,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); // элик ItemsModel::addItem(873, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']); // элик
$this->addItem(2139,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2139, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2140,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2140, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5046,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5046, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4941,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4941, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4942,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4942, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(1460,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1460, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2146,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); //усилок ItemsModel::addItem(2146, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']); //усилок
$this->addItem(1001,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1001, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(3102,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(3102, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
?>

View File

@ -1,44 +1,45 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
$io .= '<i>Подарочный комплект Танка</i>, '; $io .= '<i>Подарочный комплект Танка</i>, ';
$this->addItem(4648,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4648, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4654,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4654, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4647,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4647, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4651,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4651, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2469,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2469, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4962,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4962, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4968,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4968, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4650,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4650, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4653,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4653, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4652,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4652, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4987,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4987, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4646,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4646, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4649,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4649, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4649,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4649, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4649,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4649, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4401,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4401, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$io .= '<i>Свитки и прочие материалы....</i>, '; $io .= '<i>Свитки и прочие материалы....</i>, ';
$this->addItem(2712,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2712, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2430,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2430, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(870,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(870, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2139,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2139, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2140,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2140, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5046,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5046, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4941,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4941, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(994,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(994, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(1001,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1001, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(3102,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(3102, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
?>

View File

@ -1,46 +1,47 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
$io .= '<i>Подарочный комплект Силача ( Топора )</i>, '; $io .= '<i>Подарочный комплект Силача ( Топора )</i>, ';
$this->addItem(6483,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(6483, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(6483,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(6483, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(6484,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(6484, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(6485,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(6485, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2469,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2469, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(6486,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(6486, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(6487,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(6487, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(6488,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(6488, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(6489,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(6489, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(6490,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(6490, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(6491,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(6491, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(6492,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(6492, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(6493,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(6493, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(6493,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(6493, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(6493,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(6493, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4401,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4401, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$io .= '<i>Свитки и прочие материалы....</i>, '; $io .= '<i>Свитки и прочие материалы....</i>, ';
$this->addItem(2712,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2712, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2665,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2665, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2665,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2665, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(870,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(870, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2139,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2139, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2140,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2140, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5046,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5046, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4941,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4941, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(994,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(994, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(1001,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1001, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(3102,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(3102, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
?>

View File

@ -1,46 +1,47 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
$io .= '<i>Подарочный комплект Уворота</i>, '; $io .= '<i>Подарочный комплект Уворота</i>, ';
$this->addItem(605,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(605, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(605,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(605, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(748,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(748, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(667,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(667, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2469,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2469, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(735,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(735, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(579,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(579, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(593,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(593, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(641,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(641, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(813,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(813, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(775,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(775, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(786,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(786, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(802,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(802, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(802,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(802, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(802,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(802, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4401,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4401, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$io .= '<i>Свитки и прочие материалы....</i>, '; $io .= '<i>Свитки и прочие материалы....</i>, ';
$this->addItem(2712,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2712, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2643,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2643, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2643,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2643, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(872,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(872, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2139,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2139, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2140,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2140, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5046,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5046, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4941,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4941, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(994,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(994, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(1001,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1001, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(3102,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(3102, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
?>

View File

@ -1,45 +1,46 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
$io .= '<i>Подарочный комплект Мага Воды</i>, '; $io .= '<i>Подарочный комплект Мага Воды</i>, ';
$this->addItem(851,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(851, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(753,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(753, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(670,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(670, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(1176,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1176, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(823,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(823, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(584,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(584, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(598,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(598, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(645,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(645, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(812,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(812, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4984,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4984, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4544,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4544, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5004,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5004, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5004,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5004, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5004,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5004, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4401,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4401, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$io .= '<i>Свитки и прочие материалы....</i>, '; $io .= '<i>Свитки и прочие материалы....</i>, ';
$this->addItem(2712,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2712, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2687,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2687, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(873,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); // элик ItemsModel::addItem(873, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']); // элик
$this->addItem(2139,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2139, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2140,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2140, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5046,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5046, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4941,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4941, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4942,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4942, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(1460,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1460, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2147,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); //усилок ItemsModel::addItem(2147, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']); //усилок
$this->addItem(1001,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1001, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(3102,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(3102, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
?>

View File

@ -1,45 +1,46 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
$io .= '<i>Подарочный комплект Мага Воздуха</i>, '; $io .= '<i>Подарочный комплект Мага Воздуха</i>, ';
$this->addItem(848,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(848, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(752,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(752, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(671,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(671, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(1176,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1176, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(820,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(820, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(581,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(581, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(595,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(595, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(646,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(646, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(811,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(811, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4982,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4982, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4545,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4545, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5002,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5002, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5002,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5002, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5002,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5002, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4401,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4401, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$io .= '<i>Свитки и прочие материалы....</i>, '; $io .= '<i>Свитки и прочие материалы....</i>, ';
$this->addItem(2712,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2712, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2687,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2687, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(873,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); // элик ItemsModel::addItem(873, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']); // элик
$this->addItem(2139,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2139, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2140,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2140, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5046,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5046, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4941,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4941, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4942,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4942, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(1460,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1460, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2148,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); //усилок ItemsModel::addItem(2148, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']); //усилок
$this->addItem(1001,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1001, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(3102,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(3102, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
?>

View File

@ -1,45 +1,46 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
$io .= '<i>Подарочный комплект Мага Земли</i>, '; $io .= '<i>Подарочный комплект Мага Земли</i>, ';
$this->addItem(849,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(849, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(750,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(750, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(668,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(668, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(1176,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1176, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(821,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(821, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(582,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(582, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(596,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(596, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(643,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(643, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(809,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(809, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4985,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4985, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4546,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4546, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5005,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5005, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5005,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5005, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5005,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5005, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4401,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4401, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$io .= '<i>Свитки и прочие материалы....</i>, '; $io .= '<i>Свитки и прочие материалы....</i>, ';
$this->addItem(2712,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2712, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2687,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2687, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4736,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4736, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(873,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); // элик ItemsModel::addItem(873, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']); // элик
$this->addItem(2139,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2139, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2140,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2140, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(5046,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(5046, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2390,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(2390, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4941,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4941, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(4942,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(4942, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(1460,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1460, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(2149,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); //усилок ItemsModel::addItem(2149, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']); //усилок
$this->addItem(1001,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(1001, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$this->addItem(3102,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']); ItemsModel::addItem(3102, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
?>

View File

@ -1,149 +1,145 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
if($tr['var_id'] > 4) { if ($tr['var_id'] > 4) {
//маг //маг
$itmadd = array( $itmadd = [
//3053 - вечность , 3052 - МР 1000 //3053 - вечность , 3052 - МР 1000
//суперсвиток //суперсвиток
0 => array(2142,2143,2144,2141,3052), 0 => [2142, 2143, 2144, 2141, 3052],
//простые свитки //простые свитки
1 => array(3053,3043,2545,2709,874,2391), 1 => [3053, 3043, 2545, 2709, 874, 2391],
//гарантированные //гарантированные
2 => array(3044) 2 => [3044],
); ];
$tr['var_id'] -= 4; $tr['var_id'] -= 4;
}else{ } else {
//воин //воин
$itmadd = array( $itmadd = [
//суперсвиток //суперсвиток
0 => array(911,1172,2143,2144,1173), 0 => [911, 1172, 2143, 2144, 1173],
//простые свитки //простые свитки
1 => array(3043,2545,2709,874,2391), 1 => [3043, 2545, 2709, 874, 2391],
//гарантированные //гарантированные
2 => array(3044) 2 => [3044],
); ];
} }
if($tr['var_id'] > 4) { if ($tr['var_id'] > 4) {
//Маг //Маг
$i3[9] = $this->addItem(4676,$this->info['id'],'|notr=1|sudba='.$this->info['login']); $i3[9] = ItemsModel::addItem(4676, $this->info['id'], '|notr=1|sudba=' . $this->info['login']);
}else{ } else {
//Воин //Воин
$i3[9] = $this->addItem(2870,$this->info['id'],'|notr=1|sudba='.$this->info['login']); $i3[9] = ItemsModel::addItem(2870, $this->info['id'], '|notr=1|sudba=' . $this->info['login']);
} }
if($tr['var_id'] == 1) { if ($tr['var_id'] == 1) {
// 200 екр. - 1 суперсвиток 0/15, 2 простых 0/75 + Эссенция Здоровья 0/1 // 200 екр. - 1 суперсвиток 0/15, 2 простых 0/75 + Эссенция Здоровья 0/1
$i4 = array( $i4 = [
$itmadd[0][rand(0,count($itmadd[0])-1)], $itmadd[0][rand(0, count($itmadd[0]) - 1)],
$itmadd[1][rand(0,count($itmadd[1])-1)], $itmadd[1][rand(0, count($itmadd[1]) - 1)],
$itmadd[1][rand(0,count($itmadd[1])-1)] $itmadd[1][rand(0, count($itmadd[1]) - 1)],
); ];
$i3 = array(); $i3 = [];
$i3[0] = ItemsModel::addItem($i4[0], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 15);
$i3[1] = ItemsModel::addItem($i4[1], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 75);
$i3[2] = ItemsModel::addItem($i4[2], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 75);
$i3[3] = ItemsModel::addItem(3044, $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 1);
$i3[0] = $this->addItem($i4[0],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,15); if ($io == '') {
$io = 'Какие-то предметы добавлены к Вам в инвентарь...';
}
$i3[1] = $this->addItem($i4[1],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,75); } elseif ($tr['var_id'] == 2) {
$i3[2] = $this->addItem($i4[2],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,75); // 400 екр. - 2 суперсвитка 0/15, 4 простых 0/75 + Эссенция Здоровья 0/2 + новогодний эликсир 0/7
$i4 = [
$itmadd[0][rand(0, count($itmadd[0]) - 1)],
$itmadd[0][rand(0, count($itmadd[0]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
];
$i3[3] = $this->addItem(3044,$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,1); $i3 = [];
$i3[0] = ItemsModel::addItem($i4[0], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 15);
$i3[1] = ItemsModel::addItem($i4[1], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 15);
$i3[2] = ItemsModel::addItem($i4[2], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 75);
$i3[3] = ItemsModel::addItem($i4[3], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 75);
$i3[4] = ItemsModel::addItem($i4[4], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 75);
$i3[5] = ItemsModel::addItem($i4[5], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 75);
if($io == '') { $i3[6] = ItemsModel::addItem(3044, $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 2);
$io = 'Какие-то предметы добавлены к Вам в инвентарь...';
}
}elseif($tr['var_id'] == 2) { if ($io == '') {
// 400 екр. - 2 суперсвитка 0/15, 4 простых 0/75 + Эссенция Здоровья 0/2 + новогодний эликсир 0/7 $io = 'Какие-то предметы добавлены к Вам в инвентарь...';
$i4 = array( }
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)]
);
$i3 = array(); } elseif ($tr['var_id'] == 3) {
// 600 екр. - 2 суперсвитка 0/20, 4 простых 0/100 + Эссенция Здоровья 0/2 + новогодний эликсир 0/10
$i4 = [
$itmadd[0][rand(0, count($itmadd[0]) - 1)],
$itmadd[0][rand(0, count($itmadd[0]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
];
$i3[0] = $this->addItem($i4[0],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,15); $i3 = [];
$i3[1] = $this->addItem($i4[1],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,15);
$i3[2] = $this->addItem($i4[2],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,75); $i3[0] = ItemsModel::addItem($i4[0], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 20);
$i3[3] = $this->addItem($i4[3],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,75); $i3[1] = ItemsModel::addItem($i4[1], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 20);
$i3[4] = $this->addItem($i4[4],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,75);
$i3[5] = $this->addItem($i4[5],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,75);
$i3[6] = $this->addItem(3044,$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,2); $i3[2] = ItemsModel::addItem($i4[2], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 100);
$i3[3] = ItemsModel::addItem($i4[3], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 100);
$i3[4] = ItemsModel::addItem($i4[4], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 100);
$i3[5] = ItemsModel::addItem($i4[5], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 100);
if($io == '') { $i3[6] = ItemsModel::addItem(3044, $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 2);
$io = 'Какие-то предметы добавлены к Вам в инвентарь...';
}
}elseif($tr['var_id'] == 3) { if ($io == '') {
// 600 екр. - 2 суперсвитка 0/20, 4 простых 0/100 + Эссенция Здоровья 0/2 + новогодний эликсир 0/10 $io = 'Какие-то предметы добавлены к Вам в инвентарь...';
$i4 = array( }
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)]
);
$i3 = array(); } elseif ($tr['var_id'] == 4) {
// 1000 екр. - 3-4 суперсвитка 0/20, 4 простых 0/100 + Эссенция Здоровья 0/3 + новогодний эликсир 0/10
$i4 = [
$itmadd[0][rand(0, count($itmadd[0]) - 1)],
$itmadd[0][rand(0, count($itmadd[0]) - 1)],
$itmadd[0][rand(0, count($itmadd[0]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
];
$i3[0] = $this->addItem($i4[0],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,20); $i3 = [];
$i3[1] = $this->addItem($i4[1],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,20);
$i3[2] = $this->addItem($i4[2],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100); $i3[0] = ItemsModel::addItem($i4[0], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 20);
$i3[3] = $this->addItem($i4[3],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100); $i3[1] = ItemsModel::addItem($i4[1], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 20);
$i3[4] = $this->addItem($i4[4],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100); $i3[3] = ItemsModel::addItem($i4[2], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 20);
$i3[5] = $this->addItem($i4[5],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100);
$i3[6] = $this->addItem(3044,$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,2); if (rand(0, 1000) > 250 && rand(0, 1000) < 750) {
$i3[9] = ItemsModel::addItem($i4[3], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 20);
}
if($io == '') { $i3[4] = ItemsModel::addItem($i4[4], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 100);
$io = 'Какие-то предметы добавлены к Вам в инвентарь...'; $i3[5] = ItemsModel::addItem($i4[5], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 100);
} $i3[6] = ItemsModel::addItem($i4[6], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 100);
$i3[7] = ItemsModel::addItem($i4[7], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 100);
}elseif($tr['var_id'] == 4) { $i3[8] = ItemsModel::addItem(3044, $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 3);
// 1000 екр. - 3-4 суперсвитка 0/20, 4 простых 0/100 + Эссенция Здоровья 0/3 + новогодний эликсир 0/10
$i4 = array(
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)]
);
$i3 = array(); if ($io == '') {
$io = 'Какие-то предметы добавлены к Вам в инвентарь...';
}
$i3[0] = $this->addItem($i4[0],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,20); }
$i3[1] = $this->addItem($i4[1],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,20); unset($itmadd, $i3, $i4);
$i3[3] = $this->addItem($i4[2],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,20);
if(rand(0,1000) > 250 && rand(0,1000) < 750) {
$i3[9] = $this->addItem($i4[3],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,20);
}
$i3[4] = $this->addItem($i4[4],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100);
$i3[5] = $this->addItem($i4[5],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100);
$i3[6] = $this->addItem($i4[6],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100);
$i3[7] = $this->addItem($i4[7],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100);
$i3[8] = $this->addItem(3044,$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,3);
if($io == '') {
$io = 'Какие-то предметы добавлены к Вам в инвентарь...';
}
}
unset($itmadd,$i3,$i4);
?>

View File

@ -1,47 +1,48 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
if($tr['var_id'] != '') { if ($tr['var_id'] != '') {
$i4 = 0; $i4 = 0;
$i5 = explode('@',$tr['var_id']); $i5 = explode('@', $tr['var_id']);
while( $i4 < count($i5) ) { while ($i4 < count($i5)) {
$i3 = explode('-',$i5[$i4]); $i3 = explode('-', $i5[$i4]);
if( $i3 == 'ekr' ) { if ($i3 == 'ekr') {
//Выдаем екр. //Выдаем екр.
}elseif( $i3[0] == 'artefact' ) { } elseif ($i3[0] == 'artefact') {
//Выдаем случайный артефакт. //Выдаем случайный артефакт.
if( rand(0,100) <= $i3[1] ) { if (rand(0, 100) <= $i3[1]) {
$io = 'Вы обнаружили временный Артефакт и какие-то предметы...'; $io = 'Вы обнаружили временный Артефакт и какие-то предметы...';
$arts_1 = array(); $arts_1 = [];
$arts_lvl = $this->info['level']; $arts_lvl = $this->info['level'];
if( $arts_lvl < 4 ) { if ($arts_lvl < 4) {
$arts_lvl = 4; $arts_lvl = 4;
}elseif( $arts_lvl > 10 ) { } elseif ($arts_lvl > 10) {
$arts_lvl = 10; $arts_lvl = 10;
} }
$sp1 = mysql_query('SELECT `items_id` FROM `items_main_data` WHERE `data` LIKE "%|art=%" AND `data` LIKE "%tr_lvl='.$arts_lvl.'%"'); $sp1 = mysql_query('SELECT `items_id` FROM `items_main_data` WHERE `data` LIKE "%|art=%" AND `data` LIKE "%tr_lvl=' . $arts_lvl . '%"');
while( $pl1 = mysql_fetch_array($sp1) ) { while ($pl1 = mysql_fetch_array($sp1)) {
$arts_1[] = $pl1['items_id']; $arts_1[] = $pl1['items_id'];
} }
$arts_1 = $arts_1[rand(0,count($arts_1)-1)]; $arts_1 = $arts_1[rand(0, count($arts_1) - 1)];
if( $arts_1 > 0 ) { if ($arts_1 > 0) {
$this->addItem($arts_1,$this->info['id'],'|sroknext=1|nosale=1|srok='.(1*86400).'',NULL,75); ItemsModel::addItem($arts_1, $this->info['id'], '|sroknext=1|nosale=1|srok=' . (1 * 86400) . '', null, 75);
} }
} }
}else{ } else {
//Выдаем предмет //Выдаем предмет
$this->addItem($i3[0],$this->info['id'],'|nosale=1|notr=1|sudba='.$this->info['login'],NULL,$i3[1]); ItemsModel::addItem($i3[0], $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, $i3[1]);
} }
$i4++; $i4++;
} }
if($io == '') { if ($io == '') {
$io .= 'Какие-то предметы добавлены к Вам в инвентарь...'; $io .= 'Какие-то предметы добавлены к Вам в инвентарь...';
} }
} }
unset($i5,$i3,$i4); unset($i5, $i3, $i4);
?>

View File

@ -1,131 +1,143 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
if($tr['var_id'] != '') { if ($tr['var_id'] != '') {
$io = ''; $io = '';
/* /*
1. Выпадает артефакт уровня персонажа - 1% , временный , не продается , судьба , 3 дн. срок годности 1. Выпадает артефакт уровня персонажа - 1% , временный , не продается , судьба , 3 дн. срок годности
2. Выпадает либо 5 екр. свиток, либо свиток +200% опыта на 3 часа (без заморозки) 2. Выпадает либо 5 екр. свиток, либо свиток +200% опыта на 3 часа (без заморозки)
3. 1 из 4 эликсирова +15 (екр.) 3. 1 из 4 эликсирова +15 (екр.)
4. Чек 20 кр. 4. Чек 20 кр.
*/ */
$trgos = false; $trgos = false;
$key1 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4460 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); $key1 = mysql_fetch_array(
$key2 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4461 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4460 AND `uid` = ' . $this->info['id'] . ' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')
$key3 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4462 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); );
$key4 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4463 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); $key2 = mysql_fetch_array(
mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4461 AND `uid` = ' . $this->info['id'] . ' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')
);
$key3 = mysql_fetch_array(
mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4462 AND `uid` = ' . $this->info['id'] . ' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')
);
$key4 = mysql_fetch_array(
mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4463 AND `uid` = ' . $this->info['id'] . ' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')
);
if( isset($key1['id']) && isset($key2['id']) && isset($key3['id']) && isset($key4['id']) ) { if (isset($key1['id']) && isset($key2['id']) && isset($key3['id']) && isset($key4['id'])) {
mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = '.$key1['id'].' OR `id` = '.$key2['id'].' OR `id` = '.$key3['id'].' OR `id` = '.$key4['id'].' LIMIT 4'); mysql_query(
$trgos = true; 'UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = ' . $key1['id'] . ' OR `id` = ' . $key2['id'] . ' OR `id` = ' . $key3['id'] . ' OR `id` = ' . $key4['id'] . ' LIMIT 4'
} );
$trgos = true;
}
if( $trgos == true ) { if ($trgos == true) {
if( rand(0,100) == 57 || $this->info['admin'] > 0 ) { if (rand(0, 100) == 57 || $this->info['admin'] > 0) {
//Выдаем артефакт //Выдаем артефакт
$io .= '<i>Временный артефакт</i>, '; $io .= '<i>Временный артефакт</i>, ';
$arts_1 = array(); $arts_1 = [];
$arts_lvl = $this->info['level']; $arts_lvl = $this->info['level'];
if( $arts_lvl < 4 ) { if ($arts_lvl < 4) {
$arts_lvl = 4; $arts_lvl = 4;
}elseif( $arts_lvl > 10 ) { } elseif ($arts_lvl > 10) {
$arts_lvl = 10; $arts_lvl = 10;
} }
$sp1 = mysql_query('SELECT `items_id` FROM `items_main_data` WHERE `data` LIKE "%|art=%" AND `data` LIKE "%tr_lvl='.$arts_lvl.'%"'); $sp1 = mysql_query('SELECT `items_id` FROM `items_main_data` WHERE `data` LIKE "%|art=%" AND `data` LIKE "%tr_lvl=' . $arts_lvl . '%"');
while( $pl1 = mysql_fetch_array($sp1) ) { while ($pl1 = mysql_fetch_array($sp1)) {
$arts_1[] = $pl1['items_id']; $arts_1[] = $pl1['items_id'];
} }
$arts_1 = $arts_1[rand(0,count($arts_1)-1)]; $arts_1 = $arts_1[rand(0, count($arts_1) - 1)];
if( $arts_1 > 0 ) { if ($arts_1 > 0) {
$this->addItem($arts_1,$this->info['id'],'|nosale=1|srok='.(1*259200).'',NULL,50); ItemsModel::addItem($arts_1, $this->info['id'], '|nosale=1|srok=' . (1 * 259200) . '', null, 50);
} }
//echo '['.$arts_1[rand(0,count($arts_1)-1)].'!'.count($arts_1).'!'.$arts_lvl.']'; //echo '['.$arts_1[rand(0,count($arts_1)-1)].'!'.count($arts_1).'!'.$arts_lvl.']';
} }
$recr=rand(1,200); // 0.5% 4510 - 40 екр /2% 5021 - 20 екр /5.5% 5020 -10 екр/ 10.5% 4465 -5 екр/ 100% 5017 - 1екр $recr = rand(1, 200); // 0.5% 4510 - 40 екр /2% 5021 - 20 екр /5.5% 5020 -10 екр/ 10.5% 4465 -5 екр/ 100% 5017 - 1екр
$rcr=rand(1,200); // 5%4274 - 400 кр / 15% 4392/4392 - 100 кр / 30% 4392 -50 кр/ 100% 4464 - 20кр $rcr = rand(1, 200); // 5%4274 - 400 кр / 15% 4392/4392 - 100 кр / 30% 4392 -50 кр/ 100% 4464 - 20кр
$ryay=rand(1,200); // 5%4274 - 400 кр / 15% 4392/4392 - 100 кр / 30% 4392 -50 кр/ 100% 4464 - 20кр $ryay = rand(1, 200); // 5%4274 - 400 кр / 15% 4392/4392 - 100 кр / 30% 4392 -50 кр/ 100% 4464 - 20кр
if( $recr > 199 ) { if ($recr > 199) {
//Выдаем чек +40 екр. //Выдаем чек +40 екр.
$io .= '<i>Чек на 40 екр.</i>, '; $io .= '<i>Чек на 40 екр.</i>, ';
$this->addItem(4510,$this->info['id'],'|sudba='.$this->info['login']); ItemsModel::addItem(4510, $this->info['id'], '|sudba=' . $this->info['login']);
}elseif( $recr > 198 ){ } elseif ($recr > 198) {
//Выдаем чек +20 екр. //Выдаем чек +20 екр.
$io .= '<i>Чек на 20 екр.</i>, '; $io .= '<i>Чек на 20 екр.</i>, ';
$this->addItem(5021,$this->info['id'],'|sudba='.$this->info['login']); ItemsModel::addItem(5021, $this->info['id'], '|sudba=' . $this->info['login']);
}elseif( $recr > 192 ){ } elseif ($recr > 192) {
//Выдаем чек +10 екр. //Выдаем чек +10 екр.
$io .= '<i>Чек на 10 екр.</i>, '; $io .= '<i>Чек на 10 екр.</i>, ';
$this->addItem(5020,$this->info['id'],'|sudba='.$this->info['login']); ItemsModel::addItem(5020, $this->info['id'], '|sudba=' . $this->info['login']);
}elseif( $recr > 180 ){ } elseif ($recr > 180) {
//Выдаем чек +5 екр. //Выдаем чек +5 екр.
$io .= '<i>Чек на 5 екр.</i>, '; $io .= '<i>Чек на 5 екр.</i>, ';
$this->addItem(4465,$this->info['id'],'|sudba='.$this->info['login']); ItemsModel::addItem(4465, $this->info['id'], '|sudba=' . $this->info['login']);
}else{ } else {
//Выдаем чек +1 екр. //Выдаем чек +1 екр.
$io .= '<i>Чек на 1 екр.</i>, '; $io .= '<i>Чек на 1 екр.</i>, ';
$this->addItem(5017,$this->info['id'],'|sudba='.$this->info['login']); ItemsModel::addItem(5017, $this->info['id'], '|sudba=' . $this->info['login']);
} }
if( $rcr > 94 ) { if ($rcr > 94) {
//Выдаем чек на 400 кр. //Выдаем чек на 400 кр.
$io .= '<i>Чек на 400 кр.</i> '; $io .= '<i>Чек на 400 кр.</i> ';
$this->addItem(4274,$this->info['id'],'|sudba='.$this->info['login']); ItemsModel::addItem(4274, $this->info['id'], '|sudba=' . $this->info['login']);
}elseif( $rcr > 84 ){ } elseif ($rcr > 84) {
//Выдаем чек на 100 кр. //Выдаем чек на 100 кр.
$io .= '<i>Чеки на сумму 100 кр.</i> '; $io .= '<i>Чеки на сумму 100 кр.</i> ';
$this->addItem(4392,$this->info['id'],'|sudba='.$this->info['login']); ItemsModel::addItem(4392, $this->info['id'], '|sudba=' . $this->info['login']);
$this->addItem(4392,$this->info['id'],'|sudba='.$this->info['login']); ItemsModel::addItem(4392, $this->info['id'], '|sudba=' . $this->info['login']);
}elseif( $rcr > 69 ){ } elseif ($rcr > 69) {
//Выдаем чек на 50 кр. //Выдаем чек на 50 кр.
$io .= '<i>Чек на 50 кр.</i> '; $io .= '<i>Чек на 50 кр.</i> ';
$this->addItem(4392,$this->info['id'],'|sudba='.$this->info['login']); ItemsModel::addItem(4392, $this->info['id'], '|sudba=' . $this->info['login']);
}else{ } else {
//Выдаем чек на 20 кр. //Выдаем чек на 20 кр.
$io .= '<i>Чек на 20 кр.</i> '; $io .= '<i>Чек на 20 кр.</i> ';
$this->addItem(4464,$this->info['id'],'|sudba='.$this->info['login']); ItemsModel::addItem(4464, $this->info['id'], '|sudba=' . $this->info['login']);
} }
if( $ryay > 199 ) { if ($ryay > 199) {
//Выдаем яйцо дракона. //Выдаем яйцо дракона.
$io .= '<i>Яйцо Дракона.</i> '; $io .= '<i>Яйцо Дракона.</i> ';
$this->addItem(6445,$this->info['id']); ItemsModel::addItem(6445, $this->info['id']);
} }
$elik_1 = [
$elik_1 = array( 4037, 4038, 4039, 4040,
4037,4038,4039,4040 ];
); $elik_1 = $elik_1[rand(0, 3)];
$elik_1 = $elik_1[rand(0,3)]; if ($elik_1 > 0) {
if( $elik_1 > 0 ) { //Выдаем 1 из 4 эликов
//Выдаем 1 из 4 эликов $io .= '<i>Эликсир +22 статов</i>, ';
$io .= '<i>Эликсир +22 статов</i>, '; ItemsModel::addItem($elik_1, $this->info['id'], '|nosale=1|', null, 1);
$this->addItem($elik_1,$this->info['id'],'|nosale=1|',NULL,1); }
}
//Выдаем свиток +200%
$io .= '<i>Свиток +100% опыта</i>, ';
ItemsModel::addItem(4466, $this->info['id'], '');
//Выдаем свиток +200% mysql_query(
$io .= '<i>Свиток +100% опыта</i>, '; 'INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `ip`, `vals`, `val`) VALUES ("' . $this->info['id'] . '","' . time(
$this->addItem(4466,$this->info['id'],''); ) . '","capitalcity","' . $this->info['room'] . '","trup_sun"," ","","")'
);
mysql_query('UPDATE `users_achiv` SET `snt`= `snt`+1 WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `ip`, `vals`, `val`) VALUES ("'.$this->info['id'].'","'.time().'","capitalcity","'.$this->info['room'].'","trup_sun"," ","","")'); } else {
mysql_query('UPDATE `users_achiv` SET `snt`= `snt`+1 WHERE `id` = "'.$this->info['id'].'" LIMIT 1'); $no_open_itm = true;
$this->error = 'Требуется 4 различных ключа с поля битвы.';
}else{ }
$no_open_itm = true;
$this->error = 'Требуется 4 различных ключа с поля битвы.';
}
} }
unset($i5,$i3,$i4); unset($i5, $i3, $i4);
?>

View File

@ -1,50 +1,51 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
if($tr['var_id'] != '') { if ($tr['var_id'] != '') {
$io = ''; $io = '';
/* /*
1. Требует 2 любых ключа 1. Требует 2 любых ключа
*/ */
$trgos = false; $trgos = false;
/* $keyall = mysql_fetch_array(
$key1 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4460 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); mysql_query(
$key2 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4461 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); 'SELECT COUNT(`id`) FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = ' . $this->info['id'] . ' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'
$key3 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4462 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); )
$key4 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4463 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); );
*/ if ($keyall[0] >= 2) {
$keyall = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); mysql_query(
if( $keyall[0] >= 2 ) { 'DELETE FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = ' . $this->info['id'] . ' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 2'
mysql_query('DELETE FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 2'); );
//mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = '.$key1['id'].' OR `id` = '.$key2['id'].' OR `id` = '.$key3['id'].' OR `id` = '.$key4['id'].' LIMIT 4');
$trgos = true;
}
if( $trgos == true ) { $trgos = true;
// }
$io .= '<i>Целебный пирог (х2)</i>, ';
$this->addItem(1028,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
$this->addItem(1028,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
//
$io .= '<i>Запас маны (х2)</i>, ';
$this->addItem(1029,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
$this->addItem(1029,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
//
$io .= '<i>Восстановление энергии 600HP</i>, ';
$this->addItem(4015,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
//
$io .= '<i>Восстановление энергии 500MP</i>, ';
$this->addItem(4024,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
//
}else{
$no_open_itm = true;
$this->error = 'Требуется 2 ключа с поля битвы.';
}
} if ($trgos) {
unset($i5,$i3,$i4); //
?> $io .= '<i>Целебный пирог (х2)</i>, ';
ItemsModel::addItem(1028, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
ItemsModel::addItem(1028, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
//
$io .= '<i>Запас маны (х2)</i>, ';
ItemsModel::addItem(1029, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
ItemsModel::addItem(1029, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
//
$io .= '<i>Восстановление энергии 600HP</i>, ';
ItemsModel::addItem(4015, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
//
$io .= '<i>Восстановление энергии 500MP</i>, ';
ItemsModel::addItem(4024, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
//
} else {
$no_open_itm = true;
$this->error = 'Требуется 2 ключа с поля битвы.';
}
}
unset($i5, $i3, $i4);

View File

@ -1,58 +1,58 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
if($tr['var_id'] != '') { if ($tr['var_id'] != '') {
$io = ''; $io = '';
/* /*
1. Требует 4 любых ключа 1. Требует 4 любых ключа
*/ */
$trgos = false; $trgos = false;
/* $keyall = mysql_fetch_array(
$key1 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4460 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); mysql_query(
$key2 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4461 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); 'SELECT COUNT(`id`) FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = ' . $this->info['id'] . ' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'
$key3 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4462 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); )
$key4 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4463 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); );
*/ if ($keyall[0] >= 4) {
$keyall = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); mysql_query(
if( $keyall[0] >= 4 ) { 'DELETE FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = ' . $this->info['id'] . ' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 4'
mysql_query('DELETE FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 4'); );
//mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = '.$key1['id'].' OR `id` = '.$key2['id'].' OR `id` = '.$key3['id'].' OR `id` = '.$key4['id'].' LIMIT 4'); $trgos = true;
$trgos = true; }
}
if( $trgos == true ) { if ($trgos) {
// //
$io .= '<i>Целебный пирог (х2)</i>, '; $io .= '<i>Целебный пирог (х2)</i>, ';
$this->addItem(1028,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(1028, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$this->addItem(1028,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(1028, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
// //
$io .= '<i>Запас маны (х2)</i>, '; $io .= '<i>Запас маны (х2)</i>, ';
$this->addItem(1029,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(1029, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$this->addItem(1029,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(1029, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
// //
$io .= '<i>Восстановление энергии 900HP</i>, '; $io .= '<i>Восстановление энергии 900HP</i>, ';
$this->addItem(2710,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(2710, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
// //
$io .= '<i>Восстановление энергии 1000MP</i>, '; $io .= '<i>Восстановление энергии 1000MP</i>, ';
$this->addItem(4030,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(4030, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
// //
$io .= '<i>Зелье Жизни</i>, '; $io .= '<i>Зелье Жизни</i>, ';
$this->addItem(724,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(724, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
mysql_query('UPDATE `items_users` SET `iznosMAX` = 1 WHERE `id` = "'.$iidtm.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosMAX` = 1 WHERE `id` = "' . $iidtm . '" LIMIT 1');
// //
$io .= '<i>Зелье Маны</i>, '; $io .= '<i>Зелье Маны</i>, ';
$this->addItem(1187,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(1187, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
mysql_query('UPDATE `items_users` SET `iznosMAX` = 1 WHERE `id` = "'.$iidtm.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosMAX` = 1 WHERE `id` = "' . $iidtm . '" LIMIT 1');
// //
}else{ } else {
$no_open_itm = true; $no_open_itm = true;
$this->error = 'Требуется 4 ключа с поля битвы.'; $this->error = 'Требуется 4 ключа с поля битвы.';
} }
} }
unset($i5,$i3,$i4); unset($i5, $i3, $i4);
?>

View File

@ -1,64 +1,65 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
if($tr['var_id'] != '') { if ($tr['var_id'] != '') {
$io = ''; $io = '';
/* /*
1. Требует 6 любых ключа 1. Требует 6 любых ключа
*/ */
$trgos = false; $trgos = false;
/*
$key1 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4460 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'));
$key2 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4461 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'));
$key3 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4462 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'));
$key4 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4463 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'));
*/
$keyall = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'));
if( $keyall[0] >= 6 ) {
mysql_query('DELETE FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 6');
//mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = '.$key1['id'].' OR `id` = '.$key2['id'].' OR `id` = '.$key3['id'].' OR `id` = '.$key4['id'].' LIMIT 4');
$trgos = true;
}
if( $trgos == true ) { $keyall = mysql_fetch_array(
// mysql_query(
$io .= '<i>Целебный пирог (х3)</i>, '; 'SELECT COUNT(`id`) FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = ' . $this->info['id'] . ' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'
$this->addItem(1028,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); )
$this->addItem(1028,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); );
// if ($keyall[0] >= 6) {
$io .= '<i>Запас маны (х3)</i>, '; mysql_query(
$this->addItem(1029,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); 'DELETE FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = ' . $this->info['id'] . ' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 6'
$this->addItem(1029,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); );
// $trgos = true;
$io .= '<i>Восстановление энергии 900HP</i>, '; }
$this->addItem(2711,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
//
$io .= '<i>Восстановление энергии 1000MP</i>, ';
$this->addItem(4029,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
//
$io .= '<i>Пропуск забытых</i>, ';
$this->addItem(2412,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
//
$io .= '<i>Зелье Жизни</i>, ';
$this->addItem(724,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
mysql_query('UPDATE `items_users` SET `iznosMAX` = 5 WHERE `id` = "'.$iidtm.'" LIMIT 1');
//
$io .= '<i>Зелье Маны</i>, ';
$this->addItem(1187,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
mysql_query('UPDATE `items_users` SET `iznosMAX` = 1 WHERE `id` = "'.$iidtm.'" LIMIT 1');
//
$io .= '<i>Нападение</i>, ';
$this->addItem(865,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
//
}else{
$no_open_itm = true;
$this->error = 'Требуется 6 ключей с поля битвы.';
}
} if ($trgos) {
unset($i5,$i3,$i4); //
?> $io .= '<i>Целебный пирог (х3)</i>, ';
ItemsModel::addItem(1028, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
ItemsModel::addItem(1028, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
//
$io .= '<i>Запас маны (х3)</i>, ';
ItemsModel::addItem(1029, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
ItemsModel::addItem(1029, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
//
$io .= '<i>Восстановление энергии 900HP</i>, ';
ItemsModel::addItem(2711, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
//
$io .= '<i>Восстановление энергии 1000MP</i>, ';
ItemsModel::addItem(4029, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
//
$io .= '<i>Пропуск забытых</i>, ';
ItemsModel::addItem(2412, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
//
$io .= '<i>Зелье Жизни</i>, ';
ItemsModel::addItem(724, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
mysql_query('UPDATE `items_users` SET `iznosMAX` = 5 WHERE `id` = "' . $iidtm . '" LIMIT 1');
//
$io .= '<i>Зелье Маны</i>, ';
ItemsModel::addItem(1187, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
mysql_query('UPDATE `items_users` SET `iznosMAX` = 1 WHERE `id` = "' . $iidtm . '" LIMIT 1');
//
$io .= '<i>Нападение</i>, ';
ItemsModel::addItem(865, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
//
} else {
$no_open_itm = true;
$this->error = 'Требуется 6 ключей с поля битвы.';
}
}
unset($i5, $i3, $i4);

View File

@ -1,68 +1,56 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
if($tr['var_id'] != '') { if ($tr['var_id'] != '') {
$io = ''; $io = '';
/* /*
1. Требует 8 любых ключа 1. Требует 8 любых ключа
*/ */
$trgos = false; $trgos = false;
/* $keyall = mysql_fetch_array(
$key1 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4460 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); mysql_query(
$key2 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4461 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); 'SELECT COUNT(`id`) FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = ' . $this->info['id'] . ' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'
$key3 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4462 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); )
$key4 = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `item_id` = 4463 AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); );
*/ if ($keyall[0] >= 8) {
$keyall = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1')); mysql_query(
if( $keyall[0] >= 8 ) { 'DELETE FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = ' . $this->info['id'] . ' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 8'
mysql_query('DELETE FROM `items_users` WHERE (`item_id` = 4460 OR `item_id` = 4461 OR `item_id` = 4462 OR `item_id` = 4463) AND `uid` = '.$this->info['id'].' AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 8'); );
//mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = '.$key1['id'].' OR `id` = '.$key2['id'].' OR `id` = '.$key3['id'].' OR `id` = '.$key4['id'].' LIMIT 4'); $trgos = true;
$trgos = true; }
}
if( $trgos == true ) { if ($trgos) {
// $io .= '<i>Целебный пирог (х3)</i>, ';
$io .= '<i>Целебный пирог (х3)</i>, '; ItemsModel::addItem(1028, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$this->addItem(1028,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(1028, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$this->addItem(1028,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); $io .= '<i>Запас маны (х3)</i>, ';
// ItemsModel::addItem(1029, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$io .= '<i>Запас маны (х3)</i>, '; ItemsModel::addItem(1029, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$this->addItem(1029,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); $io .= '<i>Восстановление энергии 1500HP</i>, ';
$this->addItem(1029,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(4022, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
// $io .= '<i>Восстановление энергии 1500MP</i>, ';
$io .= '<i>Восстановление энергии 1500HP</i>, '; ItemsModel::addItem(4034, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$this->addItem(4022,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); $io .= '<i>Пропуск Забытых</i>, ';
// ItemsModel::addItem(2412, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$io .= '<i>Восстановление энергии 1500MP</i>, '; $io .= '<i>Нападение</i>, ';
$this->addItem(4034,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(865, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
// $io .= '<i>Зелье Жизни</i>, ';
$io .= '<i>Пропуск Забытых</i>, '; ItemsModel::addItem(724, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$this->addItem(2412,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); $io .= '<i>Зелье Маны</i>, ';
// ItemsModel::addItem(1187, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$io .= '<i>Нападение</i>, '; $io .= '<i>Звездное Сияние</i>, ';
$this->addItem(865,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); $iidtm = ItemsModel::addItem(1463, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
// mysql_query('UPDATE `items_users` SET `iznosMAX` = 1 WHERE `id` = "' . $iidtm . '" LIMIT 1');
$io .= '<i>Зелье Жизни</i>, '; } else {
$this->addItem(724,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); $no_open_itm = true;
//mysql_query('UPDATE `items_users` SET `iznosMAX` = 5 WHERE `id` = "'.$iidtm.'" LIMIT 1'); $this->error = 'Требуется 8 ключей с поля битвы.';
// }
$io .= '<i>Зелье Маны</i>, ';
$this->addItem(1187,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
//mysql_query('UPDATE `items_users` SET `iznosMAX` = 5 WHERE `id` = "'.$iidtm.'" LIMIT 1');
//
$io .= '<i>Звездное Сияние</i>, ';
$iidtm = $this->addItem(1463,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
mysql_query('UPDATE `items_users` SET `iznosMAX` = 1 WHERE `id` = "'.$iidtm.'" LIMIT 1');
//
}else{
$no_open_itm = true;
$this->error = 'Требуется 8 ключей с поля битвы.';
}
} }
unset($i5,$i3,$i4); unset($i5, $i3, $i4);
?>

View File

@ -1,17 +1,14 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
$io .= '<i>†ажда †изни +6</i>, '; $io .= '<i>Жажда Жизни +6</i>, ';
$this->addItem(3101,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(3101, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$io .= '<i>Звездная Тяжесть</i>, ';
$io .= '<i>‡вездная ’Яжесть</i>, '; ItemsModel::addItem(1462, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$this->addItem(1462,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); $io .= '<i>Чек на 2 екр</i>, ';
ItemsModel::addItem(5018, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$io .= '<i>—ек на 2 екрК</i>, ';
$this->addItem(5018,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
?>

View File

@ -1,20 +1,19 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
$io .= '<i>Чек на 5 ЕКР</i>, '; $io .= '<i>Чек на 5 ЕКР</i>, ';
$this->addItem(5019,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(5019, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$io .= '<i>Бутерброд -The Best Friend-</i>, '; $io .= '<i>Бутерброд -The Best Friend-</i>, ';
$this->addItem(5010,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(5010, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$io .= '<i>Звездное Сияние</i>, '; $io .= '<i>Звездное Сияние</i>, ';
$this->addItem(1463,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(1463, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$io .= '<i>Амброзия подмастерья Владык</i>, '; $io .= '<i>Амброзия подмастерья Владык</i>, ';
$this->addItem(5239,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(5239, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
?>

View File

@ -1,25 +1,26 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
$io .= '<i>Чек на 10 ЕКР</i>, '; $io .= '<i>Чек на 10 ЕКР</i>, ';
$this->addItem(5020,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(5020, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$io .= '<i>Амброзия Скучающих Владык</i>, '; $io .= '<i>Амброзия Скучающих Владык</i>, ';
$this->addItem(5069,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(5069, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$io .= '<i>Эликсир Магического Искусства</i>, '; $io .= '<i>Эликсир Магического Искусства</i>, ';
$this->addItem(4948,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(4948, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$io .= '<i>Звездное Сияние</i>, '; $io .= '<i>Звездное Сияние</i>, ';
$this->addItem(1463,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(1463, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$io .= '<i>Жажда Жизни +6</i>, '; $io .= '<i>Жажда Жизни +6</i>, ';
$this->addItem(3101,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(3101, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$io .= '<i>Бутерброд -The Best Friend-</i>, '; $io .= '<i>Бутерброд -The Best Friend-</i>, ';
$this->addItem(5010,$this->info['id'],'|nosale=1|sudba='.$this->info['login']); ItemsModel::addItem(5010, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
?>

View File

@ -1,51 +1,54 @@
<?php <?php
if(!defined('GAME'))
{
die();
}
//воин use User\ItemsModel;
$itmadd = array(
//суперсвиток
0 => array(911,1172,2143,2144,1173),
//простые свитки
1 => array(3043,2545,2709,874,2391),
//гарантированные
2 => array(3044)
);
// 1000 екр. - 3-4 суперсвитка 0/20, 4 простых 0/100 + Эссенция Здоровья 0/3 + новогодний эликсир 0/10 if (!defined('GAME')) {
$i4 = array( die();
$itmadd[0][rand(0,count($itmadd[0])-1)], }
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)]
);
$i3 = array(); //воин
$itmadd = [
//суперсвиток
0 => [911, 1172, 2143, 2144, 1173],
//простые свитки
1 => [3043, 2545, 2709, 874, 2391],
//гарантированные
2 => [3044],
];
if( $u->info['level'] > 8 ) { // 1000 екр. - 3-4 суперсвитка 0/20, 4 простых 0/100 + Эссенция Здоровья 0/3 + новогодний эликсир 0/10
$i3[0] = $this->addItem(2143,$this->info['id'],'|nosale=1|notr=1|sudba='.$this->info['login'],NULL,($u->info['level']*2-10)); $i4 = [
$i3[1] = $this->addItem(2144,$this->info['id'],'|nosale=1|notr=1|sudba='.$this->info['login'],NULL,($u->info['level']*2-10)); $itmadd[0][rand(0, count($itmadd[0]) - 1)],
} $itmadd[0][rand(0, count($itmadd[0]) - 1)],
$itmadd[0][rand(0, count($itmadd[0]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
];
$i3[3] = $this->addItem(4020,$this->info['id'],'|nosale=1|notr=1|sudba='.$this->info['login'],NULL,($u->info['level']*2-10)); $i3 = [];
$i3[4] = $this->addItem(4035,$this->info['id'],'|nosale=1|notr=1|sudba='.$this->info['login'],NULL,($u->info['level']*2-10));
$i3[5] = $this->addItem(3101,$this->info['id'],'|nosale=1|notr=1|sudba='.$this->info['login'],NULL,($u->info['level']*2-10));
$i3[6] = $this->addItem(4041,$this->info['id'],'|nosale=1|notr=1|sudba='.$this->info['login'],NULL,($u->info['level']*2-10));
$i3[7] = $this->addItem(4541,$this->info['id'],'|nosale=1|notr=1|sudba='.$this->info['login'],NULL,1);
$i3[8] = $this->addItem(4542,$this->info['id'],'|nosale=1|notr=1|sudba='.$this->info['login'],NULL,1);
$i3[9] = $this->addItem(3048,$this->info['id'],'|nosale=1|notr=1|sudba='.$this->info['login'],NULL,1);
$i3[10] = $this->addItem(3041,$this->info['id'],'|nosale=1|notr=1|sudba='.$this->info['login'],NULL,1);
mysql_query('UPDATE `items_users` SET `gift` = "Ангел",`gtxt1` = "С Днем Рождения! Поздравляем! Удачи в боях и жизни!" WHERE
`id` = "'.$i3[8].'" OR `id` = "'.$i3[9].'" OR `id` = "'.$i3[10].'"
LIMIT 1');
if($io == '') { if ($u->info['level'] > 8) {
$io = 'Какие-то предметы добавлены к Вам в инвентарь...'; $i3[0] = ItemsModel::addItem(2143, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, ($u->info['level'] * 2 - 10));
} $i3[1] = ItemsModel::addItem(2144, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, ($u->info['level'] * 2 - 10));
unset($itmadd,$i3,$i4); }
?>
$i3[3] = ItemsModel::addItem(4020, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, ($u->info['level'] * 2 - 10));
$i3[4] = ItemsModel::addItem(4035, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, ($u->info['level'] * 2 - 10));
$i3[5] = ItemsModel::addItem(3101, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, ($u->info['level'] * 2 - 10));
$i3[6] = ItemsModel::addItem(4041, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, ($u->info['level'] * 2 - 10));
$i3[7] = ItemsModel::addItem(4541, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, 1);
$i3[8] = ItemsModel::addItem(4542, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, 1);
$i3[9] = ItemsModel::addItem(3048, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, 1);
$i3[10] = ItemsModel::addItem(3041, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, 1);
mysql_query(
'UPDATE `items_users` SET `gift` = "Ангел",`gtxt1` = "С Днем Рождения! Поздравляем! Удачи в боях и жизни!" WHERE
`id` = "' . $i3[8] . '" OR `id` = "' . $i3[9] . '" OR `id` = "' . $i3[10] . '"
LIMIT 1'
);
if ($io == '') {
$io = 'Какие-то предметы добавлены к Вам в инвентарь...';
}
unset($itmadd, $i3, $i4);

View File

@ -1,4 +1,7 @@
<?php <?php
use User\ItemsModel;
if (!defined('GAME')) { if (!defined('GAME')) {
die(); die();
} }
@ -21,15 +24,15 @@ if ($tr['var_id'] == 1) {
$add_nas = 1; $add_nas = 1;
//Накидка //Накидка
$i3 = $this->addItem(3200, $this->info['id'], '|nosale=1|noremont=1'); $i3 = ItemsModel::addItem(3200, $this->info['id'], '|nosale=1|noremont=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Эликсир //Эликсир
$i3 = $this->addItem(2418, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(2418, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Новый сундук //Новый сундук
$i3 = $this->addItem(3201, $this->info['id']); $i3 = ItemsModel::addItem(3201, $this->info['id']);
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
if ($io == '') { if ($io == '') {
@ -41,19 +44,19 @@ if ($tr['var_id'] == 1) {
$add_nas = 1; $add_nas = 1;
//Рубаха 3209 //Рубаха 3209
$i3 = $this->addItem(3209, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(3209, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Штаны 3210 //Штаны 3210
$i3 = $this->addItem(3210, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(3210, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Эликсир //Эликсир
$i3 = $this->addItem(2418, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(2418, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Новый сундук //Новый сундук
$i3 = $this->addItem(3202, $this->info['id']); $i3 = ItemsModel::addItem(3202, $this->info['id']);
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
if ($io == '') { if ($io == '') {
@ -65,19 +68,19 @@ if ($tr['var_id'] == 1) {
$add_nas = 1; $add_nas = 1;
//Перчатки 3211 //Перчатки 3211
$i3 = $this->addItem(3211, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(3211, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Наручи 3212 //Наручи 3212
$i3 = $this->addItem(3212, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(3212, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Эликсир //Эликсир
$i3 = $this->addItem(2418, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(2418, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Новый сундук //Новый сундук
$i3 = $this->addItem(3203, $this->info['id']); $i3 = ItemsModel::addItem(3203, $this->info['id']);
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
if ($io == '') { if ($io == '') {
@ -89,23 +92,23 @@ if ($tr['var_id'] == 1) {
$add_nas = 1; $add_nas = 1;
//Сапоги 3213 //Сапоги 3213
$i3 = $this->addItem(3213, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(3213, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Шлем 3214 //Шлем 3214
$i3 = $this->addItem(3214, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(3214, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Пояс 3215 //Пояс 3215
$i3 = $this->addItem(3215, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(3215, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Эликсир //Эликсир
$i3 = $this->addItem(2418, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(2418, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Новый сундук //Новый сундук
$i3 = $this->addItem(3204, $this->info['id']); $i3 = ItemsModel::addItem(3204, $this->info['id']);
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
if ($io == '') { if ($io == '') {
@ -117,27 +120,27 @@ if ($tr['var_id'] == 1) {
$add_nas = 1; $add_nas = 1;
//Серьги 3216 //Серьги 3216
$i3 = $this->addItem(3216, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(3216, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Амулет 3217 //Амулет 3217
$i3 = $this->addItem(3217, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(3217, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Кольца 3218 //Кольца 3218
$i3 = $this->addItem(3218, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(3218, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
$i3 = $this->addItem(3218, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(3218, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
$i3 = $this->addItem(3218, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(3218, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Эликсир //Эликсир
$i3 = $this->addItem(2418, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(2418, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Новый сундук //Новый сундук
$i3 = $this->addItem(3205, $this->info['id']); $i3 = ItemsModel::addItem(3205, $this->info['id']);
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
if ($io == '') { if ($io == '') {
@ -149,15 +152,15 @@ if ($tr['var_id'] == 1) {
$add_nas = 1; $add_nas = 1;
//Броня 4002 //Броня 4002
$i3 = $this->addItem(4002, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(4002, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Учебник воспитанника 4004 //Учебник воспитанника 4004
$i3 = $this->addItem(4004, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(4004, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Сумка воспитанника 4003 //Сумка воспитанника 4003
$i3 = $this->addItem(4003, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(4003, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Образы //Образы
@ -172,7 +175,7 @@ if ($tr['var_id'] == 1) {
); );
//Новый сундук //Новый сундук
$i3 = $this->addItem(3206, $this->info['id']); $i3 = ItemsModel::addItem(3206, $this->info['id']);
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
if ($io == '') { if ($io == '') {
@ -184,19 +187,19 @@ if ($tr['var_id'] == 1) {
$add_nas = 2; $add_nas = 2;
//Учебник воспитанника 4004 //Учебник воспитанника 4004
$i3 = $this->addItem(4004, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(4004, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Сумка воспитанника 4003 //Сумка воспитанника 4003
$i3 = $this->addItem(4003, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(4003, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Нападалка //Нападалка
$i3 = $this->addItem(865, $this->info['id'], '|nosale=1', null, 50); $i3 = ItemsModel::addItem(865, $this->info['id'], '|nosale=1', null, 50);
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Новый сундук //Новый сундук
$i3 = $this->addItem(3207, $this->info['id']); $i3 = ItemsModel::addItem(3207, $this->info['id']);
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
if ($io == '') { if ($io == '') {
@ -208,21 +211,21 @@ if ($tr['var_id'] == 1) {
$add_nas = 3; $add_nas = 3;
//Учебник воспитанника 4004 //Учебник воспитанника 4004
$i3 = $this->addItem(4004, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(4004, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Сумка воспитанника 4003 //Сумка воспитанника 4003
$i3 = $this->addItem(4003, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(4003, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Нападалка //Нападалка
$i3 = $this->addItem(865, $this->info['id'], '|nosale=1', null, 50); $i3 = ItemsModel::addItem(865, $this->info['id'], '|nosale=1', null, 50);
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Восстановление //Восстановление
$i3 = $this->addItem(2712, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(2712, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
$i3 = $this->addItem(2712, $this->info['id'], '|nosale=1'); $i3 = ItemsModel::addItem(2712, $this->info['id'], '|nosale=1');
setMentorGiftStatus($i3); setMentorGiftStatus($i3);
//Образы //Образы
@ -245,7 +248,7 @@ if ($tr['var_id'] == 1) {
if ($add_nas > 0 && $this->info['level'] < 8 && isset($refer['id'])) { if ($add_nas > 0 && $this->info['level'] < 8 && isset($refer['id'])) {
$ino = 0; $ino = 0;
while ($ino < $add_nas) { while ($ino < $add_nas) {
$this->addItem(4005, $refer['id']); ItemsModel::addItem(4005, $refer['id']);
$ino++; $ino++;
} }

View File

@ -1,46 +1,46 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
//лечение легких травм //лечение легких травм
$ov_item = \User\ItemsModel::addItem(4412,$u->info['id'],'|srok=43200|sudba='.$u->info['login'].''); $ov_item = ItemsModel::addItem(4412, $u->info['id'], '|srok=43200|sudba=' . $u->info['login'] . '');
if($ov_item > 0) { if ($ov_item > 0) {
mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "'.$ov_item.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "' . $ov_item . '" LIMIT 1');
//пропуск забытых //пропуск забытых
$ov_item = \User\ItemsModel::addItem(2412,$u->info['id'],'|srok=43200|battleUseZd=7200|sudba='.$u->info['login'].''); $ov_item = ItemsModel::addItem(2412, $u->info['id'], '|srok=43200|battleUseZd=7200|sudba=' . $u->info['login'] . '');
mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "'.$ov_item.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "' . $ov_item . '" LIMIT 1');
//жж6 //жж6
$ov_item = \User\ItemsModel::addItem(3101,$u->info['id'],'|srok=3600|battleUseZd=7200|sudba='.$u->info['login'].''); $ov_item = ItemsModel::addItem(3101, $u->info['id'], '|srok=3600|battleUseZd=7200|sudba=' . $u->info['login'] . '');
mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "'.$ov_item.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "' . $ov_item . '" LIMIT 1');
//лечение средних травм //лечение средних травм
$ov_item = \User\ItemsModel::addItem(4413,$u->info['id'],'|srok=43200|sudba='.$u->info['login'].''); $ov_item = ItemsModel::addItem(4413, $u->info['id'], '|srok=43200|sudba=' . $u->info['login'] . '');
mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "'.$ov_item.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "' . $ov_item . '" LIMIT 1');
//право на подвиг (бездна) //право на подвиг (бездна)
$ov_item = \User\ItemsModel::addItem(5035,$u->info['id'],'|srok=43200|battleUseZd=7200|sudba='.$u->info['login'].''); $ov_item = ItemsModel::addItem(5035, $u->info['id'], '|srok=43200|battleUseZd=7200|sudba=' . $u->info['login'] . '');
mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "'.$ov_item.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "' . $ov_item . '" LIMIT 1');
//право на подвиг (грибница) //право на подвиг (грибница)
$ov_item = \User\ItemsModel::addItem(5039,$u->info['id'],'|srok=43200|battleUseZd=7200|sudba='.$u->info['login'].''); $ov_item = ItemsModel::addItem(5039, $u->info['id'], '|srok=43200|battleUseZd=7200|sudba=' . $u->info['login'] . '');
mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "'.$ov_item.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "' . $ov_item . '" LIMIT 1');
//Лечение тяжелых травм //Лечение тяжелых травм
$ov_item = \User\ItemsModel::addItem(4414,$u->info['id'],'|srok=43200|sudba='.$u->info['login'].''); $ov_item = ItemsModel::addItem(4414, $u->info['id'], '|srok=43200|sudba=' . $u->info['login'] . '');
mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "'.$ov_item.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "' . $ov_item . '" LIMIT 1');
//право на подвиг (ПТП) //право на подвиг (ПТП)
$ov_item = \User\ItemsModel::addItem(5036,$u->info['id'],'|srok=43200|battleUseZd=7200|sudba='.$u->info['login'].''); $ov_item = ItemsModel::addItem(5036, $u->info['id'], '|srok=43200|battleUseZd=7200|sudba=' . $u->info['login'] . '');
mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "'.$ov_item.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "' . $ov_item . '" LIMIT 1');
//право на подвиг (Катакомбы) //право на подвиг (Катакомбы)
$ov_item = \User\ItemsModel::addItem(5037,$u->info['id'],'|srok=43200|battleUseZd=7200|sudba='.$u->info['login'].''); $ov_item = ItemsModel::addItem(5037, $u->info['id'], '|srok=43200|battleUseZd=7200|sudba=' . $u->info['login'] . '');
mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "'.$ov_item.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "' . $ov_item . '" LIMIT 1');
//право на подвиг (Гора легиона) //право на подвиг (Гора легиона)
$ov_item = \User\ItemsModel::addItem(5038,$u->info['id'],'|srok=43200|battleUseZd=7200|sudba='.$u->info['login'].''); $ov_item = ItemsModel::addItem(5038, $u->info['id'], '|srok=43200|battleUseZd=7200|sudba=' . $u->info['login'] . '');
mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "'.$ov_item.'" LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "' . $ov_item . '" LIMIT 1');
// //
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1');
$u->error = 'Вы получили предметы:<br> Лечение легких травм, Лечение средних травм, Лечение тяжелых травм, пропуск забытых, жажда жизни +6<br> право на подвиг(бездна), право на подвиг(грибница), $u->error = 'Вы получили предметы:<br> Лечение легких травм, Лечение средних травм, Лечение тяжелых травм, пропуск забытых, жажда жизни +6<br> право на подвиг(бездна), право на подвиг(грибница),
право на подвиг(ПТП), право на подвиг(катакомбы), право на подвиг(Гора легиона)'; право на подвиг(ПТП), право на подвиг(катакомбы), право на подвиг(Гора легиона)';
} }
?>

View File

@ -1,23 +1,24 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
$io .= '<i>Предметы Танка 8-го уровня</i>,'; $io .= '<i>Предметы Танка 8-го уровня</i>,';
$this->addItem(558,$this->info['id'],'|sudba=0'); ItemsModel::addItem(558, $this->info['id'], '|sudba=0');
$this->addItem(722,$this->info['id'],'|sudba=0'); ItemsModel::addItem(722, $this->info['id'], '|sudba=0');
$this->addItem(718,$this->info['id'],'|sudba=0'); ItemsModel::addItem(718, $this->info['id'], '|sudba=0');
$this->addItem(700,$this->info['id'],'|sudba=0'); ItemsModel::addItem(700, $this->info['id'], '|sudba=0');
$this->addItem(291,$this->info['id'],'|sudba=0'); ItemsModel::addItem(291, $this->info['id'], '|sudba=0');
$this->addItem(545,$this->info['id'],'|sudba=0'); ItemsModel::addItem(545, $this->info['id'], '|sudba=0');
$this->addItem(533,$this->info['id'],'|sudba=0'); ItemsModel::addItem(533, $this->info['id'], '|sudba=0');
$this->addItem(536,$this->info['id'],'|sudba=0'); ItemsModel::addItem(536, $this->info['id'], '|sudba=0');
$this->addItem(628,$this->info['id'],'|sudba=0'); ItemsModel::addItem(628, $this->info['id'], '|sudba=0');
$this->addItem(710,$this->info['id'],'|sudba=0'); ItemsModel::addItem(710, $this->info['id'], '|sudba=0');
$this->addItem(654,$this->info['id'],'|sudba=0'); ItemsModel::addItem(654, $this->info['id'], '|sudba=0');
$this->addItem(684,$this->info['id'],'|sudba=0'); ItemsModel::addItem(684, $this->info['id'], '|sudba=0');
$this->addItem(689,$this->info['id'],'|sudba=0'); ItemsModel::addItem(689, $this->info['id'], '|sudba=0');
$this->addItem(689,$this->info['id'],'|sudba=0'); ItemsModel::addItem(689, $this->info['id'], '|sudba=0');
$this->addItem(689,$this->info['id'],'|sudba=0'); ItemsModel::addItem(689, $this->info['id'], '|sudba=0');
?>

View File

@ -1,23 +1,24 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
$io .= '<i>Предметы Силача 8-го уровня</i>,'; $io .= '<i>Предметы Силача 8-го уровня</i>,';
$this->addItem(552,$this->info['id'],'|sudba=0'); ItemsModel::addItem(552, $this->info['id'], '|sudba=0');
$this->addItem(552,$this->info['id'],'|sudba=0'); ItemsModel::addItem(552, $this->info['id'], '|sudba=0');
$this->addItem(716,$this->info['id'],'|sudba=0'); ItemsModel::addItem(716, $this->info['id'], '|sudba=0');
$this->addItem(320,$this->info['id'],'|sudba=0'); ItemsModel::addItem(320, $this->info['id'], '|sudba=0');
$this->addItem(291,$this->info['id'],'|sudba=0'); ItemsModel::addItem(291, $this->info['id'], '|sudba=0');
$this->addItem(543,$this->info['id'],'|sudba=0'); ItemsModel::addItem(543, $this->info['id'], '|sudba=0');
$this->addItem(528,$this->info['id'],'|sudba=0'); ItemsModel::addItem(528, $this->info['id'], '|sudba=0');
$this->addItem(540,$this->info['id'],'|sudba=0'); ItemsModel::addItem(540, $this->info['id'], '|sudba=0');
$this->addItem(627,$this->info['id'],'|sudba=0'); ItemsModel::addItem(627, $this->info['id'], '|sudba=0');
$this->addItem(709,$this->info['id'],'|sudba=0'); ItemsModel::addItem(709, $this->info['id'], '|sudba=0');
$this->addItem(653,$this->info['id'],'|sudba=0'); ItemsModel::addItem(653, $this->info['id'], '|sudba=0');
$this->addItem(681,$this->info['id'],'|sudba=0'); ItemsModel::addItem(681, $this->info['id'], '|sudba=0');
$this->addItem(687,$this->info['id'],'|sudba=0'); ItemsModel::addItem(687, $this->info['id'], '|sudba=0');
$this->addItem(687,$this->info['id'],'|sudba=0'); ItemsModel::addItem(687, $this->info['id'], '|sudba=0');
$this->addItem(687,$this->info['id'],'|sudba=0'); ItemsModel::addItem(687, $this->info['id'], '|sudba=0');
?>

View File

@ -1,74 +1,52 @@
<?php <?php
if(!defined('GAME')) if (!defined('GAME')) {
{ die();
die();
} }
if(isset($po['finish_file']) && $po['finish_file']=='tznanie') if (isset($po['finish_file']) && $po['finish_file'] == 'tznanie') {
{ //Добавляем слот
//Добавляем слот mysql_query(
mysql_query('UPDATE `actions` SET `val` = "cast" WHERE (`vals` = "1044" OR `vals` = "1045" OR `vals` = "1046" OR `vals` = "1047") AND `val` != "cast" AND `vars` = "read" AND `uid` = "'.$u->info['id'].'" LIMIT 1'); 'UPDATE `actions` SET `val` = "cast" WHERE (`vals` = "1044" OR `vals` = "1045" OR `vals` = "1046" OR `vals` = "1047") AND `val` != "cast" AND `vars` = "read" AND `uid` = "' . $u->info['id'] . '" LIMIT 1'
}else{ );
$st['timeRead'] = 0; } else {
//$tst = $u->testAction('`uid` = "'.$u->info['id'].'" AND `time` > '.time().' AND `vars` = "read" LIMIT 1',1); $st['timeRead'] = 0;
if(isset($tst['id']))
{ if (isset($tst['id'])) {
//Уже что-то изучаем //Уже что-то изучаем
$u->error = 'Так не пойдет, вы уже что-то изучаете'; $u->error = 'Так не пойдет, вы уже что-то изучаете';
}else{ } else {
$tst = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "read" AND `vals` = "'.$itm['item_id'].'" LIMIT 1',1); $tst = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "read" AND `vals` = "' . $itm['item_id'] . '" LIMIT 1', 1);
if(isset($tst['id'])) if (isset($tst['id'])) {
{ $u->error = 'Вы уже изучили данное знание';
$u->error = 'Вы уже изучили данное знание'; } else {
}else{ $fn = '';
$fn = ''; $tom_iz = 0; $tom_iz = 0;
if(($itm['item_id']>=1045 && $itm['item_id']<=1047) || ($itm['item_id']>=4812 && $itm['item_id']<=4813)) if (($itm['item_id'] >= 1045 && $itm['item_id'] <= 1047) || ($itm['item_id'] >= 4812 && $itm['item_id'] <= 4813)) {
{ $tst2 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "read" AND `vals` = "' . ($itm['item_id'] - 1) . '" LIMIT 1', 1);
$tst2 = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "read" AND `vals` = "'.($itm['item_id']-1).'" LIMIT 1',1); if (!isset($tst2['id'])) {
if(!isset($tst2['id'])) $tom_iz = 1;
{ }
$tom_iz = 1; unset($tst2);
} }
unset($tst2);
} if ($tom_iz == 0) {
/* if (($itm['item_id'] >= 1044 && $itm['item_id'] <= 1047) || $itm['item_id'] == 4813 || $itm['item_id'] == 4812) {
if( $itm['item_id'] == 4811 ) { mysql_query('UPDATE `stats` SET `priemslot` = `priemslot` + 1 WHERE `id` = "' . $itm['uid'] . '" LIMIT 1');
//5 том знаний, нужен 1047 $fn .= 'finish_file=tznanie';
$tst2 = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "read" AND `vals` = "1047" LIMIT 1',1); }
if(!isset($tst2['id'])) if ($itm['item_id'] == 4811) {
{ mysql_query('UPDATE `stats` SET `priemslot` = `priemslot` + 2 WHERE `id` = "' . $itm['uid'] . '" LIMIT 1');
$tom_iz = 1; $fn .= 'finish_file=tznanie';
} }
unset($tst2);
} $u->error = 'Вы изучили &quot;' . $itm['name'] . '&quot;.';
*/ $u->addAction(time() + $st['timeRead'], 'read', $itm['item_id']);
if($tom_iz==0) mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1');
{
if(($itm['item_id']>=1044 && $itm['item_id']<=1047) || $itm['item_id']==4813 || $itm['item_id']==4812) } else {
{ $u->error = 'Требует изучения предыдущего тома';
mysql_query('UPDATE `stats` SET `priemslot` = `priemslot` + 1 WHERE `id` = "'.$itm['uid'].'" LIMIT 1'); }
$fn .= 'finish_file=tznanie'; unset($tom_iz);
} }
if($itm['item_id']==4811) }
{
mysql_query('UPDATE `stats` SET `priemslot` = `priemslot` + 2 WHERE `id` = "'.$itm['uid'].'" LIMIT 1');
$fn .= 'finish_file=tznanie';
}
//$ins = mysql_query('INSERT INTO `eff_users` (`overType`,`id_eff`,`uid`,`name`,`timeUse`,`data`,`img2`,`no_Ace`) VALUES ("8","2","'.$u->info['id'].'","Изучение: '.$itm['name'].'","'.(time()+$st['timeRead']).'","'.$fn.'","'.$itm['img'].'","1")');
//if($ins)
//{
//$u->error = 'Вы начали изучать &quot;'.$itm['name'].'&quot;. Время изучения составит '.$u->timeOut($st['timeRead']).'';
$u->error = 'Вы изучили &quot;'.$itm['name'].'&quot;.';
$u->addAction(time()+$st['timeRead'],'read',$itm['item_id']);
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
//}else{
// $u->error = 'Что-то здесь не так';
//}
}else{
$u->error = 'Требует изучения предыдущего тома';
}
unset($tom_iz);
}
}
} }
?>

View File

@ -1,23 +1,24 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
$io .= '<i>Предметы Уворотчика 8-го уровня</i>,'; $io .= '<i>Предметы Уворотчика 8-го уровня</i>,';
$this->addItem(523,$this->info['id'],'|sudba=0'); ItemsModel::addItem(523, $this->info['id'], '|sudba=0');
$this->addItem(523,$this->info['id'],'|sudba=0'); ItemsModel::addItem(523, $this->info['id'], '|sudba=0');
$this->addItem(712,$this->info['id'],'|sudba=0'); ItemsModel::addItem(712, $this->info['id'], '|sudba=0');
$this->addItem(1151,$this->info['id'],'|sudba=0'); ItemsModel::addItem(1151, $this->info['id'], '|sudba=0');
$this->addItem(290,$this->info['id'],'|sudba=0'); ItemsModel::addItem(290, $this->info['id'], '|sudba=0');
$this->addItem(541,$this->info['id'],'|sudba=0'); ItemsModel::addItem(541, $this->info['id'], '|sudba=0');
$this->addItem(525,$this->info['id'],'|sudba=0'); ItemsModel::addItem(525, $this->info['id'], '|sudba=0');
$this->addItem(539,$this->info['id'],'|sudba=0'); ItemsModel::addItem(539, $this->info['id'], '|sudba=0');
$this->addItem(633,$this->info['id'],'|sudba=0'); ItemsModel::addItem(633, $this->info['id'], '|sudba=0');
$this->addItem(707,$this->info['id'],'|sudba=0'); ItemsModel::addItem(707, $this->info['id'], '|sudba=0');
$this->addItem(647,$this->info['id'],'|sudba=0'); ItemsModel::addItem(647, $this->info['id'], '|sudba=0');
$this->addItem(680,$this->info['id'],'|sudba=0'); ItemsModel::addItem(680, $this->info['id'], '|sudba=0');
$this->addItem(685,$this->info['id'],'|sudba=0'); ItemsModel::addItem(685, $this->info['id'], '|sudba=0');
$this->addItem(685,$this->info['id'],'|sudba=0'); ItemsModel::addItem(685, $this->info['id'], '|sudba=0');
$this->addItem(685,$this->info['id'],'|sudba=0'); ItemsModel::addItem(685, $this->info['id'], '|sudba=0');
?>

View File

@ -1,6 +1,7 @@
<?php <?php
use Core\Db; use Core\Db;
use Helper\Conversion;
use User\ItemsModel; use User\ItemsModel;
class Quests class Quests
@ -368,9 +369,9 @@ class Quests
//Задержка между выполнением квеста //Задержка между выполнением квеста
if (isset($d['tr_zdr'])) { if (isset($d['tr_zdr'])) {
$qlst = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "start_quest' . $pl['id'] . '" AND `vals` != "go" LIMIT 1')); $qlst = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` = "start_quest' . $pl['id'] . '" AND `vals` != "go" LIMIT 1'));
$t .= 'Задержка между выполнением задания: ' . $u->timeOut($d['tr_zdr'] * 60 * 60); $t .= 'Задержка между выполнением задания: ' . Conversion::secondsToTimeout($d['tr_zdr'] * 60 * 60);
if ($qlst['time'] + ($d['tr_zdr'] * 60 * 60) - time() > 0) { if ($qlst['time'] + ($d['tr_zdr'] * 60 * 60) - time() > 0) {
$t .= '<small>(Осталось: ' . $u->timeOut($qlst['time'] + ($d['tr_zdr'] * 60 * 60) - time()) . ' ч.)</small>'; $t .= '<small>(Осталось: ' . Conversion::secondsToTimeout($qlst['time'] + ($d['tr_zdr'] * 60 * 60) - time()) . ' ч.)</small>';
} }
$t .= '<br>'; $t .= '<br>';
unset($qlst); unset($qlst);
@ -421,7 +422,7 @@ class Quests
$x6 = mysql_fetch_array(mysql_query('SELECT `id2`,`mname`,`img` FROM `eff_main` WHERE `id2` = "' . $x7[0] . '" LIMIT 1')); $x6 = mysql_fetch_array(mysql_query('SELECT `id2`,`mname`,`img` FROM `eff_main` WHERE `id2` = "' . $x7[0] . '" LIMIT 1'));
if (isset($x6['id2'])) { if (isset($x6['id2'])) {
$x5 .= '<img width="40" height="25" src="//img.new-combats.tech/i/eff/' . $x6['img'] . '" title="' . $x6['mname'] . ' $x5 .= '<img width="40" height="25" src="//img.new-combats.tech/i/eff/' . $x6['img'] . '" title="' . $x6['mname'] . '
Время действия: ' . $u->timeOut($x7[1]) . '"> '; Время действия: ' . Conversion::secondsToTimeout($x7[1]) . '"> ';
} }
$x4++; $x4++;
} }

View File

@ -1473,7 +1473,7 @@ class User
) )
); );
if (isset($v['id']) && $v['time'] + 60 * 60 > time()) { if (isset($v['id']) && $v['time'] + 60 * 60 > time()) {
$r .= '<img style="cursor:pointer;filter:alpha(opacity=47);opacity:0.47;-moz-opacity:0.47;-khtml-opacity:0.47;" onClick="alert(\'Возможно воспользоваться через ' . $this->timeOut( $r .= '<img style="cursor:pointer;filter:alpha(opacity=47);opacity:0.47;-moz-opacity:0.47;-khtml-opacity:0.47;" onClick="alert(\'Возможно воспользоваться через ' . Conversion::secondsToTimeout(
$v['time'] + 60 * 60 - time() $v['time'] + 60 * 60 - time()
) . '\');" src="' . Config::img() . '/i/items/healvortex_' . $vid . '.png" width="40" height="25" title="Клодец HP (Задержка)"> '; ) . '\');" src="' . Config::img() . '/i/items/healvortex_' . $vid . '.png" width="40" height="25" title="Клодец HP (Задержка)"> ';
} else { } else {
@ -1485,7 +1485,7 @@ class User
) )
); );
if (isset($v['id']) && $v['time'] + 60 * 60 > time()) { if (isset($v['id']) && $v['time'] + 60 * 60 > time()) {
$r .= '<img style="cursor:pointer;filter:alpha(opacity=47);opacity:0.47;-moz-opacity:0.47;-khtml-opacity:0.47;" onClick="alert(\'Возможно воспользоваться через ' . $this->timeOut( $r .= '<img style="cursor:pointer;filter:alpha(opacity=47);opacity:0.47;-moz-opacity:0.47;-khtml-opacity:0.47;" onClick="alert(\'Возможно воспользоваться через ' . Conversion::secondsToTimeout(
$v['time'] + 60 * 60 - time() $v['time'] + 60 * 60 - time()
) . '\');" src="' . Config::img() . '/i/items/manavortex_' . $vid . '.png" width="40" height="25" title="Клодец MP (Задержка)"> '; ) . '\');" src="' . Config::img() . '/i/items/manavortex_' . $vid . '.png" width="40" height="25" title="Клодец MP (Задержка)"> ';
} else { } else {
@ -1495,16 +1495,6 @@ class User
return $r; return $r;
} }
/**
* @param $ttm
* @return string
* @deprecated использовать ConversionHelper::secondsToTimeout()
*/
public function timeOut($ttm): string
{
return Conversion::secondsToTimeout($ttm);
}
public function insertAlign($an, $uid): void public function insertAlign($an, $uid): void
{ {
if ($an <= 0) { if ($an <= 0) {
@ -2130,23 +2120,6 @@ class User
//Расчет защиты (магия) //Расчет защиты (магия)
/** Для совместимости. Поиск по файлам $this->additem выдаёт сотни отсылок с видимо подключаемымим файлами
* в которых невозможно отследить зависимость и сделать полноценную замену.
* @param $id
* @param $uid
* @param $md
* @param $dn
* @param $mxiznos
* @param $nosudba
* @param $plavka
* @return int|mixed|string
* @deprecated use ItemsModel::addItem()
*/
public function addItem($id, $uid, $md = null, $dn = null, $mxiznos = null, $nosudba = null, $plavka = null): mixed
{
return ItemsModel::addItem($id, $uid, $md, $dn, $mxiznos, $nosudba, $plavka);
}
public function newAct($test): bool public function newAct($test): bool
{ {
$r = true; $r = true;
@ -3053,7 +3026,7 @@ class User
if ($data['srok'] + $id['time_create'] - time() > 86400 + 30) { if ($data['srok'] + $id['time_create'] - time() > 86400 + 30) {
$this->error = 'Нельзя использовать на предметы с сроком годности 30 и более дней.'; $this->error = 'Нельзя использовать на предметы с сроком годности 30 и более дней.';
} elseif ($id['inslot'] > 0 && $id['inslot'] < 20) { } elseif ($id['inslot'] > 0 && $id['inslot'] < 20) {
$this->error = 'Срок годности предмета &quot;' . $id['name'] . '&quot; продлен на ' . $this->timeOut( $this->error = 'Срок годности предмета &quot;' . $id['name'] . '&quot; продлен на ' . Conversion::secondsToTimeout(
$add['uptimeitem'] $add['uptimeitem']
) . '.'; ) . '.';
@ -3121,11 +3094,11 @@ class User
$data['sv_yron_min'] += $add['upatack']; $data['sv_yron_min'] += $add['upatack'];
$data['sv_yron_max'] += $add['upatack']; $data['sv_yron_max'] += $add['upatack'];
Delo::add(
$this->addDelo( 2,
2, $this->info['id'], 'System.remont.upatack',
'&quot;<font color="#4863A0">System.remont.upatack</font>&quot;: Заточка &quot;' . $data['upatack_name'] . '&quot; была успешно <strong>встроена</strong> в предмет &quot;' . $id['name'] . '&quot; [itm:' . $id['id'] . ']', $this->info['id'],
time(), $this->info['city'], 'System.remont.upatack', 0, 0 '&quot;<span style="color: #4863A0; ">System.remont.upatack</span>&quot;: Заточка &quot;' . $data['upatack_name'] . '&quot; была успешно <strong>встроена</strong> в предмет &quot;' . $id['name'] . '&quot; [itm:' . $id['id'] . ']',
); );
$data = Conversion::arrayToDataString($data); $data = Conversion::arrayToDataString($data);
@ -3173,12 +3146,13 @@ class User
} }
} }
Delo::add(
$this->addDelo( 2,
2, $this->info['id'], 'System.remont.upatack',
'&quot;<font color="#4863A0">System.remont.upatack</font>&quot;: Заточка &quot;' . $data['upatack_name'] . '&quot; была успешно <strong>встроена</strong> в предмет &quot;' . $id['name'] . '&quot; [itm:' . $id['id'] . ']', $u->info['id'],
time(), $this->info['city'], 'System.remont.upatack', 0, 0 '&quot;<span style="color: #4863A0; ">System.remont.upatack</span>&quot;: Заточка &quot;' . $data['upatack_name'] . '&quot; была успешно <strong>встроена</strong> в предмет &quot;' . $id['name'] . '&quot; [itm:' . $id['id'] . ']',
); );
$this->error = 'Заточка &quot;' . $id['name'] . '&quot; прошла успешно! Колка:' . $data['tya1'] . ' Руб:' . $data['tya2'] . ' Дробь:' . $data['tya3'] . ' Реж:' . $data['tya4'] . ' '; $this->error = 'Заточка &quot;' . $id['name'] . '&quot; прошла успешно! Колка:' . $data['tya1'] . ' Руб:' . $data['tya2'] . ' Дробь:' . $data['tya3'] . ' Реж:' . $data['tya4'] . ' ';
$data = Conversion::arrayToDataString($data); $data = Conversion::arrayToDataString($data);
mysql_query( mysql_query(
@ -3663,13 +3637,13 @@ class User
} }
} }
if ($po['battleUseZd'] > 0) { if ($po['battleUseZd'] > 0) {
$is2 .= '<br>Задержка использования: ' . $this->timeOut($po['battleUseZd']) . ''; $is2 .= '<br>Задержка использования: ' . Conversion::secondsToTimeout($po['battleUseZd']) . '';
} }
if (isset($po['srok']) && $po['srok'] > 0) { if (isset($po['srok']) && $po['srok'] > 0) {
$pl['srok'] = $po['srok']; $pl['srok'] = $po['srok'];
} }
if ($pl['srok'] > 0) { //Срок годности предмета if ($pl['srok'] > 0) { //Срок годности предмета
$is2 .= '<br>Срок годности: ' . $this->timeOut($pl['srok']) . ' (до ' . date( $is2 .= '<br>Срок годности: ' . Conversion::secondsToTimeout($pl['srok']) . ' (до ' . date(
'd.m.Y H:i', $pl['time_create'] + $pl['srok'] 'd.m.Y H:i', $pl['time_create'] + $pl['srok']
) . ')'; ) . ')';
} }
@ -3683,7 +3657,7 @@ class User
) )
); );
if (isset($efi['id2']) && $efi['actionTime'] > 0) { if (isset($efi['id2']) && $efi['actionTime'] > 0) {
$is2 .= '<br>Продолжительность действия: ' . $this->timeOut($efi['actionTime']); $is2 .= '<br>Продолжительность действия: ' . Conversion::secondsToTimeout($efi['actionTime']);
} }
} }
@ -4226,7 +4200,7 @@ class User
'UPDATE `items_users` SET `time_create` = "' . $pl['time_create'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1' 'UPDATE `items_users` SET `time_create` = "' . $pl['time_create'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1'
); );
} }
$is2 .= '<div style="color:brown;">Предмет будет недоступен через ' . $this->timeOut( $is2 .= '<div style="color:brown;">Предмет будет недоступен через ' . Conversion::secondsToTimeout(
$pl['time_create'] - time() $pl['time_create'] - time()
) . '</div>'; ) . '</div>';
} else { } else {
@ -4234,7 +4208,7 @@ class User
if (($pl['time_create'] - time() + 86400 * 30) < 1) { if (($pl['time_create'] - time() + 86400 * 30) < 1) {
$is2 .= '<div style="color:brown;">Предмет рассыпался у Вас на глазах...</div>'; $is2 .= '<div style="color:brown;">Предмет рассыпался у Вас на глазах...</div>';
} else { } else {
$is2 .= '<div style="color:brown;">Предмет исчезнет через ' . $this->timeOut( $is2 .= '<div style="color:brown;">Предмет исчезнет через ' . Conversion::secondsToTimeout(
$pl['time_create'] - time() + 86400 * 30 $pl['time_create'] - time() + 86400 * 30
) . '</div>'; ) . '</div>';
} }
@ -4302,7 +4276,7 @@ class User
} elseif ($type == 68) { } elseif ($type == 68) {
$is1 .= '<small style="font-size:11px;"><a href="?r=3&itm_take=' . $pl['id'] . '">Забрать</a><br><a href="?r=3&itm_cancel=' . $pl['id'] . '">Отказаться</a>'; $is1 .= '<small style="font-size:11px;"><a href="?r=3&itm_take=' . $pl['id'] . '">Забрать</a><br><a href="?r=3&itm_cancel=' . $pl['id'] . '">Отказаться</a>';
if ($pl['lastUPD'] > 0) { if ($pl['lastUPD'] > 0) {
$is1 .= '<br><br>(' . $this->timeOut(($pl['lastUPD'] + 7 * 24 * 60 * 60) - time()) . ')'; $is1 .= '<br><br>(' . Conversion::secondsToTimeout(($pl['lastUPD'] + 7 * 24 * 60 * 60) - time()) . ')';
} }
$is1 .= '</small>'; $is1 .= '</small>';
} elseif ($type == 67) { } elseif ($type == 67) {
@ -4835,25 +4809,6 @@ class User
return round((Config::get('shop_type2') / 100), 2); return round((Config::get('shop_type2') / 100), 2);
} }
/**
* @param $type
* @param $uid
* @param $txt
* @param @deprecated $tm
* @param @deprecated $ct
* @param $frm
* @param $mo
* @param @deprecated $mi
* @param false $vvv
* @return bool
* @deprecated использовать Delo::add().
*/
public function addDelo($type, $uid, $txt, $tm, $ct, $frm, $mo, $mi, false $vvv = false): bool
{
Delo::add($type, $frm, $uid, $txt, $mo);
return true;
}
public function testBattle($id): bool public function testBattle($id): bool
{ {
return !($id == 0 || Db::getValue('select count(*) from battle where id = ? and team_win > -1', [$id]) > 0); return !($id == 0 || Db::getValue('select count(*) from battle where id = ? and team_win > -1', [$id]) > 0);
@ -6002,17 +5957,19 @@ LIMIT 1'
'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 '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->error = 'Предметы "' . $itm['name'] . ' (x' . ($col + 1) . ')" выброшены';
$this->addDelo( Delo::add(
1, $uid, 1,
'&quot;<font color="maroon">System.inventory</font>&quot;: Предметы &quot;<strong>' . $itm['name'] . ' (x' . $col . ')</strong>&quot; [itm:' . $itm['id'] . '=' . time() . '] были <strong>выброшены</strong>.', time(), 'System.inventory',
$this->info['city'], 'System.inventory', 0, 0 $uid,
'&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Предметы &quot;<strong>' . $itm['name'] . ' (x' . $col . ')</strong>&quot; [itm:' . $itm['id'] . '=' . time() . '] были <strong>выброшены</strong>.',
); );
} else { } else {
$this->error = 'Предмет "' . $itm['name'] . '" выброшен'; $this->error = 'Предмет "' . $itm['name'] . '" выброшен';
$this->addDelo( Delo::add(
1, $uid, 1,
'&quot;<font color="maroon">System.inventory</font>&quot;: Предмет &quot;<strong>' . $itm['name'] . '</strong>&quot; [itm:' . $itm['id'] . '] был <strong>выброшен</strong>.', 'System.inventory',
time(), $this->info['city'], 'System.inventory', 0, 0 $uid,
'&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Предмет &quot;<strong>' . $itm['name'] . '</strong>&quot; [itm:' . $itm['id'] . '] был <strong>выброшен</strong>.',
); );
} }
return 1; return 1;

View File

@ -29,33 +29,36 @@ WHERE `iu`.`data` LIKE '%frompisher=1%' AND `iu`.`uid` = "3" AND `iu`.`delete` =
$u->info['money1']; $u->info['money1'];
*/ */
$itmm=mysql_query('SELECT `iu`.`id` AS iid, `iu`.*, `im`.* $itmm = mysql_query(
'SELECT `iu`.`id` AS iid, `iu`.*, `im`.*
FROM `items_users` AS `iu` FROM `items_users` AS `iu`
LEFT JOIN `items_main` AS `im` LEFT JOIN `items_main` AS `im`
ON `iu`.`item_id`=`im`.`id` ON `iu`.`item_id`=`im`.`id`
WHERE `iu`.`data` LIKE "%frompisher=1%" AND `iu`.`uid` = "'.$u->info['id'].'" AND `iu`.`delete` = "0" AND `iu`.`inOdet` = "0" AND `im`.`inslot` >0 AND `im`.`inslot` <18'); WHERE `iu`.`data` LIKE "%frompisher=1%" AND `iu`.`uid` = "' . $u->info['id'] . '" AND `iu`.`delete` = "0" AND `iu`.`inOdet` = "0" AND `im`.`inslot` >0 AND `im`.`inslot` <18'
$sell=0; );
$selli=0; $sell = 0;
while( $itm = mysql_fetch_array($itmm)) $selli = 0;
{ while ($itm = mysql_fetch_array($itmm)) {
$sell += $itm['price1']; $sell += $itm['price1'];
$u->info['money1'] + $itm['price1']; mysql_query('UPDATE `items_users` SET `delete`="' . time() . '" WHERE `id` = "' . $itm['iid'] . '" LIMIT 1');
mysql_query('UPDATE `items_users` SET `delete`="'.time().'" WHERE `id` = "'.$itm['iid'].'" LIMIT 1'); $selli++;
$selli++;
} }
if ($sell>0) if ($sell > 0) {
{ $u->addKr($sell);
mysql_query('UPDATE `users` SET `money`=`money`+"'.$sell.'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$txt .= '<br>Забрала у тебя <b><font color=#009999>'.$selli.'</b></font> вещей.'; $txt .= '<br>Забрала у тебя <b style="color: #009999;">' . $selli . '</b> вещей.';
$txt .= '<br>Держи <b><font color=#009999>'.$sell.'</b></font> кр. малец.'; $txt .= '<br>Держи <b style="color: #009999;">' . $sell . '</b> кр. малец.';
$txt .= '<br>Приноси еще - люблю я такие вещички!'; $txt .= '<br>Приноси еще - люблю я такие вещички!';
$u->addDelo(1,$u->info['id'],'&quot;<font color=green>Babka.'.$u->info['city'].'</font>&quot;: Продал бабке &quot;<b>'.$selli.'</b>&quot; предметов за <b>'.$sell.'</b> кр.',time(),$u->info['city'],'Babka.'.$u->info['city'].'',(int)$sell,0); Delo::add(
mysql_query('UPDATE `users_achiv` SET `bv`= `bv`+'.$selli.' WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); 1,
} 'Babka.' . $u->info['city'],
else $u->info['id'],
{ '&quot;<span style="color: green; ">Babka.' . $u->info['city'] . '</span>&quot;: Продал бабке &quot;<b>' . $selli . '</b>&quot; предметов за <b>' . $sell . '</b> кр.',
$txt .= '<br><b><font color=red>Нечего не принес бабушке!</b></font>'; (int)$sell
);
mysql_query('UPDATE `users_achiv` SET `bv`= `bv`+' . $selli . ' WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
} else {
$txt .= '<br><b style="color: crimson;">Нечего не принес бабушке!</b>';
} }
unlink($sell,$itmm,$itm); unlink($sell, $itmm, $itm);
?>

View File

@ -18,59 +18,25 @@
16 Штаны 16 Штаны
17 Ботинки 17 Ботинки
items_main items_users
SELECT `iu`.*, `im`.*
FROM `items_users` AS `iu`
LEFT JOIN `items_main` AS `im`
ON `iu`.`item_id`=`im`.`id`
WHERE `iu`.`data` LIKE '%frompisher=1%' AND `iu`.`uid` = "3" AND `iu`.`delete` = "0" AND `iu`.`inOdet` = "0" AND `im`.`inslot` >0 AND `im`.`inslot` <18;
$u->info['money1'];
*/ */
$itmm = mysql_fetch_array(mysql_query('SELECT COUNT(*) as total FROM `items_users` WHERE `item_id` = "6168" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0"'));
if ($itmm['total']>=50) use User\ItemsModel;
{
mysql_query('UPDATE `items_users` SET `delete`="'.time().'" WHERE `uid`="'.$u->info['id'].'" AND `item_id` = "6168" AND `delete` = 0 LIMIT 50;'); $itmm = mysql_fetch_array(mysql_query('SELECT COUNT(*) as total FROM `items_users` WHERE `item_id` = "6168" AND `uid` = "' . $u->info['id'] . '" AND `delete` = "0"'));
\User\ItemsModel::addItem(6167,$u->info['id'],'|sudba='.$u->info['login']); if ($itmm['total'] >= 50) {
$itmm = mysql_fetch_array(mysql_query('SELECT COUNT(*) as total FROM `items_users` WHERE `item_id` = "6168" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0"')); mysql_query('UPDATE `items_users` SET `delete`="' . time() . '" WHERE `uid`="' . $u->info['id'] . '" AND `item_id` = "6168" AND `delete` = 0 LIMIT 50;');
$txt .= '<br><i>Держи свиток сынок.</i><br>Спасибо за пыль но у тебя еще осталось: '.$itmm['total'].' шт.'; ItemsModel::addItem(6167, $u->info['id'], '|sudba=' . $u->info['login']);
$u->addDelo(1,$u->info['id'],'&quot;<font color=green>Babka.'.$u->info['city'].'</font>&quot;: Поменял у бабки пыль на свиток!',time(),$u->info['city'],'Babka.'.$u->info['city'].'',1,0); $itmm = mysql_fetch_array(mysql_query('SELECT COUNT(*) as total FROM `items_users` WHERE `item_id` = "6168" AND `uid` = "' . $u->info['id'] . '" AND `delete` = "0"'));
} $txt .= '<br><i>Держи свиток сынок.</i><br>Спасибо за пыль но у тебя еще осталось: ' . $itmm['total'] . ' шт.';
else Delo::add(
{ 1,
$txt .= '<br><i>Чтож ты бабушку так разочаровал</i><br>Недостаточно Призрачной Пыли! У тебя: '.$itmm['total'].' шт. милок.'; 'Babka.' . $u->info['city'],
$u->info['id'],
'&quot;<span style="color: green; ">Babka.' . $u->info['city'] . '</span>&quot;: Поменял у бабки пыль на свиток!',
1
);
} else {
$txt .= '<br><i>Чтож ты бабушку так разочаровал</i><br>Недостаточно Призрачной Пыли! У тебя: ' . $itmm['total'] . ' шт. милок.';
} }
/* unlink($sell, $itmm, $itm);
$itmm=mysql_query('SELECT `iu`.`id` AS iid, `iu`.*, `im`.*
FROM `items_users` AS `iu`
LEFT JOIN `items_main` AS `im`
ON `iu`.`item_id`=`im`.`id`
WHERE `iu`.`data` LIKE "%frompisher=1%" AND `iu`.`uid` = "'.$u->info['id'].'" AND `iu`.`delete` = "0" AND `iu`.`inOdet` = "0" AND `im`.`inslot` >0 AND `im`.`inslot` <18');
$sell=0;
$selli=0;
while( $itm = mysql_fetch_array($itmm))
{
$sell += $itm['price1'];
$u->info['money1'] + $itm['price1'];
mysql_query('UPDATE `items_users` SET `delete`="'.time().'" WHERE `id` = "'.$itm['iid'].'" LIMIT 1');
$selli++;
}
if ($sell>0)
{
mysql_query('UPDATE `users` SET `money`=`money`+"'.$sell.'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$txt .= '<br>Забрала у тебя <b><font color=#009999>'.$selli.'</b></font> вещей.';
$txt .= '<br>Держи <b><font color=#009999>'.$sell.'</b></font> кр. малец.';
$txt .= '<br>Приноси еще - люблю я такие вещички!';
$u->addDelo(1,$u->info['id'],'&quot;<font color=green>Babka.'.$u->info['city'].'</font>&quot;: Продал бабке &quot;<b>'.$selli.'</b>&quot; предметов за <b>'.$sell.'</b> кр.',time(),$u->info['city'],'Babka.'.$u->info['city'].'',(int)$sell,0);
mysql_query('UPDATE `users_achiv` SET `bv`= `bv`+'.$selli.' WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
}
else
{
$txt .= '<br><b><font color=red>Нечего не принес бабушке!</b></font>';
}
*/
unlink($sell,$itmm,$itm);
?>

View File

@ -36,61 +36,38 @@ foreach (Db::getRows($q) as $row) {
if ($row['inGroup']) { if ($row['inGroup']) {
$col = $u->itemsX($row['id']); $col = $u->itemsX($row['id']);
if ($col > 1) { if ($col > 1) {
$stmt = Db::prepare(' $stmt = Db::prepare(
update items_users set inShop = 0, 1price = ? 'update items_users set inShop = 0, 1price = ?
where where item_id = ? and inShop = 30 and uid = ? and inGroup = ? limit ' . $col);
item_id = ? and
inShop = 30 and
uid = ? and
inGroup = ?
limit ' . $col);
if ($stmt->execute([$row['price1'], $row['item_id'], $row['uid'], $row['inGroup']])) { if ($stmt->execute([$row['price1'], $row['item_id'], $row['uid'], $row['inGroup']])) {
$ld = $u->addDelo( Delo::add(
1, 1,
SHOP_TYPE,
$row['uid'], $row['uid'],
sprintf(RETURN_GROUP, $row['item_id'], $row['name'], $row['price1'], $row['inGroup'] . '+1'), sprintf(RETURN_GROUP, $row['item_id'], $row['name'], $row['price1'], $row['inGroup'] . '+1'),
time(),
$u->info['city'],
SHOP_TYPE,
0,
0
); );
} }
} else { } else {
$stmt = Db::prepare(' $stmt = Db::prepare('update items_users set inShop = 0, 1price = ?
update items_users set inShop = 0, 1price = ? where uid = ? and id = ? and inOdet = 0 and `delete` = 0 and inShop = 30');
where
uid = ? and
id = ? and
inOdet = 0 and
`delete` = 0 and
inShop = 30
');
if ($stmt->execute([$row['price1'], $row['uid'], $row['id']])) { if ($stmt->execute([$row['price1'], $row['uid'], $row['id']])) {
$ld = $u->addDelo( Delo::add(
1, 1,
SHOP_TYPE,
$row['uid'], $row['uid'],
sprintf(RETURN_ONE, $row['item_id'], $row['name'], $row['price1']), sprintf(RETURN_ONE, $row['item_id'], $row['name'], $row['price1']),
time(),
$u->info['city'],
SHOP_TYPE,
0,
0
); );
} }
} }
} else { } else {
$stmt = Db::prepare('update items_users set inShop = 0, 1price = ? where id = ? and inShop = 30'); $stmt = Db::prepare('update items_users set inShop = 0, 1price = ? where id = ? and inShop = 30');
if ($stmt->execute([$row['price1'], $row['id']])) { if ($stmt->execute([$row['price1'], $row['id']])) {
$ld = $u->addDelo( Delo::add(
1, 1,
SHOP_TYPE,
$row['uid'], $row['uid'],
sprintf(RETURN_ONE, $row['item_id'], $row['name'], $row['price1']), sprintf(RETURN_ONE, $row['item_id'], $row['name'], $row['price1']),
time(),
$u->info['city'],
SHOP_TYPE,
0,
0
); );
} }
} }

View File

@ -1,5 +1,7 @@
<?php <?php
//const GAME = true; //const GAME = true;
use Helper\Conversion;
if (!defined('GAME_VERSION')) { if (!defined('GAME_VERSION')) {
require_once '_incl_data/autoload.php'; require_once '_incl_data/autoload.php';
} }
@ -62,9 +64,9 @@ while ($pl = mysql_fetch_array($sp)) {
if ($pl['arand'] > 0) { if ($pl['arand'] > 0) {
$html .= '<img src="//img.new-combats.tech/arand.gif" title="Команды делятся на две равные команды (равные по количеству, но не по мощности)">'; $html .= '<img src="//img.new-combats.tech/arand.gif" title="Команды делятся на две равные команды (равные по количеству, но не по мощности)">';
} }
$html .= '<font color="grey">Бой начнется через <b>' . $u->timeOut( $html .= '<font color="grey">Бой начнется через <b>' . Conversion::secondsToTimeout(
$pl['time'] + $pl['time_start'] - time() $pl['time'] + $pl['time_start'] - time()
) . '</b>, таймаут ' . $u->timeOut($pl['timeout']) . '</font>'; ) . '</b>, таймаут ' . Conversion::secondsToTimeout($pl['timeout']) . '</font>';
if ($pl['priz'] > 0) { if ($pl['priz'] > 0) {
$html .= '<a href="/n/567/" target="_blank"><span style="color:#e65700;" title="Победители имеют 5% шанс на получение Жетона Успеха "><b>(Героическое Сражение)</b></span></a></font></i>'; $html .= '<a href="/n/567/" target="_blank"><span style="color:#e65700;" title="Победители имеют 5% шанс на получение Жетона Успеха "><b>(Героическое Сражение)</b></span></a></font></i>';
} }
@ -122,7 +124,7 @@ while ($pl = mysql_fetch_array($sp)) {
if ($pl['arand'] > 0) { if ($pl['arand'] > 0) {
$html .= '<img src="//img.new-combats.tech/arand.gif" title="Команды делятся на две равные команды (равные по количеству, но не по мощности)">'; $html .= '<img src="//img.new-combats.tech/arand.gif" title="Команды делятся на две равные команды (равные по количеству, но не по мощности)">';
} }
$html .= '<font color="grey">, таймаут ' . $u->timeOut($pl['timeout']) . '</font>'; $html .= '<font color="grey">, таймаут ' . Conversion::secondsToTimeout($pl['timeout']) . '</font>';
if ($pl['priz'] > 0) { if ($pl['priz'] > 0) {
$html .= '<a href="/n/567/" target="_blank"><span style="color:#e65700;" title="Та сторона которая победила получит 5% шанс на получение дополнительно Жетона Успеха "><b>(Героическое Сражение)</b></span></a></font></i>'; $html .= '<a href="/n/567/" target="_blank"><span style="color:#e65700;" title="Та сторона которая победила получит 5% шанс на получение дополнительно Жетона Успеха "><b>(Героическое Сражение)</b></span></a></font></i>';
} }
@ -151,7 +153,7 @@ while ($pl = mysql_fetch_array($sp)) {
//Ожидаем начала нового турнира //Ожидаем начала нового турнира
$html .= ' Начало турнира в "Башне Смерти" : <span class="date">' . date( $html .= ' Начало турнира в "Башне Смерти" : <span class="date">' . date(
'd.m.Y H:i', $pl['time_start'] 'd.m.Y H:i', $pl['time_start']
) . '</span> (<small> <font color=grey>Начнется через <b>' . $u->timeOut( ) . '</span> (<small> <font color=grey>Начнется через <b>' . Conversion::secondsToTimeout(
$pl['time_start'] - time() $pl['time_start'] - time()
) . '</b></font></small>) Призовой фонд на текущий момент: <b>' . round( ) . '</b></font></small>) Призовой фонд на текущий момент: <b>' . round(
($pl['money'] / 100 * 85), 2 ($pl['money'] / 100 * 85), 2

View File

@ -1,282 +1,335 @@
<?php <?php
if(!defined('GAME'))
{
die();
} use Core\Config;
$res = mysql_fetch_array(mysql_query("SELECT * FROM `clan` WHERE `id` = '".mysql_real_escape_string($u->info['clan'])."' LIMIT 1"));
$cpr = explode('|',$u->info['clan_prava']);
if(isset($_POST['invite']) && ($u->info['clan_prava']=='glava' || $cpr[0]==1))
{
$data = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['logingo'])."'"));
if($u->testAlign( $res['align'] , $data['id'] ) == 0 ) {
echo 'У персонажа стоит ограничение на смену склонности. Вы не можете выдать данную склонность!';
}elseif($data['palpro'] < time()) {
echo 'Нельзя принимать в клан без проверки...';
}elseif($data['clan']=='0' && $data['align']=='0') {
$u->insertAlign( $res['align'] , $data['id'] );
mysql_query("UPDATE `users` SET `align` = '".$res['align']."',`clan` = '".(int)$u->info['clan']."' WHERE `login` = '".mysql_real_escape_string($_POST['logingo'])."';");
if($res['money1']>=100)
{
$res['money1'] -= 100;
mysql_query("UPDATE `clan` SET `money1` = `money1` - 100 WHERE `id` = '".$res['id']."'");
}else{
mysql_query("UPDATE `users` SET `money` = `money` - 100 WHERE `id` = '".$u->info['id']."'");
}
}else{
echo 'Не выйдет...';
}
}
if(isset($_POST['dissmis']) && ($u->info['clan_prava']=='glava' || $cpr[1]==1))
{
$data = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['logingo'])."'"));
if($data['clan']==$u->info['clan'] && $data['clan_prava']!='glava') {
$u->deleteAlign( $data['align'] , $data['id'] );
mysql_query("UPDATE `users` SET `clan` = '0',`align` = '0',`mod_zvanie` = '' WHERE `login` = '".mysql_real_escape_string($_POST['logingo'])."';");
if($res['money1']>=30)
{
$res['money1'] -= 30;
mysql_query("UPDATE `clan` SET `money1` = `money1` - 30 WHERE `id` = '".$res['id']."'");
}else{
mysql_query("UPDATE `users` SET `money` = `money` - 30 WHERE `id` = '".$u->info['id']."'");
}
}else{
echo 'Не выйдет...';
}
}
if(isset($_POST['rang']) && ($u->info['clan_prava']=='glava' || $cpr[2]==1))
{
$data = mysql_fetch_array(mysql_query("SELECT `clan_prava`,`clan` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['logingo'])."'"));
if($data['clan']==$u->info['clan'] && $data['clan_prava']!='glava') {
mysql_query("UPDATE `users` SET `mod_zvanie` = '".mysql_real_escape_string($_POST['rang'])."' WHERE `login` = '".mysql_real_escape_string($_POST['logingo'])."';");
}else{
echo 'Не выйдет...';
}
}
if(isset($_POST['persedit']) && ($u->info['clan_prava']=='glava' || $cpr[2]==1)) {
$data = mysql_fetch_array(mysql_query("SELECT `clan` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['logingo'])."';"));
if($data['clan']==$u->info['clan']) {
$edit=1;
$prava = mysql_fetch_array(mysql_query("SELECT `clan_prava`,`mod_zvanie` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['logingo'])."';"));
$edcpr = explode('|',$prava[0]);
}else{
echo 'Не выйдет...';
}
}
if($_POST['save'] && ($u->info['clan_prava']=='glava' || $cpr[2]==1)) {
$st = strip_tags($_POST['status']); if (!defined('GAME')) {
/* die();
$st = str_replace('<scr>','<script>',$st);
$st = str_replace('</scr>','</script>',$st);
*/
if ($_POST['priem']=='on') { $ecpr[0]=1; } else { $ecpr[0]=0;} }
if ($_POST['vigon']=='on') { $ecpr[1]=1; } else { $ecpr[1]=0;} $res = mysql_fetch_array(mysql_query("SELECT * FROM `clan` WHERE `id` = '" . mysql_real_escape_string($u->info['clan']) . "' LIMIT 1"));
if ($_POST['editpriv']=='on') { $ecpr[2]=1; } else { $ecpr[2]=0;} $cpr = explode('|', $u->info['clan_prava']);
if ($_POST['givekazna']=='on') { $ecpr[3]=1; } else { $ecpr[3]=0;} if (isset($_POST['invite']) && ($u->info['clan_prava'] == 'glava' || $cpr[0] == 1)) {
if ($_POST['usekazna']=='on') { $ecpr[4]=1; } else { $ecpr[4]=0;} $data = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `login` = '" . mysql_real_escape_string($_POST['logingo']) . "'"));
if ($u->testAlign($res['align'], $data['id']) == 0) {
echo 'У персонажа стоит ограничение на смену склонности. Вы не можете выдать данную склонность!';
} elseif ($data['palpro'] < time()) {
echo 'Нельзя принимать в клан без проверки...';
} elseif ($data['clan'] == '0' && $data['align'] == '0') {
$u->insertAlign($res['align'], $data['id']);
mysql_query("UPDATE `users` SET `align` = '" . $res['align'] . "',`clan` = '" . (int)$u->info['clan'] . "' WHERE `login` = '" . mysql_real_escape_string($_POST['logingo']) . "';");
if ($res['money1'] >= 100) {
$res['money1'] -= 100;
mysql_query("UPDATE `clan` SET `money1` = `money1` - 100 WHERE `id` = '" . $res['id'] . "'");
} else {
mysql_query("UPDATE `users` SET `money` = `money` - 100 WHERE `id` = '" . $u->info['id'] . "'");
}
} else {
echo 'Не выйдет...';
}
}
if (isset($_POST['dissmis']) && ($u->info['clan_prava'] == 'glava' || $cpr[1] == 1)) {
$data = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `login` = '" . mysql_real_escape_string($_POST['logingo']) . "'"));
if ($data['clan'] == $u->info['clan'] && $data['clan_prava'] != 'glava') {
$u->deleteAlign($data['align'], $data['id']);
mysql_query("UPDATE `users` SET `clan` = '0',`align` = '0',`mod_zvanie` = '' WHERE `login` = '" . mysql_real_escape_string($_POST['logingo']) . "';");
if ($res['money1'] >= 30) {
$res['money1'] -= 30;
mysql_query("UPDATE `clan` SET `money1` = `money1` - 30 WHERE `id` = '" . $res['id'] . "'");
} else {
mysql_query("UPDATE `users` SET `money` = `money` - 30 WHERE `id` = '" . $u->info['id'] . "'");
}
} else {
echo 'Не выйдет...';
}
}
if (isset($_POST['rang']) && ($u->info['clan_prava'] == 'glava' || $cpr[2] == 1)) {
$data = mysql_fetch_array(mysql_query("SELECT `clan_prava`,`clan` FROM `users` WHERE `login` = '" . mysql_real_escape_string($_POST['logingo']) . "'"));
if ($data['clan'] == $u->info['clan'] && $data['clan_prava'] != 'glava') {
mysql_query("UPDATE `users` SET `mod_zvanie` = '" . mysql_real_escape_string($_POST['rang']) . "' WHERE `login` = '" . mysql_real_escape_string($_POST['logingo']) . "';");
} else {
echo 'Не выйдет...';
}
}
if (isset($_POST['persedit']) && ($u->info['clan_prava'] == 'glava' || $cpr[2] == 1)) {
$data = mysql_fetch_array(mysql_query("SELECT `clan` FROM `users` WHERE `login` = '" . mysql_real_escape_string($_POST['logingo']) . "';"));
if ($data['clan'] == $u->info['clan']) {
$edit = 1;
$prava = mysql_fetch_array(mysql_query("SELECT `clan_prava`,`mod_zvanie` FROM `users` WHERE `login` = '" . mysql_real_escape_string($_POST['logingo']) . "';"));
$edcpr = explode('|', $prava[0]);
} else {
echo 'Не выйдет...';
}
}
if ($_POST['save'] && ($u->info['clan_prava'] == 'glava' || $cpr[2] == 1)) {
$igogo = implode('|',$ecpr); $st = strip_tags($_POST['status']);
mysql_query("UPDATE `users` SET `mod_zvanie` = '".mysql_real_escape_string($st)."' WHERE `login` = '".mysql_real_escape_string($_POST['login'])."' AND `clan` = '".mysql_real_escape_string($res['id'])."' ORDER BY `id` ASC LIMIT 1");
$prava['mod_zvanie'] = $st; if ($_POST['priem'] == 'on') {
if ($cpr[2]==1 || $u->info['clan_prava']=='glava') { $ecpr[0] = 1;
mysql_query("UPDATE `users` SET `clan_prava` = '".$igogo."' WHERE `login` = '".mysql_real_escape_string($_POST['login'])."' AND `clan` = '".mysql_real_escape_string($res['id'])."' AND `clan_prava` != 'glava' ORDER BY `id` ASC LIMIT 1"); } else {
echo 'Права успешно изменены.'; $ecpr[0] = 0;
} }
} if ($_POST['vigon'] == 'on') {
if($_POST['igogo'] && $_POST['lojit'] && ($u->info['clan_prava']=='glava' || $cpr[3]==1) ) { $ecpr[1] = 1;
$_POST['igogo'] = round($_POST['igogo'],2); } else {
if($_POST['igogo']<0 OR $_POST['igogo']>$u->info['money']){echo'не-а';}else{ $ecpr[1] = 0;
if(mysql_query("UPDATE `clan` SET `money1` = `money1`+'".mysql_real_escape_string($_POST['igogo'])."' WHERE `id` = '".mysql_real_escape_string($u->info['clan'])."';")){echo'Успешно'; }
mysql_query("UPDATE `users` SET `money`=`money`-'".mysql_real_escape_string($_POST['igogo'])."' WHERE `id` = '".mysql_real_escape_string($u->info['id'])."'"); if ($_POST['editpriv'] == 'on') {
$u->addDelo(1,$u->info['id'],'&quot;<font color=#C65F00>Clan'.$u->info['clan'].'.'.$u->info['city'].'</font>&quot;: Положено <b>'.mysql_real_escape_string($_POST['igogo']).'</b> кр. в казну клана',time(),$u->info['city'],'Clan'.$u->info['clan'].'.'.$u->info['city'].'',0,0); $ecpr[2] = 1;
}else{echo'Что-то не так...';} } else {
$res['money1']+=$_POST['igogo']; $ecpr[2] = 0;
} }
} if ($_POST['givekazna'] == 'on') {
if($_POST['igogo'] && $_POST['zabrat'] && ($u->info['clan_prava']=='glava' || $cpr[4]==1)) { $ecpr[3] = 1;
$_POST['igogo'] = round($_POST['igogo'],2); } else {
if($_POST['igogo']<0){echo'не-а';}else{ $ecpr[3] = 0;
if($res['money1']<$_POST['igogo']){echo'не-а';}else{ }
if(mysql_query("UPDATE `clan` SET `money1` = `money1`-'".mysql_real_escape_string($_POST['igogo'])."' WHERE `id` = '".mysql_real_escape_string($u->info['clan'])."';")){echo'Успешно'; if ($_POST['usekazna'] == 'on') {
mysql_query("UPDATE `users` SET `money`=`money`+'".mysql_real_escape_string($_POST['igogo'])."' WHERE `id` = '".mysql_real_escape_string($u->info['id'])."'"); $ecpr[4] = 1;
$u->addDelo(1,$u->info['id'],'&quot;<font color=#C65F00>Clan'.$u->info['clan'].'.'.$u->info['city'].'</font>&quot;: Взято <b>'.mysql_real_escape_string($_POST['igogo']).'</b> кр. из казны клана',time(),$u->info['city'],'Clan'.$u->info['clan'].'.'.$u->info['city'].'',0,0); } else {
}else{echo'Что-то не так...';} $ecpr[4] = 0;
$res['money1']-=$_POST['igogo']; }
}
} $igogo = implode('|', $ecpr);
} mysql_query(
"UPDATE `users` SET `mod_zvanie` = '" . mysql_real_escape_string($st) . "' WHERE `login` = '" . mysql_real_escape_string($_POST['login']) . "' AND `clan` = '" . mysql_real_escape_string(
$res['id']
) . "' ORDER BY `id` ASC LIMIT 1"
);
$prava['mod_zvanie'] = $st;
if ($cpr[2] == 1 || $u->info['clan_prava'] == 'glava') {
mysql_query(
"UPDATE `users` SET `clan_prava` = '" . $igogo . "' WHERE `login` = '" . mysql_real_escape_string($_POST['login']) . "' AND `clan` = '" . mysql_real_escape_string(
$res['id']
) . "' AND `clan_prava` != 'glava' ORDER BY `id` ASC LIMIT 1"
);
echo 'Права успешно изменены.';
}
}
if ($_POST['igogo'] && $_POST['lojit'] && ($u->info['clan_prava'] == 'glava' || $cpr[3] == 1)) {
$_POST['igogo'] = round($_POST['igogo'], 2);
if ($_POST['igogo'] < 0 or $_POST['igogo'] > $u->info['money']) {
echo 'не-а';
} else {
if (mysql_query("UPDATE `clan` SET `money1` = `money1`+'" . mysql_real_escape_string($_POST['igogo']) . "' WHERE `id` = '" . mysql_real_escape_string($u->info['clan']) . "';")) {
echo 'Успешно';
mysql_query("UPDATE `users` SET `money`=`money`-'" . mysql_real_escape_string($_POST['igogo']) . "' WHERE `id` = '" . mysql_real_escape_string($u->info['id']) . "'");
Delo::add(
1,
'Clan' . $u->info['clan'] . '.' . $u->info['city'],
$u->info['id'],
'&quot;<span style="color: #C65F00; ">Clan' . $u->info['clan'] . '.' . $u->info['city'] .
'</span>&quot;: Положено <b>' . mysql_real_escape_string($_POST['igogo']) . '</b> кр. в казну клана',
);
} else {
echo 'Что-то не так...';
}
$res['money1'] += $_POST['igogo'];
}
}
if ($_POST['igogo'] && $_POST['zabrat'] && ($u->info['clan_prava'] == 'glava' || $cpr[4] == 1)) {
$_POST['igogo'] = round($_POST['igogo'], 2);
if ($_POST['igogo'] < 0) {
echo 'не-а';
} else {
if ($res['money1'] < $_POST['igogo']) {
echo 'не-а';
} else {
if (mysql_query("UPDATE `clan` SET `money1` = `money1`- " . (int)$_POST['igogo'] . " WHERE `id` = " . $u->info['clan'])) {
echo 'Успешно';
$u->addKr((int)$_POST['igogo']);
Delo::add(
1,
'Clan' . $u->info['clan'] . '.' . $u->info['city'],
$u->info['id'],
'&quot;<span style="color: #C65F00; ">Clan' . $u->info['clan'] . '.' . $u->info['city'] .
'</span>&quot;: Взято <b>' . $_POST['igogo'] . '</b> кр. из казны клана',
);
} else {
echo 'Что-то не так...';
}
$res['money1'] -= $_POST['igogo'];
}
}
}
?> ?>
<body style="margin:10px; margin-top:5px;" bgcolor=e2e0e0>
<style> <style>
body {
margin: 5px 10px 10px;
background-color: #e2e0e0;
}
.modpow { .modpow {
background-color: #ddd5bf;
}
background-color:#ddd5bf; .mt {
background-color: #b1a993;
} padding: 5px 10px;
}
.mt {
background-color:#b1a993;
padding-left:10px;
padding-right:10px;
padding-top:5px;
padding-bottom:5px;
}
.md {
padding:10px;
}
.md {
padding: 10px;
}
</style> </style>
<body>
<script> <script>
function openMod(title, dat) {
const d = document.getElementById('useMagic');
if (d) {
document.getElementById('modtitle').innerHTML = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">' + title + '</td><td width="30" valign="top"><div align="right"><a title="Закрыть окно" onClick="closeMod(); return false;" href="#">x</a></div></td></tr></table>';
document.getElementById('moddata').innerHTML = dat;
d.style.display = '';
}
}
function openMod(title,dat) function closeMod() {
const d = document.getElementById('useMagic');
{ if (d) {
document.getElementById('modtitle').innerHTML = '';
var d = document.getElementById('useMagic'); document.getElementById('moddata').innerHTML = '';
d.style.display = 'none';
if(d!=undefined) }
}
{
document.getElementById('modtitle').innerHTML = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">'+title+'</td><td width="30" valign="top"><div align="right"><a title="Закрыть окно" onClick="closeMod(); return false;" href="#">x</a></div></td></tr></table>';
document.getElementById('moddata').innerHTML = dat;
d.style.display = '';
}
}
function closeMod()
{
var d = document.getElementById('useMagic');
if(d!=undefined)
{
document.getElementById('modtitle').innerHTML = '';
document.getElementById('moddata').innerHTML = '';
d.style.display = 'none';
}
}
</script> </script>
<div id="useMagic" style="display:none; position:absolute; border:solid 1px #776f59; left: 50px; top: 186px;" class="modpow"> <div id="useMagic" style="display:none; position:absolute; border:solid 1px #776f59; left: 50px; top: 186px;" class="modpow">
<div class="mt" id="modtitle"></div><div class="md" id="moddata"></div></div> <div class="mt" id="modtitle"></div>
<center><h3><img src="https://<?=$c['img']?>/i/align/align<?=$res['align'];?>.gif"> <img title="<?=$res['name'];?>" src="https://<?=$c['img']?>/i/clan/<?=$res['name_mini'];?>.gif"> <?=$res['name'];?></h3></center> <div class="md" id="moddata"></div>
<input style="float:right;margin:1px" type="button" value="Вернуться" onClick="document.location='main.php'"><input style="float:right;margin:1px" type="button" value="Обновить" onClick="document.location='main.php?clan&rnd=<?=$code;?>'"><br> </div>
<center>
<h3>
<img src="<?= Config::img() ?>/i/align/align<?= $res['align']; ?>.gif">
<img title="<?= $res['name']; ?>" src="<?= Config::img() ?>/i/clan/<?= $res['name_mini']; ?>.gif"> <?= $res['name']; ?>
</h3>
</center>
<input style="float:right;margin:1px" type="button" value="Вернуться" onClick="document.location='main.php'">
<input style="float:right;margin:1px" type="button" value="Обновить" onClick="document.location='main.php?clan&rnd=<?= $code; ?>'">
<br>
<TABLE width="100%" cellpadding="5" cellspacing="10"> <TABLE width="100%" cellpadding="5" cellspacing="10">
<TR><TD valign=top> <TR>
<small>Казна клана: <b><span style="color:green"><?=round($res['money1']);?></span> кр.</b></small> <TD valign=top>
<form method=post> <small>Казна клана: <b><span style="color:green"><?= round($res['money1']); ?></span> кр.</b></small>
<input type=text value="0.00" style='width:40px;' name=igogo> <form method=post>
<?if($cpr[3]==1 || $u->info['clan_prava']=='glava'){?> <input type=text value="0.00" style='width:40px;' name=igogo>
<input type=submit value="Положить" name=lojit> <?php if ($cpr[3] == 1 || $u->info['clan_prava'] == 'glava') { ?>
<?}if($cpr[4]==1 || $u->info['clan_prava']=='glava'){?> <input type=submit value="Положить" name=lojit>
<input type=submit value="Забрать" name=zabrat> <?php }
<?}?> if ($cpr[4] == 1 || $u->info['clan_prava'] == 'glava') { ?>
</form> <input type=submit value="Забрать" name=zabrat>
<br><br> <?php } ?>
<?php if($u->info['clan_prava'] == 'glava' || $cpr[0]==1) { ?> </form>
<input type="button" style="width:144px;" value="Принять в клан" onClick="openMod('<b>Введите логин</b>','<form action=\'main.php?clan=1&usemod=<?= $code; ?>\' method=\'post\'>Логин: <input type=\'text\' style=\'width:144px;\' id=\'logingo\' name=\'logingo\'><br> <input style=\'float:right;\' type=\'submit\' name=\'invite\' value=\'Принять\'></form>');"> <br><br>
(Это обойдется вам в <b>100 кр.</b>)<br> <?php if ($u->info['clan_prava'] == 'glava' || $cpr[0] == 1) { ?>
<small>(Перед приемом в клан,персонаж должен пройти проверку у паладинов)</small><br> <input type="button" style="width:144px;" value="Принять в клан" onClick="openMod('<b>Введите логин</b>','<form action=\'main.php?clan=1&usemod=<?= $code; ?>\' method=\'post\'>Логин: <input type=\'text\' style=\'width:144px;\' id=\'logingo\' name=\'logingo\'><br> <input style=\'float:right;\' type=\'submit\' name=\'invite\' value=\'Принять\'></form>');">
<?php } if($u->info['clan_prava'] == 'glava' || $cpr[1]==1) { ?> (Это обойдется вам в <b>100 кр.</b>)<br>
<input type="button" style="width:144px;" value="Выгнать из клана" onClick="openMod('<b>Введите логин</b>','<form action=\'main.php?clan=1&usemod=<?= $code; ?>\' method=\'post\'>Логин: <input type=\'text\' style=\'width:144px;\' id=\'logingo\' name=\'logingo\'><br> <input style=\'float:right;\' type=\'submit\' name=\'dissmis\' value=\'Выгнать\'></form>');"> <small>(Перед приемом в клан,персонаж должен пройти проверку у паладинов)</small><br>
(Это обойдется вам в <b>30 кр.</b>)<br> <?php }
<?php } if($u->info['clan_prava'] == 'glava' || $cpr[2]==1) { ?> if ($u->info['clan_prava'] == 'glava' || $cpr[1] == 1) { ?>
<!--<input type="button" style="width:144px;" value="Редактировать права" onClick="openMod('<b>Введите логин</b>','<form action=\'main.php?clan=1&usemod=<?= $code; ?>\' method=\'post\'>Логин: &nbsp;<input type=\'text\' style=\'width:144px;\' id=\'logingo\' name=\'logingo\'><br>Звание: <input type=\'text\' style=\'width:144px;\' id=\'rang\' name=\'rang\'><br> <input style=\'float:right;\' type=\'submit\' name=\'rerang\' value=\'Сменить звание\'></form>');"><br>--> <input type="button" style="width:144px;" value="Выгнать из клана" onClick="openMod('<b>Введите логин</b>','<form action=\'main.php?clan=1&usemod=<?= $code; ?>\' method=\'post\'>Логин: <input type=\'text\' style=\'width:144px;\' id=\'logingo\' name=\'logingo\'><br> <input style=\'float:right;\' type=\'submit\' name=\'dissmis\' value=\'Выгнать\'></form>');">
<input type="button" style="width:144px;" value="Редактировать" onClick="openMod('<b>Введите логин</b>','<form action=\'main.php?clan=1&usemod=<?= $code; ?>\' method=\'post\'>Логин: <input type=\'text\' style=\'width:144px;\' id=\'logingo\' name=\'logingo\'><br> <input style=\'float:right;\' type=\'submit\' name=\'persedit\' value=\'Редактировать\'></form>');"><br><br><br> (Это обойдется вам в <b>30 кр.</b>)<br>
<?php } ?> <?php }
<?php if ($u->info['clan_prava'] == 'glava' || $cpr[2] == 1) { ?>
if($edit==1){ <!--<input type="button" style="width:144px;" value="Редактировать права" onClick="openMod('<b>Введите логин</b>','<form action=\'main.php?clan=1&usemod=<?= $code; ?>\' method=\'post\'>Логин: &nbsp;<input type=\'text\' style=\'width:144px;\' id=\'logingo\' name=\'logingo\'><br>Звание: <input type=\'text\' style=\'width:144px;\' id=\'rang\' name=\'rang\'><br> <input style=\'float:right;\' type=\'submit\' name=\'rerang\' value=\'Сменить звание\'></form>');"><br>-->
<input type="button" style="width:144px;" value="Редактировать" onClick="openMod('<b>Введите логин</b>','<form action=\'main.php?clan=1&usemod=<?= $code; ?>\' method=\'post\'>Логин: <input type=\'text\' style=\'width:144px;\' id=\'logingo\' name=\'logingo\'><br> <input style=\'float:right;\' type=\'submit\' name=\'persedit\' value=\'Редактировать\'></form>');">
<br><br><br>
<?php } ?>
<?php
if ($edit == 1) {
echo' echo '
<form method=post> <form method=post>
Редактирование прав <b>'.htmlspecialchars($_POST['logingo'],NULL).'</b><br> Редактирование прав <b>' . htmlspecialchars($_POST['logingo'], null) . '</b><br>
Звание в клане <input type=text value="',$prava['mod_zvanie'],'" name=status><BR> Звание в клане <input type=text value="', $prava['mod_zvanie'], '" name=status><BR>
<input type=checkbox name=priem';if ($edcpr[0]==1) { echo ' checked ';} echo'>Прием в клан<BR> <input type=checkbox name=priem';
<input type=checkbox name=vigon';if ($edcpr[1]==1) { echo ' checked ';} echo'>Изгнание из клана<BR> if ($edcpr[0] == 1) {
<input type=checkbox name=editpriv';if ($edcpr[2]==1) { echo ' checked ';} echo'>Редактирование прав<BR> echo ' checked ';
<input type=checkbox name=givekazna';if ($edcpr[3]==1) { echo ' checked ';} echo'>Пополнение казны клана<BR> }
<input type=checkbox name=usekazna';if ($edcpr[4]==1) { echo ' checked ';} echo'>Использование казны клана<BR> echo '>Прием в клан<BR><input type=checkbox name=vigon';
if ($edcpr[1] == 1) {
echo ' checked ';
}
echo '>Изгнание из клана<BR><input type=checkbox name=editpriv';
if ($edcpr[2] == 1) {
echo ' checked ';
}
echo '>Редактирование прав<BR><input type=checkbox name=givekazna';
if ($edcpr[3] == 1) {
echo ' checked ';
}
echo '>Пополнение казны клана<BR><input type=checkbox name=usekazna';
if ($edcpr[4] == 1) {
echo ' checked ';
}
echo '>Использование казны клана<BR>
<input type=hidden value="'.htmlspecialchars($_POST['logingo'],NULL).'" name=login><input type=submit value="Сохранить" name=save> <input type=hidden value="' . htmlspecialchars($_POST['logingo'], null) . '" name=login><input type=submit value="Сохранить" name=save>
</form>'; </form>';
} }
?> ?>
</TD><TD valign=top align=right> </TD>
<TD valign=top align=right>
<TABLE cellspacing=0 cellpadding=2 width="300"><TR><TD> <TABLE cellspacing=0 cellpadding=2 width="300">
<center> <TR>
<h4><a href="javascript:void(0)" onClick="top.chat.addto('klan','private')"><IMG border=0 SRC=https://<?=$c['img']?>/i/lock.gif WIDTH=20 HEIGHT=15 ALT="Приватно"></a> Соклановцы</H4> <TD>
<table bgcolor=#eeeeee> <center>
<tr> <h4>
<td align=left> <a href="javascript:void(0)" onClick="top.chat.addto('klan','private')">
<?php <IMG border=0 SRC=https://<?= $c['img'] ?>/i/lock.gif WIDTH=20 HEIGHT=15 ALT="Приватно">
$res1 = mysql_query("SELECT `login`,`id`,`align`,`level`,`mod_zvanie`,`online`,`clan_prava` FROM `users` WHERE `clan` = '".mysql_real_escape_string($u->info['clan'])."' ORDER BY `online` DESC"); </a>
while($data = mysql_fetch_array($res1)) { Соклановцы
if ($data['online']>time()-120) { </H4>
echo '<A href="javascript:void(0)" onClick="top.chat.addto(\''.$data['login'].'\',\'private\')"><img src="https://'.$c['img'].'/i/lock.gif" width=20 height=15></A> <table bgcolor=#eeeeee>
<img title="'.$res['name'].'" src="https://'.$c['img'].'/i/clan/'.$res['name_mini'].'.gif"><b>'.$data['login'].'</b> ['.$data['level'].']<a href="info/'.$data['id'].'" target="_blank"><img title="Инф. о '.$data['login'].'" src="https://'.$c['img'].'/i/inf_capitalcity.gif"></a>'; <tr>
if ($data['clan_prava'] == 'glava') { <td align=left>
echo ' - <b>Глава клана</b>'; <?php
} else { $res1 = mysql_query(
echo ' - ',$data['mod_zvanie'],''; "SELECT `login`,`id`,`align`,`level`,`mod_zvanie`,`online`,`clan_prava` FROM `users` WHERE `clan` = '" . mysql_real_escape_string(
} $u->info['clan']
echo '<BR>'; ) . "' ORDER BY `online` DESC"
} );
elseif ($data['online']<time()-120) { while ($data = mysql_fetch_array($res1)) {
echo '<img src="https://'.$c['img'].'/i/offline.gif" width=20 height=15> if ($data['online'] > time() - 120) {
<img title="'.$res['name'].'" src="https://'.$c['img'].'/i/clan/'.$res['name_mini'].'.gif"><font color=grey><b>'.$data['login'].'</b> ['.$data['level'].']<a href="info/'.$data['id'].'" target="_blank"><img title="Инф. о '.$data['login'].'" src="https://'.$c['img'].'/inf_dis.gif"></a>'; echo '<A href="javascript:void(0)" onClick="top.chat.addto(\'' . $data['login'] . '\',\'private\')"><img src="' . Config::img() . '/i/lock.gif" width=20 height=15></A>
if ($data['clan_prava'] == 'glava') { <img title="' . $res['name'] . '" src="' . Config::img(
echo ' - <b>Глава клана</b>'; ) . '/i/clan/' . $res['name_mini'] . '.gif"><b>' . $data['login'] . '</b> [' . $data['level'] . ']<a href="info/' . $data['id'] . '" target="_blank"><img title="Инф. о ' . $data['login'] . '" src="' . Config::img(
} else { ) . '/i/inf_capitalcity.gif"></a>';
echo ' - ',$data['mod_zvanie'],'</font>'; if ($data['clan_prava'] == 'glava') {
} echo ' - <b>Глава клана</b>';
echo '<BR>'; } else {
} echo ' - ', $data['mod_zvanie'], '';
//echo '<img title="Свет" src="https://'.$c['img'].'/i/align/align'.$data['align'].'.gif"><img title="'.$res['name'].'" src="https://'.$c['img'].'/i/clan/'.$res['name_mini'].'.gif"><b>'.$data['login'].'</b> ['.$data['level'].']<a href="info/'.$data['id'].'" target="_blank"><img title="Инф. о '.$data['login'].'" src="https://'.$c['img'].'/i/inf_capitalcity.gif"></a> - '.$data['mod_zvanie'].'<br>'; }
} echo '<BR>';
?> } elseif ($data['online'] < time() - 120) {
</td> echo '<img src="' . Config::img() . '/i/offline.gif" width=20 height=15>
</tr> <img title="' . $res['name'] . '" src="' . Config::img(
</table> ) . '/i/clan/' . $res['name_mini'] . '.gif"><font color=grey><b>' . $data['login'] . '</b> [' . $data['level'] . ']<a href="info/' . $data['id'] . '" target="_blank"><img title="Инф. о ' . $data['login'] . '" src="' . Config::img(
</center> ) . '/inf_dis.gif"></a>';
if ($data['clan_prava'] == 'glava') {
</TD></TR><TR><TD> echo ' - <b>Глава клана</b>';
<small>(список обновляется <strike>в полночь</strike> каждый раз)</small> } else {
</TD></TR></TABLE><br /> echo ' - ', $data['mod_zvanie'], '</font>';
</TD> }
</TR> echo '<BR>';
}
}
?>
</td>
</tr>
</table>
</center>
</TD>
</TR>
</TABLE>
<br/>
</TD>
</TR>
</TABLE> </TABLE>
</FORM> </FORM>
<hr> <hr>

View File

@ -1,444 +1,456 @@
<?php <?php
echo " echo "<script>const elem = document.getElementById('se-pre-con');elem.parentNode.removeChild(elem);</script>";
<script language='JavaScript'> if (!defined('GAME')) {
var elem = document.getElementById('se-pre-con'); die();
elem.parentNode.removeChild(elem);
</script>
";
if(!defined('GAME')) {
die();
} }
$slot = mysql_fetch_array(mysql_query('SELECT * FROM `users_animal_slot` WHERE `uid` = "'.$u->info['id'].'" LIMIT 1')); $slot = mysql_fetch_array(mysql_query('SELECT * FROM `users_animal_slot` WHERE `uid` = "' . $u->info['id'] . '" LIMIT 1'));
if(!isset($slot['id'])) { if (!isset($slot['id'])) {
if( mysql_query('INSERT INTO `users_animal_slot` ( `uid`,`slots`,`ekr` ) VALUES ( "'.$u->info['id'].'","2","0" )') ) { if (mysql_query('INSERT INTO `users_animal_slot` ( `uid`,`slots`,`ekr` ) VALUES ( "' . $u->info['id'] . '","2","0" )')) {
$slot = mysql_fetch_array(mysql_query('SELECT * FROM `users_animal_slot` WHERE `uid` = "'.$u->info['id'].'" LIMIT 1')); $slot = mysql_fetch_array(mysql_query('SELECT * FROM `users_animal_slot` WHERE `uid` = "' . $u->info['id'] . '" LIMIT 1'));
}else{ } else {
$u->error = 'Ошибка в работе базы данных...'; $u->error = 'Ошибка в работе базы данных...';
} }
} }
$slot['price_next'] = 5; $slot['price_next'] = 5;
$petox = mysql_fetch_array(mysql_query('SELECT * FROM `obraz_pet` WHERE `uid` = "'.$u->info['id'].'" LIMIT 1')); $petox = mysql_fetch_array(mysql_query('SELECT * FROM `obraz_pet` WHERE `uid` = "' . $u->info['id'] . '" LIMIT 1'));
$petox = $petox[0]; $petox = $petox[0];
$an_eda = array( $an_eda = [
0.05, 0.05,
0.07, 0.07,
0.10, 0.10,
0.15, 0.15,
0.20, 0.20,
0.30, 0.30,
0.40, 0.40,
0.50, 0.50,
0.60, 0.60,
0.70, 0.70,
0.80, 0.80,
1.00, 1.00,
1.50, 1.50,
2.00, 2.00,
2.50, 2.50,
3.00, 3.00,
3.50, 3.50,
4.00, 4.00,
4.50, 4.50,
5.00, 5.00,
5.50, 5.50,
7.00 7.00,
); ];
function en_ru($txt) { function en_ru($txt)
$g = false; {
$en = preg_match("/^(([0-9a-zA-Z _-])+)$/i", $txt); $g = false;
$ru = preg_match("/^(([0-9а-яА-Я _-])+)$/i", $txt); $en = preg_match("/^(([0-9a-zA-Z _-])+)$/i", $txt);
if(($ru && $en) || (!$ru && !$en)) { $ru = preg_match("/^(([0-9а-яА-Я _-])+)$/i", $txt);
$g = true; if (($ru && $en) || (!$ru && !$en)) {
} $g = true;
return $g; }
return $g;
} }
// //
function testBad($txt) { function testBad($txt)
$white = '-_ 0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNMЁЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮёйцукенгшщзхъфывапролджэячсмитьбю'; {
$r = false; $white = '-_ 0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNMЁЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮёйцукенгшщзхъфывапролджэячсмитьбю';
$i = 0; $r = false;
while( $i != -1 ) { $i = 0;
if( isset($txt[$i]) ) { while ($i != -1) {
$g = false; if (isset($txt[$i])) {
$j = 0; $g = false;
while( $j != -1 ) { $j = 0;
if(isset($white[$j])) { while ($j != -1) {
if( $white[$j] == $txt[$i] ) { if (isset($white[$j])) {
$g = true; if ($white[$j] == $txt[$i]) {
} $g = true;
}else{ }
$j = -2; } else {
} $j = -2;
$j++; }
} $j++;
if( $g == false ) { }
$r = true; if (!$g) {
} $r = true;
}else{ }
$i = -2; } else {
} $i = -2;
$i++; }
} $i++;
return $r; }
return $r;
} }
function is_login_an($login) { function is_login_an($login)
$r = true; {
// $r = true;
$login = htmlspecialchars($login,NULL); //
// $login = htmlspecialchars($login, null);
$bad = array( //
'Мусорщик' => 1, $bad = [
'Мироздатель' => 1 'Мусорщик' => 1,
); 'Мироздатель' => 1,
// ];
//$login_db = mysql_fetch_array(mysql_query('SELECT `id` FROM `users` WHERE `login` = "'.mysql_real_escape_string($login).'" LIMIT 1')); //
//$login_an_db = mysql_fetch_array(mysql_query('SELECT `id` FROM `users_animal` WHERE `name` = "'.mysql_real_escape_string($login).'" LIMIT 1')); if (isset($login_db['id']) || isset($login_an_db['id']) || isset($bad[$login])) {
if( isset($login_db['id']) || isset($login_an_db['id']) || isset($bad[$login]) ) { $r = false;
$r = false; } else {
}else{ $true = true;
$true = true; //
// /*
/* Логин может содержать от 2 до 16 символов, и состоять только из букв русского ИЛИ английского алфавита, цифр, символов '_', '-' и пробела.
Логин может содержать от 2 до 16 символов, и состоять только из букв русского ИЛИ английского алфавита, цифр, символов '_', '-' и пробела. Логин не может начинаться или заканчиваться символами '_', '-' или пробелом.
Логин не может начинаться или заканчиваться символами '_', '-' или пробелом. */
*/ //
// $login = str_replace(' ', ' ', $login);
$login = str_replace(' ',' ',$login); $login = str_replace('%', ' ', $login);
$login = str_replace('%',' ',$login); $login = str_replace('&nbsp;', ' ', $login);
$login = str_replace('&nbsp;',' ',$login); //
// if (strlen($login) > 16) {
if( strlen($login) > 16 ) { $true = false;
$true = false; } elseif (strlen($login) < 2) {
}elseif( strlen($login) < 2 ) { $true = false;
$true = false; } elseif (strripos($login, ' ') == true) {
}elseif( strripos($login,' ') == true ) { $true = false;
$true = false; } elseif (substr($login, 1) == ' ' || substr($login, -1) == ' ') {
}elseif( substr($login,1) == ' ' || substr($login,-1) == ' ' ) { $true = false;
$true = false; } elseif (substr($login, 1) == '-' || substr($login, -1) == '-') {
}elseif( substr($login,1) == '-' || substr($login,-1) == '-' ) { $true = false;
$true = false; } elseif (substr($login, 1) == '_' || substr($login, -1) == '_') {
}elseif( substr($login,1) == '_' || substr($login,-1) == '_' ) { $true = false;
$true = false; } elseif (testBad($login) == true) {
}elseif( testBad($login) == true ) { $true = false;
$true = false; } elseif (en_ru(str_replace('ё', 'е', str_replace('Ё', 'Е', $login))) == true) {
}elseif( en_ru(str_replace('ё','е',str_replace('Ё','Е',$login))) == true ) { $true = false;
$true = false; }
} //
// if (!$true) {
if( $true == false ) { $r = false;
$r = false; }
}else{ }
$r = true; return $r;
}
}
return $r;
} }
if(isset($_GET['buy_slot'])) { if (isset($_GET['buy_slot'])) {
if($u->info['money2'] < $slot['price_nex']) { if ($u->info['money2'] < $slot['price_nex']) {
$u->error = 'Недостаточно денег'; $u->error = 'Недостаточно денег';
}elseif($u->info['money2'] < 5 ) { } elseif ($u->info['money2'] < 5) {
$u->error = 'Недостаточно екр!'; $u->error = 'Недостаточно екр!';
}elseif( isset($slot['id']) && $slot['slots'] < 7 ) { } elseif (isset($slot['id']) && $slot['slots'] < 7) {
$slot['slots']++; $slot['slots']++;
$u->info['money2'] -= 5; $u->info['money2'] -= 5;
mysql_query('UPDATE `users_animal_slot` SET `slots` = "'.$slot['slots'].'" WHERE `id` = "'.$slot['id'].'" LIMIT 1'); mysql_query('UPDATE `users_animal_slot` SET `slots` = "' . $slot['slots'] . '" WHERE `id` = "' . $slot['id'] . '" LIMIT 1');
mysql_query('UPDATE `users` SET `money2` = "'.$u->info['money2'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); mysql_query('UPDATE `users` SET `money2` = "' . $u->info['money2'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
$u->error = 'Куплен слот для зверя.'; $u->error = 'Куплен слот для зверя.';
}else{ } else {
$u->error = 'Нельзя купить больше слотов'; $u->error = 'Нельзя купить больше слотов';
} }
}elseif(isset($_GET['pet'])) { } elseif (isset($_GET['pet'])) {
$_GET['pet'] = round((int)$_GET['pet']); $_GET['pet'] = round((int)$_GET['pet']);
$_GET['petname'] = htmlspecialchars($_GET['petname'],NULL); $_GET['petname'] = htmlspecialchars($_GET['petname'], null);
$ax = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `users_animal` WHERE `uid` = "'.$u->info['id'].'" AND `delete` = 0 LIMIT 1')); $ax = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `users_animal` WHERE `uid` = "' . $u->info['id'] . '" AND `delete` = 0 LIMIT 1'));
$ax = $ax[0]; $ax = $ax[0];
if( $_GET['pet'] < 1 || $_GET['pet'] > 7 ) { if ($_GET['pet'] < 1 || $_GET['pet'] > 7) {
$u->error = 'Нельзя привзвать такого зверя'; $u->error = 'Нельзя привзвать такого зверя';
}elseif( $ax >= $slot['slots'] ) { } elseif ($ax >= $slot['slots']) {
$u->error = 'Нет свободных слотов для зверя'; $u->error = 'Нет свободных слотов для зверя';
}elseif( $u->info['money'] < 50 ) { } elseif ($u->info['money'] < 50) {
$u->error = 'Недостаточно денег'; $u->error = 'Недостаточно денег';
}elseif(is_login_an($_GET['petname']) == false) { } elseif (!is_login_an($_GET['petname'])) {
$u->error = 'Неверная кличка зверя, выберите другую'; $u->error = 'Неверная кличка зверя, выберите другую';
}else{ } else {
$u->error = 'Зверь пришел к Вам!'; $u->error = 'Зверь пришел к Вам!';
$u->info['money'] -= 50; $u->info['money'] -= 50;
mysql_query('UPDATE `users` SET `money` = "'.$u->info['money'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); mysql_query('UPDATE `users` SET `money` = "' . $u->info['money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
// //
$anm['type'] = $_GET['pet']; $anm['type'] = $_GET['pet'];
// //
if($anm['type']==1) if ($anm['type'] == 1) {
{ $anm['name'] = 'Кот';
$anm['name'] = 'Кот'; $anm['sex'] = 0;
$anm['sex'] = 0; $anm['obraz'] = [1 => '20864.gif', 2 => '21301.gif', 3 => '21139.gif', 4 => '20427.gif'];
$anm['obraz'] = array(1=>'20864.gif',2=>'21301.gif',3=>'21139.gif',4=>'20427.gif'); $anm['stats'] = 's1=2|s2=5|s3=2|s4=5|rinv=40|m9=5|m6=10';
$anm['stats'] = 's1=2|s2=5|s3=2|s4=5|rinv=40|m9=5|m6=10'; } elseif ($anm['type'] == 2) {
}elseif($anm['type']==2) $anm['name'] = 'Сова';
{ $anm['sex'] = 1;
$anm['name'] = 'Сова'; $anm['obraz'] = [1 => '21415.gif', 2 => '21722.gif', 3 => '21550.gif'];
$anm['sex'] = 1; $anm['stats'] = 's1=2|s2=2|s3=5|s4=5|rinv=40|m9=5|m6=10';
$anm['obraz'] = array(1=>'21415.gif',2=>'21722.gif',3=>'21550.gif'); } elseif ($anm['type'] == 3) {
$anm['stats'] = 's1=2|s2=2|s3=5|s4=5|rinv=40|m9=5|m6=10'; $anm['name'] = 'Светляк';
}elseif($anm['type']==3) $anm['sex'] = 0;
{ $anm['obraz'] = [1 => '22277.gif', 2 => '22265.gif', 3 => '22333.gif', 4 => '22298.gif'];
$anm['name'] = 'Светляк'; $anm['stats'] = 's1=3|s2=10|s3=3|s4=4|rinv=40|m9=5|m6=10';
$anm['sex'] = 0; } elseif ($anm['type'] == 4) {
$anm['obraz'] = array(1=>'22277.gif',2=>'22265.gif',3=>'22333.gif',4=>'22298.gif'); $anm['name'] = 'Чертяка';
$anm['stats'] = 's1=3|s2=10|s3=3|s4=4|rinv=40|m9=5|m6=10'; $anm['sex'] = 0;
}elseif($anm['type']==4) $anm['obraz'] = [1 => '22177.gif', 2 => '21976.gif', 3 => '21877.gif'];
{ $anm['stats'] = 's1=25|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10';
$anm['name'] = 'Чертяка'; } elseif ($anm['type'] == 5) {
$anm['sex'] = 0; $anm['name'] = 'Пес';
$anm['obraz'] = array(1=>'22177.gif',2=>'21976.gif',3=>'21877.gif'); $anm['sex'] = 0;
$anm['stats'] = 's1=25|s2=3|s3=3|s4=25|rinv=40|m9=5|m6=10'; $anm['obraz'] = [1 => '22352.gif', 2 => '23024.gif', 3 => '22900.gif', 4 => '22501.gif', 5 => '22700.gif'];
}elseif($anm['type']==5) $anm['stats'] = 's1=5|s2=3|s3=3|s4=5|rinv=40|m9=5|m6=10';
{ } elseif ($anm['type'] == 6) {
$anm['name'] = 'Пес'; $anm['name'] = 'Свин';
$anm['sex'] = 0; $anm['sex'] = 0;
$anm['obraz'] = array(1=>'22352.gif',2=>'23024.gif',3=>'22900.gif',4=>'22501.gif',5=>'22700.gif'); $anm['obraz'] = [1 => '24000.gif', 2 => '25000.gif', 3 => '27000.gif', 4 => '28000.gif'];
$anm['stats'] = 's1=5|s2=3|s3=3|s4=5|rinv=40|m9=5|m6=10'; $anm['stats'] = 's1=5|s2=3|s3=3|s4=5|rinv=40|m9=5|m6=10';
}elseif($anm['type']==6) } elseif ($anm['type'] == 7) {
{ $anm['name'] = 'Дракон';
$anm['name'] = 'Свин'; $anm['sex'] = 0;
$anm['sex'] = 0; $anm['obraz'] = [1 => '21338_pgtpdbx.gif'];
$anm['obraz'] = array(1=>'24000.gif',2=>'25000.gif',3=>'27000.gif',4=>'28000.gif'); $anm['stats'] = 's1=5|s2=3|s3=3|s4=5|rinv=40|m9=5|m6=10';
$anm['stats'] = 's1=5|s2=3|s3=3|s4=5|rinv=40|m9=5|m6=10'; }
}elseif($anm['type']==7) //
{ $anm['name'] = htmlspecialchars($_GET['petname'], null);
$anm['name'] = 'Дракон'; $anm['name'] = preg_replace("/&#?[a-z0-9]+;/i", "", $anm['name']);
$anm['sex'] = 0; //
$anm['obraz'] = array(1=>'21338_pgtpdbx.gif'); $anm['obraz'] = $anm['obraz'][rand(1, count($anm['obraz']))];
$anm['stats'] = 's1=5|s2=3|s3=3|s4=5|rinv=40|m9=5|m6=10'; $anm['obraz'] = str_replace('.gif', '', $anm['obraz']);
} $anm['obraz'] = str_replace('.jpg', '', $anm['obraz']);
// $anm['obraz'] = str_replace('.png', '', $anm['obraz']);
$anm['name'] = htmlspecialchars($_GET['petname'],NULL); $ins = mysql_query(
$anm['name'] = preg_replace("/&#?[a-z0-9]+;/i","", $anm['name']); 'INSERT INTO `users_animal` (`type`,`name`,`uid`,`obraz`,`stats`,`sex`,`eda`) VALUES ("' . $anm['type'] . '","' . $anm['name'] . '","' . $u->info['id'] . '","' . $anm['obraz'] . '","' . $anm['stats'] . '","' . $anm['sex'] . '","0")'
// );
$anm['obraz'] = $anm['obraz'][rand(1,count($anm['obraz']))]; if ($ins) {
$anm['obraz'] = str_replace('.gif','',$anm['obraz']); Delo::add(
$anm['obraz'] = str_replace('.jpg','',$anm['obraz']); 1,
$anm['obraz'] = str_replace('.png','',$anm['obraz']); 'System.inventory',
$ins = mysql_query('INSERT INTO `users_animal` (`type`,`name`,`uid`,`obraz`,`stats`,`sex`,`eda`) VALUES ("'.$anm['type'].'","'.$anm['name'].'","'.$u->info['id'].'","'.$anm['obraz'].'","'.$anm['stats'].'","'.$anm['sex'].'","0")'); $u->info['id'],
if($ins) '&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Персонаж призвал зверя &quot;' . $_GET['petname'] . '&quot; (' . $_GET['pet'] . ') - 50 кр.',
{ );
$u->addDelo(1,$u->info['id'],'&quot;<font color="maroon">System.inventory</font>&quot;: Персонаж призвал зверя &quot;'.$_GET['petname'].'&quot; ('.$_GET['pet'].') - 50 кр.',time(),$u->info['city'],'System.inventory',0,0); } else {
}else{ $u->error = 'Не удалось призвать зверя, что-то здесь не так ...';
$u->error = 'Не удалось призвать зверя, что-то здесь не так ...'; }
} //
// }
} //
// } elseif (isset($_GET['eda'])) {
}elseif(isset($_GET['eda'])) { $anm = mysql_fetch_array(mysql_query('SELECT * FROM `users_animal` WHERE `id` = "' . mysql_real_escape_string($_GET['eda']) . '" AND `uid` = "' . $u->info['id'] . '" AND `delete` = 0 LIMIT 1'));
$anm = mysql_fetch_array(mysql_query('SELECT * FROM `users_animal` WHERE `id` = "'.mysql_real_escape_string($_GET['eda']).'" AND `uid` = "'.$u->info['id'].'" AND `delete` = 0 LIMIT 1')); $x = round((int)$_GET['vvv']);
$x = round((int)$_GET['vvv']); if ($x > 100 - $anm['eda']) {
if($x > 100 - $anm['eda']) { $x = 100 - $anm['eda']; } $x = 100 - $anm['eda'];
if($x < 1) { $x = 1; } }
if($x > 100) { $x = 100; } if ($x < 1) {
if(!isset($anm['id'])) { $x = 1;
$u->error = 'Зверь не найден.'; }
}elseif( $anm['eda'] >= 100 ) { if ($x > 100) {
$u->error = 'Зверь сыт и не нуждается в еде.'; $x = 100;
}elseif($an_eda[$anm['level']]*$_GET['vvv'] > $u->info['money']) { }
$u->error = 'Недостаточно денег.'; if (!isset($anm['id'])) {
}else{ $u->error = 'Зверь не найден.';
$u->error = 'Покормили зверя &quot;'.$anm['name'].'&quot; на '.$x.' ед. за '.($x*$an_eda[$anm['level']]).' кр.'; } elseif ($anm['eda'] >= 100) {
$u->info['money'] -= ($x*$an_eda[$anm['level']]); $u->error = 'Зверь сыт и не нуждается в еде.';
$anm['eda'] += $x; } elseif ($an_eda[$anm['level']] * $_GET['vvv'] > $u->info['money']) {
mysql_query('UPDATE `users` SET `money` = "'.$u->info['money'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); $u->error = 'Недостаточно денег.';
mysql_query('UPDATE `users_animal` SET `eda` = "'.$anm['eda'].'" WHERE `id` = "'.$anm['id'].'" LIMIT 1'); } else {
} $u->error = 'Покормили зверя &quot;' . $anm['name'] . '&quot; на ' . $x . ' ед. за ' . ($x * $an_eda[$anm['level']]) . ' кр.';
}elseif(isset($_GET['pet_del'])) { $u->info['money'] -= ($x * $an_eda[$anm['level']]);
if(mysql_query('UPDATE `users_animal` SET `delete` = "'.time().'" WHERE `id` = "'.mysql_real_escape_string($_GET['pet_del']).'" AND `delete` = 0 AND `uid` = "'.$u->info['id'].'" LIMIT 1')) { $anm['eda'] += $x;
$u->error = 'Зверь был выгнан.'; mysql_query('UPDATE `users` SET `money` = "' . $u->info['money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
}else{ mysql_query('UPDATE `users_animal` SET `eda` = "' . $anm['eda'] . '" WHERE `id` = "' . $anm['id'] . '" LIMIT 1');
$u->error = 'Зверь не найден.'; }
} } elseif (isset($_GET['pet_del'])) {
}elseif(isset($_GET['rename'])) { if (mysql_query(
$anm = mysql_fetch_array(mysql_query('SELECT * FROM `users_animal` WHERE `id` = "'.mysql_real_escape_string($_GET['rename']).'" AND `uid` = "'.$u->info['id'].'" AND `delete` = 0 LIMIT 1')); 'UPDATE `users_animal` SET `delete` = "' . time() . '" WHERE `id` = "' . mysql_real_escape_string($_GET['pet_del']) . '" AND `delete` = 0 AND `uid` = "' . $u->info['id'] . '" LIMIT 1'
$_GET['vvv'] = htmlspecialchars($_GET['vvv'],NULL); )) {
if(!isset($anm['id'])) { $u->error = 'Зверь был выгнан.';
$u->error = 'Зверь не найден.'; } else {
}elseif(30 > $u->info['money']) { $u->error = 'Зверь не найден.';
$u->error = 'Недостаточно денег.'; }
}else{ } elseif (isset($_GET['rename'])) {
$u->info['money'] -= 30; $anm = mysql_fetch_array(
$anm['name'] = preg_replace('/\W/', '', $_GET['vvv']); //$_GET['vvv']; mysql_query('SELECT * FROM `users_animal` WHERE `id` = "' . mysql_real_escape_string($_GET['rename']) . '" AND `uid` = "' . $u->info['id'] . '" AND `delete` = 0 LIMIT 1')
$u->error = 'Кличка зверя изменена на &quot;'.$anm['name'].'&quot; за 30 кр.'; );
mysql_query('UPDATE `users` SET `money` = "'.$u->info['money'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); $_GET['vvv'] = htmlspecialchars($_GET['vvv'], null);
mysql_query('UPDATE `users_animal` SET `name` = "'.mysql_real_escape_string($anm['name']).'" WHERE `id` = "'.mysql_real_escape_string($anm['id']).'" LIMIT 1'); if (!isset($anm['id'])) {
} $u->error = 'Зверь не найден.';
}elseif(isset($_GET['shadow']) && $petox > 0) { } elseif (30 > $u->info['money']) {
if(isset($_GET['rechange'])) { $u->error = 'Недостаточно денег.';
$u->error = 'Образ питомца снят.'; } else {
mysql_query('UPDATE `obraz_pet` SET `use` = 0 WHERE `uid` = "'.$u->info['id'].'"'); $u->info['money'] -= 30;
}elseif(isset($_GET['change'])) { $anm['name'] = preg_replace('/\W/', '', $_GET['vvv']); //$_GET['vvv'];
$u->error = 'Образ питомца установлен.'; $u->error = 'Кличка зверя изменена на &quot;' . $anm['name'] . '&quot; за 30 кр.';
mysql_query('UPDATE `obraz_pet` SET `use` = 0 WHERE `uid` = "'.$u->info['id'].'"'); mysql_query('UPDATE `users` SET `money` = "' . $u->info['money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
mysql_query('UPDATE `obraz_pet` SET `use` = 1 WHERE `uid` = "'.$u->info['id'].'" AND `id` = "'.mysql_real_escape_string($_GET['change']).'" LIMIT 1'); mysql_query('UPDATE `users_animal` SET `name` = "' . mysql_real_escape_string($anm['name']) . '" WHERE `id` = "' . mysql_real_escape_string($anm['id']) . '" LIMIT 1');
} }
} elseif (isset($_GET['shadow']) && $petox > 0) {
if (isset($_GET['rechange'])) {
$u->error = 'Образ питомца снят.';
mysql_query('UPDATE `obraz_pet` SET `use` = 0 WHERE `uid` = "' . $u->info['id'] . '"');
} elseif (isset($_GET['change'])) {
$u->error = 'Образ питомца установлен.';
mysql_query('UPDATE `obraz_pet` SET `use` = 0 WHERE `uid` = "' . $u->info['id'] . '"');
mysql_query('UPDATE `obraz_pet` SET `use` = 1 WHERE `uid` = "' . $u->info['id'] . '" AND `id` = "' . mysql_real_escape_string($_GET['change']) . '" LIMIT 1');
}
} }
?> ?>
<style> <style>
.an_border { .an_border {
border:1px solid #aaaaaa; border: 1px solid #aaaaaa;
padding:2px; padding: 2px;
width:120px; width: 120px;
height:220px; height: 220px;
} }
.an_btn {
cursor:pointer; .an_btn {
} cursor: pointer;
.an_btn:hover { }
cursor:pointer;
background-color:#cccccc; .an_btn:hover {
} cursor: pointer;
.an_img64x64 { background-color: #cccccc;
padding-top:75px; }
height:145px;
} .an_img64x64 {
.an_line { padding-top: 75px;
text-align:center; height: 145px;
padding:5px; }
}
.an_line2 { .an_line {
text-align:left; text-align: center;
padding:5px; padding: 5px;
width:124px; }
}
.an_w120 { .an_line2 {
width:120px; text-align: left;
} padding: 5px;
.cp { width: 124px;
cursor:pointer; }
}
.obrsl1 { .an_w120 {
border:1px solid #888; width: 120px;
padding:1px; }
margin-bottom:5px;
} .cp {
.obrsl1d { cursor: pointer;
display:inline-block; }
widows:120px;
} .obrsl1 {
border: 1px solid #888;
padding: 1px;
margin-bottom: 5px;
}
.obrsl1d {
display: inline-block;
widows: 120px;
}
</style> </style>
<center><b>Ваши деньги:<font color=darkgreen> <?=$u->info['money']?> кр.</center></b></font> <center><b>Ваши деньги:<font color=darkgreen> <?= $u->info['money'] ?> кр.</center></b></font>
<div align="right"> <div align="right">
<?php <?php
if(!isset($_GET['shadow']) || $petox == 0 ) { if (!isset($_GET['shadow']) || $petox == 0) {
if( $petox > 0 ) { if ($petox > 0) {
echo '<button onClick="location.href=\'/main.php?newanimal&shadow\';" class="btn btn-success">Образ</button>&nbsp;'; echo '<button onClick="location.href=\'/main.php?newanimal&shadow\';" class="btn btn-success">Образ</button>&nbsp;';
}else{ } else {
echo '<button disabled="disabled" onClick="alert(\'Установка образов возможно после покупки хотя бы одного образа для питомца.\');" class="btn btn-success">Образ</button>&nbsp;'; echo '<button disabled="disabled" onClick="alert(\'Установка образов возможно после покупки хотя бы одного образа для питомца.\');" class="btn btn-success">Образ</button>&nbsp;';
} }
?> ?>
<button onClick="location.href='/main.php?newanimal';" class="btn">Обновить</button>&nbsp; <button onClick="location.href='/main.php?newanimal';" class="btn">Обновить</button>&nbsp;
<button onClick="location.href='/main.php?inv';" class="btn">Вернуться</button> <button onClick="location.href='/main.php?inv';" class="btn">Вернуться</button>
<?php }else{ ?> <?php } else { ?>
<button onClick="location.href='/main.php?newanimal&shadow';" class="btn">Обновить</button>&nbsp; <button onClick="location.href='/main.php?newanimal&shadow';" class="btn">Обновить</button>&nbsp;
<button onClick="location.href='/main.php?newanimal';" class="btn">Вернуться</button> <button onClick="location.href='/main.php?newanimal';" class="btn">Вернуться</button>
<?php } ?> <?php } ?>
</div> </div>
<?php <?php
if( $u->error != '' ) { if ($u->error != '') {
echo '<div><b><font color="red">'.$u->error.'</font></b></div>'; echo '<div><b><font color="red">' . $u->error . '</font></b></div>';
} }
?> ?>
<hr> <hr>
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<?php <?php
if(isset($_GET['shadow']) && $petox > 0) { if (isset($_GET['shadow']) && $petox > 0) {
// //
echo '<td align="left">'; echo '<td align="left">';
$sp = mysql_query('SELECT * FROM `obraz_pet` WHERE `uid` = "'.$u->info['id'].'"'); $sp = mysql_query('SELECT * FROM `obraz_pet` WHERE `uid` = "' . $u->info['id'] . '"');
while( $pl = mysql_fetch_array($sp) ) { while ($pl = mysql_fetch_array($sp)) {
echo '<div class="obrsl1d">'; echo '<div class="obrsl1d">';
// //
echo '<img class="obrsl1" src="//img.new-combats.tech/pet/'.$pl['img'].'" width="120" height="40"><br><div align="center">'; echo '<img class="obrsl1" src="//img.new-combats.tech/pet/' . $pl['img'] . '" width="120" height="40"><br><div align="center">';
if( $pl['use'] == 0 ) { if ($pl['use'] == 0) {
echo '<input onclick="location.href=\'/main.php?newanimal&shadow&change='.$pl['id'].'\';" style="width:120px;" type="button" value="Выбрать" class="btn">'; echo '<input onclick="location.href=\'/main.php?newanimal&shadow&change=' . $pl['id'] . '\';" style="width:120px;" type="button" value="Выбрать" class="btn">';
}else{ } else {
echo '<input onclick="location.href=\'/main.php?newanimal&shadow&rechange\';" style="width:120px;" type="button" value="Используется" class="btn btn-success">'; echo '<input onclick="location.href=\'/main.php?newanimal&shadow&rechange\';" style="width:120px;" type="button" value="Используется" class="btn btn-success">';
} }
echo '</div>'; echo '</div>';
// //
echo '</div>'; echo '</div>';
} }
echo '</td>'; echo '</td>';
}else{ } else {
$sp = mysql_query('SELECT * FROM `users_animal` WHERE `uid` = "'.$u->info['id'].'" AND `delete` = 0 LIMIT 6'); $sp = mysql_query('SELECT * FROM `users_animal` WHERE `uid` = "' . $u->info['id'] . '" AND `delete` = 0 LIMIT 6');
$i = 1; $i = 1;
while( $pl = mysql_fetch_array($sp) ) { while ($pl = mysql_fetch_array($sp)) {
// //
if( isset($_GET['selected']) && $pl['id'] == $_GET['selected'] ) { if (isset($_GET['selected']) && $pl['id'] == $_GET['selected']) {
if( $u->info['animal'] != $pl['id'] ) { if ($u->info['animal'] != $pl['id']) {
$u->info['animal'] = $pl['id']; $u->info['animal'] = $pl['id'];
}else{ } else {
$u->info['animal'] = 0; $u->info['animal'] = 0;
} }
mysql_query('UPDATE `users` SET `animal` = "'.$u->info['animal'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); mysql_query('UPDATE `users` SET `animal` = "' . $u->info['animal'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
} }
// //
//$kp = 0.05; //цена корма //$kp = 0.05; //цена корма
$kp = $an_eda[$pl['level']]; $kp = $an_eda[$pl['level']];
//$kp = $an_eda[1]; //
// echo '<td width="16%" align="center" valign="top">';
echo '<td width="16%" align="center" valign="top">'; //
// echo '<div class="an_line"><b><img onclick="top.anrename(' . $pl['id'] . ',\'' . $pl['name'] . '\');" class="cp" src="//img.new-combats.tech/pencil.png" width="16" height="16" title="Изменить кличку"> <small>' . $pl['name'] . '</small> <img onclick="if(confirm(\'Вы действительно хотите ВЫГНАТЬ зверя &quot;' . $pl['name'] . '&quot;?\')) location.href=\'main.php?newanimal&pet_del=' . $pl['id'] . '\';" class="cp" src="//img.new-combats.tech/i/clear.gif" title="Выгнать" width="13" height="13"></b></div>';
echo '<div class="an_line"><b><img onclick="top.anrename('.$pl['id'].',\''.$pl['name'].'\');" class="cp" src="//img.new-combats.tech/pencil.png" width="16" height="16" title="Изменить кличку"> <small>'.$pl['name'].'</small> <img onclick="if(confirm(\'Вы действительно хотите ВЫГНАТЬ зверя &quot;'.$pl['name'].'&quot;?\')) location.href=\'main.php?newanimal&pet_del='.$pl['id'].'\';" class="cp" src="//img.new-combats.tech/i/clear.gif" title="Выгнать" width="13" height="13"></b></div>'; //
// echo '<div title="' . $pl['name'] . '" class="an_border"><img src="//img.new-combats.tech/i/obraz/' . $pl['sex'] . '/' . $pl['obraz'] . '.gif" width="120" height="220"></div>';
echo '<div title="'.$pl['name'].'" class="an_border"><img src="//img.new-combats.tech/i/obraz/'.$pl['sex'].'/'.$pl['obraz'].'.gif" width="120" height="220"></div>'; //
// echo '<div class="an_line2"><small>';
echo '<div class="an_line2"><small>'; echo 'Уровень: ' . $pl['level'] . '<br>Опыт: <b>' . $pl['exp'] . '</b><br>Сытность: ' . $pl['eda'] . '/100<br>';
echo 'Уровень: '.$pl['level'].'<br>Опыт: <b>'.$pl['exp'].'</b><br>Сытность: '.$pl['eda'].'/100<br>'; //
// echo '<input ';
echo '<input '; if ($pl['eda'] >= 100) {
if( $pl['eda'] >= 100 ) { echo ' disabled="disabled" ';
echo ' disabled="disabled" '; } else {
}else{ echo ' onclick="top.eda(' . $pl['id'] . ',\'' . $pl['name'] . '\',' . (0 + $kp) . ',' . (0 + 100 - $pl['eda']) . ');" ';
echo ' onclick="top.eda('.$pl['id'].',\''.$pl['name'].'\','.(0+$kp).','.(0+100-$pl['eda']).');" '; }
} echo 'type="button" value="Покормить" class="btn an_w120';
echo 'type="button" value="Покормить" class="btn an_w120'; if ($pl['eda'] < 1) {
if( $pl['eda'] < 1 ) { echo ' btn-danger';
echo ' btn-danger'; }
} echo '">';
echo '">'; //
// if ($pl['id'] != $u->info['animal'] || (isset($_GET['selected']) && $pl['id'] != $_GET['selected'])) {
if( $pl['id'] != $u->info['animal'] || ( isset($_GET['selected']) && $pl['id'] != $_GET['selected'] ) ) { echo '<input onClick="location.href=\'main.php?newanimal&selected=' . $pl['id'] . '\';" type="button" value="Выбрать" class="btn an_w120">';
echo '<input onClick="location.href=\'main.php?newanimal&selected='.$pl['id'].'\';" type="button" value="Выбрать" class="btn an_w120">'; } else {
}else{ echo '<input onClick="location.href=\'main.php?newanimal&selected=' . $pl['id'] . '\';" type="button" value="Используется" class="btn btn-success an_w120">';
echo '<input onClick="location.href=\'main.php?newanimal&selected='.$pl['id'].'\';" type="button" value="Используется" class="btn btn-success an_w120">'; }
} //
// echo '</small></div>';
echo '</small></div>'; //
// echo '</td>';
echo '</td>'; $i++;
$i++; }
} if ($i <= 6) {
if( $i <= 6 ) { $j = 0;
$j = 0; while ($i <= 6) {
while( $i <= 6 ) { if ($i <= $slot['slots']) {
if( $i <= $slot['slots'] ) { echo '<td width="16%" align="center" valign="top"><div class="an_line">&nbsp;</div><div onclick="top.petbuy();" onMouseOver="top.hi(this,\'Завести питомца (50 КР)\',event,0,1,1,1,\'\');" onMouseOut="top.hic(event);" onMouseDown="top.hic(event);" class="an_border an_btn an_img64x64"><img src="//img.new-combats.tech/pet_free_slot.png" width="64" height="64"></div></td>';
echo '<td width="16%" align="center" valign="top"><div class="an_line">&nbsp;</div><div onclick="top.petbuy();" onMouseOver="top.hi(this,\'Завести питомца (50 КР)\',event,0,1,1,1,\'\');" onMouseOut="top.hic(event);" onMouseDown="top.hic(event);" class="an_border an_btn an_img64x64"><img src="//img.new-combats.tech/pet_free_slot.png" width="64" height="64"></div></td>'; } else {
}else{ if ($j == 0) {
if( $j == 0 ) { echo '<td width="16%" align="center" valign="top"><div class="an_line">&nbsp;</div><div onclick="if(confirm(\'Вы действительно хотите купить слот за ' . $slot['price_next'] . ' ЕКР?\')) location.href=\'main.php?newanimal&buy_slot\';" onMouseOver="top.hi(this,\'Купить слот (' . $slot['price_next'] . ' ЕКР)\',event,0,1,1,1,\'\');" onMouseOut="top.hic(event);" onMouseDown="top.hic(event);" class="an_border an_btn an_img64x64"><img src="//img.new-combats.tech/pet_add.png" width="64" height="64"></div></td>';
echo '<td width="16%" align="center" valign="top"><div class="an_line">&nbsp;</div><div onclick="if(confirm(\'Вы действительно хотите купить слот за '.$slot['price_next'].' ЕКР?\')) location.href=\'main.php?newanimal&buy_slot\';" onMouseOver="top.hi(this,\'Купить слот ('.$slot['price_next'].' ЕКР)\',event,0,1,1,1,\'\');" onMouseOut="top.hic(event);" onMouseDown="top.hic(event);" class="an_border an_btn an_img64x64"><img src="//img.new-combats.tech/pet_add.png" width="64" height="64"></div></td>'; $j++;
$j++; } else {
}else{ echo '<td width="16%" align="center" valign="top"><div class="an_line">&nbsp;</div><div title="Недоступно" class="an_border an_img64x64"><img src="//img.new-combats.tech/pet_lock.png" width="64" height="64"></div></td>';
echo '<td width="16%" align="center" valign="top"><div class="an_line">&nbsp;</div><div title="Недоступно" class="an_border an_img64x64"><img src="//img.new-combats.tech/pet_lock.png" width="64" height="64"></div></td>'; }
} }
} $i++;
$i++; }
} }
} }
} ?>
?> </tr>
</tr>
</table> </table>

View File

@ -1493,7 +1493,7 @@ $tma = '';
echo '<div style="color: red; font-weight: bold;">Эффект &quot;' . $u->stats['effects'][$i]['name'] . '&quot; был принудительно завершен.</div>'; echo '<div style="color: red; font-weight: bold;">Эффект &quot;' . $u->stats['effects'][$i]['name'] . '&quot; был принудительно завершен.</div>';
$clr = $clr == 'C7' ? 'D5' : 'C7'; $clr = $clr == 'C7' ? 'D5' : 'C7';
} else { } else {
$ae .= '<TR bgcolor=#' . $clr . $clr . $clr . '><TD>' . $v1 . '</TD><TD align=right>' . $v2 . '</TD><TD style=\'padding: 1px 5px 1px 5px; text-align: right;\'>' . $u->timeOut($u->stats['effects'][$i]['timeUse'] + $u->stats['effects'][$i]['actionTime'] - time()) . '</TD><TD style=\'padding: 1px 5px 1px 5px; text-align: right; font-size: small;\'>&quot;' . $u->stats['effects'][$i]['name'] . '&quot;</TD><TD><center>' . $btnse . '</center></TD></TR>'; $ae .= '<TR bgcolor=#' . $clr . $clr . $clr . '><TD>' . $v1 . '</TD><TD align=right>' . $v2 . '</TD><TD style=\'padding: 1px 5px 1px 5px; text-align: right;\'>' . Conversion::secondsToTimeout($u->stats['effects'][$i]['timeUse'] + $u->stats['effects'][$i]['actionTime'] - time()) . '</TD><TD style=\'padding: 1px 5px 1px 5px; text-align: right; font-size: small;\'>&quot;' . $u->stats['effects'][$i]['name'] . '&quot;</TD><TD><center>' . $btnse . '</center></TD></TR>';
} }
} }
$i++; $i++;
@ -1540,7 +1540,7 @@ $tma = '';
$e['see'] = 1; $e['see'] = 1;
} }
$ae .= '<TR bgcolor=#' . $clr . $clr . $clr . '><TD>' . $v1 . '</TD><TD align=right>' . $v2 . '</TD><TD style=\'padding: 1px 5px 1px 5px; text-align: right;\'>' . $u->timeOut($e['endTime'] - time()) . '</TD><TD style=\'padding: 1px 5px 1px 5px; text-align: right; font-size: small;\'><img '; $ae .= '<TR bgcolor=#' . $clr . $clr . $clr . '><TD>' . $v1 . '</TD><TD align=right>' . $v2 . '</TD><TD style=\'padding: 1px 5px 1px 5px; text-align: right;\'>' . Conversion::secondsToTimeout($e['endTime'] - time()) . '</TD><TD style=\'padding: 1px 5px 1px 5px; text-align: right; font-size: small;\'><img ';
if ($e['type'] == 2) { if ($e['type'] == 2) {
$ae .= 'width="30" style="float:left"'; $ae .= 'width="30" style="float:left"';
} }
@ -1574,7 +1574,7 @@ $tma = '';
$lvlp = explode(']', $lvlp[1]); $lvlp = explode(']', $lvlp[1]);
$lvlp = $lvlp[0]; $lvlp = $lvlp[0];
$v = $magic->pgpar[$tp]; $v = $magic->pgpar[$tp];
$ae .= '&bull; ' . $v[0] . ' [' . $lvlp . '], еще ' . $u->timeOut($pl['timeUse'] - time()) . ', начнет действовать через ' . $u->timeOut($pl['deactiveTime'] - time()) . '<br>'; $ae .= '&bull; ' . $v[0] . ' [' . $lvlp . '], еще ' . Conversion::secondsToTimeout($pl['timeUse'] - time()) . ', начнет действовать через ' . Conversion::secondsToTimeout($pl['deactiveTime'] - time()) . '<br>';
} }
if ($ae) { if ($ae) {
@ -1587,7 +1587,7 @@ $tma = '';
); );
if (isset($psh['id'])) { if (isset($psh['id'])) {
$clr = $clr == 'C7' ? 'D5' : 'C7'; $clr = $clr == 'C7' ? 'D5' : 'C7';
echo '<br>&nbsp;<b>Время до подземелья:</b> ' . $u->timeOut(($psh['time'] + 60 * 60 * 3) - time()) . '<br><br>'; echo '<br>&nbsp;<b>Время до подземелья:</b> ' . Conversion::secondsToTimeout(($psh['time'] + 60 * 60 * 3) - time()) . '<br><br>';
} }
?> ?>
&nbsp;<b>Эффекты:</b><br> &nbsp;<b>Эффекты:</b><br>
@ -2278,7 +2278,7 @@ $tma = '';
); );
while ($pl = mysql_fetch_array($sp)) { while ($pl = mysql_fetch_array($sp)) {
$ic1 = str_replace('psh_qt_', '', $pl['vars']); $ic1 = str_replace('psh_qt_', '', $pl['vars']);
echo '<fieldset>&nbsp; <img height="19" width="34" src="' . Config::img() . '/i/city_ico2/' . $ic1 . '.gif" alt=""> <b>Задержка на получение задания в ' . $u->city_name[$ic1] . '</b> ' . $u->timeOut((86400 + $pl['time']) - time()) . '</fieldset><br>'; echo '<fieldset>&nbsp; <img height="19" width="34" src="' . Config::img() . '/i/city_ico2/' . $ic1 . '.gif" alt=""> <b>Задержка на получение задания в ' . $u->city_name[$ic1] . '</b> ' . Conversion::secondsToTimeout((86400 + $pl['time']) - time()) . '</fieldset><br>';
} }
//Пещеры //Пещеры
$dungeon_timeout = $u->testAction( $dungeon_timeout = $u->testAction(
@ -2286,7 +2286,7 @@ $tma = '';
1 1
); );
if ($dungeon_timeout['vars'] == "psh0") { if ($dungeon_timeout['vars'] == "psh0") {
echo '<center><b>Задержка на посещение подземелья: ' . $u->timeOut(60 * 60 * 2 - time() + $dungeon_timeout['time']) . '</center></b><br>'; echo '<center><b>Задержка на посещение подземелья: ' . Conversion::secondsToTimeout(60 * 60 * 2 - time() + $dungeon_timeout['time']) . '</center></b><br>';
} }
?> ?>
<br> <br>

View File

@ -1,273 +1,340 @@
<?php <?php
if(!defined('GAME')) { die(); }
if($u->room['file'] == 'bsenter') { use Helper\Conversion;
$r = 2;
if(isset($_GET['r'])) { if (!defined('GAME')) {
$_GET['r'] = (int)$_GET['r']; die();
if($_GET['r'] == 7 || $_GET['r'] == 8 || $_GET['r'] == 9 || $_GET['r'] == 10 || $_GET['r'] == 11) { $r = round($_GET['r']-6); }
if($u->info['level'] < $r+6) { $r = 1; }
} }
function changeSleep($uid,$sleep_action){ if ($u->room['file'] == 'bsenter') {
global $u; $r = 2;
if( $sleep_action == 1 ){ if (isset($_GET['r'])) {
// $_GET['r'] = (int)$_GET['r'];
mysql_query('INSERT INTO `sleep` (`uid`,`time`,`sleep`) VALUES ("'.$uid.'","'.time().'","1")'); if ($_GET['r'] == 7 || $_GET['r'] == 8 || $_GET['r'] == 9 || $_GET['r'] == 10 || $_GET['r'] == 11) {
// $r = round($_GET['r'] - 6);
mysql_query("UPDATE `eff_users` SET `sleeptime`=".time().",`deactiveLast` = ( `deactiveTime` - ".time()." ) WHERE `uid`='".mysql_real_escape_string($uid)."' AND `no_Ace` = 0 AND `delete` = 0"); }
mysql_query('UPDATE `items_users` SET `time_sleep` = "'.time().'" WHERE `uid` = "'.$uid.'" AND `delete` < 1001 AND `data` LIKE "%|sleep_moroz=1%"'); if ($u->info['level'] < $r + 6) {
$u->addAction(time(),'sleep',$u->info['city']); $r = 1;
// }
} elseif( $sleep_action == 2 ){ }
//
mysql_query('INSERT INTO `sleep` (`uid`,`time`,`sleep`) VALUES ("'.$uid.'","'.time().'","2")');
//
$sp = mysql_query('SELECT * FROM `items_users` WHERE `time_sleep` > 0 AND `uid` = "'.$uid.'" AND `delete` < 1001 AND `data` LIKE "%|sleep_moroz=1%"');
while( $pl = mysql_fetch_array($sp) ) {
$tm_add = time() - $pl['time_sleep'];
mysql_query('UPDATE `items_users` SET `time_sleep` = "0",`time_create` = "'.($pl['time_create'] + $tm_add).'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
}
$sp = mysql_query('SELECT `id`,`deactiveTime`,`deactiveLast` FROM `eff_users` WHERE `v1` LIKE "pgb%" AND `delete` = "0" AND `deactiveTime` > 0 AND `uid` = "'.$uid.'" ORDER BY `timeUse` DESC');
while($pl = mysql_fetch_array($sp)) {
mysql_query("UPDATE `eff_users` SET `deactiveTime` = ".(time()+$pl['deactiveLast'])." WHERE `id`='".$pl['id']."' ");
}
$sp = mysql_query('SELECT `id`,`sleeptime`,`timeUse` FROM `eff_users` WHERE `uid`="'.mysql_real_escape_string($uid).'" AND `no_Ace` = 0 AND `sleeptime` > 0 AND `delete` = 0');
while($pl = mysql_fetch_array($sp)) {
$timeUsen = time()-($pl['sleeptime']-$pl['timeUse']);
mysql_query("UPDATE `eff_users` SET `timeUse`='".$timeUsen."',`sleeptime`='0' WHERE `id`='".$pl['id']."' ");
}
mysql_query('UPDATE `actions` SET `vars` = "unsleep",`val` = "'.time().'" WHERE `id` = "'.$sleep['id'].'" LIMIT 1');
}
}
$t = mysql_fetch_array(mysql_query('SELECT * FROM `bs_turnirs` WHERE `city` = "'.$u->info['city'].'" AND `level` = "'.((int)($r+6)).'" LIMIT 1')); function changeSleep($uid, $sleep_action)
if(isset($t['id'])) { {
if($t['time_start'] > time()) { global $u;
$tz = mysql_fetch_array(mysql_query('SELECT * FROM `bs_zv` WHERE `bsid` = "'.$t['id'].'" AND `time` = "'.$t['time_start'].'" AND `uid` = "'.$u->info['id'].'" AND `finish` = 0 LIMIT 1')); if ($sleep_action == 1) {
$tz_all = mysql_fetch_array(mysql_query('SELECT SUM(`money`) FROM `bs_zv` WHERE `bsid` = "'.$t['id'].'" AND `time` = "'.$t['time_start'].'" AND `uid` = "'.$u->info['id'].'" AND `finish` <= "'.$t['time_start'].'" LIMIT 1')); //
} mysql_query('INSERT INTO `sleep` (`uid`,`time`,`sleep`) VALUES ("' . $uid . '","' . time() . '","1")');
if(isset($_POST['coin']) && $t['time_start'] > time() ) { //
$_POST['coin'] = round((int)$_POST['coin'],2); mysql_query(
if((round((int)$tz['money'], 2) + $_POST['coin']) > 3*$u->info['level'] || $tz_all[0] > 3*$u->info['level']) { "UPDATE `eff_users` SET `sleeptime`=" . time() . ",`deactiveLast` = ( `deactiveTime` - " . time() . " ) WHERE `uid`='" . mysql_real_escape_string(
$error = 'Вам нельзя делать ставку выше '.(3* $u->info['level']).' кр.'; $uid
} elseif(($_POST['coin'] >= $t['min_money'] || (isset($tz['id']) && $_POST['coin'] >= 1)) && $u->info['money'] >= $_POST['coin']) { ) . "' AND `no_Ace` = 0 AND `delete` = 0"
$t['money'] += $_POST['coin']; );
$u->info['money'] -= $_POST['coin']; mysql_query('UPDATE `items_users` SET `time_sleep` = "' . time() . '" WHERE `uid` = "' . $uid . '" AND `delete` < 1001 AND `data` LIKE "%|sleep_moroz=1%"');
if(isset($tz['id'])) { $u->addAction(time(), 'sleep', $u->info['city']);
$tz['money'] += $_POST['coin']; //
mysql_query('UPDATE `bs_zv` SET `money` = "'.$tz['money'].'" WHERE `id` = "'.$tz['id'].'" LIMIT 1'); } elseif ($sleep_action == 2) {
} else { //
//создаем mysql_query('INSERT INTO `sleep` (`uid`,`time`,`sleep`) VALUES ("' . $uid . '","' . time() . '","2")');
$tz_all = mysql_fetch_array(mysql_query('SELECT SUM(`money`) FROM `bs_zv` WHERE `bsid` = "'.$t['id'].'" AND `time` = "'.$t['time_start'].'" AND `uid` = "'.$u->info['id'].'" AND `finish` = "0" LIMIT 1')); //
$ins = mysql_query('INSERT INTO `bs_zv` (`bsid`,`money`,`time`,`uid`) VALUES ("'.$t['id'].'","'.mysql_real_escape_string($_POST['coin']).'","'.$t['time_start'].'","'.$u->info['id'].'")'); $sp = mysql_query('SELECT * FROM `items_users` WHERE `time_sleep` > 0 AND `uid` = "' . $uid . '" AND `delete` < 1001 AND `data` LIKE "%|sleep_moroz=1%"');
if($ins) { while ($pl = mysql_fetch_array($sp)) {
$tz_all = mysql_fetch_array(mysql_query('SELECT SUM(`money`) FROM `bs_zv` WHERE `bsid` = "'.$t['id'].'" AND `time` = "'.$t['time_start'].'" AND `uid` = "'.$u->info['id'].'" AND `finish` = "0" LIMIT 1')); $tm_add = time() - $pl['time_sleep'];
if( $tz_all[0] > 0 ) { mysql_query('UPDATE `items_users` SET `time_sleep` = "0",`time_create` = "' . ($pl['time_create'] + $tm_add) . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1');
$_POST['coin'] = $tz_all[0]; }
$error = 'Ваша ставка была возвращена. ('.round($_POST['coin'],2).' кр.)'; $sp = mysql_query(
} 'SELECT `id`,`deactiveTime`,`deactiveLast` FROM `eff_users` WHERE `v1` LIKE "pgb%" AND `delete` = "0" AND `deactiveTime` > 0 AND `uid` = "' . $uid . '" ORDER BY `timeUse` DESC'
$t['users']++; );
$tz = array('id'=>1, 'bsid'=>$t['id'], 'money'=>$_POST['coin'], 'time'=>$t['time_start'], 'finish'=>0); while ($pl = mysql_fetch_array($sp)) {
} mysql_query("UPDATE `eff_users` SET `deactiveTime` = " . (time() + $pl['deactiveLast']) . " WHERE `id`='" . $pl['id'] . "' ");
} }
mysql_query('UPDATE `bs_turnirs` SET `money` = "'.$t['money'].'", `users` = "'.$t['users'].'" WHERE `id` = "'.$t['id'].'" LIMIT 1'); $sp = mysql_query('SELECT `id`,`sleeptime`,`timeUse` FROM `eff_users` WHERE `uid`="' . mysql_real_escape_string($uid) . '" AND `no_Ace` = 0 AND `sleeptime` > 0 AND `delete` = 0');
mysql_query('UPDATE `users` SET `money` = "'.$u->info['money'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); while ($pl = mysql_fetch_array($sp)) {
} $timeUsen = time() - ($pl['sleeptime'] - $pl['timeUse']);
} mysql_query("UPDATE `eff_users` SET `timeUse`='" . $timeUsen . "',`sleeptime`='0' WHERE `id`='" . $pl['id'] . "' ");
} }
mysql_query('UPDATE `actions` SET `vars` = "unsleep",`val` = "' . time() . '" WHERE `id` = "' . $sleep['id'] . '" LIMIT 1');
}
}
if($u->info['id'] != 7) { $t = mysql_fetch_array(mysql_query('SELECT * FROM `bs_turnirs` WHERE `city` = "' . $u->info['city'] . '" AND `level` = "' . ((int)($r + 6)) . '" LIMIT 1'));
?> if (isset($t['id'])) {
<style> if ($t['time_start'] > time()) {
body { $tz = mysql_fetch_array(
background-color:#dfdfdf; mysql_query('SELECT * FROM `bs_zv` WHERE `bsid` = "' . $t['id'] . '" AND `time` = "' . $t['time_start'] . '" AND `uid` = "' . $u->info['id'] . '" AND `finish` = 0 LIMIT 1')
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg); );
background-repeat:no-repeat;background-position:top right; $tz_all = mysql_fetch_array(
} mysql_query(
</style> 'SELECT SUM(`money`) FROM `bs_zv` WHERE `bsid` = "' . $t['id'] . '" AND `time` = "' . $t['time_start'] . '" AND `uid` = "' . $u->info['id'] . '" AND `finish` <= "' . $t['time_start'] . '" LIMIT 1'
<?php )
if($re != '') { );
echo '<div style="float:right"><font color=red><b>'.$re.'</b></font></div>'; }
} if (isset($_POST['coin']) && $t['time_start'] > time()) {
?> $_POST['coin'] = round((int)$_POST['coin'], 2);
<table width="100%" border="0" cellspacing="0" cellpadding="0"> if ((round((int)$tz['money'], 2) + $_POST['coin']) > 3 * $u->info['level'] || $tz_all[0] > 3 * $u->info['level']) {
<tr> $error = 'Вам нельзя делать ставку выше ' . (3 * $u->info['level']) . ' кр.';
<td><div style="padding-left:0px;" align="center"> } elseif (($_POST['coin'] >= $t['min_money'] || (isset($tz['id']) && $_POST['coin'] >= 1)) && $u->info['money'] >= $_POST['coin']) {
<h3><?= $u->room['name']; ?></h3> $t['money'] += $_POST['coin'];
</div></td> $u->info['money'] -= $_POST['coin'];
<td width="200"><div align="right"> if (isset($tz['id'])) {
<table cellspacing="0" cellpadding="0"> $tz['money'] += $_POST['coin'];
<tr> mysql_query('UPDATE `bs_zv` SET `money` = "' . $tz['money'] . '" WHERE `id` = "' . $tz['id'] . '" LIMIT 1');
<td width="100%">&nbsp;</td> } else {
<td><table border="0" cellpadding="0" cellspacing="0"> //создаем
<tr align="right" valign="top"> $tz_all = mysql_fetch_array(
<td><!-- --> mysql_query(
<?= $goLis; ?> 'SELECT SUM(`money`) FROM `bs_zv` WHERE `bsid` = "' . $t['id'] . '" AND `time` = "' . $t['time_start'] . '" AND `uid` = "' . $u->info['id'] . '" AND `finish` = "0" LIMIT 1'
<!-- --> )
<table border="0" cellspacing="0" cellpadding="0"> );
<tr> $ins = mysql_query(
<td nowrap="nowrap"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE"> 'INSERT INTO `bs_zv` (`bsid`,`money`,`time`,`uid`) VALUES ("' . $t['id'] . '","' . mysql_real_escape_string(
$_POST['coin']
) . '","' . $t['time_start'] . '","' . $u->info['id'] . '")'
);
if ($ins) {
$tz_all = mysql_fetch_array(
mysql_query(
'SELECT SUM(`money`) FROM `bs_zv` WHERE `bsid` = "' . $t['id'] . '" AND `time` = "' . $t['time_start'] . '" AND `uid` = "' . $u->info['id'] . '" AND `finish` = "0" LIMIT 1'
)
);
if ($tz_all[0] > 0) {
$_POST['coin'] = $tz_all[0];
$error = 'Ваша ставка была возвращена. (' . round($_POST['coin'], 2) . ' кр.)';
}
$t['users']++;
$tz = ['id' => 1, 'bsid' => $t['id'], 'money' => $_POST['coin'], 'time' => $t['time_start'], 'finish' => 0];
}
}
mysql_query('UPDATE `bs_turnirs` SET `money` = "' . $t['money'] . '", `users` = "' . $t['users'] . '" WHERE `id` = "' . $t['id'] . '" LIMIT 1');
mysql_query('UPDATE `users` SET `money` = "' . $u->info['money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
}
}
}
if ($u->info['id'] != 7) {
?>
<style>
body {
background-color: #dfdfdf;
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
background-repeat: no-repeat;
background-position: top right;
}
</style>
<?php
if ($re != '') {
echo '<div style="float:right"><font color=red><b>' . $re . '</b></font></div>';
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div style="padding-left:0px;" align="center">
<h3><?= $u->room['name']; ?></h3>
</div>
</td>
<td width="200">
<div align="right">
<table cellspacing="0" cellpadding="0">
<tr> <tr>
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7" /></td> <td width="100%">&nbsp;</td>
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop" onClick="location='main.php?loc=1.180.0.11&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.11',1); ?>">Страшилкина ул.</a></td> <td>
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">
<td><!-- -->
<?= $goLis; ?>
<!-- -->
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td nowrap="nowrap">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
<tr>
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td>
<td bgcolor="#D3D3D3" nowrap="nowrap">
<a href="#" id="greyText" class="menutop" onClick="location='main.php?loc=1.180.0.11&rnd=<?= $code; ?>';" title="<?php thisInfRm(
'1.180.0.11', 1
); ?>">Страшилкина ул.</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr> </tr>
</table></td> </table>
</tr> </div>
</table></td> </td>
</tr> </tr>
</table></td> </table>
</tr> <center><h4><font color=green>Поздравляем! Вы успешно допускаетесь к турниру!</font></h4></center><br>
</table> <P align=right>
</div></td> <INPUT class="btn" onclick="window.open('/forum/', 'help', 'height=500,width=1024,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes')" value="Подсказка" style="color:red;" type="button"><INPUT TYPE="button" class="btn" onClick="location = 'main.php?rnd=<?= $code; ?>';" value="Обновить">
</tr> &nbsp; </P>
</table> <form method="post" action="main.php?rnd=<?= $code; ?>">
<center><h4><font color=green>Поздравляем! Вы успешно допускаетесь к турниру!</font></h4></center><br> <fieldset style="padding: 5px; border:1px solid #CCC;">
<P align=right><INPUT class="btn" onclick="window.open('/forum/', 'help', 'height=500,width=1024,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes')" value="Подсказка" style="color:red;" type="button"><INPUT TYPE="button" class="btn" onClick="location = 'main.php?rnd=<?=$code;?>';" value="Обновить"> &nbsp; </P> <legend style='font-weight:bold; color:#8F0000;'><h4><?php if ($t['status'] == 0) { ?>Прием заявок на следующий турнир <?php } else { ?>Текущий турнир<?php } ?></h4></legend>
<form method="post" action="main.php?rnd=<?=$code;?>">
<fieldset style="padding: 5px; border:1px solid #CCC;">
<legend style='font-weight:bold; color:#8F0000;'><h4><?php if($t['status'] == 0) { ?>Прием заявок на следующий турнир <?php } else { ?>Текущий турнир<?php } ?></h4></legend>
<?php if(!isset($t['id'])) { echo '<br><center>К сожалению турниры данного типа не проводятся в этом городе</center><br>'; } else { <?php if (!isset($t['id'])) {
if($t['status'] == 0) { echo '<br><center>К сожалению турниры данного типа не проводятся в этом городе</center><br>';
?> } else {
Начало турнира в Башне Смерти: <span class=date><?=date('d.m.Y H:i:',$t['time_start']);?>59</span><BR> if ($t['status'] == 0) {
Призовой фонд на текущий момент: <B><?=round(($t['money']-($t['money']/100*15)),2);?></B> кр. и <B>1</B> екр.<BR> ?>
Всего подано заявок: <B><?=$t['users'];?></B><BR> Начало турнира в Башне Смерти: <span class=date><?= date('d.m.Y H:i:', $t['time_start']); ?>59</span><BR>
<?php Призовой фонд на текущий момент: <B><?= round(($t['money'] - ($t['money'] / 100 * 15)), 2); ?></B> кр. и <B>1</B> екр.<BR>
if($error != '') { Всего подано заявок: <B><?= $t['users']; ?></B><BR>
echo '<font color=red><b>'.$error.'</b></font><Br>'; <?php
} if ($error != '') {
?> echo '<font color=red><b>' . $error . '</b></font><Br>';
<?php if(!isset($tz['id'])) { ?> }
<?php if($u->info['exp'] >= 250000) { ?> ?>
<?php if (!isset($tz['id'])) { ?>
<?php if ($u->info['exp'] >= 250000) { ?>
Сколько ставите кредитов? (минимальная ставка <b><?=$t['min_money'];?>.00 кр.</B> у вас в наличии <b><?= floor($u->info['money']); ?> кр.</b>)<BR><input type="text" name="coin" value="20.00" size="8"> Сколько ставите кредитов? (минимальная ставка <b><?= $t['min_money']; ?>.00 кр.</B> у вас в наличии <b><?= floor($u->info['money']); ?> кр.</b>)<BR>
<input type="submit" value="Подать заявку" name="docoin"><BR> <input type="text" name="coin" value="20.00" size="8">
Чем выше ваша ставка, тем больше шансов принять участие в турнире.<BR> <input type="submit" value="Подать заявку" name="docoin"><BR>
Чем выше ваша ставка, тем больше шансов принять участие в турнире.<BR>
<?php }elseif($u->info['exp'] < 250000){?> <?php } elseif ($u->info['exp'] < 250000) { ?>
Для регистрации в турнире нужно: <span style="color:green;"><b>250000</b></span> опыта у вас: <span style="color:red;"><b><?= $u->info['exp'];?></b></span> опыта<BR> Для регистрации в турнире нужно: <span style="color:green;"><b>250000</b></span> опыта у вас: <span style="color:red;"><b><?= $u->info['exp']; ?></b></span> опыта<BR>
Вам нужно набраться опыта.<BR> Вам нужно набраться опыта.<BR>
<?php }}else{ ?> <?php }
} else { ?>
Вы уже сделали ставку <b><?= floor($tz['money']); ?> кр.</b> (У вас в наличии <b><?= floor($u->info['money']); ?> кр.</b>) Сделать повторную ставку?<br /> Вы уже сделали ставку <b><?= floor($tz['money']); ?> кр.</b> (У вас в наличии <b><?= floor($u->info['money']); ?> кр.</b>) Сделать повторную ставку?<br/>
<small><b><font color=red>Внимание! Покинув помещение Башни Смерти все Ваши ставки будут потеряны!</font></b></small><br> <small><b><font color=red>Внимание! Покинув помещение Башни Смерти все Ваши ставки будут потеряны!</font></b></small><br>
<input type="text" name="coin" value="1.00" size="8" id="coin" /> <input type="text" name="coin" value="1.00" size="8" id="coin"/>
<input type="submit" value="Увеличить ставку" name="docoin2" /> <input type="submit" value="Увеличить ставку" name="docoin2"/>
<?php } } elseif($t['status'] == 1) { ?> <?php }
<?php } elseif ($t['status'] == 1) { ?>
$r = ''; $p = ''; $b = '<table width="100%" cellpadding="0" cellspacing="0" border="0"> <?php
$r = '';
$p = '';
$b = '<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tbody> <tbody>
<tr valign="top"> <tr valign="top">
<td valign="bottom" nowrap="" title=""><input onClick="location=location;" style="padding:5px;" type="submit" name="analiz2" value="Обновить"></td> <td valign="bottom" nowrap="" title=""><input onClick="location=location;" style="padding:5px;" type="submit" name="analiz2" value="Обновить"></td>
</tr> </tr>
</tbody> </tbody>
</table>'; </table>';
$notowerlog = false; $notowerlog = false;
$log = mysql_fetch_array(mysql_query('SELECT `id`,`count_bs`,`m` FROM `bs_logs` WHERE `count_bs` = "'.mysql_real_escape_string($t['count']).'" ORDER BY `id` ASC LIMIT 1')); $log = mysql_fetch_array(mysql_query('SELECT `id`,`count_bs`,`m` FROM `bs_logs` WHERE `count_bs` = "' . mysql_real_escape_string($t['count']) . '" ORDER BY `id` ASC LIMIT 1'));
if(!isset($log['id'])) { if (!isset($log['id'])) {
$notowerlog = true; $notowerlog = true;
$r = '<div>Скорее всего Архивариус снова потерял пергамент с хрониками турниров ...</div>'; $r = '<div>Скорее всего Архивариус снова потерял пергамент с хрониками турниров ...</div>';
} else { } else {
$sp = mysql_query('SELECT * FROM `bs_logs` WHERE `count_bs` = "'.$log['count_bs'].'" ORDER BY `id` ASC'); $sp = mysql_query('SELECT * FROM `bs_logs` WHERE `count_bs` = "' . $log['count_bs'] . '" ORDER BY `id` ASC');
while( $pl = mysql_fetch_array($sp) ) { while ($pl = mysql_fetch_array($sp)) {
$datesb = ''; $datesb = '';
if( $pl['type'] == 2 ) { if ($pl['type'] == 2) {
$datesb = '2'; $datesb = '2';
} }
$r .= '<br><span class="date'.$datesb.'">'.date('d.m.y H:i',$pl['time']).'</span> '.$pl['text'].''; $r .= '<br><span class="date' . $datesb . '">' . date('d.m.y H:i', $pl['time']) . '</span> ' . $pl['text'] . '';
} }
$liveusers = ''; $liveusers = '';
$sp = mysql_query('SELECT `id` FROM `users` WHERE `inTurnir` = "'.$t['id'].'"'); $sp = mysql_query('SELECT `id` FROM `users` WHERE `inTurnir` = "' . $t['id'] . '"');
while( $plu = mysql_fetch_array($sp) ) { while ($plu = mysql_fetch_array($sp)) {
$pl = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`align`,`clan`,`level` FROM `users` WHERE `inUser` = "'.$plu['id'].'"')); $pl = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`align`,`clan`,`level` FROM `users` WHERE `inUser` = "' . $plu['id'] . '"'));
if( isset($pl['id']) ) { if (isset($pl['id'])) {
$alc = ''; $alc = '';
if( $pl['align'] > 0 ) { if ($pl['align'] > 0) {
$alc .= '<img width=12 height=15 src=//img.new-combats.tech/i/align/align'.$pl['align'].'.gif >'; $alc .= '<img width=12 height=15 src=//img.new-combats.tech/i/align/align' . $pl['align'] . '.gif >';
} }
if( $pl['clan'] > 0 ) { if ($pl['clan'] > 0) {
$alc .= '<img width=24 height=15 src=//img.new-combats.tech/i/clan/'.$pl['clan'].'.gif >'; $alc .= '<img width=24 height=15 src=//img.new-combats.tech/i/clan/' . $pl['clan'] . '.gif >';
} }
$liveusers .= ', <b>'.$alc.$pl['login'].'</b> ['.$pl['level'].']<a href=/info/'.$plu['id'].' target=_blank><img src=//img.new-combats.tech/i/inf_capitalcity.gif width=12 height=11 ></a>'; $liveusers .= ', <b>' . $alc . $pl['login'] . '</b> [' . $pl['level'] . ']<a href=/info/' . $plu['id'] . ' target=_blank><img src=//img.new-combats.tech/i/inf_capitalcity.gif width=12 height=11 ></a>';
} }
} }
$r .= '<br><br>Всего живых участников на данный момент: <b>'.$t['users'].'</b> ('.ltrim($liveusers,', ').')'; $r .= '<br><br>Всего живых участников на данный момент: <b>' . $t['users'] . '</b> (' . ltrim($liveusers, ', ') . ')';
unset($liveusers,$alc); unset($liveusers, $alc);
} }
if( $notowerlog == false ) {?> if ($notowerlog == false) { ?>
Призовой фонд: <b><?=$log['m']?> кр.</b> Призовой фонд: <b><?= $log['m'] ?> кр.</b>
<?php } echo $r; ?> <?php }
<?php } } ?> echo $r; ?>
<BR> <?php }
</fieldset> } ?>
</form> <BR>
<h4>Топ 10 игроков (новая статистиика) турнир 5<?//=$t['level']?> уровней</h4> </fieldset>
<?php </form>
$sp = mysql_query('SELECT * FROM `users` WHERE `win_bs`>0 ORDER BY `win_bs` DESC LIMIT 10'); <h4>Топ 10 игроков (новая статистиика) турнир 5<? //=$t['level']?> уровней</h4>
$i = 1; <?php
while ($pl = mysql_fetch_array($sp)) { $sp = mysql_query('SELECT * FROM `users` WHERE `win_bs`>0 ORDER BY `win_bs` DESC LIMIT 10');
$wuser = '<b>'.$pl['login'].'</b> ['.$pl['level'].']<a href=/info/'.$pl['id'].' target=_blank ><img width=12 height=11 src=//img.new-combats.tech/i/inf_capitalcity.gif ></a>'; $i = 1;
if( $pl['clan'] > 0 ) { while ($pl = mysql_fetch_array($sp)) {
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/'.$pl['clan'].'.gif>'.$wuser; $wuser = '<b>' . $pl['login'] . '</b> [' . $pl['level'] . ']<a href=/info/' . $pl['id'] . ' target=_blank ><img width=12 height=11 src=//img.new-combats.tech/i/inf_capitalcity.gif ></a>';
} if ($pl['clan'] > 0) {
if( $pl['align'] > 0 ) { $wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/' . $pl['clan'] . '.gif>' . $wuser;
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align'.$pl['align'].'.gif>'.$wuser; }
} if ($pl['align'] > 0) {
echo '<b>'.$i.'.</b> Место: '.$wuser.' побед: <b>'.$pl['win_bs'].'</b><br>'; $wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align' . $pl['align'] . '.gif>' . $wuser;
$i++; }
} echo '<b>' . $i . '.</b> Место: ' . $wuser . ' побед: <b>' . $pl['win_bs'] . '</b><br>';
?> $i++;
<h4>Победители 10-ти предыдущих турниров для 5<?//=$t['level']?> уровней</h4> }
<?php ?>
$sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `id` DESC LIMIT 10'); <h4>Победители 10-ти предыдущих турниров для 5<? //=$t['level']?> уровней</h4>
$i = 1; <?php
while ($pl = mysql_fetch_array($sp)) { $sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `id` DESC LIMIT 10');
$wuser = '<b>'.$pl['wlogin'].'</b> ['.$pl['wlevel'].']<a href=/info/'.$pl['wuid'].' target=_blank ><img width=12 height=11 src=//img.new-combats.tech/i/inf_capitalcity.gif ></a>'; $i = 1;
if( $pl['wclan'] > 0 ) { while ($pl = mysql_fetch_array($sp)) {
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/'.$pl['wclan'].'.gif>'.$wuser; $wuser = '<b>' . $pl['wlogin'] . '</b> [' . $pl['wlevel'] . ']<a href=/info/' . $pl['wuid'] . ' target=_blank ><img width=12 height=11 src=//img.new-combats.tech/i/inf_capitalcity.gif ></a>';
} if ($pl['wclan'] > 0) {
if( $pl['walign'] > 0 ) { $wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/' . $pl['wclan'] . '.gif>' . $wuser;
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align'.$pl['walign'].'.gif>'.$wuser; }
} if ($pl['walign'] > 0) {
echo $i.'. Победитель: '.$wuser.' Начало турнира <span class=date>'.date('d.m.Y H:i',($pl['time_start']+60)).'</span> продолжительность <span class=date>'.$u->timeOut( $pl['time_sf'] ).'</span> приз: <b>'.$pl['money'].'</b> <a target=_blank href=/towerlog.php?towerid='.$pl['bsid'].'&id='.$pl['count'].' >История турнира »»</a><br>'; $wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align' . $pl['walign'] . '.gif>' . $wuser;
$i++; }
} echo $i . '. Победитель: ' . $wuser . ' Начало турнира <span class=date>' . date(
?> 'd.m.Y H:i', ($pl['time_start'] + 60)
<h4>Максимальный выигрыш для 5<?//=$t['level']?> уровней</h4> ) . '</span> продолжительность <span class=date>' . Conversion::secondsToTimeout(
<?php $pl['time_sf']
$sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `money` DESC LIMIT 1'); ) . '</span> приз: <b>' . $pl['money'] . '</b> <a target=_blank href=/towerlog.php?towerid=' . $pl['bsid'] . '&id=' . $pl['count'] . ' >История турнира »»</a><br>';
$i = 1; $i++;
while ($pl = mysql_fetch_array($sp)) { }
$wuser = '<b>'.$pl['wlogin'].'</b> ['.$pl['wlevel'].']<a href=/info/'.$pl['wuid'].' target=_blank ><img width=12 height=11 src=//img.new-combats.tech/i/inf_capitalcity.gif ></a>'; ?>
if( $pl['wclan'] > 0 ) { <h4>Максимальный выигрыш для 5 уровней</h4>
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/'.$pl['wclan'].'.gif>'.$wuser; <?php
} $sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `money` DESC LIMIT 1');
if( $pl['walign'] > 0 ) { $i = 1;
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align'.$pl['walign'].'.gif>'.$wuser; while ($pl = mysql_fetch_array($sp)) {
} $wuser = '<b>' . $pl['wlogin'] . '</b> [' . $pl['wlevel'] . ']<a href=/info/' . $pl['wuid'] . ' target=_blank ><img width=12 height=11 src=//img.new-combats.tech/i/inf_capitalcity.gif ></a>';
echo 'Победитель: '.$wuser.' Начало турнира <span class=date>'.date('d.m.Y H:i',($pl['time_start']+60)).'</span> продолжительность <span class=date>'.$u->timeOut( $pl['time_sf'] ).'</span> приз: <b>'.$pl['money'].'</b> <a target=_blank href=/towerlog.php?towerid='.$pl['bsid'].'&id='.$pl['count'].' >История турнира »»</a><br>'; if ($pl['wclan'] > 0) {
$i++; $wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/' . $pl['wclan'] . '.gif>' . $wuser;
} }
?> if ($pl['walign'] > 0) {
<h4>Самый продолжительный турнир для 5<?//=$t['level']?> уровней</h4> $wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align' . $pl['walign'] . '.gif>' . $wuser;
<?php }
$sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `time_sf` DESC LIMIT 1'); echo 'Победитель: ' . $wuser . ' Начало турнира <span class=date>' . date('d.m.Y H:i', ($pl['time_start'] + 60)) . '</span> продолжительность <span class=date>' . Conversion::secondsToTimeout(
$i = 1; $pl['time_sf']
while ($pl = mysql_fetch_array($sp)) { ) . '</span> приз: <b>' . $pl['money'] . '</b> <a target=_blank href=/towerlog.php?towerid=' . $pl['bsid'] . '&id=' . $pl['count'] . ' >История турнира »»</a><br>';
$wuser = '<b>'.$pl['wlogin'].'</b> ['.$pl['wlevel'].']<a href=/info/'.$pl['wuid'].' target=_blank ><img width=12 height=11 src=//img.new-combats.tech/i/inf_capitalcity.gif ></a>'; $i++;
if( $pl['wclan'] > 0 ) { }
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/'.$pl['wclan'].'.gif>'.$wuser; ?>
} <h4>Самый продолжительный турнир для 5<? //=$t['level']?> уровней</h4>
if( $pl['walign'] > 0 ) { <?php
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align'.$pl['walign'].'.gif>'.$wuser; $sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `time_sf` DESC LIMIT 1');
} $i = 1;
echo 'Победитель: '.$wuser.' Начало турнира<span class=date>'.date('d.m.Y H:i',($pl['time_start']+60)).'</span> продолжительность <span class=date>'.$u->timeOut( $pl['time_sf'] ).'</span> приз: <b>'.$pl['money'].'</b> <a target=_blank href=/towerlog.php?towerid='.$pl['bsid'].'&id='.$pl['count'].' >История турнира »»</a><br>'; while ($pl = mysql_fetch_array($sp)) {
$i++; $wuser = '<b>' . $pl['wlogin'] . '</b> [' . $pl['wlevel'] . ']<a href=/info/' . $pl['wuid'] . ' target=_blank ><img width=12 height=11 src=//img.new-combats.tech/i/inf_capitalcity.gif ></a>';
} if ($pl['wclan'] > 0) {
?> $wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/' . $pl['wclan'] . '.gif>' . $wuser;
<br /><br /> }
<?php } } ?> if ($pl['walign'] > 0) {
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align' . $pl['walign'] . '.gif>' . $wuser;
}
echo 'Победитель: ' . $wuser . ' Начало турнира<span class=date>' . date('d.m.Y H:i', ($pl['time_start'] + 60)) . '</span> продолжительность <span class=date>' . Conversion::secondsToTimeout(
$pl['time_sf']
) . '</span> приз: <b>' . $pl['money'] . '</b> <a target=_blank href=/towerlog.php?towerid=' . $pl['bsid'] . '&id=' . $pl['count'] . ' >История турнира »»</a><br>';
$i++;
}
?>
<br/><br/>
<?php }
} ?>

View File

@ -1,4 +1,7 @@
<?php <?php
use Helper\Conversion;
if (!defined('GAME')) { if (!defined('GAME')) {
die(); die();
} }
@ -8,7 +11,8 @@ if ($u->room['file'] != 'dragopsh') {
} }
$d = new Dungeon; $d = new Dungeon;
function sendSysChat(string $message, bool $hasDn = false, bool $hasReceiver = false) { function sendSysChat(string $message, bool $hasDn = false, bool $hasReceiver = false)
{
global $u; global $u;
$cmsg = new ChatMessage(); $cmsg = new ChatMessage();
$cmsg->setCity($u->info['city']); $cmsg->setCity($u->info['city']);
@ -55,13 +59,23 @@ $dies = $dies[0];
$map_d = json_decode($map['data']); $map_d = json_decode($map['data']);
$varos = []; $varos = [];
$varos['trap1'] = mysql_fetch_array(mysql_query('SELECT `vals`,`time` FROM `laba_act` WHERE `uid` = "' . $u->info['id'] . '" AND `lib` = "' . $lab['id'] . '" AND `time` > "' . time() . '" AND `vars` = "trap1" ORDER BY `time` DESC LIMIT 1')); $varos['trap1'] = mysql_fetch_array(
mysql_query(
'SELECT `vals`,`time` FROM `laba_act` WHERE `uid` = "' . $u->info['id'] . '" AND `lib` = "' . $lab['id'] . '" AND `time` > "' . time() . '" AND `vars` = "trap1" ORDER BY `time` DESC LIMIT 1'
)
);
$errors = ''; $errors = '';
$effed = ''; $effed = '';
if (isset($_GET['takeitm'])) { if (isset($_GET['takeitm'])) {
$var = ['obj' => mysql_fetch_array(mysql_query('SELECT `i`.*,`m`.`name`,`m`.`inslot` FROM `laba_itm` AS `i` LEFT JOIN `items_main` AS `m` ON `m`.`id` = `i`.`itm` WHERE `i`.`id` = "' . mysql_real_escape_string($_GET['takeitm']) . '" AND `i`.`lib` = "' . $lab['id'] . '" AND `i`.`x` = "' . $u->info['x'] . '" AND `i`.`y` = "' . $u->info['y'] . '" LIMIT 1'))]; $var = ['obj' => mysql_fetch_array(
mysql_query(
'SELECT `i`.*,`m`.`name`,`m`.`inslot` FROM `laba_itm` AS `i` LEFT JOIN `items_main` AS `m` ON `m`.`id` = `i`.`itm` WHERE `i`.`id` = "' . mysql_real_escape_string(
$_GET['takeitm']
) . '" AND `i`.`lib` = "' . $lab['id'] . '" AND `i`.`x` = "' . $u->info['x'] . '" AND `i`.`y` = "' . $u->info['y'] . '" LIMIT 1'
)
)];
if (isset($var['obj']['id'])) { if (isset($var['obj']['id'])) {
if ($var['obj']['take'] == 0) { if ($var['obj']['take'] == 0) {
$var['sex'] = ''; $var['sex'] = '';
@ -84,7 +98,13 @@ if (isset($_GET['takeitm'])) {
$errors = '<b style="color: red">Предмет не найден...</b>'; $errors = '<b style="color: red">Предмет не найден...</b>';
} }
} elseif (isset($_GET['useobj'])) { } elseif (isset($_GET['useobj'])) {
$var = ['obj' => mysql_fetch_array(mysql_query('SELECT * FROM `laba_obj` WHERE `id` = "' . mysql_real_escape_string($_GET['useobj']) . '" AND `lib` = "' . $lab['id'] . '" AND `x` = "' . $u->info['x'] . '" AND `y` = "' . $u->info['y'] . '" LIMIT 1'))]; $var = ['obj' => mysql_fetch_array(
mysql_query(
'SELECT * FROM `laba_obj` WHERE `id` = "' . mysql_real_escape_string(
$_GET['useobj']
) . '" AND `lib` = "' . $lab['id'] . '" AND `x` = "' . $u->info['x'] . '" AND `y` = "' . $u->info['y'] . '" LIMIT 1'
)
)];
if (isset($var['obj']['id'])) { if (isset($var['obj']['id'])) {
if ($var['obj']['use'] == 0) { if ($var['obj']['use'] == 0) {
if ($var['obj']['type'] == 1) { if ($var['obj']['type'] == 1) {
@ -101,9 +121,11 @@ if (isset($_GET['takeitm'])) {
$var['itm'] = $var['itm'][0]; $var['itm'] = $var['itm'][0];
$var['itm'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "' . $var['itm'] . '" LIMIT 1')); $var['itm'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "' . $var['itm'] . '" LIMIT 1'));
if (isset($var['itm']['id'])) { if (isset($var['itm']['id'])) {
mysql_query('INSERT INTO `laba_itm` (`uid`,`lib`,`time`,`itm`,`x`,`y`,`take`) VALUES ( mysql_query(
'INSERT INTO `laba_itm` (`uid`,`lib`,`time`,`itm`,`x`,`y`,`take`) VALUES (
"' . $u->info['id'] . '","' . $lab['id'] . '","' . time() . '","' . $var['itm']['id'] . '","' . $u->info['x'] . '","' . $u->info['y'] . '","0" "' . $u->info['id'] . '","' . $lab['id'] . '","' . time() . '","' . $var['itm']['id'] . '","' . $u->info['x'] . '","' . $u->info['y'] . '","0"
)'); )'
);
} else { } else {
$var['itm']['name'] = 'Предмет рассыпался на глазах...'; $var['itm']['name'] = 'Предмет рассыпался на глазах...';
} }
@ -135,9 +157,11 @@ if (isset($_GET['takeitm'])) {
$var['itm'] = $var['itm'][0]; $var['itm'] = $var['itm'][0];
$var['itm'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "' . $var['itm'] . '" LIMIT 1')); $var['itm'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "' . $var['itm'] . '" LIMIT 1'));
if (isset($var['itm']['id'])) { if (isset($var['itm']['id'])) {
mysql_query('INSERT INTO `laba_itm` (`uid`,`lib`,`time`,`itm`,`x`,`y`,`take`) VALUES ( mysql_query(
'INSERT INTO `laba_itm` (`uid`,`lib`,`time`,`itm`,`x`,`y`,`take`) VALUES (
"' . $u->info['id'] . '","' . $lab['id'] . '","' . time() . '","' . $var['itm']['id'] . '","' . $u->info['x'] . '","' . $u->info['y'] . '","0" "' . $u->info['id'] . '","' . $lab['id'] . '","' . time() . '","' . $var['itm']['id'] . '","' . $u->info['x'] . '","' . $u->info['y'] . '","0"
)'); )'
);
} else { } else {
$var['itm']['name'] = 'Предмет рассыпался на глазах...'; $var['itm']['name'] = 'Предмет рассыпался на глазах...';
} }
@ -146,9 +170,11 @@ if (isset($_GET['takeitm'])) {
$var['itm'] = $var['itm'][0]; $var['itm'] = $var['itm'][0];
$var['itm'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "' . $var['itm'] . '" LIMIT 1')); $var['itm'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "' . $var['itm'] . '" LIMIT 1'));
if (isset($var['itm']['id'])) { if (isset($var['itm']['id'])) {
mysql_query('INSERT INTO `laba_itm` (`uid`,`lib`,`time`,`itm`,`x`,`y`,`take`) VALUES ( mysql_query(
'INSERT INTO `laba_itm` (`uid`,`lib`,`time`,`itm`,`x`,`y`,`take`) VALUES (
"' . $u->info['id'] . '","' . $lab['id'] . '","' . time() . '","' . $var['itm']['id'] . '","' . $u->info['x'] . '","' . $u->info['y'] . '","0" "' . $u->info['id'] . '","' . $lab['id'] . '","' . time() . '","' . $var['itm']['id'] . '","' . $u->info['x'] . '","' . $u->info['y'] . '","0"
)'); )'
);
} else { } else {
$var['itm']['name'] = 'Предмет рассыпался на глазах...'; $var['itm']['name'] = 'Предмет рассыпался на глазах...';
} }
@ -207,7 +233,9 @@ if ($real_x > count($map_d) - 7) {
$objs = []; $objs = [];
$sp = mysql_query('SELECT * FROM `laba_obj` WHERE `lib` = "' . $lab['id'] . '" AND `x` > ' . ($real_x - 7) . ' AND `x` < ' . ($real_x + 7) . ' AND `y` > ' . ($real_y - 12) . ' AND `y` < ' . ($real_y + 12) . ' LIMIT 144'); $sp = mysql_query(
'SELECT * FROM `laba_obj` WHERE `lib` = "' . $lab['id'] . '" AND `x` > ' . ($real_x - 7) . ' AND `x` < ' . ($real_x + 7) . ' AND `y` > ' . ($real_y - 12) . ' AND `y` < ' . ($real_y + 12) . ' LIMIT 144'
);
while ($pl = mysql_fetch_array($sp)) { while ($pl = mysql_fetch_array($sp)) {
$objs[$pl['x']][$pl['y']] = $pl; $objs[$pl['x']][$pl['y']] = $pl;
} }
@ -260,7 +288,9 @@ if (isset($_GET['goto'])) {
} }
$u->info['timeGo'] = time() + $varos['timego']; $u->info['timeGo'] = time() + $varos['timego'];
$u->info['timeGoL'] = time(); $u->info['timeGoL'] = time();
mysql_query('UPDATE `stats` SET `x` = "' . $u->info['x'] . '" ,`y` = "' . $u->info['y'] . '",`timeGoL` = "' . $u->info['timeGoL'] . '",`timeGo` = "' . $u->info['timeGo'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); mysql_query(
'UPDATE `stats` SET `x` = "' . $u->info['x'] . '" ,`y` = "' . $u->info['y'] . '",`timeGoL` = "' . $u->info['timeGoL'] . '",`timeGo` = "' . $u->info['timeGo'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
);
} }
} }
@ -331,9 +361,11 @@ if (isset($objs[$u->info['x']][$u->info['y']]['id'])) {
if ($var['add'][1] > 0) { if ($var['add'][1] > 0) {
$j = 0; $j = 0;
while ($j < $var['add'][1]) { while ($j < $var['add'][1]) {
mysql_query('INSERT INTO `laba_itm` (`uid`,`lib`,`time`,`itm`,`x`,`y`,`take`) VALUES ( mysql_query(
'INSERT INTO `laba_itm` (`uid`,`lib`,`time`,`itm`,`x`,`y`,`take`) VALUES (
"' . $u->info['id'] . '","' . $lab['id'] . '","' . time() . '","' . $var['add'][0] . '","' . $u->info['x'] . '","' . $u->info['y'] . '","0" "' . $u->info['id'] . '","' . $lab['id'] . '","' . time() . '","' . $var['add'][0] . '","' . $u->info['x'] . '","' . $u->info['y'] . '","0"
)'); )'
);
$j++; $j++;
} }
} }
@ -346,7 +378,9 @@ if (isset($objs[$u->info['x']][$u->info['y']]['id'])) {
mysql_query('DELETE FROM `laba_obj` WHERE `id` = "' . $mitm['id'] . '" LIMIT 1'); mysql_query('DELETE FROM `laba_obj` WHERE `id` = "' . $mitm['id'] . '" LIMIT 1');
} elseif ($mitm['type'] == 2) { } elseif ($mitm['type'] == 2) {
if ($mitm['use'] == 0) { if ($mitm['use'] == 0) {
$tbtl = mysql_fetch_array(mysql_query('SELECT * FROM `battle` WHERE `team_win` = -1 AND `dn_id` = "' . $lab['id'] . '" AND `x` = "' . $u->info['x'] . '" AND `y` = "' . $u->info['y'] . '" LIMIT 1')); $tbtl = mysql_fetch_array(
mysql_query('SELECT * FROM `battle` WHERE `team_win` = -1 AND `dn_id` = "' . $lab['id'] . '" AND `x` = "' . $u->info['x'] . '" AND `y` = "' . $u->info['y'] . '" LIMIT 1')
);
if (isset($tbtl['id'])) { if (isset($tbtl['id'])) {
//вступаем в поединок //вступаем в поединок
mysql_query('UPDATE `users` SET `battle` = "' . $tbtl['id'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); mysql_query('UPDATE `users` SET `battle` = "' . $tbtl['id'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
@ -378,7 +412,8 @@ if (isset($objs[$u->info['x']][$u->info['y']]['id'])) {
$expB = 0; $expB = 0;
$btld = ['players' => '', 'timeout' => 180, 'type' => 0, 'invis' => 0, 'noinc' => 0, 'travmChance' => 0, 'typeBattle' => 0, 'addExp' => $expB, 'money' => 0]; $btld = ['players' => '', 'timeout' => 180, 'type' => 0, 'invis' => 0, 'noinc' => 0, 'travmChance' => 0, 'typeBattle' => 0, 'addExp' => $expB, 'money' => 0];
$ins = mysql_query('INSERT INTO `battle` (`dungeon`,`dn_id`,`x`,`y`,`city`,`time_start`,`players`,`timeout`,`type`,`invis`,`noinc`,`travmChance`,`typeBattle`,`addExp`,`money`) VALUES ( $ins = mysql_query(
'INSERT INTO `battle` (`dungeon`,`dn_id`,`x`,`y`,`city`,`time_start`,`players`,`timeout`,`type`,`invis`,`noinc`,`travmChance`,`typeBattle`,`addExp`,`money`) VALUES (
"102", "102",
"' . $lab['id'] . '", "' . $lab['id'] . '",
"' . $u->info['x'] . '", "' . $u->info['x'] . '",
@ -393,7 +428,8 @@ if (isset($objs[$u->info['x']][$u->info['y']]['id'])) {
"' . $btld['travmChance'] . '", "' . $btld['travmChance'] . '",
"' . $btld['typeBattle'] . '", "' . $btld['typeBattle'] . '",
"' . $btld['addExp'] . '", "' . $btld['addExp'] . '",
"' . $btld['money'] . '")'); "' . $btld['money'] . '")'
);
$btl_id = mysql_insert_id(); $btl_id = mysql_insert_id();
} }
if ($btl_id > 0) { if ($btl_id > 0) {
@ -444,14 +480,23 @@ if (isset($objs[$u->info['x']][$u->info['y']]['id'])) {
} elseif ($mitm['type'] == 4) { } elseif ($mitm['type'] == 4) {
if ($mitm['use'] == 0) { if ($mitm['use'] == 0) {
//Ловушка //Ловушка
$var['trap1'] = mysql_fetch_array(mysql_query('SELECT `id`,`vals`,`time` FROM `laba_act` WHERE `uid` = "' . $u->info['id'] . '" AND `lib` = "' . $lab['id'] . '" AND `time` > "' . time() . '" AND `vars` = "trap1" ORDER BY `time` DESC LIMIT 1')); $var['trap1'] = mysql_fetch_array(
mysql_query(
'SELECT `id`,`vals`,`time` FROM `laba_act` WHERE `uid` = "' . $u->info['id'] . '" AND `lib` = "' . $lab['id'] . '" AND `time` > "' . time(
) . '" AND `vars` = "trap1" ORDER BY `time` DESC LIMIT 1'
)
);
$var['time'] = rand(1, 60); $var['time'] = rand(1, 60);
if (isset($var['trap1']['id'])) { if (isset($var['trap1']['id'])) {
mysql_query('UPDATE `laba_act` SET `vals` = "' . ($var['trap1']['vals'] + $var['time']) . '",`time` = "' . ($var['trap1']['time'] + $var['time'] * 60) . '" WHERE `id` = "' . $var['trap1']['id'] . '" LIMIT 1'); mysql_query(
'UPDATE `laba_act` SET `vals` = "' . ($var['trap1']['vals'] + $var['time']) . '",`time` = "' . ($var['trap1']['time'] + $var['time'] * 60) . '" WHERE `id` = "' . $var['trap1']['id'] . '" LIMIT 1'
);
} else { } else {
mysql_query('INSERT INTO `laba_act` (`uid`,`time`,`lib`,`vars`,`vals`) VALUES ( mysql_query(
'INSERT INTO `laba_act` (`uid`,`time`,`lib`,`vars`,`vals`) VALUES (
"' . $u->info['id'] . '","' . (time() + $var['time'] * 60) . '","' . $lab['id'] . '","trap1","' . $var['time'] . '" "' . $u->info['id'] . '","' . (time() + $var['time'] * 60) . '","' . $lab['id'] . '","trap1","' . $var['time'] . '"
)'); )'
);
} }
mysql_query('UPDATE `laba_obj` SET `use` = "' . $u->info['id'] . '" WHERE `id` = "' . $mitm['id'] . '" LIMIT 1'); mysql_query('UPDATE `laba_obj` SET `use` = "' . $u->info['id'] . '" WHERE `id` = "' . $mitm['id'] . '" LIMIT 1');
@ -461,7 +506,12 @@ if (isset($objs[$u->info['x']][$u->info['y']]['id'])) {
} }
$var['text'] = '<img width=40 height=25 src=//img.new-combats.tech/i/items/event_timer_trap.gif> <b>' . $u->info['login'] . '</b> угодил' . $var['sex'] . ' в ловушку...'; $var['text'] = '<img width=40 height=25 src=//img.new-combats.tech/i/items/event_timer_trap.gif> <b>' . $u->info['login'] . '</b> угодил' . $var['sex'] . ' в ловушку...';
$varos['trap1'] = mysql_fetch_array(mysql_query('SELECT `vals`,`time` FROM `laba_act` WHERE `uid` = "' . $u->info['id'] . '" AND `lib` = "' . $lab['id'] . '" AND `time` > "' . time() . '" AND `vars` = "trap1" ORDER BY `time` DESC LIMIT 1')); $varos['trap1'] = mysql_fetch_array(
mysql_query(
'SELECT `vals`,`time` FROM `laba_act` WHERE `uid` = "' . $u->info['id'] . '" AND `lib` = "' . $lab['id'] . '" AND `time` > "' . time(
) . '" AND `vars` = "trap1" ORDER BY `time` DESC LIMIT 1'
)
);
sendSysChat($var['text'], true); sendSysChat($var['text'], true);
$errors .= '<img width="40" height="25" src="//img.new-combats.tech/i/items/event_timer_trap.gif"> ' . $u->info['login'] . ' угодил' . $var['sex'] . ' в ловушку... Время перехода +3 секунды (Длительность: +' . $var['time'] . ' мин.)'; $errors .= '<img width="40" height="25" src="//img.new-combats.tech/i/items/event_timer_trap.gif"> ' . $u->info['login'] . ' угодил' . $var['sex'] . ' в ловушку... Время перехода +3 секунды (Длительность: +' . $var['time'] . ' мин.)';
} }
@ -476,7 +526,9 @@ if (isset($objs[$u->info['x']][$u->info['y']]['id'])) {
unset($var); unset($var);
} }
$sp = mysql_query('SELECT `i`.*,`m`.`name`,`m`.`img` FROM `laba_itm` AS `i` LEFT JOIN `items_main` AS `m` ON `m`.`id` = `i`.`itm` WHERE `i`.`lib` = "' . $lab['id'] . '" AND `i`.`x` = "' . $u->info['x'] . '" AND `i`.`y` = "' . $u->info['y'] . '" AND `i`.`take` = "0"'); $sp = mysql_query(
'SELECT `i`.*,`m`.`name`,`m`.`img` FROM `laba_itm` AS `i` LEFT JOIN `items_main` AS `m` ON `m`.`id` = `i`.`itm` WHERE `i`.`lib` = "' . $lab['id'] . '" AND `i`.`x` = "' . $u->info['x'] . '" AND `i`.`y` = "' . $u->info['y'] . '" AND `i`.`take` = "0"'
);
while ($pl = mysql_fetch_array($sp)) { while ($pl = mysql_fetch_array($sp)) {
$itms .= ' <a href="main.php?takeitm=' . $pl['id'] . '"><img src="//img.new-combats.tech/i/items/' . $pl['img'] . '" title="Поднять &quot;' . $pl['name'] . '&quot;"></a>'; $itms .= ' <a href="main.php?takeitm=' . $pl['id'] . '"><img src="//img.new-combats.tech/i/items/' . $pl['img'] . '" title="Поднять &quot;' . $pl['name'] . '&quot;"></a>';
} }
@ -497,7 +549,10 @@ if ($itms != '') {
mysql_query('UPDATE `laba_now` SET `users` = "' . $lab['users'] . '" WHERE `id` = "' . $lab['id'] . '" LIMIT 1'); mysql_query('UPDATE `laba_now` SET `users` = "' . $lab['users'] . '" WHERE `id` = "' . $lab['id'] . '" LIMIT 1');
} }
\User\ItemsModel::addItem(4392, $u->info['id'], '|fromlaba=1|nosale=1'); \User\ItemsModel::addItem(4392, $u->info['id'], '|fromlaba=1|nosale=1');
mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `uid` = "' . $u->info['id'] . '" AND `delete` < 1234567890 AND `inShop` = "0" AND `data` LIKE "%fromlaba=1%" AND `data` LIKE "%nosavelaba=1%"'); mysql_query(
'UPDATE `items_users` SET `delete` = "' . time(
) . '" WHERE `uid` = "' . $u->info['id'] . '" AND `delete` < 1234567890 AND `inShop` = "0" AND `data` LIKE "%fromlaba=1%" AND `data` LIKE "%nosavelaba=1%"'
);
mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `uid` = "' . $u->info['id'] . '" AND `delete` < 1234567890 AND `inShop` = "0" AND `data` LIKE "%nosavelaba=1%"'); mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `uid` = "' . $u->info['id'] . '" AND `delete` < 1234567890 AND `inShop` = "0" AND `data` LIKE "%nosavelaba=1%"');
mysql_query('UPDATE `users` SET `room` = "369" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); mysql_query('UPDATE `users` SET `room` = "369" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
mysql_query('UPDATE `stats` SET `dnow` = "0",`x`="0",`y`="0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); mysql_query('UPDATE `stats` SET `dnow` = "0",`x`="0",`y`="0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
@ -510,7 +565,9 @@ if ($itms != '') {
die('<script>location.href="main.php";</script>'); die('<script>location.href="main.php";</script>');
} }
$sp = mysql_query('SELECT `s`.`x`,`s`.`y`,`u`.`id`,`u`.`login`,`u`.`level` FROM `stats` AS `s` LEFT JOIN `users` AS `u` ON `u`.`id` = `s`.`id` WHERE `s`.`dnow` = "' . $lab['id'] . '" AND `s`.`id` != "' . $u->info['id'] . '" LIMIT 5'); $sp = mysql_query(
'SELECT `s`.`x`,`s`.`y`,`u`.`id`,`u`.`login`,`u`.`level` FROM `stats` AS `s` LEFT JOIN `users` AS `u` ON `u`.`id` = `s`.`id` WHERE `s`.`dnow` = "' . $lab['id'] . '" AND `s`.`id` != "' . $u->info['id'] . '" LIMIT 5'
);
$pi = 1; $pi = 1;
while ($pl = mysql_fetch_array($sp)) { while ($pl = mysql_fetch_array($sp)) {
$objs[$pl['x']][$pl['y']] = [2 => '<div title="Игрок: ' . $pl['login'] . '" class="ddp1ee' . $pi . '"></div>']; //Персонаж 1 $objs[$pl['x']][$pl['y']] = [2 => '<div title="Игрок: ' . $pl['login'] . '" class="ddp1ee' . $pi . '"></div>']; //Персонаж 1
@ -556,169 +613,171 @@ $mapsee = '<div style="width:165px;height:165px;padding:10px;">' . $mapsee . '</
//Эффекты на персонаже //Эффекты на персонаже
if (isset($varos['trap1']['vals']) && $varos['trap1']['vals'] > 0) { if (isset($varos['trap1']['vals']) && $varos['trap1']['vals'] > 0) {
$effed .= '<div><img width=40 height=25 src=//img.new-combats.tech/i/items/event_timer_trap.gif> - Время перехода +3 секунды (Осталось: ' . $u->timeOut($varos['trap1']['time'] - time()) . ')</div>'; $effed .= '<div><img width=40 height=25 src=//img.new-combats.tech/i/items/event_timer_trap.gif> - Время перехода +3 секунды (Осталось: ' . Conversion::secondsToTimeout(
$varos['trap1']['time'] - time()
) . ')</div>';
} }
unset($varos); unset($varos);
?> ?>
<style> <style>
.ddp0 { .ddp0 {
display: inline-block; display: inline-block;
width: 15px; width: 15px;
height: 15px; height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/o.gif"); background-image: url("//img.new-combats.tech/drgn/bg/o.gif");
}
.ddp1 {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/m.gif");
}
.ddpStart {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/os.gif");
}
.ddpExit {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/of.gif");
}
.ddp1s {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/s.gif");
}
.ddp1m {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/r.gif");
}
.ddp1h {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/h.gif");
}
.ddp1l {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/b.gif");
}
.ddp1p {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/p.gif");
}
.ddp1me {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/u.gif");
}
.ddp1ee1 {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/e1.gif");
}
.ddp1ee2 {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/e2.gif");
}
.ddp1ee3 {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/e3.gif");
}
.ddp1ee4 {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/e4.gif");
}
.ddp1ee5 {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/e5.gif");
}
</style>
<script type="text/javascript" src="js/jquery.js"></script>
<script>
$('body').keydown(function (event) {
if (event.which == 38 || event.which == 87) {
location.href = "main.php?goto=2";
} else if (event.which == 37 || event.which == 65) {
location.href = "main.php?goto=1";
} else if (event.which == 39 || event.which == 68) {
location.href = "main.php?goto=3";
} else if (event.which == 40 || event.which == 83) {
location.href = "main.php?goto=4";
} }
});
</script> .ddp1 {
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#E2E0E0"> display: inline-block;
<tbody> width: 15px;
<tr> height: 15px;
<td></td> background-image: url("//img.new-combats.tech/drgn/bg/m.gif");
<td width="307"></td> }
<td width="300"></td>
</tr> .ddpStart {
<tr> display: inline-block;
<td height="409" valign="top"> width: 15px;
<table width="100%" border="0" cellspacing="0" cellpadding="0"> height: 15px;
<tbody> background-image: url("//img.new-combats.tech/drgn/bg/os.gif");
<tr> }
<td width="5">&nbsp;</td>
<td width="99%"> .ddpExit {
<div><?= $u->error ?></div> display: inline-block;
<div>Карта: <?= $lab['id'] ?></div> width: 15px;
<script language="javascript" type="text/javascript"> height: 15px;
function confirmSubmit(mes) { background-image: url("//img.new-combats.tech/drgn/bg/of.gif");
var agree = confirm(mes); }
if (agree)
return true; .ddp1s {
else display: inline-block;
return false; width: 15px;
} height: 15px;
</script> background-image: url("//img.new-combats.tech/drgn/bg/s.gif");
<br/> }
<form method="post">
<div> .ddp1m {
<?= $d->usersDng($lab['id']); ?> display: inline-block;
</div> width: 15px;
<input type="submit" name="exit" value="Выйти и потерять все найденное!" height: 15px;
onclick="return confirmSubmit('Действительно хотите Выйти и потерять все найденное?')"/> background-image: url("//img.new-combats.tech/drgn/bg/r.gif");
</form> }
<br/>
<?php if ($effed != '') { .ddp1h {
echo $effed; display: inline-block;
} ?> width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/h.gif");
}
.ddp1l {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/b.gif");
}
.ddp1p {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/p.gif");
}
.ddp1me {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/u.gif");
}
.ddp1ee1 {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/e1.gif");
}
.ddp1ee2 {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/e2.gif");
}
.ddp1ee3 {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/e3.gif");
}
.ddp1ee4 {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/e4.gif");
}
.ddp1ee5 {
display: inline-block;
width: 15px;
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/e5.gif");
}
</style>
<script type="text/javascript" src="js/jquery.js"></script>
<script>
$('body').keydown(function (event) {
if (event.which == 38 || event.which == 87) {
location.href = "main.php?goto=2";
} else if (event.which == 37 || event.which == 65) {
location.href = "main.php?goto=1";
} else if (event.which == 39 || event.which == 68) {
location.href = "main.php?goto=3";
} else if (event.which == 40 || event.which == 83) {
location.href = "main.php?goto=4";
}
});
</script>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#E2E0E0">
<tbody>
<tr>
<td></td>
<td width="307"></td>
<td width="300"></td>
</tr>
<tr>
<td height="409" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="5">&nbsp;</td>
<td width="99%">
<div><?= $u->error ?></div>
<div>Карта: <?= $lab['id'] ?></div>
<script language="javascript" type="text/javascript">
function confirmSubmit(mes) {
var agree = confirm(mes);
if (agree)
return true;
else
return false;
}
</script>
<br/> <br/>
<?php <form method="post">
<div>
<?= $d->usersDng($lab['id']); ?>
</div>
<input type="submit" name="exit" value="Выйти и потерять все найденное!"
onclick="return confirmSubmit('Действительно хотите Выйти и потерять все найденное?')"/>
</form>
<br/>
<?php if ($effed != '') {
echo $effed;
} ?>
<br/>
<?php
if ($dies > 0) { if ($dies > 0) {
echo '<b>Кол-во смертей: ' . $dies . '/3</b><br>'; echo '<b>Кол-во смертей: ' . $dies . '/3</b><br>';
} }
@ -934,9 +993,7 @@ unset($varos);
<td width="67" height="74"></td> <td width="67" height="74"></td>
<td width="165" height="165"> <td width="165" height="165">
<div> <div>
<?php <?= $mapsee; ?>
echo $mapsee;
?>
</div> </div>
</td> </td>
<td width="64"></td> <td width="64"></td>
@ -957,5 +1014,3 @@ unset($varos);
</tr> </tr>
</tbody> </tbody>
</table> </table>
<?php
?>

File diff suppressed because it is too large Load Diff

View File

@ -656,7 +656,9 @@ if ($roomSection == 1) {
if (!isset($hgo1['id'])) { ?> if (!isset($hgo1['id'])) { ?>
<button class="btn btn-success" onclick="location.href='/main.php?rz=1&add_quest=1&city_quest=capitalcity'">Пещера Тысячи Проклятий</button> <button class="btn btn-success" onclick="location.href='/main.php?rz=1&add_quest=1&city_quest=capitalcity'">Пещера Тысячи Проклятий</button>
<?php } else { ?> <?php } else { ?>
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= Conversion::secondsToTimeout(60 * 60 * 24 + $hgo1['time'] - time()) ?> (Пещера Тысячи Проклятий)' <input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= Conversion::secondsToTimeout(
60 * 60 * 24 + $hgo1['time'] - time()
) ?> (Пещера Тысячи Проклятий)'
onclick='location="main.php?rz=1&add_quest=1&city_quest=capitalcity"'/> onclick='location="main.php?rz=1&add_quest=1&city_quest=capitalcity"'/>
<?php } <?php }
if (!isset($hgo2['id'])) { ?> if (!isset($hgo2['id'])) { ?>
@ -1078,7 +1080,7 @@ if ($roomSection == 1) {
} }
} }
} else { } else {
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . $u->timeOut( echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(
60 * 60 * 2 - time() + $dungeon_timeout['time'] 60 * 60 * 2 - time() + $dungeon_timeout['time']
) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>'; ) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>';

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,369 +1,352 @@
<?php <?php
if(!defined('GAME'))
{ use Helper\Conversion;
die();
if (!defined('GAME')) {
die();
} }
if($u->room['file']=='enternekro') if ($u->room['file'] == 'enternekro') {
{
$dun = 11; //для новичков 2-7 лвл $dun = 11; //для новичков 2-7 лвл
$er = ''; $er = '';
$dzs = ''; $dzs = '';
$g111 = 1; $g111 = 1;
$g11 = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "psh1" AND `time`>'.(time()-7200).' LIMIT 1',1); $g11 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "psh1" AND `time`>' . (time() - 7200) . ' LIMIT 1', 1);
$moder = mysql_fetch_array(mysql_query('SELECT * FROM `moder` WHERE `align` = "'.$u->info['align'].'" LIMIT 1')); $moder = mysql_fetch_array(mysql_query('SELECT * FROM `moder` WHERE `align` = "' . $u->info['align'] . '" LIMIT 1'));
if($u->info['dn']>0) if ($u->info['dn'] > 0) {
{ $zv = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `id`="' . $u->info['dn'] . '" AND `delete` = "0" LIMIT 1'));
$zv = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `id`="'.$u->info['dn'].'" AND `delete` = "0" LIMIT 1')); if (!isset($zv['id'])) {
if(!isset($zv['id'])) mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
{ $u->info['dn'] = 0;
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); }
$u->info['dn'] = 0; }
}
}
if(isset($g11['id'])) if (isset($g11['id'])) {
{ $g111 = 0;
$g111 = 0; if (isset($_GET['start'])) {
if(isset($_GET['start'])) $re = 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(7200 - time() + $g11['time']);
{ }
$re = 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']); }
} if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $g111 == 1) {
} //начинаем поход
if(isset($_GET['start']) && $zv['uid']==$u->info['id'] && $g111 == 1) //начинаем поход
{ $ig = 1;
//начинаем поход if ($ig > 0) {
//начинаем поход //перемещаем игроков в пещеру
$ig = 1; //$u->addAction(time(),'psh1','');
if($ig>0) $ins = mysql_query(
{ 'INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
//перемещаем игроков в пещеру VALUES ("' . $zv['city'] . '","' . $zv['uid'] . '","' . $dun . '","Бездна","' . time() . '")'
//$u->addAction(time(),'psh1',''); );
$ins = mysql_query('INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`) if ($ins) {
VALUES ("'.$zv['city'].'","'.$zv['uid'].'","'.$dun.'","Бездна","'.time().'")'); $zid = mysql_insert_id();
if($ins) //обновляем пользователей
{ $su = mysql_query(
$zid = mysql_insert_id(); 'SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $zv['id'] . '" LIMIT ' . ($zv['team_max'] + 1) . ''
//обновляем пользователей );
$su = mysql_query('SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="'.$zv['id'].'" LIMIT '.($zv['team_max']+1).''); $ids = '';
$ids = ''; while ($pu = mysql_fetch_array($su)) {
while($pu = mysql_fetch_array($su)) $ids .= ' `id` = "' . $pu['id'] . '" OR';
{ $u->addAction(time(), 'psh1', '', $pu['id']);
$ids .= ' `id` = "'.$pu['id'].'" OR'; }
$u->addAction(time(),'psh1','',$pu['id']); $ids = rtrim($ids, 'OR');
} $upd1 = mysql_query('UPDATE `stats` SET `x`="1",`y`="-6",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . '');
$ids = rtrim($ids,'OR'); if ($upd1) {
$upd1 = mysql_query('UPDATE `stats` SET `x`="1",`y`="-6",`dn` = "0",`dnow` = "'.$zid.'" WHERE '.$ids.' LIMIT '.($zv['team_max']+1).''); $upd2 = mysql_query('UPDATE `users` SET `room` = "297" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . '');
if($upd1) //Добавляем ботов и обьекты в пещеру $zid с for_dn = $dun
{ //Добавляем ботов
$upd2 = mysql_query('UPDATE `users` SET `room` = "297" WHERE '.$ids.' LIMIT '.($zv['team_max']+1).''); $vls = '';
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dun $sp = mysql_query('SELECT * FROM `dungeon_bots` WHERE `for_dn` = "' . $dun . '"');
//Добавляем ботов while ($pl = mysql_fetch_array($sp)) {
$vls = ''; $vls .= '("' . $zid . '","' . $pl['id_bot'] . '","' . $pl['colvo'] . '","' . $pl['items'] . '","' . $pl['x'] . '","' . $pl['y'] . '","' . $pl['dialog'] . '","' . $pl['items'] . '"),';
$sp = mysql_query('SELECT * FROM `dungeon_bots` WHERE `for_dn` = "'.$dun.'"'); }
while($pl = mysql_fetch_array($sp)) $vls = rtrim($vls, ',');
{ $ins1 = mysql_query('INSERT INTO `dungeon_bots` (`dn`,`id_bot`,`colvo`,`items`,`x`,`y`,`dialog`,`atack`) VALUES ' . $vls . '');
$vls .= '("'.$zid.'","'.$pl['id_bot'].'","'.$pl['colvo'].'","'.$pl['items'].'","'.$pl['x'].'","'.$pl['y'].'","'.$pl['dialog'].'","'.$pl['items'].'"),'; //Добавляем обьекты
} $vls = '';
$vls = rtrim($vls,','); $sp = mysql_query('SELECT * FROM `dungeon_obj` WHERE `for_dn` = "' . $dun . '"');
$ins1 = mysql_query('INSERT INTO `dungeon_bots` (`dn`,`id_bot`,`colvo`,`items`,`x`,`y`,`dialog`,`atack`) VALUES '.$vls.''); while ($pl = mysql_fetch_array($sp)) {
//Добавляем обьекты $vls .= '("' . $zid . '","' . $pl['name'] . '","' . $pl['img'] . '","' . $pl['x'] . '","' . $pl['y'] . '","' . $pl['action'] . '","' . $pl['type'] . '","' . $pl['w'] . '","' . $pl['h'] . '","' . $pl['s'] . '","' . $pl['s2'] . '","' . $pl['os1'] . '","' . $pl['os2'] . '","' . $pl['os3'] . '","' . $pl['os4'] . '","' . $pl['type2'] . '","' . $pl['top'] . '","' . $pl['left'] . '","' . $pl['date'] . '"),';
$vls = ''; }
$sp = mysql_query('SELECT * FROM `dungeon_obj` WHERE `for_dn` = "'.$dun.'"'); $vls = rtrim($vls, ',');
while($pl = mysql_fetch_array($sp)) if ($vls != '') {
{ $ins2 = mysql_query(
$vls .= '("'.$zid.'","'.$pl['name'].'","'.$pl['img'].'","'.$pl['x'].'","'.$pl['y'].'","'.$pl['action'].'","'.$pl['type'].'","'.$pl['w'].'","'.$pl['h'].'","'.$pl['s'].'","'.$pl['s2'].'","'.$pl['os1'].'","'.$pl['os2'].'","'.$pl['os3'].'","'.$pl['os4'].'","'.$pl['type2'].'","'.$pl['top'].'","'.$pl['left'].'","'.$pl['date'].'"),'; 'INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES ' . $vls . ''
} );
$vls = rtrim($vls,','); } else {
if($vls!='') $ins2 = true;
{ }
$ins2 = mysql_query('INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES '.$vls.''); if ($upd2 && $ins1 && $ins2) {
}else{ mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
$ins2 = true; die('<script>location="main.php?rnd=' . $code . '";</script>');
} } else {
if($upd2 && $ins1 && $ins2) $re = 'Ошибка перехода в подземелье...';
{ }
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv['id'].'" LIMIT 1'); } else {
die('<script>location="main.php?rnd='.$code.'";</script>'); $re = 'Ошибка перехода в подземелье...';
}else{ }
$re = 'Ошибка перехода в подземелье...'; } else {
} $re = 'Ошибка перехода в подземелье...';
}else{ }
$re = 'Ошибка перехода в подземелье...'; }
} } elseif (isset($_POST['go'], $_POST['goid']) && $g111 == 1) {
}else{ if (!isset($zv['id'])) {
$re = 'Ошибка перехода в подземелье...'; $zv = mysql_fetch_array(
} mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `id`="' . mysql_real_escape_string($_POST['goid']) . '" AND `delete` = "0" LIMIT 1')
} );
}elseif(isset($_POST['go'],$_POST['goid']) && $g111==1) if (isset($zv['id'])) {
{ if ($u->info['level'] > 5) {
if(!isset($zv['id'])) $row = 0;
{ if (5 > $row) {
$zv = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "'.$u->info['city'].'" AND `id`="'.mysql_real_escape_string($_POST['goid']).'" AND `delete` = "0" LIMIT 1')); $upd = mysql_query('UPDATE `stats` SET `dn` = "' . $zv['id'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
if(isset($zv['id'])) if (!$upd) {
{ $re = 'Не удалось вступить в эту группу';
if($u->info['level']>5) unset($zv);
{ } else {
$row = 0; $u->info['dn'] = $zv['id'];
if(5>$row) }
{ } else {
$upd = mysql_query('UPDATE `stats` SET `dn` = "'.$zv['id'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); $re = 'В группе нет места';
if(!$upd) unset($zv);
{ }
$re = 'Не удалось вступить в эту группу'; } else {
unset($zv); $re = 'Вы не подходите по уровню';
}else{ unset($zv);
$u->info['dn'] = $zv['id']; }
} } else {
}else{ $re = 'Заявка не найдена';
$re = 'В группе нет места'; }
unset($zv); } else {
} $re = 'Вы уже находитесь в группе';
}else{ }
$re = 'Вы не подходите по уровню'; } elseif (isset($_POST['leave']) && isset($zv['id']) && $g111 == 1) {
unset($zv); if ($zv['uid'] == $u->info['id']) {
} //ставим в группу нового руководителя
}else{ $ld = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `dn` = "' . $zv['id'] . '" AND `id` != "' . $u->info['id'] . '" LIMIT 1'));
$re = 'Заявка не найдена'; if (isset($ld['id'])) {
} $zv['uid'] = $ld['id'];
}else{ mysql_query('UPDATE `dungeon_zv` SET `uid` = "' . $zv['uid'] . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
$re = 'Вы уже находитесь в группе'; mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
} $u->info['dn'] = 0;
}elseif(isset($_POST['leave']) && isset($zv['id']) && $g111 == 1) unset($zv);
{ } else {
if($zv['uid']==$u->info['id']) //удаляем группу целиком
{ mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
//ставим в группу нового руководителя mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
$ld = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `dn` = "'.$zv['id'].'" AND `id` != "'.$u->info['id'].'" LIMIT 1')); $u->info['dn'] = 0;
if(isset($ld['id'])) unset($zv);
{ }
$zv['uid'] = $ld['id']; } else {
mysql_query('UPDATE `dungeon_zv` SET `uid` = "'.$zv['uid'].'" WHERE `id` = "'.$zv['id'].'" LIMIT 1'); //просто выходим с группы
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
$u->info['dn'] = 0; $u->info['dn'] = 0;
unset($zv); unset($zv);
}else{ }
//удаляем группу целиком } elseif (isset($_POST['add']) && $u->info['level'] > 1 && $g111 == 1) {
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv['id'].'" LIMIT 1'); if ($u->info['dn'] == 0) {
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); $lmn = 6;
$u->info['dn'] = 0; $lmx = 21;
unset($zv); $tmx = 5;
}
}else{
//просто выходим с группы
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$u->info['dn'] = 0;
unset($zv);
}
}elseif(isset($_POST['add']) && $u->info['level']>1 && $g111 == 1)
{
if($u->info['dn']==0)
{
$lmn = 6;
$lmx = 21;
$tmx = 5;
//только своего уровня //только своего уровня
$lmn = $u->info['level']; $lmn = $u->info['level'];
$ins = mysql_query('INSERT INTO `dungeon_zv` $ins = mysql_query(
'INSERT INTO `dungeon_zv`
(`city`,`time`,`uid`,`dun`,`pass`,`com`,`lvlmin`,`lvlmax`,`team_max`) VALUES (`city`,`time`,`uid`,`dun`,`pass`,`com`,`lvlmin`,`lvlmax`,`team_max`) VALUES
("'.$u->info['city'].'","'.time().'","'.$u->info['id'].'","'.$dun.'", ("' . $u->info['city'] . '","' . time() . '","' . $u->info['id'] . '","' . $dun . '",
"'.mysql_real_escape_string($_POST['pass']).'", "' . mysql_real_escape_string($_POST['pass']) . '",
"'.mysql_real_escape_string($_POST['text']).'", "' . mysql_real_escape_string($_POST['text']) . '",
"'.$lmn.'", "' . $lmn . '",
"'.$lmx.'", "' . $lmx . '",
"'.$tmx.'")'); "' . $tmx . '")'
if($ins) );
{ if ($ins) {
$u->info['dn'] = mysql_insert_id(); $u->info['dn'] = mysql_insert_id();
$zv['id'] = $u->info['dn']; $zv['id'] = $u->info['dn'];
$zv['uid'] = $u->info['id']; $zv['uid'] = $u->info['id'];
mysql_query('UPDATE `stats` SET `dn` = "'.$u->info['dn'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); mysql_query('UPDATE `stats` SET `dn` = "' . $u->info['dn'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
$re = 'Вы успешно создали группу'; $re = 'Вы успешно создали группу';
}else{ } else {
$re = 'Не удалось создать группу'; $re = 'Не удалось создать группу';
} }
}else{ } else {
$re = 'Вы уже находитесь в группе'; $re = 'Вы уже находитесь в группе';
} }
} }
//Генерируем список групп //Генерируем список групп
$sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "'.$u->info['city'].'" AND `delete` = "0" AND `time` > "'.(time()-60*60*2).'"'); $sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `delete` = "0" AND `time` > "' . (time() - 60 * 60 * 2) . '"');
while($pl = mysql_fetch_array($sp)) while ($pl = mysql_fetch_array($sp)) {
{ $dzs .= '<div style="padding:2px;">';
$dzs .= '<div style="padding:2px;">'; if ($u->info['dn'] == 0) {
if($u->info['dn']==0) $dzs .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
{ }
$dzs .= '<input type="radio" name="goid" id="goid" value="'.$pl['id'].'" />'; $dzs .= '<span class="date">' . date('H:i', $pl['time']) . '</span> ';
}
$dzs .= '<span class="date">'.date('H:i',$pl['time']).'</span> ';
$pus = ''; //группа $pus = ''; //группа
$su = mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="'.$pl['id'].'" LIMIT '.($pl['team_max']+1).''); $su = mysql_query(
while($pu = mysql_fetch_array($su)) 'SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . ''
{ );
$pus .= '<b>'.$pu['login'].'</b> ['.$pu['level'].']<a href="info/'.$pu['id'].'" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" title="Инф. о '.$pu['login'].'"></a>'; while ($pu = mysql_fetch_array($su)) {
$pus .= ', '; $pus .= '<b>' . $pu['login'] . '</b> [' . $pu['level'] . ']<a href="info/' . $pu['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" title="Инф. о ' . $pu['login'] . '"></a>';
} $pus .= ', ';
$pus = trim($pus,', '); }
$pus = trim($pus, ', ');
$dzs .= $pus; $dzs .= $pus;
if($pl['com']!='') if ($pl['com'] != '') {
{ $dl = '';
$dl = ''; if (($moder['boi'] == 1 || $u->info['admin'] > 0) && $pl['dcom'] == 0) {
if(($moder['boi']==1 || $u->info['admin']>0) && $pl['dcom']==0) $dl .= ' (<a href="?delcom=' . $pl['id'] . '&key=' . $u->info['nextAct'] . '&rnd=' . $code . '">удалить комментарий</a>)';
{ if (isset($_GET['delcom']) && $_GET['delcom'] == $pl['id'] && $u->newAct($_GET['key']) == true) {
$dl .= ' (<a href="?delcom='.$pl['id'].'&key='.$u->info['nextAct'].'&rnd='.$code.'">удалить комментарий</a>)'; mysql_query('UPDATE `dungeon_zv` SET `dcom` = "' . $u->info['id'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1');
if(isset($_GET['delcom']) && $_GET['delcom']==$pl['id'] && $u->newAct($_GET['key'])==true) $pl['dcom'] = $u->info['id'];
{ }
mysql_query('UPDATE `dungeon_zv` SET `dcom` = "'.$u->info['id'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1'); }
$pl['dcom'] = $u->info['id'];
}
}
$pl['com'] = htmlspecialchars($pl['com'],NULL); $pl['com'] = htmlspecialchars($pl['com'], null);
if($pl['dcom']>0) if ($pl['dcom'] > 0) {
{ $dl = ' <font color="grey"><i>комментарий удален модератором</i></font>';
$dl = ' <font color="grey"><i>комментарий удален модератором</i></font>'; }
}
if($pl['dcom']>0) if ($pl['dcom'] > 0) {
{ if ($moder['boi'] == 1 || $u->info['admin'] > 0) {
if($moder['boi']==1 || $u->info['admin']>0) $pl['com'] = '<font color="red">' . $pl['com'] . '</font>';
{ } else {
$pl['com'] = '<font color="red">'.$pl['com'].'</font>'; $pl['com'] = '';
}else{ }
$pl['com'] = ''; }
}
}
$dzs .= '<small> | '.$pl['com'].''.$dl.'</small>'; $dzs .= '<small> | ' . $pl['com'] . '' . $dl . '</small>';
} }
$dzs .= '</div>'; $dzs .= '</div>';
} }
?> ?>
<style> <style>
body body {
{ background-color: #E2E2E2;
background-color:#E2E2E2; background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg); background-repeat: no-repeat;
background-repeat:no-repeat;background-position:top right; background-position: top right;
} }
</style> </style>
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div style="padding-left:0px;" align="center">
<h3><?= $u->room['name']; ?></h3>
</div></td>
<td width="200"><div align="right">
<table cellspacing="0" cellpadding="0">
<tr> <tr>
<td width="100%">&nbsp;</td> <td>
<td><table border="0" cellpadding="0" cellspacing="0"> <div style="padding-left:0px;" align="center">
<tr align="right" valign="top"> <h3><?= $u->room['name']; ?></h3>
<td><!-- --> </div>
<?= $goLis; ?> </td>
<!-- --> <td width="200">
<table border="0" cellspacing="0" cellpadding="0"> <div align="right">
<tr> <table cellspacing="0" cellpadding="0">
<td nowrap="nowrap"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE"> <tr>
<tr> <td width="100%">&nbsp;</td>
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7" /></td> <td>
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.17&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.17',1); ?>">Вход в подземелье</a></td> <table border="0" cellpadding="0" cellspacing="0">
</tr> <tr align="right" valign="top">
</table></td> <td><!-- -->
</tr> <?= $goLis; ?>
</table></td> <!-- -->
</tr> <table border="0" cellspacing="0" cellpadding="0">
</table></td> <tr>
<td nowrap="nowrap">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
<tr>
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td>
<td bgcolor="#D3D3D3" nowrap="nowrap">
<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.17&rnd=<?= $code; ?>';" title="<?php thisInfRm(
'1.180.0.17', 1
); ?>">Вход в подземелье</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr> </tr>
</table> </table>
</div></td> <?php
</tr> if ($re != '') {
</table> echo '<font color="red"><b>' . $re . '</b></font><br>';
<?php }
if($re!='')
{
echo '<font color="red"><b>'.$re.'</b></font><br>';
}
//отображаем //отображаем
if($dzs=='') if ($dzs == '') {
{ $dzs = '';
$dzs = ''; } else {
}else{ if (!isset($zv['id'])) {
if(!isset($zv['id'])) if ($g111 == 1) {
{ $pr = '<input name="go" type="submit" value="Вступить в группу">';
if($g111==1) }
{ $dzs = '<form action="main.php?rnd=' . $code . '" method="post">' . $pr . '<br>' . $dzs . '' . $pr . '</form>';
$pr = '<input name="go" type="submit" value="Вступить в группу">'; }
} $dzs .= '<hr>';
$dzs = '<form action="main.php?rnd='.$code.'" method="post">'.$pr.'<br>'.$dzs.''.$pr.'</form>'; }
}
$dzs .= '<hr>';
}
echo $dzs; echo $dzs;
if($g111 == 1) if ($g111 == 1) {
{ if ($u->info['dn'] == 0) {
if($u->info['dn']==0) ?>
{ <table width="350" border="0" cellspacing="0" cellpadding="0">
?> <tr>
<table width="350" border="0" cellspacing="0" cellpadding="0"> <td valign="top">
<tr> <form id="from" name="from" action="main.php?pz1=<?= $code; ?>" method="post">
<td valign="top"> <fieldset style='padding-left: 5; width=50%'>
<form id="from" name="from" action="main.php?pz1=<?= $code; ?>" method="post"> <legend><b> Группа </b></legend>
<fieldset style='padding-left: 5; width=50%'> Комментарий
<legend><b> Группа </b> </legend> <input type="text" name="text" maxlength="40" size="40"/>
Комментарий <br/>
<input type="text" name="text" maxlength="40" size="40" /> Пароль
<br /> <input type="password" name="pass" maxlength="25" size="25"/>
Пароль <br/>
<input type="password" name="pass" maxlength="25" size="25" /> <input type="submit" name="add" value="Создать группу"/>
<br /> &nbsp;<br/>
<input type="submit" name="add" value="Создать группу" /> </fieldset>
&nbsp;<br /> </form>
</fieldset> </td>
</form> </tr>
</td> </table>
</tr> <?php
</table> } else {
<?php $psh_start = '';
}else{ if (isset($zv['id'])) {
$psh_start = ''; if ($zv['uid'] == $u->info['id']) {
if(isset($zv['id'])) $psh_start = '<INPUT type=\'button\' name=\'start\' value=\'Начать\' onClick="top.frames[\'main\'].location = \'main.php?start=1&rnd=' . $code . '\'"> &nbsp;';
{ }
if($zv['uid']==$u->info['id'])
{
$psh_start = '<INPUT type=\'button\' name=\'start\' value=\'Начать\' onClick="top.frames[\'main\'].location = \'main.php?start=1&rnd='.$code.'\'"> &nbsp;';
}
echo '<br><FORM id="REQUEST" method="post" style="width:210px;" action="main.php?rnd='.$code.'"> echo '<br><FORM id="REQUEST" method="post" style="width:210px;" action="main.php?rnd=' . $code . '">
<FIELDSET style=\'padding-left: 5; width=50%\'> <FIELDSET style=\'padding-left: 5; width=50%\'>
<LEGEND><B> Группа </B> </LEGEND> <LEGEND><B> Группа </B> </LEGEND>
'.$psh_start.' ' . $psh_start . '
<INPUT type=\'submit\' name=\'leave\' value=\'Покинуть группу\'> <INPUT type=\'submit\' name=\'leave\' value=\'Покинуть группу\'>
</FIELDSET> </FIELDSET>
</FORM>'; </FORM>';
} }
} }
?> ?>
<?php <?php
}else{ } else {
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']).'<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>'; echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(
7200 - time() + $g11['time']
) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>';
}
} }
}
?>

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,7 @@
<?php <?php
use Helper\Conversion;
if (!defined('GAME')) { if (!defined('GAME')) {
die(); die();
} }
@ -47,12 +50,12 @@ if ($u->info['dn'] > 0) { // Если ты пошел гулять, так ид
} }
$dungeon_timeout = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "psh' . $dungeon['id'] . '" AND `time` > ' . (time() - 60 * 60 * 2) . ' LIMIT 1', 1); // Проверка - последний визит? $dungeon_timeout = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "psh' . $dungeon['id'] . '" AND `time` > ' . (time() - 60 * 60 * 2) . ' LIMIT 1', 1); // Проверка - последний визит?
// if($u->info['admin']>0) unset($dungeon_timeout); // $dungeon_timeout - задержка на посещение пещеры.
if (isset($dungeon_timeout['id'])) // Кто-то передумал и не пойдет в пещеру, так-как уже там был. if (isset($dungeon_timeout['id'])) // Кто-то передумал и не пойдет в пещеру, так-как уже там был.
{ {
$dungeonGo = 0; $dungeonGo = 0;
if (isset($_GET['start'])) { if (isset($_GET['start'])) {
$re = 'До следующего похода осталось еще: ' . $u->timeOut(60 * 60 * 2 - time() + $dungeon_timeout['time']); $re = 'До следующего похода осталось еще: ' . Conversion::secondsToTimeout(60 * 60 * 2 - time() + $dungeon_timeout['time']);
} }
} }
@ -63,13 +66,17 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
if ($ig > 0) { if ($ig > 0) {
//перемещаем игроков в пещеру //перемещаем игроков в пещеру
//$u->addAction(time(),'psh'.$dun,''); //$u->addAction(time(),'psh'.$dun,'');
$ins = mysql_query('INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`) $ins = mysql_query(
VALUES ("' . $zv['city'] . '","' . $zv['uid'] . '","' . $dungeon['id'] . '","Бездна","' . time() . '")'); 'INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
VALUES ("' . $zv['city'] . '","' . $zv['uid'] . '","' . $dungeon['id'] . '","Бездна","' . time() . '")'
);
if ($ins) { if ($ins) {
$zid = mysql_insert_id(); $zid = mysql_insert_id();
mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1'); mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
//обновляем пользователей //обновляем пользователей
$su = mysql_query('SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $zv['id'] . '" LIMIT ' . ($zv['team_max'] + 1) . ''); $su = mysql_query(
'SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $zv['id'] . '" LIMIT ' . ($zv['team_max'] + 1) . ''
);
$ids = ''; $ids = '';
$map_locs = []; $map_locs = [];
@ -100,17 +107,21 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
while ($j < $xr2[1]) { while ($j < $xr2[1]) {
$cord = $map_locs[rand(0, count($map_locs) - 1)]; $cord = $map_locs[rand(0, count($map_locs) - 1)];
if ($cord[0] != 0 || $cord[1] != 0) { if ($cord[0] != 0 || $cord[1] != 0) {
mysql_query('INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`,`onlyfor`,`quest`) VALUES ( mysql_query(
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`,`onlyfor`,`quest`) VALUES (
"' . $zid . '","' . $u->info['id'] . '","' . $xr2[0] . '","' . time() . '","' . $cord[0] . '","' . $cord[1] . '","' . $u->info['id'] . '","' . $pl['id'] . '" "' . $zid . '","' . $u->info['id'] . '","' . $xr2[0] . '","' . time() . '","' . $cord[0] . '","' . $cord[1] . '","' . $u->info['id'] . '","' . $pl['id'] . '"
)'); )'
);
} }
$j++; $j++;
} }
} else { } else {
//Предмет находится в конкретном месте //Предмет находится в конкретном месте
mysql_query('INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`,`onlyfor`,`quest`) VALUES ( mysql_query(
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`,`onlyfor`,`quest`) VALUES (
"' . $zid . '","' . $u->info['id'] . '","' . $xr2[0] . '","' . time() . '","' . $xr2[2] . '","' . $xr2[3] . '","' . $u->info['id'] . '","' . $pl['id'] . '" "' . $zid . '","' . $u->info['id'] . '","' . $xr2[0] . '","' . time() . '","' . $xr2[2] . '","' . $xr2[3] . '","' . $u->info['id'] . '","' . $pl['id'] . '"
)'); )'
);
} }
// //
} }
@ -121,7 +132,9 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
// //
} }
$ids = rtrim($ids, 'OR'); $ids = rtrim($ids, 'OR');
$upd1 = mysql_query('UPDATE `stats` SET `s`="1",`res_s`="1",`x`="0",`y`="0",`res_x`="0",`res_y`="0",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . ''); $upd1 = mysql_query(
'UPDATE `stats` SET `s`="1",`res_s`="1",`x`="0",`y`="0",`res_x`="0",`res_y`="0",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . ''
);
if ($upd1) { if ($upd1) {
$upd2 = mysql_query('UPDATE `users` SET `room` = "374" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . ''); $upd2 = mysql_query('UPDATE `users` SET `room` = "374" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . '');
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dungeon['id'] //Добавляем ботов и обьекты в пещеру $zid с for_dn = $dungeon['id']
@ -141,7 +154,9 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
} }
$vls = rtrim($vls, ','); $vls = rtrim($vls, ',');
if ($vls != '') { if ($vls != '') {
$ins2 = mysql_query('INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES ' . $vls . ''); $ins2 = mysql_query(
'INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES ' . $vls . ''
);
} else { } else {
$ins2 = true; $ins2 = true;
} }
@ -159,7 +174,9 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
} }
} elseif (isset($_POST['go'], $_POST['goid']) && $dungeonGo == 1) { } elseif (isset($_POST['go'], $_POST['goid']) && $dungeonGo == 1) {
if (!isset($zv['id'])) { if (!isset($zv['id'])) {
$zv = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `id`="' . mysql_real_escape_string($_POST['goid']) . '" AND `delete` = "0" LIMIT 1')); $zv = mysql_fetch_array(
mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `id`="' . mysql_real_escape_string($_POST['goid']) . '" AND `delete` = "0" LIMIT 1')
);
if (isset($zv['id']) && $u->info['dn'] == 0) { if (isset($zv['id']) && $u->info['dn'] == 0) {
if ($zv['pass'] != '' && $_POST['pass_com'] != $zv['pass']) { if ($zv['pass'] != '' && $_POST['pass_com'] != $zv['pass']) {
$re = 'Вы ввели неправильный пароль'; $re = 'Вы ввели неправильный пароль';
@ -212,14 +229,16 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
} }
} elseif (isset($_POST['add']) && $u->info['level'] > 1 && $dungeonGo == 1) { } elseif (isset($_POST['add']) && $u->info['level'] > 1 && $dungeonGo == 1) {
if ($u->info['dn'] == 0) { if ($u->info['dn'] == 0) {
$ins = mysql_query('INSERT INTO `dungeon_zv` $ins = mysql_query(
'INSERT INTO `dungeon_zv`
(`city`,`time`,`uid`,`dun`,`pass`,`com`,`lvlmin`,`lvlmax`,`team_max`) VALUES (`city`,`time`,`uid`,`dun`,`pass`,`com`,`lvlmin`,`lvlmax`,`team_max`) VALUES
("' . $u->info['city'] . '","' . time() . '","' . $u->info['id'] . '","' . $dungeon['id'] . '", ("' . $u->info['city'] . '","' . time() . '","' . $u->info['id'] . '","' . $dungeon['id'] . '",
"' . mysql_real_escape_string($_POST['pass']) . '", "' . mysql_real_escape_string($_POST['pass']) . '",
"' . mysql_real_escape_string($_POST['text']) . '", "' . mysql_real_escape_string($_POST['text']) . '",
"8", "8",
"21", "21",
"5")'); "5")'
);
if ($ins) { if ($ins) {
$u->info['dn'] = mysql_insert_id(); $u->info['dn'] = mysql_insert_id();
$zv['id'] = $u->info['dn']; $zv['id'] = $u->info['dn'];
@ -238,11 +257,15 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
$sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `dun` = "' . $dungeon['id'] . '" AND `delete` = "0" AND `time` > "' . (time() - 60 * 60 * 2) . '"'); $sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `dun` = "' . $dungeon['id'] . '" AND `delete` = "0" AND `time` > "' . (time() - 60 * 60 * 2) . '"');
while ($pl = mysql_fetch_array($sp)) { while ($pl = mysql_fetch_array($sp)) {
$dungeonGroupList .= '<div style="padding:2px;">'; $dungeonGroupList .= '<div style="padding:2px;">';
if ($u->info['dn'] == 0) $dungeonGroupList .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />'; if ($u->info['dn'] == 0) {
$dungeonGroupList .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
}
$dungeonGroupList .= '<span class="date">' . date('H:i', $pl['time']) . '</span> '; $dungeonGroupList .= '<span class="date">' . date('H:i', $pl['time']) . '</span> ';
$pus = ''; //группа $pus = ''; //группа
$su = mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . ''); $su = mysql_query(
'SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . ''
);
while ($pu = mysql_fetch_array($su)) { while ($pu = mysql_fetch_array($su)) {
$pus .= '<b>' . $pu['login'] . '</b> [' . $pu['level'] . ']<a href="info/' . $pu['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" title="Инф. о ' . $pu['login'] . '"></a>'; $pus .= '<b>' . $pu['login'] . '</b> [' . $pu['level'] . ']<a href="info/' . $pu['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" title="Инф. о ' . $pu['login'] . '"></a>';
$pus .= ', '; $pus .= ', ';
@ -252,7 +275,9 @@ while ($pl = mysql_fetch_array($sp)) {
$dungeonGroupList .= $pus; $dungeonGroupList .= $pus;
unset($pus); unset($pus);
if ($pl['pass'] != '' && $u->info['dn'] == 0) $dungeonGroupList .= ' <small><input type="password" name="pass_com" value=""></small>'; if ($pl['pass'] != '' && $u->info['dn'] == 0) {
$dungeonGroupList .= ' <small><input type="password" name="pass_com" value=""></small>';
}
if ($pl['com'] != '') { if ($pl['com'] != '') {
$dl = ''; $dl = '';
@ -286,79 +311,79 @@ while ($pl = mysql_fetch_array($sp)) {
$dungeonGroupList .= '</div>'; $dungeonGroupList .= '</div>';
} }
?> ?>
<style> <style>
body { body {
background-color: #E2E2E2; background-color: #E2E2E2;
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg); background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: top right; background-position: top right;
} }
</style> </style>
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<td> <td>
<div style="padding-left:0px;" align="center"> <div style="padding-left:0px;" align="center">
<h3><?= $u->room['name']; ?></h3> <h3><?= $u->room['name']; ?></h3>
</div> </div>
</td> </td>
<td width="200"> <td width="200">
<div align="right"> <div align="right">
<table cellspacing="0" cellpadding="0"> <table cellspacing="0" cellpadding="0">
<tr> <tr>
<td width="100%">&nbsp;</td> <td width="100%">&nbsp;</td>
<td> <td>
<?php if ($roomSection == 0) { ?> <?php if ($roomSection == 0) { ?>
<table border="0" cellpadding="0" cellspacing="0"> <table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top"> <tr align="right" valign="top">
<td><!-- --> <td><!-- -->
<?= $goLis; ?> <?= $goLis; ?>
<!-- --> <!-- -->
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<td nowrap="nowrap"> <td nowrap="nowrap">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE"> <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
<tr> <tr>
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td> <td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td>
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop" <td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop"
onclick="location='main.php?loc=<?php if ($u->info['city'] == 'fallenearth') { onclick="location='main.php?loc=<?php if ($u->info['city'] == 'fallenearth') {
echo '6.180.0.102'; echo '6.180.0.102';
} else { } else {
echo '1.180.0.321'; echo '1.180.0.321';
} ?>&rnd=<?= $code; ?>';" title="<?php } ?>&rnd=<?= $code; ?>';" title="<?php
if ($u->info['city'] == 'fallenearth') {
thisInfRm('6.180.0.102', 1);
} else {
thisInfRm('1.180.0.321', 1);
}
?>"><?php
if ($u->info['city'] == 'fallenearth') { if ($u->info['city'] == 'fallenearth') {
echo "Темный Портал"; thisInfRm('6.180.0.102', 1);
} else { } else {
echo "Магический Портал"; thisInfRm('1.180.0.321', 1);
} }
?></a></td> ?>"><?php
</tr> if ($u->info['city'] == 'fallenearth') {
<tr> echo "Темный Портал";
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td> } else {
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop" echo "Магический Портал";
onclick="location='main.php?loc=1.180.0.373&rnd=<?= $code; ?>';" }
title="<?php thisInfRm('1.180.0.373', 1); ?>">Рыцарский магазин</a></td> ?></a></td>
</tr> </tr>
</table> <tr>
</td> <td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td>
</tr> <td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop"
</table> onclick="location='main.php?loc=1.180.0.373&rnd=<?= $code; ?>';"
</td> title="<?php thisInfRm('1.180.0.373', 1); ?>">Рыцарский магазин</a></td>
</tr> </tr>
</table> </table>
<?php } ?> </td>
</td> </tr>
</tr> </table>
</table> </td>
</div> </tr>
</td> </table>
</tr> <?php } ?>
</table> </td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<?php if ($roomSection == 1) { ?> <?php if ($roomSection == 1) { ?>
<div align="center" style="float:right;width:100px;"> <div align="center" style="float:right;width:100px;">
<p> <p>
@ -377,7 +402,9 @@ while ($pl = mysql_fetch_array($sp)) {
</div> </div>
<?php } ?> <?php } ?>
<?php <?php
if ($re != '') echo '<font color="red"><b>' . $re . '</b></font><br>'; if ($re != '') {
echo '<font color="red"><b>' . $re . '</b></font><br>';
}
//отображаем //отображаем
if ($dungeonGroupList == '') { if ($dungeonGroupList == '') {
@ -411,11 +438,11 @@ if ($roomSection == 1) {
echo '<font color="red"><b>Нельзя получать задания чаще одного раза в сутки</b></font><br>'; echo '<font color="red"><b>Нельзя получать задания чаще одного раза в сутки</b></font><br>';
} else { } else {
//if($u->info['admin']>0){ //if($u->info['admin']>0){
// $sp = mysql_query('SELECT * FROM `quests` WHERE `id` = "236" && `tr_date` LIKE "%tr_dn:=:'.$dun.'%"'); // Только дашку // $sp = mysql_query('SELECT * FROM `quests` WHERE `id` = "236" && `tr_date` LIKE "%tr_dn:=:'.$dun.'%"'); // Только дашку
//} else { //} else {
$sp = mysql_query('SELECT * FROM `quests` WHERE `line` = ' . $dungeon['id'] . ''); $sp = mysql_query('SELECT * FROM `quests` WHERE `line` = ' . $dungeon['id'] . '');
//} //}
$dq_add = []; $dq_add = [];
while ($pl = mysql_fetch_array($sp)) { while ($pl = mysql_fetch_array($sp)) {
@ -462,7 +489,9 @@ if ($roomSection == 1) {
$sp = mysql_query('SELECT * FROM `actions` WHERE `vars` LIKE "%start_quest%" AND `vals` = "go" AND `uid` = "' . $u->info['id'] . '" LIMIT 100'); $sp = mysql_query('SELECT * FROM `actions` WHERE `vars` LIKE "%start_quest%" AND `vals` = "go" AND `uid` = "' . $u->info['id'] . '" LIMIT 100');
while ($pl = mysql_fetch_array($sp)) { while ($pl = mysql_fetch_array($sp)) {
$pq = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `id` = "' . str_replace('start_quest', '', $pl['vars']) . '" LIMIT 1')); $pq = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `id` = "' . str_replace('start_quest', '', $pl['vars']) . '" LIMIT 1'));
$qsee .= '<a href="main.php?rz=1&end_qst_now=' . $pq['id'] . '"><img src="//img.new-combats.tech/i/clear.gif" title="Отказаться от задания"></a> <b>' . $pq['name'] . '</b><div style="padding-left:15px;padding-bottom:5px;border-bottom:1px solid grey"><small>' . $pq['info'] . '<br>' . $q->info($pq) . '</small></div><br>'; $qsee .= '<a href="main.php?rz=1&end_qst_now=' . $pq['id'] . '"><img src="//img.new-combats.tech/i/clear.gif" title="Отказаться от задания"></a> <b>' . $pq['name'] . '</b><div style="padding-left:15px;padding-bottom:5px;border-bottom:1px solid grey"><small>' . $pq['info'] . '<br>' . $q->info(
$pq
) . '</small></div><br>';
$qx++; $qx++;
} }
@ -482,7 +511,7 @@ if (!isset($hgo['id'])) {
<input type='button' value='Получить задание' onclick='location="main.php?rz=1&add_quest=1"'/> <input type='button' value='Получить задание' onclick='location="main.php?rz=1&add_quest=1"'/>
<?php <?php
} else { } else {
echo 'Получить новое задание можно <b>' . date('d.m.Y H:i', $hgo['time'] + 60 * 60 * 24) . '</b> <font color="">( Через ' . $u->timeOut($hgo['time'] + 60 * 60 * 24 - time()) . ' )</font>'; echo 'Получить новое задание можно <b>' . date('d.m.Y H:i', $hgo['time'] + 60 * 60 * 24) . '</b> ( Через ' . Conversion::secondsToTimeout($hgo['time'] + 60 * 60 * 24 - time()) . ' )';
} }
?> ?>
</span> </span>
@ -522,7 +551,9 @@ if (!isset($hgo['id'])) {
} }
mysql_query('UPDATE `rep` SET `add_stats` = "' . $u->rep['add_stats'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); mysql_query('UPDATE `rep` SET `add_stats` = "' . $u->rep['add_stats'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
mysql_query('UPDATE `stats` SET `ability` = "' . $u->info['ability'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); mysql_query('UPDATE `stats` SET `ability` = "' . $u->info['ability'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
} else echo 'Недостаточно репутации.'; } else {
echo 'Недостаточно репутации.';
}
} else { } else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>'; echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
} }
@ -554,7 +585,9 @@ if (!isset($hgo['id'])) {
} }
mysql_query('UPDATE `rep` SET `add_skills` = "' . $u->rep['add_skills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); mysql_query('UPDATE `rep` SET `add_skills` = "' . $u->rep['add_skills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
mysql_query('UPDATE `stats` SET `skills` = "' . $u->info['skills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); mysql_query('UPDATE `stats` SET `skills` = "' . $u->info['skills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
} else echo 'Недостаточно репутации.'; } else {
echo 'Недостаточно репутации.';
}
} else { } else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>'; echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
} }
@ -586,7 +619,9 @@ if (!isset($hgo['id'])) {
} }
mysql_query('UPDATE `rep` SET `add_money` = "' . $u->rep['add_money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); mysql_query('UPDATE `rep` SET `add_money` = "' . $u->rep['add_money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
mysql_query('UPDATE `users` SET `money` = "' . $u->info['money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); mysql_query('UPDATE `users` SET `money` = "' . $u->info['money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
} else echo 'Недостаточно репутации.'; } else {
echo 'Недостаточно репутации.';
}
} else { } else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>'; echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
} }
@ -618,7 +653,9 @@ if (!isset($hgo['id'])) {
} }
mysql_query('UPDATE `rep` SET `add_skills2` = "' . $u->rep['add_skills2'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); mysql_query('UPDATE `rep` SET `add_skills2` = "' . $u->rep['add_skills2'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
mysql_query('UPDATE `stats` SET `sskills` = "' . $u->info['sskills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); mysql_query('UPDATE `stats` SET `sskills` = "' . $u->info['sskills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
} else echo 'Недостаточно репутации.'; } else {
echo 'Недостаточно репутации.';
}
// echo '<font color="red"><b>Вы успешно приобрели 1 особенность за 3000 ед. награды</b></font><br>'; // echo '<font color="red"><b>Вы успешно приобрели 1 особенность за 3000 ед. награды</b></font><br>';
// $u->info['nskills'] += 1; // $u->info['nskills'] += 1;
@ -668,11 +705,19 @@ if (!isset($hgo['id'])) {
</table> </table>
<p><span style="padding-left: 10px"> <p><span style="padding-left: 10px">
<?php <?php
$chk = mysql_fetch_array(mysql_query('SELECT COUNT(`u`.`id`),SUM(`m`.`price1`) FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u->info['id'] . '" LIMIT 1000')); $chk = mysql_fetch_array(
mysql_query(
'SELECT COUNT(`u`.`id`),SUM(`m`.`price1`) FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u->info['id'] . '" LIMIT 1000'
)
);
if (isset($_GET['buy777']) && $chk[0] > 0) { if (isset($_GET['buy777']) && $chk[0] > 0) {
$chk_cl = mysql_query('SELECT `u`.`id`,`m`.`price1` FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u->info['id'] . '" LIMIT 1000'); $chk_cl = mysql_query(
'SELECT `u`.`id`,`m`.`price1` FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u->info['id'] . '" LIMIT 1000'
);
while ($chk_pl = mysql_fetch_array($chk_cl)) { while ($chk_pl = mysql_fetch_array($chk_cl)) {
if (mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $chk_pl['id'] . '" LIMIT 1')) ; if (mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $chk_pl['id'] . '" LIMIT 1')) {
;
}
{ {
$x++; $x++;
$prc += $chk_pl['price1']; $prc += $chk_pl['price1'];
@ -750,7 +795,9 @@ if (!isset($hgo['id'])) {
} }
} }
} else { } else {
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . $u->timeOut(60 * 60 * 2 - time() + $dungeon_timeout['time']) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>'; echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(
60 * 60 * 2 - time() + $dungeon_timeout['time']
) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>';
} }
} }
?>

View File

@ -1,370 +1,357 @@
<?php <?php
if(!defined('GAME'))
{ use Helper\Conversion;
die();
if (!defined('GAME')) {
die();
} }
if($u->room['file']=='entersnow') if ($u->room['file'] == 'entersnow') {
{
$dun = 20; //для новичков 2-7 лвл $dun = 20; //для новичков 2-7 лвл
$er = ''; $er = '';
$dzs = ''; $dzs = '';
$g111 = 1; $g111 = 1;
$g11 = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "psh1" AND `time`>'.(time()-7200).' LIMIT 1',1); $g11 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "psh1" AND `time`>' . (time() - 7200) . ' LIMIT 1', 1);
$moder = mysql_fetch_array(mysql_query('SELECT * FROM `moder` WHERE `align` = "'.$u->info['align'].'" LIMIT 1')); $moder = mysql_fetch_array(mysql_query('SELECT * FROM `moder` WHERE `align` = "' . $u->info['align'] . '" LIMIT 1'));
if($u->info['dn']>0) if ($u->info['dn'] > 0) {
{ $zv_dn = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `id`="' . $u->info['dn'] . '" AND `dun` = "' . $dun . '" AND `delete` = "0" LIMIT 1'));
$zv_dn = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `id`="'.$u->info['dn'].'" AND `dun` = "'.$dun.'" AND `delete` = "0" LIMIT 1')); if (!isset($zv_dn['id'])) {
if(!isset($zv_dn['id'])) mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
{ $u->info['dn'] = 0;
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); }
$u->info['dn'] = 0; }
}
}
if(isset($g11['id'])) if (isset($g11['id'])) {
{ $g111 = 0;
$g111 = 0; if (isset($_GET['start'])) {
if(isset($_GET['start'])) $re = 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(7200 - time() + $g11['time']);
{ }
$re = 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']); }
} if (isset($_GET['start']) && $zv_dn['uid'] == $u->info['id'] && $g111 == 1) {
} //начинаем поход
if(isset($_GET['start']) && $zv_dn['uid']==$u->info['id'] && $g111 == 1) //начинаем поход
{ $ig = 1;
//начинаем поход if ($ig > 0) {
//начинаем поход //перемещаем игроков в пещеру
$ig = 1; //$u->addAction(time(),'psh1','');
if($ig>0) $ins = mysql_query(
{ 'INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
//перемещаем игроков в пещеру VALUES ("' . $zv_dn['city'] . '","' . $zv_dn['uid'] . '","' . $dun . '","Ледяная пещера","' . time() . '")'
//$u->addAction(time(),'psh1',''); );
$ins = mysql_query('INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`) if ($ins) {
VALUES ("'.$zv_dn['city'].'","'.$zv_dn['uid'].'","'.$dun.'","Ледяная пещера","'.time().'")'); $zid = mysql_insert_id();
if($ins) //обновляем пользователей
{ $su = mysql_query(
$zid = mysql_insert_id(); 'SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $zv_dn['id'] . '" LIMIT ' . ($zv_dn['team_max'] + 1) . ''
//обновляем пользователей );
$su = mysql_query('SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="'.$zv_dn['id'].'" LIMIT '.($zv_dn['team_max']+1).''); $ids = '';
$ids = ''; while ($pu = mysql_fetch_array($su)) {
while($pu = mysql_fetch_array($su)) $ids .= ' `id` = "' . $pu['id'] . '" OR';
{ $u->addAction(time(), 'psh1', '', $pu['id']);
$ids .= ' `id` = "'.$pu['id'].'" OR'; }
$u->addAction(time(),'psh1','',$pu['id']); $ids = rtrim($ids, 'OR');
} $upd1 = mysql_query('UPDATE `stats` SET `x`="0",`y`="0",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . ' LIMIT ' . ($zv_dn['team_max'] + 1) . '');
$ids = rtrim($ids,'OR'); if ($upd1) {
$upd1 = mysql_query('UPDATE `stats` SET `x`="0",`y`="0",`dn` = "0",`dnow` = "'.$zid.'" WHERE '.$ids.' LIMIT '.($zv_dn['team_max']+1).''); $upd2 = mysql_query('UPDATE `users` SET `room` = "304" WHERE ' . $ids . ' LIMIT ' . ($zv_dn['team_max'] + 1) . '');
if($upd1) //Добавляем ботов и обьекты в пещеру $zid с for_dn = $dun
{ //Добавляем ботов
$upd2 = mysql_query('UPDATE `users` SET `room` = "304" WHERE '.$ids.' LIMIT '.($zv_dn['team_max']+1).''); $vls = '';
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dun $sp = mysql_query('SELECT * FROM `dungeon_bots` WHERE `for_dn` = "' . $dun . '"');
//Добавляем ботов while ($pl = mysql_fetch_array($sp)) {
$vls = ''; $vls .= '("' . $zid . '","' . $pl['id_bot'] . '","' . $pl['colvo'] . '","' . $pl['items'] . '","' . $pl['x'] . '","' . $pl['y'] . '","' . $pl['dialog'] . '","' . $pl['items'] . '"),';
$sp = mysql_query('SELECT * FROM `dungeon_bots` WHERE `for_dn` = "'.$dun.'"'); }
while($pl = mysql_fetch_array($sp)) $vls = rtrim($vls, ',');
{ $ins1 = mysql_query('INSERT INTO `dungeon_bots` (`dn`,`id_bot`,`colvo`,`items`,`x`,`y`,`dialog`,`atack`) VALUES ' . $vls . '');
$vls .= '("'.$zid.'","'.$pl['id_bot'].'","'.$pl['colvo'].'","'.$pl['items'].'","'.$pl['x'].'","'.$pl['y'].'","'.$pl['dialog'].'","'.$pl['items'].'"),'; //Добавляем обьекты
} $vls = '';
$vls = rtrim($vls,','); $sp = mysql_query('SELECT * FROM `dungeon_obj` WHERE `for_dn` = "' . $dun . '"');
$ins1 = mysql_query('INSERT INTO `dungeon_bots` (`dn`,`id_bot`,`colvo`,`items`,`x`,`y`,`dialog`,`atack`) VALUES '.$vls.''); while ($pl = mysql_fetch_array($sp)) {
//Добавляем обьекты $vls .= '("' . $zid . '","' . $pl['name'] . '","' . $pl['img'] . '","' . $pl['x'] . '","' . $pl['y'] . '","' . $pl['action'] . '","' . $pl['type'] . '","' . $pl['w'] . '","' . $pl['h'] . '","' . $pl['s'] . '","' . $pl['s2'] . '","' . $pl['os1'] . '","' . $pl['os2'] . '","' . $pl['os3'] . '","' . $pl['os4'] . '","' . $pl['type2'] . '","' . $pl['top'] . '","' . $pl['left'] . '","' . $pl['date'] . '"),';
$vls = ''; }
$sp = mysql_query('SELECT * FROM `dungeon_obj` WHERE `for_dn` = "'.$dun.'"'); $vls = rtrim($vls, ',');
while($pl = mysql_fetch_array($sp)) if ($vls != '') {
{ $ins2 = mysql_query(
$vls .= '("'.$zid.'","'.$pl['name'].'","'.$pl['img'].'","'.$pl['x'].'","'.$pl['y'].'","'.$pl['action'].'","'.$pl['type'].'","'.$pl['w'].'","'.$pl['h'].'","'.$pl['s'].'","'.$pl['s2'].'","'.$pl['os1'].'","'.$pl['os2'].'","'.$pl['os3'].'","'.$pl['os4'].'","'.$pl['type2'].'","'.$pl['top'].'","'.$pl['left'].'","'.$pl['date'].'"),'; 'INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES ' . $vls . ''
} );
$vls = rtrim($vls,','); } else {
if($vls!='') $ins2 = true;
{ }
$ins2 = mysql_query('INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES '.$vls.''); if ($upd2 && $ins1 && $ins2) {
}else{ mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv_dn['id'] . '" LIMIT 1');
$ins2 = true; die('<script>location="main.php?rnd=' . $code . '";</script>');
} } else {
if($upd2 && $ins1 && $ins2) $re = 'Ошибка перехода в подземелье...';
{ }
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv_dn['id'].'" LIMIT 1'); } else {
die('<script>location="main.php?rnd='.$code.'";</script>'); $re = 'Ошибка перехода в подземелье...';
}else{ }
$re = 'Ошибка перехода в подземелье...'; } else {
} $re = 'Ошибка перехода в подземелье...';
}else{ }
$re = 'Ошибка перехода в подземелье...'; }
} } elseif (isset($_POST['go'], $_POST['goid']) && $g111 == 1) {
}else{ if (!isset($zv_dn['id'])) {
$re = 'Ошибка перехода в подземелье...'; $zv_dn = mysql_fetch_array(
} mysql_query(
} 'SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `id`="' . mysql_real_escape_string(
}elseif(isset($_POST['go'],$_POST['goid']) && $g111==1) $_POST['goid']
{ ) . '" AND `dun` = "' . $dun . '" AND `delete` = "0" LIMIT 1'
if(!isset($zv_dn['id'])) )
{ );
$zv_dn = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "'.$u->info['city'].'" AND `id`="'.mysql_real_escape_string($_POST['goid']).'" AND `dun` = "'.$dun.'" AND `delete` = "0" LIMIT 1')); if (isset($zv_dn['id'])) {
if(isset($zv_dn['id'])) if ($u->info['level'] > 5) {
{ $row = 0;
if($u->info['level']>5) if (5 > $row) {
{ $upd = mysql_query('UPDATE `stats` SET `dn` = "' . $zv_dn['id'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
$row = 0; if (!$upd) {
if(5>$row) $re = 'Не удалось вступить в эту группу';
{ unset($zv_dn);
$upd = mysql_query('UPDATE `stats` SET `dn` = "'.$zv_dn['id'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); } else {
if(!$upd) $u->info['dn'] = $zv_dn['id'];
{ }
$re = 'Не удалось вступить в эту группу'; } else {
unset($zv_dn); $re = 'В группе нет места';
}else{ unset($zv_dn);
$u->info['dn'] = $zv_dn['id']; }
} } else {
}else{ $re = 'Вы не подходите по уровню';
$re = 'В группе нет места'; unset($zv_dn);
unset($zv_dn); }
} } else {
}else{ $re = 'Заявка не найдена';
$re = 'Вы не подходите по уровню'; }
unset($zv_dn); } else {
} $re = 'Вы уже находитесь в группе';
}else{ }
$re = 'Заявка не найдена'; } elseif (isset($_POST['leave']) && isset($zv_dn['id']) && $g111 == 1) {
} if ($zv_dn['uid'] == $u->info['id']) {
}else{ //ставим в группу нового руководителя
$re = 'Вы уже находитесь в группе'; $ld = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `dn` = "' . $zv_dn['id'] . '" AND `id` != "' . $u->info['id'] . '" LIMIT 1'));
} if (isset($ld['id'])) {
}elseif(isset($_POST['leave']) && isset($zv_dn['id']) && $g111 == 1) $zv_dn['uid'] = $ld['id'];
{ mysql_query('UPDATE `dungeon_zv` SET `uid` = "' . $zv_dn['uid'] . '" WHERE `id` = "' . $zv_dn['id'] . '" LIMIT 1');
if($zv_dn['uid']==$u->info['id']) mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
{ $u->info['dn'] = 0;
//ставим в группу нового руководителя unset($zv_dn);
$ld = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `dn` = "'.$zv_dn['id'].'" AND `id` != "'.$u->info['id'].'" LIMIT 1')); } else {
if(isset($ld['id'])) //удаляем группу целиком
{ mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv_dn['id'] . '" LIMIT 1');
$zv_dn['uid'] = $ld['id']; mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
mysql_query('UPDATE `dungeon_zv` SET `uid` = "'.$zv_dn['uid'].'" WHERE `id` = "'.$zv_dn['id'].'" LIMIT 1'); $u->info['dn'] = 0;
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); unset($zv_dn);
$u->info['dn'] = 0; }
unset($zv_dn); } else {
}else{ //просто выходим с группы
//удаляем группу целиком mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv_dn['id'].'" LIMIT 1'); $u->info['dn'] = 0;
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); unset($zv_dn);
$u->info['dn'] = 0; }
unset($zv_dn); } elseif (isset($_POST['add']) && $u->info['level'] > 1 && $g111 == 1) {
} if ($u->info['dn'] == 0) {
}else{ $lmn = 6;
//просто выходим с группы $lmx = 21;
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); $tmx = 5;
$u->info['dn'] = 0;
unset($zv_dn);
}
}elseif(isset($_POST['add']) && $u->info['level']>1 && $g111 == 1)
{
if($u->info['dn']==0)
{
$lmn = 6;
$lmx = 21;
$tmx = 5;
//только своего уровня //только своего уровня
$lmn = $u->info['level']; $lmn = $u->info['level'];
$ins = mysql_query('INSERT INTO `dungeon_zv` $ins = mysql_query(
'INSERT INTO `dungeon_zv`
(`city`,`time`,`uid`,`dun`,`pass`,`com`,`lvlmin`,`lvlmax`,`team_max`) VALUES (`city`,`time`,`uid`,`dun`,`pass`,`com`,`lvlmin`,`lvlmax`,`team_max`) VALUES
("'.$u->info['city'].'","'.time().'","'.$u->info['id'].'","'.$dun.'", ("' . $u->info['city'] . '","' . time() . '","' . $u->info['id'] . '","' . $dun . '",
"'.mysql_real_escape_string($_POST['pass']).'", "' . mysql_real_escape_string($_POST['pass']) . '",
"'.mysql_real_escape_string($_POST['text']).'", "' . mysql_real_escape_string($_POST['text']) . '",
"'.$lmn.'", "' . $lmn . '",
"'.$lmx.'", "' . $lmx . '",
"'.$tmx.'")'); "' . $tmx . '")'
if($ins) );
{ if ($ins) {
$u->info['dn'] = mysql_insert_id(); $u->info['dn'] = mysql_insert_id();
$zv_dn['id'] = $u->info['dn']; $zv_dn['id'] = $u->info['dn'];
$zv_dn['uid'] = $u->info['id']; $zv_dn['uid'] = $u->info['id'];
mysql_query('UPDATE `stats` SET `dn` = "'.$u->info['dn'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); mysql_query('UPDATE `stats` SET `dn` = "' . $u->info['dn'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
$re = 'Вы успешно создали группу'; $re = 'Вы успешно создали группу';
}else{ } else {
$re = 'Не удалось создать группу'; $re = 'Не удалось создать группу';
} }
}else{ } else {
$re = 'Вы уже находитесь в группе'; $re = 'Вы уже находитесь в группе';
} }
} }
//Генерируем список групп //Генерируем список групп
$sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "'.$u->info['city'].'" AND `dun` = "'.$dun.'" AND `delete` = "0" AND `time` > "'.(time()-60*60*2).'"'); $sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `dun` = "' . $dun . '" AND `delete` = "0" AND `time` > "' . (time() - 60 * 60 * 2) . '"');
while($pl = mysql_fetch_array($sp)) while ($pl = mysql_fetch_array($sp)) {
{ $dzs .= '<div style="padding:2px;">';
$dzs .= '<div style="padding:2px;">'; if ($u->info['dn'] == 0) {
if($u->info['dn']==0) $dzs .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
{ }
$dzs .= '<input type="radio" name="goid" id="goid" value="'.$pl['id'].'" />'; $dzs .= '<span class="date">' . date('H:i', $pl['time']) . '</span> ';
}
$dzs .= '<span class="date">'.date('H:i',$pl['time']).'</span> ';
$pus = ''; //группа $pus = ''; //группа
$su = mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="'.$pl['id'].'" LIMIT '.($pl['team_max']+1).''); $su = mysql_query(
while($pu = mysql_fetch_array($su)) 'SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . ''
{ );
$pus .= '<b>'.$pu['login'].'</b> ['.$pu['level'].']<a href="info/'.$pu['id'].'" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" title="Инф. о '.$pu['login'].'"></a>'; while ($pu = mysql_fetch_array($su)) {
$pus .= ', '; $pus .= '<b>' . $pu['login'] . '</b> [' . $pu['level'] . ']<a href="info/' . $pu['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" title="Инф. о ' . $pu['login'] . '"></a>';
} $pus .= ', ';
$pus = trim($pus,', '); }
$pus = trim($pus, ', ');
$dzs .= $pus; $dzs .= $pus;
if($pl['com']!='') if ($pl['com'] != '') {
{ $dl = '';
$dl = ''; if (($moder['boi'] == 1 || $u->info['admin'] > 0) && $pl['dcom'] == 0) {
if(($moder['boi']==1 || $u->info['admin']>0) && $pl['dcom']==0) $dl .= ' (<a href="?delcom=' . $pl['id'] . '&key=' . $u->info['nextAct'] . '&rnd=' . $code . '">удалить комментарий</a>)';
{ if (isset($_GET['delcom']) && $_GET['delcom'] == $pl['id'] && $u->newAct($_GET['key']) == true) {
$dl .= ' (<a href="?delcom='.$pl['id'].'&key='.$u->info['nextAct'].'&rnd='.$code.'">удалить комментарий</a>)'; mysql_query('UPDATE `dungeon_zv` SET `dcom` = "' . $u->info['id'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1');
if(isset($_GET['delcom']) && $_GET['delcom']==$pl['id'] && $u->newAct($_GET['key'])==true) $pl['dcom'] = $u->info['id'];
{ }
mysql_query('UPDATE `dungeon_zv` SET `dcom` = "'.$u->info['id'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1'); }
$pl['dcom'] = $u->info['id'];
}
}
$pl['com'] = htmlspecialchars($pl['com'],NULL); $pl['com'] = htmlspecialchars($pl['com'], null);
if($pl['dcom']>0) if ($pl['dcom'] > 0) {
{ $dl = ' <font color="grey"><i>комментарий удален модератором</i></font>';
$dl = ' <font color="grey"><i>комментарий удален модератором</i></font>'; }
}
if($pl['dcom']>0) if ($pl['dcom'] > 0) {
{ if ($moder['boi'] == 1 || $u->info['admin'] > 0) {
if($moder['boi']==1 || $u->info['admin']>0) $pl['com'] = '<font color="red">' . $pl['com'] . '</font>';
{ } else {
$pl['com'] = '<font color="red">'.$pl['com'].'</font>'; $pl['com'] = '';
}else{ }
$pl['com'] = ''; }
}
}
$dzs .= '<small> | '.$pl['com'].''.$dl.'</small>'; $dzs .= '<small> | ' . $pl['com'] . '' . $dl . '</small>';
} }
$dzs .= '</div>'; $dzs .= '</div>';
} }
?> ?>
<style> <style>
body body {
{ background-color: #E2E2E2;
background-color:#E2E2E2; background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg); background-repeat: no-repeat;
background-repeat:no-repeat;background-position:top right; background-position: top right;
} }
</style> </style>
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div style="padding-left:0px;" align="center">
<h3><?= $u->room['name']; ?></h3>
</div></td>
<td width="200"><div align="right">
<table cellspacing="0" cellpadding="0">
<tr> <tr>
<td width="100%">&nbsp;</td> <td>
<td><table border="0" cellpadding="0" cellspacing="0"> <div style="padding-left:0px;" align="center">
<tr align="right" valign="top"> <h3><?= $u->room['name']; ?></h3>
<td><!-- --> </div>
<?= $goLis; ?> </td>
<!-- --> <td width="200">
<table border="0" cellspacing="0" cellpadding="0"> <div align="right">
<tr> <table cellspacing="0" cellpadding="0">
<td nowrap="nowrap"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE"> <tr>
<tr> <td width="100%">&nbsp;</td>
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7" /></td> <td>
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.208&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.208',1); ?>">Елка</a></td> <table border="0" cellpadding="0" cellspacing="0">
</tr> <tr align="right" valign="top">
</table></td> <td><!-- -->
</tr> <?= $goLis; ?>
</table></td> <!-- -->
</tr> <table border="0" cellspacing="0" cellpadding="0">
</table></td> <tr>
<td nowrap="nowrap">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
<tr>
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td>
<td bgcolor="#D3D3D3" nowrap="nowrap">
<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.208&rnd=<?= $code; ?>';" title="<?php thisInfRm(
'1.180.0.208', 1
); ?>">Елка</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr> </tr>
</table> </table>
</div></td> <?php
</tr> if ($re != '') {
</table> echo '<font color="red"><b>' . $re . '</b></font><br>';
<?php }
if($re!='')
{
echo '<font color="red"><b>'.$re.'</b></font><br>';
}
//отображаем //отображаем
if($dzs=='') if ($dzs == '') {
{ $dzs = '';
$dzs = ''; } else {
}else{ if (!isset($zv_dn['id'])) {
if(!isset($zv_dn['id'])) if ($g111 == 1) {
{ $pr = '<input name="go" type="submit" value="Вступить в группу">';
if($g111==1) }
{ $dzs = '<form action="main.php?rnd=' . $code . '" method="post">' . $pr . '<br>' . $dzs . '' . $pr . '</form>';
$pr = '<input name="go" type="submit" value="Вступить в группу">'; }
} $dzs .= '<hr>';
$dzs = '<form action="main.php?rnd='.$code.'" method="post">'.$pr.'<br>'.$dzs.''.$pr.'</form>'; }
}
$dzs .= '<hr>';
}
echo $dzs; echo $dzs;
if($g111 == 1) if ($g111 == 1) {
{ if ($u->info['dn'] == 0) {
if($u->info['dn']==0) ?>
{ <table width="350" border="0" cellspacing="0" cellpadding="0">
?> <tr>
<table width="350" border="0" cellspacing="0" cellpadding="0"> <td valign="top">
<tr> <form id="from" name="from" action="main.php?pz1=<?= $code; ?>" method="post">
<td valign="top"> <fieldset style='padding-left: 5; width=50%'>
<form id="from" name="from" action="main.php?pz1=<?= $code; ?>" method="post"> <legend><b> Группа </b></legend>
<fieldset style='padding-left: 5; width=50%'> Комментарий
<legend><b> Группа </b> </legend> <input type="text" name="text" maxlength="40" size="40"/>
Комментарий <br/>
<input type="text" name="text" maxlength="40" size="40" /> Пароль
<br /> <input type="password" name="pass" maxlength="25" size="25"/>
Пароль <br/>
<input type="password" name="pass" maxlength="25" size="25" /> <input type="submit" name="add" value="Создать группу"/>
<br /> &nbsp;<br/>
<input type="submit" name="add" value="Создать группу" /> </fieldset>
&nbsp;<br /> </form>
</fieldset> </td>
</form> </tr>
</td> </table>
</tr> <?php
</table> } else {
<?php $psh_start = '';
}else{ if (isset($zv_dn['id'])) {
$psh_start = ''; if ($zv_dn['uid'] == $u->info['id']) {
if(isset($zv_dn['id'])) $psh_start = '<INPUT type=\'button\' name=\'start\' value=\'Начать\' onClick="top.frames[\'main\'].location = \'main.php?start=1&rnd=' . $code . '\'"> &nbsp;';
{ }
if($zv_dn['uid']==$u->info['id'])
{
$psh_start = '<INPUT type=\'button\' name=\'start\' value=\'Начать\' onClick="top.frames[\'main\'].location = \'main.php?start=1&rnd='.$code.'\'"> &nbsp;';
}
echo '<br><FORM id="REQUEST" method="post" style="width:210px;" action="main.php?rnd='.$code.'"> echo '<br><FORM id="REQUEST" method="post" style="width:210px;" action="main.php?rnd=' . $code . '">
<FIELDSET style=\'padding-left: 5; width=50%\'> <FIELDSET style=\'padding-left: 5; width=50%\'>
<LEGEND><B> Группа </B> </LEGEND> <LEGEND><B> Группа </B> </LEGEND>
'.$psh_start.' ' . $psh_start . '
<INPUT type=\'submit\' name=\'leave\' value=\'Покинуть группу\'> <INPUT type=\'submit\' name=\'leave\' value=\'Покинуть группу\'>
</FIELDSET> </FIELDSET>
</FORM>'; </FORM>';
} }
} }
?> ?>
<?php <?php
}else{ } else {
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']).'<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>'; echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(
7200 - time() + $g11['time']
) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>';
}
} }
}
?>

View File

@ -1,5 +1,10 @@
<?php <?php
if (!defined('GAME')) die();
use Helper\Conversion;
if (!defined('GAME')) {
die();
}
if ($u->room['file'] == 'house_belaun') { if ($u->room['file'] == 'house_belaun') {
$notify = ['type' => '', 'text' => '']; // Ошибки или Уведомления здесь! $notify = ['type' => '', 'text' => '']; // Ошибки или Уведомления здесь!
$action = ''; $action = '';
@ -292,7 +297,9 @@ if ($u->room['file'] == 'house_belaun') {
</div> </div>
<div class="Content"> <div class="Content">
<?php <?php
if ($notify['text'] != '') echo '<div class="notification ' . $notify['type'] . '">' . $notify['text'] . '</div>'; if ($notify['text'] != '') {
echo '<div class="notification ' . $notify['type'] . '">' . $notify['text'] . '</div>';
}
if ($action == "dialog") { if ($action == "dialog") {
} }
@ -305,12 +312,16 @@ if ($u->room['file'] == 'house_belaun') {
$sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "all" AND `delete` = "0" AND `time` > "' . (time() - 60 * 60 * 2) . '"'); $sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "all" AND `delete` = "0" AND `time` > "' . (time() - 60 * 60 * 2) . '"');
while ($pl = mysql_fetch_array($sp)) { while ($pl = mysql_fetch_array($sp)) {
$dungeonGroupList .= '<div style="padding:2px;">'; $dungeonGroupList .= '<div style="padding:2px;">';
if ($u->info['dn'] == 0) $dungeonGroupList .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />'; if ($u->info['dn'] == 0) {
$dungeonGroupList .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
}
$dungeonGroupList .= '<span class="date">' . date('H:i', $pl['time']) . '</span> '; $dungeonGroupList .= '<span class="date">' . date('H:i', $pl['time']) . '</span> ';
$dungeonGroupList .= '<span><img title="' . $dunname[$pl['dun']][1] . '" style="vertical-align:bottom" src="//img.new-combats.tech/i/city_ico2/' . $dunname[$pl['dun']][0] . '.gif" /></span> '; $dungeonGroupList .= '<span><img title="' . $dunname[$pl['dun']][1] . '" style="vertical-align:bottom" src="//img.new-combats.tech/i/city_ico2/' . $dunname[$pl['dun']][0] . '.gif" /></span> ';
$pus = ''; //группа $pus = ''; //группа
$su = mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . ''); $su = mysql_query(
'SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . ''
);
while ($pu = mysql_fetch_array($su)) { while ($pu = mysql_fetch_array($su)) {
$pus .= '<b>' . $pu['login'] . '</b> [' . $pu['level'] . ']<a href="info/' . $pu['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_' . $pu['city'] . '.gif" title="Инф. о ' . $pu['login'] . '"></a>'; $pus .= '<b>' . $pu['login'] . '</b> [' . $pu['level'] . ']<a href="info/' . $pu['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_' . $pu['city'] . '.gif" title="Инф. о ' . $pu['login'] . '"></a>';
$pus .= ', '; $pus .= ', ';
@ -320,7 +331,9 @@ if ($u->room['file'] == 'house_belaun') {
$dungeonGroupList .= $pus; $dungeonGroupList .= $pus;
unset($pus); unset($pus);
if ($pl['pass'] != '' && $u->info['dn'] == 0) $dungeonGroupList .= ' <small><input type="password" name="pass_com" value=""></small>'; if ($pl['pass'] != '' && $u->info['dn'] == 0) {
$dungeonGroupList .= ' <small><input type="password" name="pass_com" value=""></small>';
}
if ($pl['com'] != '') { if ($pl['com'] != '') {
$dl = ''; $dl = '';
@ -427,7 +440,11 @@ if ($u->room['file'] == 'house_belaun' && false) {
$error = ''; // Собираем ошибки. $error = ''; // Собираем ошибки.
$dungeonGroupList = ''; // Сюда помещаем список Групп. $dungeonGroupList = ''; // Сюда помещаем список Групп.
$dungeonGo = 1; // По умолчанию, мы идем в пещеру. $dungeonGo = 1; // По умолчанию, мы идем в пещеру.
$dungeon = mysql_fetch_assoc(mysql_query('SELECT `id` as room, city, `dungeon_room` as d_room, city, `shop`, `dungeon_id` as id, `dungeon_name` as name, quest FROM `dungeon_room` WHERE `id`="' . $u->room['id'] . '" LIMIT 1')); $dungeon = mysql_fetch_assoc(
mysql_query(
'SELECT `id` as room, city, `dungeon_room` as d_room, city, `shop`, `dungeon_id` as id, `dungeon_name` as name, quest FROM `dungeon_room` WHERE `id`="' . $u->room['id'] . '" LIMIT 1'
)
);
$dunname = [ $dunname = [
12 => ['capitalcity', 'Пещера Тысячи Проклятий'], 12 => ['capitalcity', 'Пещера Тысячи Проклятий'],
@ -439,9 +456,13 @@ if ($u->room['file'] == 'house_belaun' && false) {
//106 => array('devilscity','Туманные Низины') //106 => array('devilscity','Туманные Низины')
]; ];
if (isset($_GET['rz']) && $dungeon['quest'] == 1) $roomSection = 1; // Получаем Задание if (isset($_GET['rz']) && $dungeon['quest'] == 1) {
else $roomSection = 0; // Собираем группу для похода $roomSection = 1;
//if( $u->info['admin'] > 0 ) var_info($dungeon); } // Получаем Задание
else {
$roomSection = 0;
} // Собираем группу для похода
//if( $u->info['admin'] > 0 ) var_info($dungeon);
$all_dungeon = mysql_query('SELECT `city` FROM `dungeon_room` WHERE `city` IS NOT NULL AND `active`=1 '); $all_dungeon = mysql_query('SELECT `city` FROM `dungeon_room` WHERE `city` IS NOT NULL AND `active`=1 ');
while ($t = mysql_fetch_array($all_dungeon)) { while ($t = mysql_fetch_array($all_dungeon)) {
@ -459,28 +480,32 @@ if ($u->room['file'] == 'house_belaun' && false) {
$dungeon_timeout = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "psh0" AND `time` > ' . (time() - 60 * 60 * 2) . ' LIMIT 1', 1); $dungeon_timeout = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "psh0" AND `time` > ' . (time() - 60 * 60 * 2) . ' LIMIT 1', 1);
if ($u->info['admin'] > 0) unset($dungeon_timeout); // $dungeon_timeout - задержка на посещение пещеры. if ($u->info['admin'] > 0) {
unset($dungeon_timeout);
} // $dungeon_timeout - задержка на посещение пещеры.
if (isset($dungeon_timeout['id'])) // Кто-то передумал и не пойдет в пещеру, так-как уже там был. if (isset($dungeon_timeout['id'])) // Кто-то передумал и не пойдет в пещеру, так-как уже там был.
{ {
$dungeonGo = 0; $dungeonGo = 0;
if (isset($_GET['start'])) { if (isset($_GET['start'])) {
$error = 'До следующего похода осталось еще: ' . $u->timeOut(60 * 60 * 2 - time() + $dungeon_timeout['time']); $error = 'До следующего похода осталось еще: ' . Conversion::secondsToTimeout(60 * 60 * 2 - time() + $dungeon_timeout['time']);
} }
} }
if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) { if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
$ig = 1; $ig = 1;
if ($ig > 0) { //перемещаем игроков в пещеру if ($ig > 0) { //перемещаем игроков в пещеру
//$u->addAction(time(),'psh'.$dun,'');
// $ins = mysql_query(
$ins = mysql_query('INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`) 'INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
VALUES ("' . $zv['city'] . '","' . $zv['uid'] . '","' . $zv['dun'] . '","' . $dunname[$zv['dun']][1] . '","' . time() . '")'); VALUES ("' . $zv['city'] . '","' . $zv['uid'] . '","' . $zv['dun'] . '","' . $dunname[$zv['dun']][1] . '","' . time() . '")'
);
if ($ins) { if ($ins) {
$zid = mysql_insert_id(); $zid = mysql_insert_id();
mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1'); mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
//обновляем пользователей //обновляем пользователей
$su = mysql_query('SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $zv['id'] . '" /*LIMIT ' . ($zv['team_max'] + 1) . '*/'); $su = mysql_query(
'SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $zv['id'] . '" /*LIMIT ' . ($zv['team_max'] + 1) . '*/'
);
$ids = ''; $ids = '';
$map_locs = []; $map_locs = [];
@ -500,9 +525,13 @@ if ($u->room['file'] == 'house_belaun' && false) {
$u->addAction(time(), 'psh0', $pu['id'], $pu['id']); $u->addAction(time(), 'psh0', $pu['id'], $pu['id']);
} }
//Добавляем квестовые обьекты для персонажей //Добавляем квестовые обьекты для персонажей
$sp = mysql_query('SELECT * FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `room` = ' . $dungeon['room'] . ' AND `vars` LIKE "%start_quest%" AND `vals` = "go" LIMIT 100'); $sp = mysql_query(
'SELECT * FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `room` = ' . $dungeon['room'] . ' AND `vars` LIKE "%start_quest%" AND `vals` = "go" LIMIT 100'
);
while ($pl2 = mysql_fetch_array($sp)) { while ($pl2 = mysql_fetch_array($sp)) {
$pl = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `id` = "' . (str_replace('start_quest', '', $pl2['vars'])) . '" AND `line` = "' . $dungeon['id'] . '" LIMIT 1')); $pl = mysql_fetch_array(
mysql_query('SELECT * FROM `quests` WHERE `id` = "' . (str_replace('start_quest', '', $pl2['vars'])) . '" AND `line` = "' . $dungeon['id'] . '" LIMIT 1')
);
if (isset($pl['id'])) { if (isset($pl['id'])) {
$act = explode(',', $pl['act_date']); $act = explode(',', $pl['act_date']);
$i = 0; $i = 0;
@ -523,27 +552,39 @@ if ($u->room['file'] == 'house_belaun' && false) {
$ml_arr = []; $ml_arr = [];
foreach ($map_locs as $ml) { // tk_itm_fromY tk_itm_toY - отсеиваем позицию для дропа предметов. foreach ($map_locs as $ml) { // tk_itm_fromY tk_itm_toY - отсеиваем позицию для дропа предметов.
if ((isset($actdate['tk_itm_fromY']) && isset($actdate['tk_itm_toY'])) or (!isset($actdate['tk_itm_fromY']) && isset($actdate['tk_itm_toY']))) { if ((isset($actdate['tk_itm_fromY']) && isset($actdate['tk_itm_toY'])) or (!isset($actdate['tk_itm_fromY']) && isset($actdate['tk_itm_toY']))) {
if ($ml[1] > $actdate['tk_itm_fromY'] && $actdate['tk_itm_toY'] > $ml[1]) $ml_arr[] = $ml; if ($ml[1] > $actdate['tk_itm_fromY'] && $actdate['tk_itm_toY'] > $ml[1]) {
elseif (!isset($actdate['tk_itm_fromY']) && $actdate['tk_itm_toY'] > $ml[1]) $ml_arr[] = $ml; $ml_arr[] = $ml;
} else $ml_arr[] = $ml; } elseif (!isset($actdate['tk_itm_fromY']) && $actdate['tk_itm_toY'] > $ml[1]) {
$ml_arr[] = $ml;
}
} else {
$ml_arr[] = $ml;
}
}
if (isset($ml_arr) && count($ml_arr) == 0) {
$ml_arr = $map_locs;
} }
if (isset($ml_arr) && count($ml_arr) == 0) $ml_arr = $map_locs;
//Добавляем обьект для юзера //Добавляем обьект для юзера
$j = 0; $j = 0;
while ($j < $xr2[1]) { while ($j < $xr2[1]) {
$cord = $ml_arr[rand(0, count($ml_arr) - 1)]; $cord = $ml_arr[rand(0, count($ml_arr) - 1)];
if ($cord[0] != 0 || $cord[1] != 0) { if ($cord[0] != 0 || $cord[1] != 0) {
mysql_query('INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`,`onlyfor`,`quest`) VALUES ( mysql_query(
"' . $zid . '","' . $u->info['id'] . '","' . $xr2[0] . '","' . time() . '","' . $cord[0] . '","' . $cord[1] . '","' . $u->info['id'] . '","' . $pl['id'] . '" 'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`,`onlyfor`,`quest`) VALUES (
)'); "' . $zid . '","' . $u->info['id'] . '","' . $xr2[0] . '","' . time(
) . '","' . $cord[0] . '","' . $cord[1] . '","' . $u->info['id'] . '","' . $pl['id'] . '"
)'
);
} }
$j++; $j++;
} }
} else { } else {
//Предмет находится в конкретном месте //Предмет находится в конкретном месте
mysql_query('INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`,`onlyfor`,`quest`) VALUES ( mysql_query(
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`,`onlyfor`,`quest`) VALUES (
"' . $zid . '","' . $u->info['id'] . '","' . $xr2[0] . '","' . time() . '","' . $xr2[2] . '","' . $xr2[3] . '","' . $u->info['id'] . '","' . $pl['id'] . '" "' . $zid . '","' . $u->info['id'] . '","' . $xr2[0] . '","' . time() . '","' . $xr2[2] . '","' . $xr2[3] . '","' . $u->info['id'] . '","' . $pl['id'] . '"
)'); )'
);
} }
} }
$i++; $i++;
@ -554,7 +595,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
} }
$ids = rtrim($ids, 'OR'); $ids = rtrim($ids, 'OR');
$snew = 1; $snew = 1;
$upd1 = mysql_query('UPDATE `stats` SET `s`="' . $snew . '",`res_s`="1",`x`="0",`y`="0",`res_x`="0",`res_y`="0",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . ''); $upd1 = mysql_query(
'UPDATE `stats` SET `s`="' . $snew . '",`res_s`="1",`x`="0",`y`="0",`res_x`="0",`res_y`="0",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . ''
);
if ($upd1) { if ($upd1) {
$upd2 = mysql_query('UPDATE `users` SET `room` = "405" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . ''); $upd2 = mysql_query('UPDATE `users` SET `room` = "405" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . '');
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dungeon['id'] //Добавляем ботов и обьекты в пещеру $zid с for_dn = $dungeon['id']
@ -566,7 +609,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
$bots = explode(',', $pl['bot_group']); $bots = explode(',', $pl['bot_group']);
$pl['id_bot'] = (int)$bots[rand(0, count($bots) - 1)]; $pl['id_bot'] = (int)$bots[rand(0, count($bots) - 1)];
} }
if ($pl['id_bot'] > 0) $vls .= '("' . $zid . '","' . $pl['id_bot'] . '","' . $pl['colvo'] . '","' . $pl['items'] . '","' . $pl['x'] . '","' . $pl['y'] . '","' . $pl['dialog'] . '","' . $pl['items'] . '","' . $pl['go_bot'] . '","' . $pl['noatack'] . '"),'; if ($pl['id_bot'] > 0) {
$vls .= '("' . $zid . '","' . $pl['id_bot'] . '","' . $pl['colvo'] . '","' . $pl['items'] . '","' . $pl['x'] . '","' . $pl['y'] . '","' . $pl['dialog'] . '","' . $pl['items'] . '","' . $pl['go_bot'] . '","' . $pl['noatack'] . '"),';
}
unset($bots); unset($bots);
} }
$vls = rtrim($vls, ','); $vls = rtrim($vls, ',');
@ -692,7 +737,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
// //
$vls = rtrim($vls, ','); $vls = rtrim($vls, ',');
if ($vls != '') { if ($vls != '') {
$ins2 = mysql_query('INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES ' . $vls . ''); $ins2 = mysql_query(
'INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES ' . $vls . ''
);
} else { } else {
$ins2 = true; $ins2 = true;
} }
@ -839,14 +886,16 @@ if ($u->room['file'] == 'house_belaun' && false) {
$dun5 = 12; //ПТП $dun5 = 12; //ПТП
} }
// //
$ins = mysql_query('INSERT INTO `dungeon_zv` $ins = mysql_query(
'INSERT INTO `dungeon_zv`
(`city`,`time`,`uid`,`dun`,`pass`,`com`,`lvlmin`,`lvlmax`,`team_max`) VALUES (`city`,`time`,`uid`,`dun`,`pass`,`com`,`lvlmin`,`lvlmax`,`team_max`) VALUES
("all","' . time() . '","' . $u->info['id'] . '","' . $dun5 . '", ("all","' . time() . '","' . $u->info['id'] . '","' . $dun5 . '",
"' . mysql_real_escape_string($_POST['pass']) . '", "' . mysql_real_escape_string($_POST['pass']) . '",
"' . mysql_real_escape_string($_POST['text']) . '", "' . mysql_real_escape_string($_POST['text']) . '",
"8", "8",
"21", "21",
"5")'); "5")'
);
if ($ins) { if ($ins) {
$u->info['dn'] = mysql_insert_id(); $u->info['dn'] = mysql_insert_id();
$zv['id'] = $u->info['dn']; $zv['id'] = $u->info['dn'];
@ -861,17 +910,21 @@ if ($u->room['file'] == 'house_belaun' && false) {
} }
} }
//Генерируем список групп //Генерируем список групп
$sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "all" AND `delete` = "0" AND `time` > "' . (time() - 60 * 60 * 2) . '"'); $sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "all" AND `delete` = "0" AND `time` > "' . (time() - 60 * 60 * 2) . '"');
while ($pl = mysql_fetch_array($sp)) { while ($pl = mysql_fetch_array($sp)) {
$dungeonGroupList .= '<div style="padding:2px;">'; $dungeonGroupList .= '<div style="padding:2px;">';
if ($u->info['dn'] == 0) $dungeonGroupList .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />'; if ($u->info['dn'] == 0) {
$dungeonGroupList .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
}
$dungeonGroupList .= '<span class="date">' . date('H:i', $pl['time']) . '</span> '; $dungeonGroupList .= '<span class="date">' . date('H:i', $pl['time']) . '</span> ';
$dungeonGroupList .= '<span><img title="' . $dunname[$pl['dun']][1] . '" style="vertical-align:bottom" src="//img.new-combats.tech/i/city_ico2/' . $dunname[$pl['dun']][0] . '.gif" /></span> '; $dungeonGroupList .= '<span><img title="' . $dunname[$pl['dun']][1] . '" style="vertical-align:bottom" src="//img.new-combats.tech/i/city_ico2/' . $dunname[$pl['dun']][0] . '.gif" /></span> ';
$pus = ''; //группа $pus = ''; //группа
$su = mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . ''); $su = mysql_query(
'SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . ''
);
while ($pu = mysql_fetch_array($su)) { while ($pu = mysql_fetch_array($su)) {
$pus .= '<b>' . $pu['login'] . '</b> [' . $pu['level'] . ']<a href="info/' . $pu['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_' . $pu['city'] . '.gif" title="Инф. о ' . $pu['login'] . '"></a>'; $pus .= '<b>' . $pu['login'] . '</b> [' . $pu['level'] . ']<a href="info/' . $pu['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_' . $pu['city'] . '.gif" title="Инф. о ' . $pu['login'] . '"></a>';
$pus .= ', '; $pus .= ', ';
@ -881,7 +934,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
$dungeonGroupList .= $pus; $dungeonGroupList .= $pus;
unset($pus); unset($pus);
if ($pl['pass'] != '' && $u->info['dn'] == 0) $dungeonGroupList .= ' <small><input type="password" name="pass_com" value=""></small>'; if ($pl['pass'] != '' && $u->info['dn'] == 0) {
$dungeonGroupList .= ' <small><input type="password" name="pass_com" value=""></small>';
}
if ($pl['com'] != '') { if ($pl['com'] != '') {
$dl = ''; $dl = '';
@ -1011,7 +1066,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
?></a></td> ?></a></td>
</tr> </tr>
<?php if (isset($dungeon['shop']) && $dungeon['shop'] > 0) { <?php if (isset($dungeon['shop']) && $dungeon['shop'] > 0) {
$shop = mysql_fetch_array(mysql_query('SELECT `id` as shop_id, `code` FROM `room` WHERE `id` = "' . $dungeon['shop'] . '" LIMIT 1')); $shop = mysql_fetch_array(
mysql_query('SELECT `id` as shop_id, `code` FROM `room` WHERE `id` = "' . $dungeon['shop'] . '" LIMIT 1')
);
if (isset($shop['code'])) { if (isset($shop['code'])) {
?> ?>
<tr> <tr>
@ -1057,9 +1114,11 @@ if ($u->room['file'] == 'house_belaun' && false) {
</div> </div>
<?php } ?> <?php } ?>
<?php <?php
if ($error != '') echo '<font color="red"><b>' . $error . '</b></font><br>'; if ($error != '') {
echo '<font color="red"><b>' . $error . '</b></font><br>';
}
//отображаем //отображаем
if ($dungeonGroupList == '') { if ($dungeonGroupList == '') {
$dungeonGroupList = ''; $dungeonGroupList = '';
} else { } else {
@ -1089,14 +1148,20 @@ if ($u->room['file'] == 'house_belaun' && false) {
<form autocomplete="off" action='/main.php' method="post" name="F1" id="F1"> <form autocomplete="off" action='/main.php' method="post" name="F1" id="F1">
<?php <?php
$qsee = ''; $qsee = '';
$hgo = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `room` = "' . $u->info['room'] . '" AND `time` >= ' . (time() - 60 * 60 * 24) . ' AND `vars` = "psh_qt_' . $dungeon['city'] . '" LIMIT 1', 1); $hgo = $u->testAction(
'`uid` = "' . $u->info['id'] . '" AND `room` = "' . $u->info['room'] . '" AND `time` >= ' . (time() - 60 * 60 * 24) . ' AND `vars` = "psh_qt_' . $dungeon['city'] . '" LIMIT 1', 1
);
$qc = 0; // Quest Count $qc = 0; // Quest Count
//Генерируем список текущих квестов //Генерируем список текущих квестов
$sp = mysql_query('SELECT * FROM `actions` WHERE `vars` LIKE "%start_quest%" AND `vals` = "go" AND `uid` = "' . $u->info['id'] . '" LIMIT 100'); $sp = mysql_query('SELECT * FROM `actions` WHERE `vars` LIKE "%start_quest%" AND `vals` = "go" AND `uid` = "' . $u->info['id'] . '" LIMIT 100');
while ($pl = mysql_fetch_array($sp)) { while ($pl = mysql_fetch_array($sp)) {
if ($pl['room'] == $u->info['room']) { if ($pl['room'] == $u->info['room']) {
$pq = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `id` = "' . str_replace('start_quest', '', $pl['vars']) . '" LIMIT 1')); $pq = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `id` = "' . str_replace('start_quest', '', $pl['vars']) . '" LIMIT 1'));
if ($q->questCheckEnd($pq) == 1) $qsee2 = '<input style="margin-top:6px;" type="button" value="Завершить задание" onclick="location=\'main.php?rz=1&amp;endQuest=' . $pl['id'] . '\'">'; else $qsee2 = ''; if ($q->questCheckEnd($pq) == 1) {
$qsee2 = '<input style="margin-top:6px;" type="button" value="Завершить задание" onclick="location=\'main.php?rz=1&amp;endQuest=' . $pl['id'] . '\'">';
} else {
$qsee2 = '';
}
$qsee .= ' $qsee .= '
<a href="main.php?rz=1&end_qst_now=' . $pq['id'] . '"><img src="//img.new-combats.tech/i/clear.gif" title="Отказаться от задания"></a> <a href="main.php?rz=1&end_qst_now=' . $pq['id'] . '"><img src="//img.new-combats.tech/i/clear.gif" title="Отказаться от задания"></a>
@ -1175,7 +1240,7 @@ if ($u->room['file'] == 'house_belaun' && false) {
<input type='button' value='Получить задание' onclick='location="main.php?rz=1&add_quest=1"'/> <input type='button' value='Получить задание' onclick='location="main.php?rz=1&add_quest=1"'/>
<?php <?php
} else { } else {
echo 'Получить новое задание можно <b>' . date('d.m.Y H:i', $hgo['time'] + 60 * 60 * 24) . '</b> <font color="">( Через ' . $u->timeOut($hgo['time'] + 60 * 60 * 24 - time()) . ' )</font>'; echo 'Получить новое задание можно <b>' . date('d.m.Y H:i', $hgo['time'] + 60 * 60 * 24) . '</b> ( Через ' . Conversion::secondsToTimeout($hgo['time'] + 60 * 60 * 24 - time()) . ' )';
} }
?> ?>
</span> </span>
@ -1202,7 +1267,11 @@ if ($u->room['file'] == 'house_belaun' && false) {
if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) { if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) {
$u->rep['nu_' . $val] += $cur_price['nu_' . $val]; $u->rep['nu_' . $val] += $cur_price['nu_' . $val];
$r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); $r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
if ($r) $rt = 1; else $rt = 0; if ($r) {
$rt = 1;
} else {
$rt = 0;
}
} }
} }
if ($rt == 1) { if ($rt == 1) {
@ -1214,7 +1283,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
} else { } else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>'; echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
} }
} else echo 'Недостаточно репутации.'; } else {
echo 'Недостаточно репутации.';
}
} else { } else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>'; echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
} }
@ -1233,7 +1304,11 @@ if ($u->room['file'] == 'house_belaun' && false) {
if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) { if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) {
$u->rep['nu_' . $val] += $cur_price['nu_' . $val]; $u->rep['nu_' . $val] += $cur_price['nu_' . $val];
$r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); $r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
if ($r) $rt = 1; else $rt = 0; if ($r) {
$rt = 1;
} else {
$rt = 0;
}
} }
} }
if ($rt == 1) { if ($rt == 1) {
@ -1245,7 +1320,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
} else { } else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>'; echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
} }
} else echo 'Недостаточно репутации.'; } else {
echo 'Недостаточно репутации.';
}
} else { } else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>'; echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
} }
@ -1264,7 +1341,11 @@ if ($u->room['file'] == 'house_belaun' && false) {
if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) { if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) {
$u->rep['nu_' . $val] += $cur_price['nu_' . $val]; $u->rep['nu_' . $val] += $cur_price['nu_' . $val];
$r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); $r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
if ($r) $rt = 1; else $rt = 0; if ($r) {
$rt = 1;
} else {
$rt = 0;
}
} }
} }
if ($rt == 1) { if ($rt == 1) {
@ -1276,7 +1357,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
} else { } else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>'; echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
} }
} else echo 'Недостаточно репутации.'; } else {
echo 'Недостаточно репутации.';
}
} else { } else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>'; echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
} }
@ -1295,7 +1378,11 @@ if ($u->room['file'] == 'house_belaun' && false) {
if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) { if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) {
$u->rep['nu_' . $val] += $cur_price['nu_' . $val]; $u->rep['nu_' . $val] += $cur_price['nu_' . $val];
$r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); $r = mysql_query('UPDATE `rep` SET `nu_' . $val . '` = "' . $u->rep['nu_' . $val] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
if ($r) $rt = 1; else $rt = 0; if ($r) {
$rt = 1;
} else {
$rt = 0;
}
} }
} }
if ($rt == 1) { if ($rt == 1) {
@ -1307,7 +1394,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
} else { } else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>'; echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
} }
} else echo 'Недостаточно репутации.'; } else {
echo 'Недостаточно репутации.';
}
} else { } else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>'; echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
@ -1350,15 +1439,23 @@ if ($u->room['file'] == 'house_belaun' && false) {
</table> </table>
</fieldset> </fieldset>
<?php <?php
$chk = mysql_fetch_array(mysql_query('SELECT COUNT(`u`.`id`),SUM(`m`.`price1`) FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u->info['id'] . '" LIMIT 1000')); $chk = mysql_fetch_array(
mysql_query(
'SELECT COUNT(`u`.`id`),SUM(`m`.`price1`) FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u->info['id'] . '" LIMIT 1000'
)
);
if (isset($_GET['buy777']) && $chk[0] > 0) { if (isset($_GET['buy777']) && $chk[0] > 0) {
?> ?>
<fieldset style='margin-top:15px;'> <fieldset style='margin-top:15px;'>
<p><span style="padding-left: 10px"> <p><span style="padding-left: 10px">
<?php <?php
$chk_cl = mysql_query('SELECT `u`.`id`,`m`.`price1` FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u->info['id'] . '" LIMIT 1000'); $chk_cl = mysql_query(
'SELECT `u`.`id`,`m`.`price1` FROM `items_users` AS `u` LEFT JOIN `items_main` AS `m` ON `u`.`item_id` = `m`.`id` WHERE `m`.`type` = "61" AND `u`.`delete` = "0" AND `u`.`inOdet` = "0" AND `u`.`inShop` = "0" AND `u`.`inTransfer` = "0" AND `u`.`uid` = "' . $u->info['id'] . '" LIMIT 1000'
);
while ($chk_pl = mysql_fetch_array($chk_cl)) { while ($chk_pl = mysql_fetch_array($chk_cl)) {
if (mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $chk_pl['id'] . '" LIMIT 1')) ; if (mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $chk_pl['id'] . '" LIMIT 1')) {
;
}
{ {
$x++; $x++;
$prc += $chk_pl['price1']; $prc += $chk_pl['price1'];
@ -1468,7 +1565,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
} }
} }
} else { } else {
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . $u->timeOut(60 * 60 * 2 - time() + $dungeon_timeout['time']) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>'; echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(
60 * 60 * 2 - time() + $dungeon_timeout['time']
) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>';
} }
} }
} }

View File

@ -1,4 +1,7 @@
<?php <?php
use Core\Config;
if (!defined('GAME')) { if (!defined('GAME')) {
die(); die();
} }
@ -45,7 +48,12 @@ if (isset($_GET['payshtraf'])) {
mysql_query('UPDATE `users` SET `jail` = "0", `room`="9", `city`="capitalcity" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); mysql_query('UPDATE `users` SET `jail` = "0", `room`="9", `city`="capitalcity" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
mysql_query('UPDATE `items_users` SET `delete` = "0" WHERE `uid` = ' . $u->info['id'] . ' AND `delete` = "1357908642"'); mysql_query('UPDATE `items_users` SET `delete` = "0" WHERE `uid` = ' . $u->info['id'] . ' AND `delete` = "1357908642"');
$u->error = date('d.m.Y H:i', time()) . ' Вы успешно оплатили штраф ' . $_GET['payshtraf'] . ' и вышли из тюрьмы'; $u->error = date('d.m.Y H:i', time()) . ' Вы успешно оплатили штраф ' . $_GET['payshtraf'] . ' и вышли из тюрьмы';
$u->addDelo(3, $u->info['id'], 'Оплачен штраф: ' . $_GET['payshtraf'] . ' кр. и выпущен на свободу.', time(), $u->info['city'], 'Prison.System', 0, 0); Delo::add(
3,
'Prison.System',
$u->info['id'],
'Оплачен штраф: ' . $_GET['payshtraf'] . ' кр. и выпущен на свободу.',
);
} else { } else {
$u->error = 'Что то пошло не так'; $u->error = 'Что то пошло не так';
} }
@ -76,17 +84,17 @@ if (isset($_GET['ekrobmen'])) {
$u->error .= 'запил но на следующий день принес вам кр.'; $u->error .= 'запил но на следующий день принес вам кр.';
} }
$u->addDelo(3, $u->info['id'], 'Обмен 4 екр на 1000 кр.', time(), $u->info['city'], 'Prison.System', 0, 0); Delo::add(3, 'Prison.System', $u->info['id'], 'Обмен 4 екр на 1000 кр.',);
} else { } else {
$u->error = 'Не хватает средств!'; $u->error = 'Не хватает средств!';
} }
} }
?> ?>
<style type="text/css"> <style>
.pH3 { .pH3 {
COLOR: #8f0000; COLOR: #8f0000;
FONT-FAMILY: Arial; FONT-FAMILY: Arial, serif;
FONT-SIZE: 12pt; FONT-SIZE: 12pt;
FONT-WEIGHT: bold; FONT-WEIGHT: bold;
} }
@ -96,13 +104,13 @@ if (isset($_GET['ekrobmen'])) {
<td valign="top"> <td valign="top">
<div align="center" class="pH3"><?= $u->room['name'] ?></div> <div align="center" class="pH3"><?= $u->room['name'] ?></div>
<br/> <br/>
<font color=red><b><?= $u->error ?></b></font><br/> <b style="color: red"><?= $u->error ?></b><br/>
<?php if ($u->info['jail'] > time()) { ?> <?php if ($u->info['jail'] > time()) { ?>
Вы заточены в карцере до <?= date('d.m.Y H:i', $u->info['jail']) ?> <br> Вы заточены в карцере до <?= date('d.m.Y H:i', $u->info['jail']) ?> <br>
Освобождение возможно при условии оплаты Штрафа: Освобождение возможно при условии оплаты Штрафа:
<?php <?php
if (shtraf($u->info['jail']) > $u->info['money'] && $u->info['jail'] > 0) { if (shtraf($u->info['jail']) > $u->info['money'] && $u->info['jail'] > 0) {
echo "<font color=red><b>" . shtraf($u->info['jail']) . "</b></font> кр. У вас есть: " . $u->info['money'] . " кр."; echo "<b style='color: red'>" . shtraf($u->info['jail']) . "</b> кр. У вас есть: " . $u->info['money'] . " кр.";
?> ?>
<FORM action="/main.php?payshtraf=<?= shtraf($u->info['jail']); ?>" method="POST"> <FORM action="/main.php?payshtraf=<?= shtraf($u->info['jail']); ?>" method="POST">
<INPUT class="btn btn-success" TYPE="submit" disabled value="Оплатить">&nbspНедостаточно средств! <INPUT class="btn btn-success" TYPE="submit" disabled value="Оплатить">&nbspНедостаточно средств!
@ -115,7 +123,7 @@ if (isset($_GET['ekrobmen'])) {
} else { } else {
echo "<font color=gren><b>" . shtraf($u->info['jail']) . "</b></font> кр. "; echo "<b style='color: green'>" . shtraf($u->info['jail']) . "</b> кр. ";
?> ?>
<FORM action="/main.php?payshtraf=<?= shtraf($u->info['jail']); ?>" method="POST"> <FORM action="/main.php?payshtraf=<?= shtraf($u->info['jail']); ?>" method="POST">
<INPUT class="btn btn-success" TYPE="submit" value="Оплатить"> <INPUT class="btn btn-success" TYPE="submit" value="Оплатить">
@ -141,9 +149,14 @@ if (isset($_GET['ekrobmen'])) {
<td nowrap="nowrap"> <td nowrap="nowrap">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE"> <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
<tr> <tr>
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td> <td bgcolor="#D3D3D3">
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop" onclick="location='main.php?karcer_back=1';">Выйти из <img src="<?= Config::img() ?>/i/move/links.gif" width="9" height="7">
карцера</a></td> </td>
<td bgcolor="#D3D3D3" nowrap="nowrap">
<a href="#" id="greyText" class="menutop" onclick="location='main.php?karcer_back=1';">
Выйти из карцера
</a>
</td>
</tr> </tr>
</table> </table>
</td> </td>

View File

@ -1,391 +1,385 @@
<?php <?php
if(!defined('GAME'))
{ use Helper\Conversion;
die();
if (!defined('GAME')) {
die();
} }
if($u->room['file']=='penter') if ($u->room['file'] == 'penter') {
{
$dun = 1; //для новичков 2-7 лвл $dun = 1; //для новичков 2-7 лвл
$er = ''; $er = '';
$dzs = ''; $dzs = '';
$g111 = 1; $g111 = 1;
$g11 = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "psh1" AND `time`>'.(time()-7200).' LIMIT 1',1); $g11 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "psh1" AND `time`>' . (time() - 7200) . ' LIMIT 1', 1);
$moder = mysql_fetch_array(mysql_query('SELECT * FROM `moder` WHERE `align` = "'.$u->info['align'].'" LIMIT 1')); $moder = mysql_fetch_array(mysql_query('SELECT * FROM `moder` WHERE `align` = "' . $u->info['align'] . '" LIMIT 1'));
if ($u->info['dn'] > 0) {
$zv = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `id`="' . $u->info['dn'] . '" AND `delete` = "0" LIMIT 1'));
if (!isset($zv['id'])) {
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
$u->info['dn'] = 0;
}
}
if($u->info['dn']>0) if (isset($g11['id'])) {
{ $g111 = 0;
$zv = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `id`="'.$u->info['dn'].'" AND `delete` = "0" LIMIT 1')); if (isset($_GET['start'])) {
if(!isset($zv['id'])) $re = 'Поход в пещеры запрещен. Осталось еще: ' . Conversion::secondsToTimeout(7200 - time() + $g11['time']);
{ }
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); }
$u->info['dn'] = 0; if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $g111 == 1) {
} //начинаем поход
} //начинаем поход
$ig = 1;
if ($ig > 0) {
//перемещаем игроков в пещеру
//$u->addAction(time(),'psh1','');
$ins = mysql_query(
'INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
VALUES ("' . $zv['city'] . '","' . $zv['uid'] . '","' . $dun . '","Канализация","' . time() . '")'
);
if ($ins) {
$zid = mysql_insert_id();
//обновляем пользователей
$su = mysql_query(
'SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $zv['id'] . '" LIMIT ' . ($zv['team_max'] + 1) . ''
);
$ids = '';
while ($pu = mysql_fetch_array($su)) {
$ids .= ' `id` = "' . $pu['id'] . '" OR';
$u->addAction(time(), 'psh1', '', $pu['id']);
}
$ids = rtrim($ids, 'OR');
$upd1 = mysql_query('UPDATE `stats` SET `x`="0",`y`="0",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . '');
if ($upd1) {
$upd2 = mysql_query('UPDATE `users` SET `room` = "189" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . '');
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dun
//Добавляем ботов
$vls = '';
$sp = mysql_query('SELECT * FROM `dungeon_bots` WHERE `for_dn` = "' . $dun . '"');
while ($pl = mysql_fetch_array($sp)) {
$vls .= '("' . $zid . '","' . $pl['id_bot'] . '","' . $pl['colvo'] . '","' . $pl['items'] . '","' . $pl['x'] . '","' . $pl['y'] . '","' . $pl['dialog'] . '","' . $pl['items'] . '"),';
}
$vls = rtrim($vls, ',');
$ins1 = mysql_query('INSERT INTO `dungeon_bots` (`dn`,`id_bot`,`colvo`,`items`,`x`,`y`,`dialog`,`atack`) VALUES ' . $vls . '');
//Добавляем обьекты
$vls = '';
$sp = mysql_query('SELECT * FROM `dungeon_obj` WHERE `for_dn` = "' . $dun . '"');
while ($pl = mysql_fetch_array($sp)) {
$vls .= '("' . $zid . '","' . $pl['name'] . '","' . $pl['img'] . '","' . $pl['x'] . '","' . $pl['y'] . '","' . $pl['action'] . '","' . $pl['type'] . '","' . $pl['w'] . '","' . $pl['h'] . '","' . $pl['s'] . '","' . $pl['s2'] . '","' . $pl['os1'] . '","' . $pl['os2'] . '","' . $pl['os3'] . '","' . $pl['os4'] . '","' . $pl['type2'] . '","' . $pl['top'] . '","' . $pl['left'] . '","' . $pl['date'] . '"),';
}
$vls = rtrim($vls, ',');
$ins2 = mysql_query(
'INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES ' . $vls . ''
);
if(isset($g11['id'])) if ($upd2 && $ins1 && $ins2) {
{ mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
$g111 = 0; die('<script>location="main.php?rnd=' . $code . '";</script>');
if(isset($_GET['start'])) } else {
{ $re = 'Ошибка перехода в подземелье...';
$re = 'Поход в пещеры запрещен. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']); }
} } else {
} $re = 'Ошибка перехода в подземелье...';
if(isset($_GET['start']) && $zv['uid']==$u->info['id'] && $g111 == 1) }
{ } else {
//начинаем поход $re = 'Ошибка перехода в подземелье...';
//начинаем поход }
$ig = 1; }
if($ig>0) } elseif (isset($_POST['go'], $_POST['goid']) && $g111 == 1) {
{ if (!isset($zv['id'])) {
//перемещаем игроков в пещеру $zv = mysql_fetch_array(
//$u->addAction(time(),'psh1',''); mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `id`="' . mysql_real_escape_string($_POST['goid']) . '" AND `delete` = "0" LIMIT 1')
$ins = mysql_query('INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`) );
VALUES ("'.$zv['city'].'","'.$zv['uid'].'","'.$dun.'","Канализация","'.time().'")'); if (isset($zv['id'])) {
if($ins) if ($zv['lvlmin'] == $u->info['level'] || $u->info['admin'] > 0) {
{ $row = 0;
$zid = mysql_insert_id(); if ($zv['team_max'] > $row || $u->info['admin'] > 0) {
//обновляем пользователей $upd = mysql_query('UPDATE `stats` SET `dn` = "' . $zv['id'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
$su = mysql_query('SELECT `u`.`id`,`st`.`dn` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="'.$zv['id'].'" LIMIT '.($zv['team_max']+1).''); if (!$upd) {
$ids = ''; $re = 'Не удалось вступить в эту группу';
while($pu = mysql_fetch_array($su)) unset($zv);
{ } else {
$ids .= ' `id` = "'.$pu['id'].'" OR'; $u->info['dn'] = $zv['id'];
$u->addAction(time(),'psh1','',$pu['id']); }
} } else {
$ids = rtrim($ids,'OR'); $re = 'В группе нет места';
$upd1 = mysql_query('UPDATE `stats` SET `x`="0",`y`="0",`dn` = "0",`dnow` = "'.$zid.'" WHERE '.$ids.' LIMIT '.($zv['team_max']+1).''); unset($zv);
if($upd1) }
{ } else {
$upd2 = mysql_query('UPDATE `users` SET `room` = "189" WHERE '.$ids.' LIMIT '.($zv['team_max']+1).''); $re = 'Вы не подходите по уровню';
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dun unset($zv);
//Добавляем ботов }
$vls = ''; } else {
$sp = mysql_query('SELECT * FROM `dungeon_bots` WHERE `for_dn` = "'.$dun.'"'); $re = 'Заявка не найдена';
while($pl = mysql_fetch_array($sp)) }
{ } else {
$vls .= '("'.$zid.'","'.$pl['id_bot'].'","'.$pl['colvo'].'","'.$pl['items'].'","'.$pl['x'].'","'.$pl['y'].'","'.$pl['dialog'].'","'.$pl['items'].'"),'; $re = 'Вы уже находитесь в группе';
} }
$vls = rtrim($vls,','); } elseif (isset($_POST['leave']) && isset($zv['id']) && $g111 == 1) {
$ins1 = mysql_query('INSERT INTO `dungeon_bots` (`dn`,`id_bot`,`colvo`,`items`,`x`,`y`,`dialog`,`atack`) VALUES '.$vls.''); if ($zv['uid'] == $u->info['id']) {
//Добавляем обьекты //ставим в группу нового руководителя
$vls = ''; $ld = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `dn` = "' . $zv['id'] . '" AND `id` != "' . $u->info['id'] . '" LIMIT 1'));
$sp = mysql_query('SELECT * FROM `dungeon_obj` WHERE `for_dn` = "'.$dun.'"'); if (isset($ld['id'])) {
while($pl = mysql_fetch_array($sp)) $zv['uid'] = $ld['id'];
{ mysql_query('UPDATE `dungeon_zv` SET `uid` = "' . $zv['uid'] . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
$vls .= '("'.$zid.'","'.$pl['name'].'","'.$pl['img'].'","'.$pl['x'].'","'.$pl['y'].'","'.$pl['action'].'","'.$pl['type'].'","'.$pl['w'].'","'.$pl['h'].'","'.$pl['s'].'","'.$pl['s2'].'","'.$pl['os1'].'","'.$pl['os2'].'","'.$pl['os3'].'","'.$pl['os4'].'","'.$pl['type2'].'","'.$pl['top'].'","'.$pl['left'].'","'.$pl['date'].'"),'; mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
} $u->info['dn'] = 0;
$vls = rtrim($vls,','); unset($zv);
$ins2 = mysql_query('INSERT INTO `dungeon_obj` (`dn`,`name`,`img`,`x`,`y`,`action`,`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`) VALUES '.$vls.''); } else {
//удаляем группу целиком
mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
$u->info['dn'] = 0;
unset($zv);
}
} else {
//просто выходим с группы
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
$u->info['dn'] = 0;
unset($zv);
}
} elseif (isset($_POST['add']) && $u->info['level'] > 1 && $g111 == 1) {
if ($u->info['dn'] == 0) {
$lmn = $u->info['level'] - 1;
$lmx = $u->info['level'] + 1;
$tmx = 0;
if($upd2 && $ins1 && $ins2) if ($lmn < 2) {
{ $lmn = 2;
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv['id'].'" LIMIT 1'); }
die('<script>location="main.php?rnd='.$code.'";</script>'); if ($lmn > 7) {
}else{ $lmn = 7;
$re = 'Ошибка перехода в подземелье...'; }
} if ($lmx < 2) {
}else{ $lmx = 2;
$re = 'Ошибка перехода в подземелье...'; }
} if ($lmx > 7) {
}else{ $lmx = 7;
$re = 'Ошибка перехода в подземелье...'; }
}
}
}elseif(isset($_POST['go'],$_POST['goid']) && $g111==1)
{
if(!isset($zv['id']))
{
$zv = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "'.$u->info['city'].'" AND `id`="'.mysql_real_escape_string($_POST['goid']).'" AND `delete` = "0" LIMIT 1'));
if(isset($zv['id']))
{
if($zv['lvlmin']==$u->info['level'] || $u->info['admin']>0)
{
$row = 0;
if($zv['team_max']>$row || $u->info['admin']>0)
{
$upd = mysql_query('UPDATE `stats` SET `dn` = "'.$zv['id'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
if(!$upd)
{
$re = 'Не удалось вступить в эту группу';
unset($zv);
}else{
$u->info['dn'] = $zv['id'];
}
}else{
$re = 'В группе нет места';
unset($zv);
}
}else{
$re = 'Вы не подходите по уровню';
unset($zv);
}
}else{
$re = 'Заявка не найдена';
}
}else{
$re = 'Вы уже находитесь в группе';
}
}elseif(isset($_POST['leave']) && isset($zv['id']) && $g111 == 1)
{
if($zv['uid']==$u->info['id'])
{
//ставим в группу нового руководителя
$ld = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `dn` = "'.$zv['id'].'" AND `id` != "'.$u->info['id'].'" LIMIT 1'));
if(isset($ld['id']))
{
$zv['uid'] = $ld['id'];
mysql_query('UPDATE `dungeon_zv` SET `uid` = "'.$zv['uid'].'" WHERE `id` = "'.$zv['id'].'" LIMIT 1');
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$u->info['dn'] = 0;
unset($zv);
}else{
//удаляем группу целиком
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv['id'].'" LIMIT 1');
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$u->info['dn'] = 0;
unset($zv);
}
}else{
//просто выходим с группы
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$u->info['dn'] = 0;
unset($zv);
}
}elseif(isset($_POST['add']) && $u->info['level']>1 && $g111 == 1)
{
if($u->info['dn']==0)
{
$lmn = $u->info['level']-1;
$lmx = $u->info['level']+1;
$tmx = 0;
if($lmn<2){ $lmn = 2; } if ($u->info['level'] >= 6 && $u->info['admin'] == 0) {
if($lmn>7){ $lmn = 7; } $tmx = 0;
if($lmx<2){ $lmx = 2; } } else {
if($lmx>7){ $lmx = 7; } $tmx = 5;
}
if($u->info['level']>=6 && $u->info['admin']==0) //только своего уровня
{ $lmn = $u->info['level'];
$tmx = 0;
}else{
$tmx = 5;
}
//только своего уровня $ins = mysql_query(
$lmn = $u->info['level']; 'INSERT INTO `dungeon_zv`
$ins = mysql_query('INSERT INTO `dungeon_zv`
(`city`,`time`,`uid`,`dun`,`pass`,`com`,`lvlmin`,`lvlmax`,`team_max`) VALUES (`city`,`time`,`uid`,`dun`,`pass`,`com`,`lvlmin`,`lvlmax`,`team_max`) VALUES
("'.$u->info['city'].'","'.time().'","'.$u->info['id'].'","'.$dun.'", ("' . $u->info['city'] . '","' . time() . '","' . $u->info['id'] . '","' . $dun . '",
"'.mysql_real_escape_string($_POST['pass']).'", "' . mysql_real_escape_string($_POST['pass']) . '",
"'.mysql_real_escape_string($_POST['text']).'", "' . mysql_real_escape_string($_POST['text']) . '",
"'.$lmn.'", "' . $lmn . '",
"'.$lmx.'", "' . $lmx . '",
"'.$tmx.'")'); "' . $tmx . '")'
if($ins) );
{ if ($ins) {
$u->info['dn'] = mysql_insert_id(); $u->info['dn'] = mysql_insert_id();
$zv['id'] = $u->info['dn']; $zv['id'] = $u->info['dn'];
$zv['uid'] = $u->info['id']; $zv['uid'] = $u->info['id'];
mysql_query('UPDATE `stats` SET `dn` = "'.$u->info['dn'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); mysql_query('UPDATE `stats` SET `dn` = "' . $u->info['dn'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
$re = 'Вы успешно создали группу'; $re = 'Вы успешно создали группу';
}else{ } else {
$re = 'Не удалось создать группу'; $re = 'Не удалось создать группу';
} }
}else{ } else {
$re = 'Вы уже находитесь в группе'; $re = 'Вы уже находитесь в группе';
} }
} }
//Генерируем список групп //Генерируем список групп
$sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "'.$u->info['city'].'" AND `lvlmin` = "'.$u->info['level'].'" AND `delete` = "0" AND `time` > "'.(time()-60*60*2).'"'); $sp = mysql_query(
while($pl = mysql_fetch_array($sp)) 'SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `lvlmin` = "' . $u->info['level'] . '" AND `delete` = "0" AND `time` > "' . (time() - 60 * 60 * 2) . '"'
{ );
$dzs .= '<div style="padding:2px;">'; while ($pl = mysql_fetch_array($sp)) {
if($u->info['dn']==0) $dzs .= '<div style="padding:2px;">';
{ if ($u->info['dn'] == 0) {
$dzs .= '<input type="radio" name="goid" id="goid" value="'.$pl['id'].'" />'; $dzs .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
} }
$dzs .= '<span class="date">'.date('H:i',$pl['time']).'</span> '; $dzs .= '<span class="date">' . date('H:i', $pl['time']) . '</span> ';
$pus = ''; //группа $pus = ''; //группа
$su = mysql_query('SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="'.$pl['id'].'" LIMIT '.($pl['team_max']+1).''); $su = mysql_query(
while($pu = mysql_fetch_array($su)) 'SELECT `u`.`id`,`u`.`login`,`u`.`level`,`u`.`align`,`u`.`clan`,`st`.`dn`,`u`.`city`,`u`.`room` FROM `stats` AS `st` LEFT JOIN `users` AS `u` ON (`st`.`id` = `u`.`id`) WHERE `st`.`dn`="' . $pl['id'] . '" LIMIT ' . ($pl['team_max'] + 1) . ''
{ );
$pus .= '<b>'.$pu['login'].'</b> ['.$pu['level'].']<a href="info/'.$pu['id'].'" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" title="Инф. о '.$pu['login'].'"></a>'; while ($pu = mysql_fetch_array($su)) {
$pus .= ', '; $pus .= '<b>' . $pu['login'] . '</b> [' . $pu['level'] . ']<a href="info/' . $pu['id'] . '" target="_blank"><img src="//img.new-combats.tech/i/inf_capitalcity.gif" title="Инф. о ' . $pu['login'] . '"></a>';
} $pus .= ', ';
$pus = trim($pus,', '); }
$pus = trim($pus, ', ');
$dzs .= $pus; $dzs .= $pus;
if($pl['com']!='') if ($pl['com'] != '') {
{ $dl = '';
$dl = ''; if (($moder['boi'] == 1 || $u->info['admin'] > 0) && $pl['dcom'] == 0) {
if(($moder['boi']==1 || $u->info['admin']>0) && $pl['dcom']==0) $dl .= ' (<a href="?delcom=' . $pl['id'] . '&key=' . $u->info['nextAct'] . '&rnd=' . $code . '">удалить комментарий</a>)';
{ if (isset($_GET['delcom']) && $_GET['delcom'] == $pl['id'] && $u->newAct($_GET['key']) == true) {
$dl .= ' (<a href="?delcom='.$pl['id'].'&key='.$u->info['nextAct'].'&rnd='.$code.'">удалить комментарий</a>)'; mysql_query('UPDATE `dungeon_zv` SET `dcom` = "' . $u->info['id'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1');
if(isset($_GET['delcom']) && $_GET['delcom']==$pl['id'] && $u->newAct($_GET['key'])==true) $pl['dcom'] = $u->info['id'];
{ }
mysql_query('UPDATE `dungeon_zv` SET `dcom` = "'.$u->info['id'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1'); }
$pl['dcom'] = $u->info['id'];
}
}
$pl['com'] = htmlspecialchars($pl['com'],NULL); $pl['com'] = htmlspecialchars($pl['com'], null);
if($pl['dcom']>0) if ($pl['dcom'] > 0) {
{ $dl = ' <font color="grey"><i>комментарий удален модератором</i></font>';
$dl = ' <font color="grey"><i>комментарий удален модератором</i></font>'; }
}
if($pl['dcom']>0) if ($pl['dcom'] > 0) {
{ if ($moder['boi'] == 1 || $u->info['admin'] > 0) {
if($moder['boi']==1 || $u->info['admin']>0) $pl['com'] = '<font color="red">' . $pl['com'] . '</font>';
{ } else {
$pl['com'] = '<font color="red">'.$pl['com'].'</font>'; $pl['com'] = '';
}else{ }
$pl['com'] = ''; }
}
}
$dzs .= '<small> | '.$pl['com'].''.$dl.'</small>'; $dzs .= '<small> | ' . $pl['com'] . '' . $dl . '</small>';
} }
$dzs .= '</div>'; $dzs .= '</div>';
} }
?> ?>
<style> <style>
body body {
{ background-color: #E2E2E2;
background-color:#E2E2E2; background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg); background-repeat: no-repeat;
background-repeat:no-repeat;background-position:top right; background-position: top right;
} }
</style> </style>
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div style="padding-left:0px;" align="center">
<h3><?= $u->room['name']; ?></h3>
</div></td>
<td width="200"><div align="right">
<table cellspacing="0" cellpadding="0">
<tr> <tr>
<td width="100%">&nbsp;</td> <td>
<td><table border="0" cellpadding="0" cellspacing="0"> <div style="padding-left:0px;" align="center">
<tr align="right" valign="top"> <h3><?= $u->room['name']; ?></h3>
<td><!-- --> </div>
<?= $goLis; ?> </td>
<!-- --> <td width="200">
<table border="0" cellspacing="0" cellpadding="0"> <div align="right">
<tr> <table cellspacing="0" cellpadding="0">
<td nowrap="nowrap"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE"> <tr>
<tr> <td width="100%">&nbsp;</td>
<td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7" /></td> <td>
<td bgcolor="#D3D3D3" nowrap="nowrap"><a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=<?php if($u->info['city']=='fallenearth'){ echo '6.180.0.102'; } else {echo '1.180.0.321'; }?>&rnd=<?= $code; ?>';" title="<?php <table border="0" cellpadding="0" cellspacing="0">
if($u->info['city']=='fallenearth'){ <tr align="right" valign="top">
thisInfRm('6.180.0.102',1); <td><!-- -->
}else { <?= $goLis; ?>
thisInfRm('1.180.0.321',1); <!-- -->
} <table border="0" cellspacing="0" cellpadding="0">
?>"><?php <tr>
if($u->info['city']=='fallenearth'){ <td nowrap="nowrap">
echo "Темный Портал"; <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
}else { <tr>
echo "Магический Портал"; <td bgcolor="#D3D3D3"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/></td>
} <td bgcolor="#D3D3D3" nowrap="nowrap">
?></a></td> <a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=<?php if ($u->info['city'] == 'fallenearth') {
</tr> echo '6.180.0.102';
</table></td> } else {
</tr> echo '1.180.0.321';
</table></td> } ?>&rnd=<?= $code; ?>';" title="<?php
</tr> if ($u->info['city'] == 'fallenearth') {
</table></td> thisInfRm('6.180.0.102', 1);
} else {
thisInfRm('1.180.0.321', 1);
}
?>"><?php
if ($u->info['city'] == 'fallenearth') {
echo "Темный Портал";
} else {
echo "Магический Портал";
}
?></a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr> </tr>
</table> </table>
</div></td> <?php
</tr> if ($re != '') {
</table> echo '<font color="red"><b>' . $re . '</b></font><br>';
<?php }
if($re!='')
{
echo '<font color="red"><b>'.$re.'</b></font><br>';
}
//отображаем //отображаем
if($dzs=='') if ($dzs == '') {
{ $dzs = '';
$dzs = ''; } else {
}else{ if (!isset($zv['id'])) {
if(!isset($zv['id'])) if ($g111 == 1) {
{ $pr = '<input name="go" type="submit" value="Вступить в группу">';
if($g111==1) }
{ $dzs = '<form action="main.php?rnd=' . $code . '" method="post">' . $pr . '<br>' . $dzs . '' . $pr . '</form>';
$pr = '<input name="go" type="submit" value="Вступить в группу">'; }
} $dzs .= '<hr>';
$dzs = '<form action="main.php?rnd='.$code.'" method="post">'.$pr.'<br>'.$dzs.''.$pr.'</form>'; }
}
$dzs .= '<hr>';
}
echo $dzs; echo $dzs;
if($g111 == 1) if ($g111 == 1) {
{ if ($u->info['dn'] == 0) {
if($u->info['dn']==0) ?>
{ <table width="350" border="0" cellspacing="0" cellpadding="0">
?> <tr>
<table width="350" border="0" cellspacing="0" cellpadding="0"> <td valign="top">
<tr> <form autocomplete="off" id="from" name="from" action="main.php?pz1=<?= $code; ?>" method="post">
<td valign="top"> <fieldset style='padding-left: 5; width=50%'>
<form autocomplete="off" id="from" name="from" action="main.php?pz1=<?= $code; ?>" method="post"> <legend><b> Группа </b></legend>
<fieldset style='padding-left: 5; width=50%'> Комментарий
<legend><b> Группа </b> </legend> <input type="text" name="text" maxlength="40" size="40"/>
Комментарий <br/>
<input type="text" name="text" maxlength="40" size="40" /> Пароль
<br /> <input type="password" name="pass" maxlength="25" size="25"/>
Пароль <br/>
<input type="password" name="pass" maxlength="25" size="25" /> <input type="submit" name="add" value="Создать группу"/>
<br /> &nbsp;<br/>
<input type="submit" name="add" value="Создать группу" /> </fieldset>
&nbsp;<br /> </form>
</fieldset> </td>
</form> </tr>
</td> </table>
</tr> <?php
</table> } else {
<?php $psh_start = '';
}else{ if (isset($zv['id'])) {
$psh_start = ''; if ($zv['uid'] == $u->info['id']) {
if(isset($zv['id'])) $psh_start = '<INPUT type=\'button\' name=\'start\' value=\'Начать\' onClick="top.frames[\'main\'].location = \'main.php?start=1&rnd=' . $code . '\'"> &nbsp;';
{ }
if($zv['uid']==$u->info['id'])
{
$psh_start = '<INPUT type=\'button\' name=\'start\' value=\'Начать\' onClick="top.frames[\'main\'].location = \'main.php?start=1&rnd='.$code.'\'"> &nbsp;';
}
echo '<br><FORM id="REQUEST" method="post" style="width:210px;" action="main.php?rnd='.$code.'"> echo '<br><FORM id="REQUEST" method="post" style="width:210px;" action="main.php?rnd=' . $code . '">
<FIELDSET style=\'padding-left: 5; width=50%\'> <FIELDSET style=\'padding-left: 5; width=50%\'>
<LEGEND><B> Группа </B> </LEGEND> <LEGEND><B> Группа </B> </LEGEND>
'.$psh_start.' ' . $psh_start . '
<INPUT type=\'submit\' name=\'leave\' value=\'Покинуть группу\'> <INPUT type=\'submit\' name=\'leave\' value=\'Покинуть группу\'>
</FIELDSET> </FIELDSET>
</FORM>'; </FORM>';
} }
} }
?> ?>
<?php <?php
}else{ } else {
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']).'<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>'; echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(
7200 - time() + $g11['time']
) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>';
}
} }
}
?>

View File

@ -42,7 +42,13 @@ if (isset($_GET['r'])) {
if (isset($_GET['upgrade']) && true == false) { if (isset($_GET['upgrade']) && true == false) {
//улучшение предмета //улучшение предмета
$ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`data` LIKE "%modif%" AND `iu`.`data` NOT LIKE "%upgrade=5%" AND `iu`.`id` = "' . mysql_real_escape_string((int)$_GET['upgrade']) . '" LIMIT 1')); $ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`data` LIKE "%modif%" AND `iu`.`data` NOT LIKE "%upgrade=5%" AND `iu`.`id` = "' . mysql_real_escape_string(
(int)$_GET['upgrade']
) . '" LIMIT 1'
)
);
if (isset($ir['id'])) { if (isset($ir['id'])) {
$po = []; $po = [];
$po = Conversion::dataStringToArray($ir['data']); $po = Conversion::dataStringToArray($ir['data']);
@ -112,9 +118,14 @@ if (isset($_GET['upgrade']) && true == false) {
$po['add_hpAll'] += $fadd[3]; $po['add_hpAll'] += $fadd[3];
$po['upgrade']++; $po['upgrade']++;
$re = '<div align="left">Предмет &quot;' . $ir['name'] . '&quot; был успешно улучшен (' . $po['upgrade'] . '/5) за ' . $pcena . ' кр.</div>'; $re = '<div>Предмет &quot;' . $ir['name'] . '&quot; был успешно улучшен (' . $po['upgrade'] . '/5) за ' . $pcena . ' кр.</div>';
$u->addDelo(2, $u->info['id'], '&quot;<font color="#4863A0">System.remont.itemUpgrade</font>&quot;: Предмет &quot;' . $ir['name'] . '&quot; [itm:' . $ir['id'] . '] был успешно улучшен (' . $po['upgrade'] . '/5) за ' . $pcena . ' кр..', time(), $u->info['city'], 'System.remont.itemUpgrade', 0, 0); Delo::add(
2,
'System.remont.itemUpgrade',
$u->info['id'],
'&quot;<span style="color: #4863A0; ">System.remont.itemUpgrade</span>&quot;: Предмет &quot;' . $ir['name'] . '&quot; [itm:' . $ir['id'] . '] был успешно улучшен (' . $po['upgrade'] . '/5) за ' . $pcena . ' кр..',
);
$po = Conversion::arrayToDataString($po); $po = Conversion::arrayToDataString($po);
mysql_query('UPDATE `items_users` SET `data` = "' . $po . '",`1price` = "' . $ir['1price'] . '" WHERE `id` = "' . $ir['id'] . '" LIMIT 1'); mysql_query('UPDATE `items_users` SET `data` = "' . $po . '",`1price` = "' . $ir['1price'] . '" WHERE `id` = "' . $ir['id'] . '" LIMIT 1');
@ -132,9 +143,13 @@ if (isset($_GET['upgrade']) && true == false) {
} }
} elseif (isset($_GET['modif']) && true == false) { } elseif (isset($_GET['modif']) && true == false) {
//модификация //модификация
$ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND $ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND
`iu`.`data` NOT LIKE "%modif%" AND `im`.`type` > 0 AND `im`.`type` < 16 AND (`iu`.`data` LIKE "%add_s1%" OR `iu`.`data` LIKE "%add_s2%" OR `iu`.`data` LIKE "%add_s3%" OR `iu`.`data` LIKE "%add_s5%" OR `iu`.`data` LIKE "%add_hpAll%" OR `iu`.`data` LIKE "%add_mib%") `iu`.`data` NOT LIKE "%modif%" AND `im`.`type` > 0 AND `im`.`type` < 16 AND (`iu`.`data` LIKE "%add_s1%" OR `iu`.`data` LIKE "%add_s2%" OR `iu`.`data` LIKE "%add_s3%" OR `iu`.`data` LIKE "%add_s5%" OR `iu`.`data` LIKE "%add_hpAll%" OR `iu`.`data` LIKE "%add_mib%")
AND `iu`.`id` = "' . mysql_real_escape_string((int)$_GET['modif']) . '" LIMIT 1')); AND `iu`.`id` = "' . mysql_real_escape_string((int)$_GET['modif']) . '" LIMIT 1'
)
);
if (isset($ir['id'])) { if (isset($ir['id'])) {
$po = []; $po = [];
$po = Conversion::dataStringToArray($ir['data']); $po = Conversion::dataStringToArray($ir['data']);
@ -266,7 +281,13 @@ if (isset($_GET['upgrade']) && true == false) {
} }
} elseif (isset($_GET['ubeff']) && true == false) { } elseif (isset($_GET['ubeff']) && true == false) {
// Берем в переменную текущий предмет. // Берем в переменную текущий предмет.
$ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`data` LIKE "%upatack_id%" AND `iu`.`id` = "' . mysql_real_escape_string((int)$_GET['ubeff']) . '" LIMIT 1')); $ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`data` LIKE "%upatack_id%" AND `iu`.`id` = "' . mysql_real_escape_string(
(int)$_GET['ubeff']
) . '" LIMIT 1'
)
);
// Предмет существует. // Предмет существует.
if (isset($ir['id'])) { if (isset($ir['id'])) {
@ -291,7 +312,13 @@ if (isset($_GET['upgrade']) && true == false) {
$pcena -= 14; // Уменьшаем цену после извлеченния заточки. $pcena -= 14; // Уменьшаем цену после извлеченния заточки.
if (isset($po['upatack_id'])) { // Добавляем заточку в инвентарь. if (isset($po['upatack_id'])) { // Добавляем заточку в инвентарь.
// Берем в переменную свиток заточки, который находится в предмете. // Берем в переменную свиток заточки, который находится в предмете.
$upattack = 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`.`id` = "' . mysql_real_escape_string((int)$po["upatack"]) . '" LIMIT 1')); $upattack = 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`.`id` = "' . mysql_real_escape_string(
(int)$po["upatack"]
) . '" LIMIT 1'
)
);
if (isset($upattack) && $upattack['item_id'] && $upattack['delete'] > 0) { // Если старый предмет не удален из базы, мы его восстанавливаем. if (isset($upattack) && $upattack['item_id'] && $upattack['delete'] > 0) { // Если старый предмет не удален из базы, мы его восстанавливаем.
mysql_query('UPDATE `items_users` SET `delete` = "' . mysql_real_escape_string(0) . '" WHERE `id` = "' . $po["upatack"] . '" LIMIT 1'); mysql_query('UPDATE `items_users` SET `delete` = "' . mysql_real_escape_string(0) . '" WHERE `id` = "' . $po["upatack"] . '" LIMIT 1');
mysql_query('UPDATE `items_users` SET `data` = CONCAT(`data`,"noremont=1") WHERE `id` = "' . $po["upatack"] . '" LIMIT 1'); mysql_query('UPDATE `items_users` SET `data` = CONCAT(`data`,"noremont=1") WHERE `id` = "' . $po["upatack"] . '" LIMIT 1');
@ -313,7 +340,9 @@ if (isset($_GET['upgrade']) && true == false) {
if ($upattack['uptype'] == 22) { if ($upattack['uptype'] == 22) {
$po['add_m11'] -= $upattack['upatack'] * 2; $po['add_m11'] -= $upattack['upatack'] * 2;
$po['tr_lvl'] = $item_default['tr_lvl']; $po['tr_lvl'] = $item_default['tr_lvl'];
if (isset($po['add_m11']) && $po['add_m11'] == 0) unset($po['add_m11']); if (isset($po['add_m11']) && $po['add_m11'] == 0) {
unset($po['add_m11']);
}
} else { } else {
$po['sv_yron_min'] -= $upattack['upatack']; $po['sv_yron_min'] -= $upattack['upatack'];
$po['sv_yron_max'] -= $upattack['upatack']; $po['sv_yron_max'] -= $upattack['upatack'];
@ -339,7 +368,13 @@ if (isset($_GET['upgrade']) && true == false) {
} }
} elseif (isset($_GET['unrune'])) { } elseif (isset($_GET['unrune'])) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/_incl_data/class/Insallah/Runes/Runes.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/_incl_data/class/Insallah/Runes/Runes.php';
$ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`data` LIKE "%rune_id%" AND `iu`.`id` = "' . mysql_real_escape_string((int)$_GET['unrune']) . '" LIMIT 1')); $ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`data` LIKE "%rune_id%" AND `iu`.`id` = "' . mysql_real_escape_string(
(int)$_GET['unrune']
) . '" LIMIT 1'
)
);
if (isset($ir['id'])) { if (isset($ir['id'])) {
$po = []; $po = [];
$po = Conversion::dataStringToArray($ir['data']); $po = Conversion::dataStringToArray($ir['data']);
@ -356,12 +391,12 @@ if (isset($_GET['upgrade']) && true == false) {
/** Самое новое изъятие рун. ;)*/ /** Самое новое изъятие рун. ;)*/
$item_and_rune = Runes::removeRuneData($po); $item_and_rune = Runes::removeRuneData($po);
if (!empty($item_and_rune)) { if (!empty($item_and_rune)) {
# Добавляем предмет без руны # Добавляем предмет без руны
mysql_query(sprintf("update items_users set data = '%s' where id = %d", $item_and_rune['item'], $ir['id'])); mysql_query(sprintf("update items_users set data = '%s' where id = %d", $item_and_rune['item'], $ir['id']));
# Отнимаем деньги # Отнимаем деньги
$u->info['money'] -= $pcena; $u->info['money'] -= $pcena;
mysql_query(sprintf("update users set money = money - %f where id = %d", $pcena, $u->info['id'])); mysql_query(sprintf("update users set money = money - %f where id = %d", $pcena, $u->info['id']));
# Добавляем руну # Добавляем руну
ItemsModel::addItem($item_and_rune['rune_id'], $u->info['id'], $item_and_rune['rune'], null, null, true); ItemsModel::addItem($item_and_rune['rune_id'], $u->info['id'], $item_and_rune['rune'], null, null, true);
} else { } else {
/** Если пытаемся извлечь любую руну кроме 6001, 6002, 6003. */ /** Если пытаемся извлечь любую руну кроме 6001, 6002, 6003. */
@ -374,7 +409,13 @@ if (isset($_GET['upgrade']) && true == false) {
$re = '<div>Подходящий предмет не найден в инвентаре</div>'; $re = '<div>Подходящий предмет не найден в инвентаре</div>';
} }
} elseif (isset($_GET['ubeff'])) { } elseif (isset($_GET['ubeff'])) {
$ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`data` LIKE "%upatack_id%" AND `iu`.`id` = "' . mysql_real_escape_string((int)$_GET['ubeff']) . '" LIMIT 1')); $ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`data` LIKE "%upatack_id%" AND `iu`.`id` = "' . mysql_real_escape_string(
(int)$_GET['ubeff']
) . '" LIMIT 1'
)
);
if (isset($ir['id'])) { if (isset($ir['id'])) {
$po = []; $po = [];
$po = Conversion::dataStringToArray($ir['data']); $po = Conversion::dataStringToArray($ir['data']);
@ -409,9 +450,15 @@ if (isset($_GET['upgrade']) && true == false) {
} }
ItemsModel::addItem($po['upatack_id'], $u->info['id'], null, null, null, 1); ItemsModel::addItem($po['upatack_id'], $u->info['id'], null, null, null, 1);
$re = '<div align="left">Заточка &quot;' . $po['upatack_name'] . '&quot; была успешно извлечена из предмета &quot;' . $ir['name'] . '&quot; за ' . $pcena . ' кр.</div>'; $re = '<div>Заточка &quot;' . $po['upatack_name'] . '&quot; была успешно извлечена из предмета &quot;' . $ir['name'] . '&quot; за ' . $pcena . ' кр.</div>';
Delo::add(
2,
'System.remont.ubeff',
$u->info['id'],
'&quot;<span style="color: #4863A0; ">System.remont.ubeff</span>&quot;: Руна &quot;' . $po['upatack_name'] . '&quot; была успешно извлечена из предмета &quot;' . $ir['name'] . '&quot; [itm:' . $ir['id'] . '] за ' . $pcena . ' кр.',
);
$u->addDelo(2, $u->info['id'], '&quot;<font color="#4863A0">System.remont.ubeff</font>&quot;: Руна &quot;' . $po['upatack_name'] . '&quot; была успешно извлечена из предмета &quot;' . $ir['name'] . '&quot; [itm:' . $ir['id'] . '] за ' . $pcena . ' кр.', time(), $u->info['city'], 'System.remont.ubeff', 0, 0);
unset($po['upatack'], $po['upatack_id'], $po['upatack_name'], $po['upatack_lvl']); unset($po['upatack'], $po['upatack_id'], $po['upatack_name'], $po['upatack_lvl']);
$po = Conversion::arrayToDataString($po); $po = Conversion::arrayToDataString($po);
mysql_query('UPDATE `items_users` SET `data` = "' . $po . '" WHERE `id` = "' . $ir['id'] . '" LIMIT 1'); mysql_query('UPDATE `items_users` SET `data` = "' . $po . '" WHERE `id` = "' . $ir['id'] . '" LIMIT 1');
@ -419,13 +466,19 @@ if (isset($_GET['upgrade']) && true == false) {
$u->info['money'] -= $pcena; $u->info['money'] -= $pcena;
} else { } else {
$re = '<div align="left">У вас не достаточно средств для извлечения, стоимость извлечения заточки ' . $pcena . ' кр</div>'; $re = '<div>У вас не достаточно средств для извлечения, стоимость извлечения заточки ' . $pcena . ' кр</div>';
} }
} else { } else {
$re = '<div align="left">Подходящий предмет не найден в инвентаре</div>'; $re = '<div>Подходящий предмет не найден в инвентаре</div>';
} }
} elseif (isset($_GET['un_grav'])) { } elseif (isset($_GET['un_grav'])) {
$ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND (`im`.`type` = "18" OR `im`.`type` = "19" OR `im`.`type` = "20" OR `im`.`type` = "21" OR `im`.`type` = "22" OR `im`.`type` = "23" OR `im`.`type` = "24" OR `im`.`type` = "26" OR `im`.`type` = "27" OR `im`.`type` = "28") AND `iu`.`id` = "' . mysql_real_escape_string((int)$_GET['un_grav']) . '" LIMIT 1')); $ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND (`im`.`type` = "18" OR `im`.`type` = "19" OR `im`.`type` = "20" OR `im`.`type` = "21" OR `im`.`type` = "22" OR `im`.`type` = "23" OR `im`.`type` = "24" OR `im`.`type` = "26" OR `im`.`type` = "27" OR `im`.`type` = "28") AND `iu`.`id` = "' . mysql_real_escape_string(
(int)$_GET['un_grav']
) . '" LIMIT 1'
)
);
if (isset($ir['id'])) { if (isset($ir['id'])) {
$pcena = 30; $pcena = 30;
if ($ir['type'] == 22) { if ($ir['type'] == 22) {
@ -458,7 +511,13 @@ if (isset($_GET['upgrade']) && true == false) {
$re = '<div align="left">Подходящий предмет не найден в инвентаре</div>'; $re = '<div align="left">Подходящий предмет не найден в инвентаре</div>';
} }
} elseif (isset($_GET['grav'])) { } elseif (isset($_GET['grav'])) {
$ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND (`im`.`type` = "18" OR `im`.`type` = "19" OR `im`.`type` = "20" OR `im`.`type` = "21" OR `im`.`type` = "22" OR `im`.`type` = "23" OR `im`.`type` = "24" OR `im`.`type` = "26" OR `im`.`type` = "27" OR `im`.`type` = "28") AND `iu`.`id` = "' . mysql_real_escape_string((int)$_GET['grav']) . '" LIMIT 1')); $ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND (`im`.`type` = "18" OR `im`.`type` = "19" OR `im`.`type` = "20" OR `im`.`type` = "21" OR `im`.`type` = "22" OR `im`.`type` = "23" OR `im`.`type` = "24" OR `im`.`type` = "26" OR `im`.`type` = "27" OR `im`.`type` = "28") AND `iu`.`id` = "' . mysql_real_escape_string(
(int)$_GET['grav']
) . '" LIMIT 1'
)
);
if (isset($ir['id'])) { if (isset($ir['id'])) {
$pcena = 30; $pcena = 30;
if ($ir['type'] == 22) { if ($ir['type'] == 22) {
@ -491,7 +550,13 @@ if (isset($_GET['upgrade']) && true == false) {
$re = '<div align="left">Подходящий предмет не найден в инвентаре</div>'; $re = '<div align="left">Подходящий предмет не найден в инвентаре</div>';
} }
} elseif (isset($_GET['podgon'])) { } elseif (isset($_GET['podgon'])) {
$ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `im`.`inslot` = 5 AND `iu`.`id` = "' . mysql_real_escape_string((int)$_GET['podgon']) . '" LIMIT 1')); $ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `im`.`inslot` = 5 AND `iu`.`id` = "' . mysql_real_escape_string(
(int)$_GET['podgon']
) . '" LIMIT 1'
)
);
if (isset($ir['id'])) { if (isset($ir['id'])) {
$po = []; $po = [];
$po = Conversion::dataStringToArray($ir['data']); $po = Conversion::dataStringToArray($ir['data']);
@ -525,7 +590,13 @@ if (isset($_GET['upgrade']) && true == false) {
} elseif ($_GET['t'] == 3) { } elseif ($_GET['t'] == 3) {
$t = 3; $t = 3;
} }
$ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`iznosNOW` >= 1 AND `iu`.`id` = "' . mysql_real_escape_string((int)$_GET['remon']) . '" LIMIT 1')); $ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`iznosNOW` >= 1 AND `iu`.`id` = "' . mysql_real_escape_string(
(int)$_GET['remon']
) . '" LIMIT 1'
)
);
$rem_price = round($ir['price1'] * 0.1 / 100, 2);//цена ремонта за 1ед поломки $rem_price = round($ir['price1'] * 0.1 / 100, 2);//цена ремонта за 1ед поломки
$rem_all = round($ir['price1'] * $ir['iznosNOW'] * 0.1 / 100, 2);//цена ремонта full $rem_all = round($ir['price1'] * $ir['iznosNOW'] * 0.1 / 100, 2);//цена ремонта full
@ -590,7 +661,12 @@ if (isset($_GET['upgrade']) && true == false) {
$re2 .= '<br>К сожалению, максимальная долговечность предмета из-за ремонта уменьшилась.'; $re2 .= '<br>К сожалению, максимальная долговечность предмета из-за ремонта уменьшилась.';
$dop = 1; $dop = 1;
} }
$u->addDelo(2, $u->info['id'], '&quot;<font color="grey">System.remont</font>&quot;: Предмет &quot;' . $ir['name'] . '&quot; [itm:' . $ir['id'] . '] был <b>отремонтирован</b>, максимальная долговечность уменьшилась: ' . $dop . ' (' . $rm . ' ед. за ' . $t . ' кр.).', time(), $u->info['city'], 'System.remont', 0, 0); Delo::add(
2,
'System.remont',
$u->info['id'],
'&quot;<span style="color: grey; ">System.remont</span>&quot;: Предмет &quot;' . $ir['name'] . '&quot; [itm:' . $ir['id'] . '] был <b>отремонтирован</b>, максимальная долговечность уменьшилась: ' . $dop . ' (' . $rm . ' ед. за ' . $t . ' кр.).',
);
} else { } else {
$re2 = 'Что-то здесь не так...'; $re2 = 'Что-то здесь не так...';
} }
@ -600,7 +676,13 @@ if (isset($_GET['upgrade']) && true == false) {
$re2 = 'Предмет подходящий для ремонта не найден в инвентаре'; $re2 = 'Предмет подходящий для ремонта не найден в инвентаре';
} }
} elseif (isset($_GET['upgradelvl'])) { } elseif (isset($_GET['upgradelvl'])) {
$ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`id` = "' . mysql_real_escape_string((int)$_GET['upgradelvl']) . '" LIMIT 1')); $ir = 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`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`id` = "' . mysql_real_escape_string(
(int)$_GET['upgradelvl']
) . '" LIMIT 1'
)
);
if (isset($ir['id'])) { if (isset($ir['id'])) {
$ur = mysql_fetch_array(mysql_query('SELECT * FROM `items_upgrade` WHERE `iid` = "' . $ir['item_id'] . '" LIMIT 1')); $ur = mysql_fetch_array(mysql_query('SELECT * FROM `items_upgrade` WHERE `iid` = "' . $ir['item_id'] . '" LIMIT 1'));
if (isset($ur['id'])) { if (isset($ur['id'])) {
@ -612,7 +694,9 @@ if (isset($_GET['upgrade']) && true == false) {
$ui1 = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "' . $ur['iup'] . '" LIMIT 1')); $ui1 = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "' . $ur['iup'] . '" LIMIT 1'));
$ui2 = mysql_fetch_array(mysql_query('SELECT * FROM `items_main_data` WHERE `items_id` = "' . $ur['iup'] . '" LIMIT 1')); $ui2 = mysql_fetch_array(mysql_query('SELECT * FROM `items_main_data` WHERE `items_id` = "' . $ur['iup'] . '" LIMIT 1'));
if (isset($ui1['id'], $ui2['id'])) { if (isset($ui1['id'], $ui2['id'])) {
mysql_query('UPDATE `items_users` SET `item_id` = "' . $ui1['id'] . '",`1price` = "' . $ui1['price1'] . '",`2price` = "' . $ui1['price2'] . '",`iznosMAX` = "' . $ui1['iznosMAXi'] . '",`data` = "' . $ui2['data'] . '" WHERE `id` = "' . $ir['id'] . '" LIMIT 1'); mysql_query(
'UPDATE `items_users` SET `item_id` = "' . $ui1['id'] . '",`1price` = "' . $ui1['price1'] . '",`2price` = "' . $ui1['price2'] . '",`iznosMAX` = "' . $ui1['iznosMAXi'] . '",`data` = "' . $ui2['data'] . '" WHERE `id` = "' . $ir['id'] . '" LIMIT 1'
);
$re2 = 'Предмет &quot;' . $ir['name'] . '&quot; был успешно улучшен до следующего уровня за ' . $ur['price2'] . ' екр.'; $re2 = 'Предмет &quot;' . $ir['name'] . '&quot; был успешно улучшен до следующего уровня за ' . $ur['price2'] . ' екр.';
$u->info['money2'] -= $ur['price2']; $u->info['money2'] -= $ur['price2'];
$u->addEkr(-$ur['price2']); $u->addEkr(-$ur['price2']);
@ -635,11 +719,16 @@ if ($r == 1) {
$see = $see[2]; $see = $see[2];
} elseif ($r == 5) { } elseif ($r == 5) {
//подгонка брони //подгонка брони
$see = $u->genInv(56, '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `im`.`inslot` = "5" AND `iu`.`data` NOT LIKE "%podgon%" ORDER BY `lastUPD` DESC'); $see = $u->genInv(
56, '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `im`.`inslot` = "5" AND `iu`.`data` NOT LIKE "%podgon%" ORDER BY `lastUPD` DESC'
);
$see = $see[2]; $see = $see[2];
} elseif ($r == 2) { } elseif ($r == 2) {
//гравировка оружия //гравировка оружия
$see = $u->genInv(57, '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND (`im`.`type` = "18" OR `im`.`type` = "19" OR `im`.`type` = "20" OR `im`.`type` = "21" OR `im`.`type` = "22" OR `im`.`type` = "23" OR `im`.`type` = "24" OR `im`.`type` = "26" OR `im`.`type` = "27" OR `im`.`type` = "28") ORDER BY `lastUPD` DESC'); $see = $u->genInv(
57,
'`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND (`im`.`type` = "18" OR `im`.`type` = "19" OR `im`.`type` = "20" OR `im`.`type` = "21" OR `im`.`type` = "22" OR `im`.`type` = "23" OR `im`.`type` = "24" OR `im`.`type` = "26" OR `im`.`type` = "27" OR `im`.`type` = "28") ORDER BY `lastUPD` DESC'
);
$see = $see[2]; $see = $see[2];
} elseif ($r == 4) { } elseif ($r == 4) {
//вытаскивание рун //вытаскивание рун
@ -651,17 +740,25 @@ if ($r == 1) {
$see = $see[2]; $see = $see[2];
} elseif ($r == 7) { } elseif ($r == 7) {
//модификация //модификация
$see = $u->genInv(60, '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`data` NOT LIKE "%modif%" AND `im`.`type` > 0 AND `im`.`type` < 16 AND $see = $u->genInv(
(`iu`.`data` LIKE "%add_s1%" OR `iu`.`data` LIKE "%add_s2%" OR `iu`.`data` LIKE "%add_s3%" OR `iu`.`data` LIKE "%add_s5%" OR `iu`.`data` LIKE "%add_hpAll%" OR `iu`.`data` LIKE "%add_mib%") ORDER BY `lastUPD` DESC'); 60, '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`data` NOT LIKE "%modif%" AND `im`.`type` > 0 AND `im`.`type` < 16 AND
(`iu`.`data` LIKE "%add_s1%" OR `iu`.`data` LIKE "%add_s2%" OR `iu`.`data` LIKE "%add_s3%" OR `iu`.`data` LIKE "%add_s5%" OR `iu`.`data` LIKE "%add_hpAll%" OR `iu`.`data` LIKE "%add_mib%") ORDER BY `lastUPD` DESC'
);
$see = $see[2]; $see = $see[2];
} elseif ($r == 6) { } elseif ($r == 6) {
//Усиление //Усиление
$see = $u->genInv(61, '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`data` LIKE "%modif%" AND `iu`.`data` NOT LIKE "%upgrade=5%" ORDER BY `lastUPD` DESC'); $see = $u->genInv(
61,
'`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`data` LIKE "%modif%" AND `iu`.`data` NOT LIKE "%upgrade=5%" ORDER BY `lastUPD` DESC'
);
$see = $see[2]; $see = $see[2];
} elseif ($r == 8) { } elseif ($r == 8) {
if ($u->info['money2'] > 0) { if ($u->info['money2'] > 0) {
//Улучшения //Улучшения
$see = $u->genInv(62, '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND (SELECT `id` FROM `items_upgrade` WHERE `iid` = `iu`.`item_id` AND `activ` = 1 LIMIT 1) > 0 ORDER BY `lastUPD` DESC'); $see = $u->genInv(
62,
'`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND (SELECT `id` FROM `items_upgrade` WHERE `iid` = `iu`.`item_id` AND `activ` = 1 LIMIT 1) > 0 ORDER BY `lastUPD` DESC'
);
$see = $see[2]; $see = $see[2];
} }
} elseif ($r == 9) { } elseif ($r == 9) {
@ -676,7 +773,11 @@ if ($r == 1) {
$see = $u->genInv(63, '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND (`iu`.`data` LIKE "%|art=1%" ' . $itmos . ')'); $see = $u->genInv(63, '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND (`iu`.`data` LIKE "%|art=1%" ' . $itmos . ')');
} else { } else {
//Подгонка под комплект //Подгонка под комплект
$see = $u->genInv(64, '`iu`.`id` = "' . mysql_real_escape_string($_GET['upgradelvlcom']) . '" AND `iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND (`iu`.`data` LIKE "%|art=1%" ' . $itmos . ')'); $see = $u->genInv(
64, '`iu`.`id` = "' . mysql_real_escape_string(
$_GET['upgradelvlcom']
) . '" AND `iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND (`iu`.`data` LIKE "%|art=1%" ' . $itmos . ')'
);
} }
$see = $see[2]; $see = $see[2];
} }

View File

@ -1,4 +1,7 @@
<?php <?php
use Helper\Conversion;
if (!defined('GAME')) { if (!defined('GAME')) {
die(); die();
} }
@ -446,14 +449,14 @@ if (!isset($u->info['noreal']) && $c['bonussocial'] == true) {
$gd = 0; $gd = 0;
$zdml = 3600; //час $zdml = 3600; //час
if (isset($mcf['id']) && $mcf['time'] > time() - $zdml) { if (isset($mcf['id']) && $mcf['time'] > time() - $zdml) {
echo '<hr><center><font color="red">Нельзя подтверждать эл.почту так часто. Осталось ' . $u->timeOut( echo '<hr><center><span style="color: red; ">Нельзя подтверждать эл.почту так часто. Осталось ' . Conversion::secondsToTimeout(
$mcf['time'] + $zdml - time() $mcf['time'] + $zdml - time()
) . '</font></center>'; ) . '</span></center>';
$gd = 1; $gd = 1;
} elseif (!preg_match( } elseif (!preg_match(
'#^[a-z0-9.!\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\s]+\.+[a-z]{2,6}))$#si', $_GET['confmail'] '#^[a-z0-9.!\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\s]+\.+[a-z]{2,6}))$#si', $_GET['confmail']
)) { )) {
echo '<hr><center><font color="red">Вы указали явно ошибочный E-mail.</font></center>'; echo '<hr><center><span style="color: red; ">Вы указали явно ошибочный E-mail.</span></center>';
$gd = 1; $gd = 1;
} }

View File

@ -1,86 +1,80 @@
<?php <?php
if(!defined('GAME'))
{ use User\ItemsModel;
die();
if (!defined('GAME')) {
die();
} }
if($p['banned']==1 || $p['proverka']==1) if ($p['banned'] == 1 || $p['proverka'] == 1) {
{ $uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "' . mysql_real_escape_string($_POST['logingo']) . '" LIMIT 1'));
$uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['logingo']).'" LIMIT 1')); $uu2 = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "' . mysql_real_escape_string($_POST['logingo2']) . '" LIMIT 1'));
$uu2 = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['logingo2']).'" LIMIT 1')); if (isset($uu['id']) && isset($uu2['id'])) {
if(isset($uu['id']) && isset($uu2['id']))
{
if($uu['marry']>0) if ($uu['marry'] > 0) {
{ $uer = 'Персонаж уже находится в браке<br>';
$uer = 'Персонаж уже находится в браке<br>'; } elseif ($uu['marry'] > 0) {
}elseif($uu['marry']>0) $uer = 'Персонаж уже находится в браке<br>';
{ } elseif ($uu['align'] > 1 && $uu['align'] < 2 && $u->info['admin'] == 0) {
$uer = 'Персонаж уже находится в браке<br>'; $uer = 'Вы не можете использовать данное заклятие на Паладинов.<br>';
}elseif($uu['align']>1 && $uu['align']<2 && $u->info['admin']==0) } elseif ($uu['align'] > 3 && $uu['align'] < 4 && $u->info['admin'] == 0) {
{ $uer = 'Вы не можете использовать данное заклятие на Тарманов.<br>';
$uer = 'Вы не можете использовать данное заклятие на Паладинов.<br>'; } elseif ($uu['admin'] > 0 && $u->info['admin'] == 0) {
}elseif($uu['align']>3 && $uu['align']<4 && $u->info['admin']==0) $uer = 'Вы не можете накладывать заклятие на Ангелов';
{ } elseif ($uu['city'] != $u->info['city'] && $p['citym1'] == 0) {
$uer = 'Вы не можете использовать данное заклятие на Тарманов.<br>'; $uer = 'Персонаж находится в другом городе';
}elseif($uu['admin']>0 && $u->info['admin']==0) } elseif ($uu['id'] == $u->info['id'] && $u->info['admin'] == 0) {
{ $uer = 'Вы не можете использовать на самого себя';
$uer = 'Вы не можете накладывать заклятие на Ангелов'; } elseif ($uu2['align'] > 1 && $uu['align'] < 2 && $u->info['admin'] == 0) {
}elseif($uu['city']!=$u->info['city'] && $p['citym1']==0){ $uer = 'Вы не можете использовать данное заклятие на Паладинов.<br>';
$uer = 'Персонаж находится в другом городе'; } elseif ($uu2['align'] > 3 && $uu['align'] < 4 && $u->info['admin'] == 0) {
}elseif($uu['id']==$u->info['id'] && $u->info['admin']==0){ $uer = 'Вы не можете использовать данное заклятие на Тарманов.<br>';
$uer = 'Вы не можете использовать на самого себя'; } elseif ($uu2['admin'] > 0 && $u->info['admin'] == 0) {
}elseif($uu2['align']>1 && $uu['align']<2 && $u->info['admin']==0) $uer = 'Вы не можете накладывать заклятие на Ангелов';
{ } elseif ($uu2['city'] != $u->info['city'] && $p['citym1'] == 0) {
$uer = 'Вы не можете использовать данное заклятие на Паладинов.<br>'; $uer = 'Персонаж находится в другом городе';
}elseif($uu2['align']>3 && $uu['align']<4 && $u->info['admin']==0) } elseif ($uu2['id'] == $u->info['id'] && $u->info['admin'] == 0) {
{ $uer = 'Вы не можете использовать на самого себя';
$uer = 'Вы не можете использовать данное заклятие на Тарманов.<br>'; } else {
}elseif($uu2['admin']>0 && $u->info['admin']==0) $uu['palpro'] = time() + 60 * 60 * 24 * 7;
{ $upd = mysql_query('UPDATE `users` SET `marry` = "' . $uu2['id'] . '" WHERE `id` = "' . $uu['id'] . '" LIMIT 1');
$uer = 'Вы не можете накладывать заклятие на Ангелов'; $upd = mysql_query('UPDATE `users` SET `marry` = "' . $uu['id'] . '" WHERE `id` = "' . $uu2['id'] . '" LIMIT 1');
}elseif($uu2['city']!=$u->info['city'] && $p['citym1']==0){ if ($upd) {
$uer = 'Персонаж находится в другом городе'; $sx = '';
}elseif($uu2['id']==$u->info['id'] && $u->info['admin']==0){ if ($u->info['sex'] == 1) {
$uer = 'Вы не можете использовать на самого себя'; $sx = 'а';
}else{ }
$uu['palpro'] = time()+60*60*24*7; $rtxt = '[img[items/marry.gif]] ' . $rang . ' &quot;' . $u->info['login'] . '&quot; подтвердил' . $sx . ' законность брака между &quot;' . $uu['login'] . '&quot; и &quot;' . $uu2['login'] . '&quot;.';
$upd = mysql_query('UPDATE `users` SET `marry` = "'.$uu2['id'].'" WHERE `id` = "'.$uu['id'].'" LIMIT 1');
$upd = mysql_query('UPDATE `users` SET `marry` = "'.$uu['id'].'" WHERE `id` = "'.$uu2['id'].'" LIMIT 1');
if($upd)
{
$sx = '';
if($u->info['sex']==1)
{
$sx = 'а';
}
$rtxt = '[img[items/marry.gif]] '.$rang.' &quot;'.$u->info['login'].'&quot; подтвердил'.$sx.' законность брака между &quot;'.$uu['login'].'&quot; и &quot;'.$uu2['login'].'&quot;.';
mysql_query("UPDATE `chat` SET `delete` = 1 WHERE `login` = '".$uu['login']."' LIMIT 1000"); mysql_query("UPDATE `chat` SET `delete` = 1 WHERE `login` = '" . $uu['login'] . "' LIMIT 1000");
$cmsg = new ChatMessage(); $cmsg = new ChatMessage();
$cmsg->setCity($u->info['city']); $cmsg->setRoom($u->info['room']);
$cmsg->setRoom($u->info['room']); $cmsg->setText($rtxt);
$cmsg->setText($rtxt); $cmsg->setType(6);
$cmsg->setType(6); $cmsg->setTypeTime(1);
$cmsg->setTypeTime(1); (new Chat())->sendMsg($cmsg);
(new Chat())->sendMsg($cmsg); $rtxt = $rang . ' &quot;' . $u->info['login'] . '&quot; подтвердил' . $sx . ' законность брака с ' . $uu2['id'] . '.';
$rtxt = $rang.' &quot;'.$u->info['login'].'&quot; подтвердил'.$sx.' законность брака с '.$uu2['id'].'.'; mysql_query(
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)"); "INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('" . $uu['id'] . "','" . $_SERVER['REMOTE_ADDR'] . "','" . $u->info['city'] . "','" . time(
$rtxt = $rang.' &quot;'.$u->info['login'].'&quot; подтвердил'.$sx.' законность брака с '.$uu['id'].'.'; ) . "','" . $rtxt . "','" . $u->info['login'] . "',0)"
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu2['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)"); );
$rtxt = $rang . ' &quot;' . $u->info['login'] . '&quot; подтвердил' . $sx . ' законность брака с ' . $uu['id'] . '.';
mysql_query(
"INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('" . $uu2['id'] . "','" . $_SERVER['REMOTE_ADDR'] . "','" . $u->info['city'] . "','" . time(
) . "','" . $rtxt . "','" . $u->info['login'] . "',0)"
);
$this->addItem(76,$uu['id'],'sudba='.$uu['login'].'|noremont=1|notransfer=1'); ItemsModel::addItem(76, $uu['id'], 'sudba=' . $uu['login'] . '|noremont=1|notransfer=1');
$this->addItem(76,$uu2['id'],'sudba='.$uu2['login'].'|noremont=1|notransfer=1'); ItemsModel::addItem(76, $uu2['id'], 'sudba=' . $uu2['login'] . '|noremont=1|notransfer=1');
$uer = 'Вы успешно зафиксировали брак "'.$uu['login'].'" и "'.$uu2['login'].'".'; $uer = 'Вы успешно зафиксировали брак "' . $uu['login'] . '" и "' . $uu2['login'] . '".';
}else{ } else {
$uer = 'Не удалось использовать данное заклятие'; $uer = 'Не удалось использовать данное заклятие';
} }
} }
}else{ } else {
$uer = 'Персонаж не найден в этом городе'; $uer = 'Персонаж не найден в этом городе';
} }
}else{ } else {
$uer = 'У Вас нет прав на использование данного заклятия'; $uer = 'У Вас нет прав на использование данного заклятия';
} }
?>

View File

@ -527,11 +527,8 @@ foreach ($sp as $pl) {
} }
if ($wn > 0 || $wn2 > 0) { if ($wn > 0 || $wn2 > 0) {
$u->addDelo( Delo::add(1, 'Casino', $pl2['uid'], '&quot;Casino.&quot;: Выиграл ' . $nmn . ' екр.');
1, $pl2['uid'],
'&quot;Casino.' . $u->info['city'] . '&quot;: Выиграл ' . $nmn . ' екр.',
time(), $u->info['city'], 'Casino.' . $u->info['city'], 0, 0
);
if (!isset($u_w[1][$pl2['uid']])) { if (!isset($u_w[1][$pl2['uid']])) {
$u_w[0][count($u_w[0])] = $pl2['uid']; $u_w[0][count($u_w[0])] = $pl2['uid'];
$u_w[2][count($u_w[0]) - 1] = $pl2['game_id']; $u_w[2][count($u_w[0]) - 1] = $pl2['game_id'];

View File

@ -74,21 +74,24 @@ if ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
'UPDATE `users` SET `money` = `money` + "' . $mn1 . '" WHERE `id` = "' . $inf[$u->tfer['uid2']]['id'] . '" LIMIT 1' 'UPDATE `users` SET `money` = `money` + "' . $mn1 . '" WHERE `id` = "' . $inf[$u->tfer['uid2']]['id'] . '" LIMIT 1'
); );
if ($upd) { if ($upd) {
$u->addDelo( Delo::add(
2, $inf[$u->tfer['uid1']]['id'], 2,
'&quot;<font color="green">System.transfer.MONEY</font>&quot;: Передано ' . $mn1 . ' кр. персонажу &quot;' . $inf[$u->tfer['uid2']]['login'] . '&quot; (' . $inf[$u->tfer['uid2']]['id'] . ').', 'System.transfer',
time(), $u->info['city'], 'System.transfer', 0, 0 $inf[$u->tfer['uid1']]['id'],
'&quot;<span style="color: green; ">System.transfer.MONEY</span>&quot;: Передано ' . $mn1 . ' кр. персонажу &quot;' . $inf[$u->tfer['uid2']]['login'] . '&quot; (' . $inf[$u->tfer['uid2']]['id'] . ').'
); );
$u->addDelo( Delo::add(
2, $inf[$u->tfer['uid2']]['id'], 2,
'&quot;<font color="green">System.transfer.MONEY</font>&quot;: Получено ' . $mn1 . ' кр. от персонажа &quot;' . $inf[$u->tfer['uid1']]['login'] . '&quot; (' . $inf[$u->tfer['uid1']]['id'] . ').', 'System.transfer',
time(), $u->info['city'], 'System.transfer', 0, 0 $inf[$u->tfer['uid2']]['id'],
'&quot;<span style="color: green; ">System.transfer.MONEY</span>&quot;: Получено ' . $mn1 . ' кр. от персонажа &quot;' . $inf[$u->tfer['uid1']]['login'] . '&quot; (' . $inf[$u->tfer['uid1']]['id'] . ').',
); );
} else { } else {
$u->addDelo( Delo::add(
2, $inf[$u->tfer['uid1']]['id'], 2,
'&quot;<font color="green">System.transfer.MONEY</font>&quot;: Передано ' . $mn1 . ' кр. персонажу &quot;' . $inf[$u->tfer['uid2']]['login'] . '&quot; (' . $inf[$u->tfer['uid2']]['id'] . '), ошибка во время передачи.', 'System.transfer',
time(), $u->info['city'], 'System.transfer', 0, 0 $inf[$u->tfer['uid1']]['id'],
'&quot;<span style="color: green; ">System.transfer.MONEY</span>&quot;: Передано ' . $mn1 . ' кр. персонажу &quot;' . $inf[$u->tfer['uid2']]['login'] . '&quot; (' . $inf[$u->tfer['uid2']]['id'] . '), ошибка во время передачи.',
); );
} }
} }
@ -104,21 +107,24 @@ if ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
'UPDATE `users` SET `money` = `money` + "' . $mn2 . '" WHERE `id` = "' . $inf[$u->tfer['uid1']]['id'] . '" LIMIT 1' 'UPDATE `users` SET `money` = `money` + "' . $mn2 . '" WHERE `id` = "' . $inf[$u->tfer['uid1']]['id'] . '" LIMIT 1'
); );
if ($upd) { if ($upd) {
$u->addDelo( Delo::add(
2, $inf[$u->tfer['uid2']]['id'], 2,
'&quot;<font color="green">System.transfer.MONEY</font>&quot;: Передано ' . $mn2 . ' кр. персонажу &quot;' . $inf[$u->tfer['uid1']]['login'] . '&quot; (' . $inf[$u->tfer['uid1']]['id'] . ').', 'System.transfer',
time(), $u->info['city'], 'System.transfer', 0, 0 $inf[$u->tfer['uid2']]['id'],
'&quot;<span style="color: green; ">System.transfer.MONEY</span>&quot;: Передано ' . $mn1 . ' кр. персонажу &quot;' . $inf[$u->tfer['uid1']]['login'] . '&quot; (' . $inf[$u->tfer['uid1']]['id'] . ').'
); );
$u->addDelo( Delo::add(
2, $inf[$u->tfer['uid1']]['id'], 2,
'&quot;<font color="green">System.transfer.MONEY</font>&quot;: Получено ' . $mn2 . ' кр. от персонажа &quot;' . $inf[$u->tfer['uid2']]['login'] . '&quot; (' . $inf[$u->tfer['uid2']]['id'] . ').', 'System.transfer',
time(), $u->info['city'], 'System.transfer', 0, 0 $inf[$u->tfer['uid1']]['id'],
'&quot;<span style="color: green; ">System.transfer.MONEY</span>&quot;: Получено ' . $mn1 . ' кр. от персонажа &quot;' . $inf[$u->tfer['uid2']]['login'] . '&quot; (' . $inf[$u->tfer['uid2']]['id'] . ').',
); );
} else { } else {
$u->addDelo( Delo::add(
2, $inf[$u->tfer['uid2']]['id'], 2,
'&quot;<font color="green">System.transfer.MONEY</font>&quot;: Передано ' . $mn2 . ' кр. персонажу &quot;' . $inf[$u->tfer['uid1']]['login'] . '&quot; (' . $inf[$u->tfer['uid1']]['id'] . '), ошибка во время передачи.', 'System.transfer',
time(), $u->info['city'], 'System.transfer', 0, 0 $inf[$u->tfer['uid2']]['id'],
'&quot;<span style="color: green; ">System.transfer.MONEY</span>&quot;: Передано ' . $mn1 . ' кр. персонажу &quot;' . $inf[$u->tfer['uid1']]['login'] . '&quot; (' . $inf[$u->tfer['uid1']]['id'] . '), ошибка во время передачи.',
); );
} }
} }
@ -165,15 +171,17 @@ if ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
$i_s = '[Предмет из подземелья]'; $i_s = '[Предмет из подземелья]';
} }
//заносим в личные дела //заносим в личные дела
$u->addDelo( Delo::add(
2, $fu, 2,
'&quot;<font color="green">System.transfer</font>&quot;: Предмет &quot;<b>' . $pl['name'] . '</b> (стоимость: ' . $pl['1price'] . ' кр. , ' . $pl['2price'] . ' екр.) (x' . $x . ')&quot; [itm:' . $pl['id'] . '] ' . $i_s . ' был передан персонажу &quot;' . $us['login'] . '&quot;(' . $pl['uid'] . '), Тип передачи: ' . $pl['inTransfer'] . '.', 'System.transfer',
time(), $u->info['city'], 'System.transfer', 0, 0 $fu,
'&quot;<span style="color: green; ">System.transfer</span>&quot;: Предмет &quot;<b>' . $pl['name'] . '</b> (стоимость: ' . $pl['1price'] . ' кр. , ' . $pl['2price'] . ' екр.) (x' . $x . ')&quot; [itm:' . $pl['id'] . '] ' . $i_s . ' был передан персонажу &quot;' . $us['login'] . '&quot;(' . $pl['uid'] . '), Тип передачи: ' . $pl['inTransfer'] . '.',
); );
$u->addDelo( Delo::add(
2, $pl['uid'], 2,
'&quot;<font color="green">System.transfer</font>&quot;: Персонаж &quot;' . $uus['login'] . '&quot;(' . $uus['id'] . ') передал предмет &quot;<b>' . $pl['name'] . '</b> ' . $i_s . ' (стоимость: ' . $pl['1price'] . ' кр. , ' . $pl['2price'] . ' екр.) (x' . $x . ')&quot; [itm:' . $pl['id'] . '], Тип передачи: ' . $pl['inTransfer'] . '.', 'System.transfer',
time(), $u->info['city'], 'System.transfer', 0, 0 $pl['uid'],
'&quot;<span style="color: green; ">System.transfer</span>&quot;: Персонаж &quot;' . $uus['login'] . '&quot;(' . $uus['id'] . ') передал предмет &quot;<b>' . $pl['name'] . '</b> ' . $i_s . ' (стоимость: ' . $pl['1price'] . ' кр. , ' . $pl['2price'] . ' екр.) (x' . $x . ')&quot; [itm:' . $pl['id'] . '], Тип передачи: ' . $pl['inTransfer'] . '.',
); );
} else { } else {
echo 'Ошибка передачи предмета'; echo 'Ошибка передачи предмета';