Merge pull request 'dev-remove-deprecated' (#65) from dev-remove-deprecated into dev

Reviewed-on: #65
This commit is contained in:
Ivor Barhansky 2023-12-01 21:31:55 +00:00
commit 490b9bc901
74 changed files with 9583 additions and 9023 deletions

View File

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

View File

@ -7,18 +7,19 @@ class Delo
{
/**
* Запись в личное дело персонажа.
* @param int $type цифровой тип лога (??)
* @param string $from отправитель записи
* @param int $uid кому пишется
* @param string $text текст
* @param string $from отправитель записи
* @param float $moneyOut количество денег снятых с игрока
* @param int $type цифровой тип лога (??)
* @param float $moneyIn количество денег полученных игроком
* @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, [
$uid, $text, $from, '', UserIp::get(), $moneyOut, $type,
$uid, $text, $from, '', UserIp::get(), $moneyOut, $moneyIn, $type,
]);
}

View File

@ -1,5 +1,8 @@
<?php
use Helper\Conversion;
use User\ItemsModel;
class Dialog
{
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'));
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>';
}
}
@ -229,16 +232,16 @@ class Dialog
$txt .= ' за ' . $act1[2] . ' екр.';
}
if ($act1[3] > 0) {
$txt .= ' на срок ' . $u->timeOut($act1[3]) . '';
$act1dt .= '|srok=' . $act1[3] . '';
$txt .= ' на срок ' . Conversion::secondsToTimeout($act1[3]);
$act1dt .= '|srok=' . $act1[3];
}
$txt .= '</font></b>';
\User\ItemsModel::addItem($itmb['id'], $u->info['id'], $act1dt);
ItemsModel::addItem($itmb['id'], $u->info['id'], $act1dt);
$pg = $act1[4];
}
} else {
$txt .= '<br><b><font color=red>Неудалось приобрести предмет...</font></b>';
$txt .= '<br><b style="color: red">Неудалось приобрести предмет...</b>';
$pg = 1;
}
} elseif ($act1[0] == 'quest') {
@ -263,7 +266,7 @@ class Dialog
}
$ic2 = 1;
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++;
}
}
@ -393,7 +396,7 @@ class Dialog
if ($upd) {
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'));
$txt = 'Вы получили предмет &quot;' . $itm_nm['name'] . '&quot;';
} else {
@ -413,7 +416,7 @@ class Dialog
}
$arts_1 = $arts_1[rand(0, count($arts_1) - 1)];
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'));
@ -433,7 +436,7 @@ class Dialog
}
$arts_1 = $arts_1[rand(0, count($arts_1) - 1)];
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'));
@ -523,7 +526,7 @@ class Dialog
$data = '|frompisher=' . $d->info['id2'];
$e = 1;
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++;
}
$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'];
$e = 1;
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++;
}
$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'];
$e = 1;
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++;
}
$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'])) {
mysql_query('DELETE FROM `items_users` WHERE `id` = "' . $keypr1['id'] . '" OR `id` = "' . $keypr2['id'] . '" LIMIT 2');
$data = '|frompisher=' . $d->info['id2'];
\User\ItemsModel::addItem(2555, $u->info['id'], $data);
ItemsModel::addItem(2555, $u->info['id'], $data);
$txt = 'Вы успешно получили &quot;Пирамидальный ключ&quot;';
}
@ -690,7 +693,7 @@ class Dialog
$data = '|frompisher=' . $d->info['id2'];
$e = 1;
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++;
}
mysql_query('DELETE FROM `items_users` WHERE `id` = "' . $keypr['id'] . '" LIMIT 1');
@ -746,7 +749,7 @@ class Dialog
$data = '|frompisher=' . $d->info['id2'];
$e = 1;
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++;
}
mysql_query('DELETE FROM `items_users` WHERE `id` = "' . $keypr['id'] . '" LIMIT 1');
@ -802,7 +805,7 @@ class Dialog
$data = '|frompisher=' . $d->info['id2'];
$e = 1;
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++;
}
$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;
while ($qsw < $item['colvo']) {
$txt .= '<br/>Вы получили предмет';
\User\ItemsModel::addItem($item['item_id'], $u->info['id']);
ItemsModel::addItem($item['item_id'], $u->info['id']);
$qsw++;
}
}
@ -1214,7 +1217,7 @@ class Dialog
$val = 4799;
}
}
\User\ItemsModel::addItem($val, $u->info['id'], $data_itm);
ItemsModel::addItem($val, $u->info['id'], $data_itm);
$i1++;
}
} elseif ($var == 'up') {

View File

@ -1050,7 +1050,7 @@ class Dungeon
);
if (isset($it['id'])) {
$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]]
);
}
@ -1099,7 +1099,7 @@ class Dungeon
$u->addAction(
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]]
);
$nj++;
@ -1147,7 +1147,7 @@ class Dungeon
$u->addAction(
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]]
);
$nj++;

View File

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

View File

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

View File

@ -1,56 +1,24 @@
<?php
if(!defined('GAME')) {
if (!defined('GAME')) {
die();
}
if($itm['magic_inci'] == 396) {
$eff = mysql_fetch_array(mysql_query('SELECT `id` FROM `eff_users` WHERE `uid` = "'.$u->info['id'].'" AND `id_eff` = 396 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 (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` = '. $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']);
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
if(!defined('GAME'))
{
if (!defined('GAME')) {
die();
}
//добавляем снежок в инвентарь
$this->addItem(1000,$this->info['id']);
?>
ItemsModel::addItem(1000, $this->info['id']);

View File

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

View File

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

View File

@ -1,4 +1,7 @@
<?php
use User\ItemsModel;
if(!defined('GAME'))
{
die();
@ -15,38 +18,38 @@ if(date('Y')==2023) {
7. Новогодний Эликсир
*/
//рыба (x1)
$idit = \User\ItemsModel::addItem(5009,$u->info['id']);
$idit = ItemsModel::addItem(5009,$u->info['id']);
if($idit > 0) {
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');
//искуства
$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');
//жж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');
//Открытка (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');
//точилка
$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');
//чек на 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');
//цепь защитника
$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');

View File

@ -1,4 +1,7 @@
<?php
use User\ItemsModel;
if(!defined('GAME'))
{
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['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']);
\User\ItemsModel::addItem($rnd0['itm2']['id'],$u->info['id'],'|srok=1209600|sudba='.$u->info['login']);
ItemsModel::addItem($rnd0['itm1']['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) {
$rnd0['itm3'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($rnd0['itm3']).'" LIMIT 1'));
}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']);

View File

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

View File

@ -1,11 +1,11 @@
<?php
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
$io .= '<i>Акционный клановый комплект</i>, ';
$this->addItem(11128,$this->info['id'],'|nosale=1|nodelete=1|sudba=0');
$this->addItem(11128,$this->info['id'],'|nosale=1|nodelete=1|sudba=0');
?>
$io .= '<i>Акционный клановый комплект</i>, ';
ItemsModel::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
if(!defined('GAME'))
{
use Helper\Conversion;
if (!defined('GAME')) {
die();
}
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'));
if( $u->info['align'] != 2 ) {
if( isset($test['id']) ) {
$u->error = 'Задержка не прошла, еще '.$u->timeOut($test['time']-time()+300);
}else{
$u->addAction(time(),'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'));
if ($u->info['align'] != 2) {
if (isset($test['id'])) {
$u->error = 'Задержка не прошла, еще ' . Conversion::secondsToTimeout($test['time'] - time() + 300);
} else {
$u->addAction(time(), 'propuskpsh', '');
$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']))
{
mysql_query('UPDATE `eff_users` SET `timeUse` = `timeUse` - 21600 WHERE `id` = '.$eff['id'].' ');
if (isset($eff['id'])) {
mysql_query('UPDATE `eff_users` SET `timeUse` = `timeUse` - 21600 WHERE `id` = ' . $eff['id'] . ' ');
}
// Действует только на:
// 1) где таймер меньше 12 часов. (чтобы очень старые походы не меняли время похода 4 свитка, и сутки назад, история походов некорректная).
// 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 = 'Хаосники не могут пользоваться пропуском!';
}
}
?>

View File

@ -1,37 +1,38 @@
<?php
if(!defined('GAME'))
{
use Helper\Conversion;
if (!defined('GAME')) {
die();
}
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'));
if( $u->info['align'] != 2 ) {
if( isset($test['id']) ) {
$u->error = 'Задержка не прошла, еще '.$u->timeOut($test['time']-time()+300);
}else{
$u->addAction(time(),'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'));
if ($u->info['align'] != 2) {
if (isset($test['id'])) {
$u->error = 'Задержка не прошла, еще ' . Conversion::secondsToTimeout($test['time'] - time() + 300);
} else {
$u->addAction(time(), 'propuskpsh2', '');
$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']))
{
mysql_query('UPDATE `eff_users` SET `timeUse` = `timeUse` - 86400 WHERE `id` = '.$eff['id'].' ');
if (isset($eff['id'])) {
mysql_query('UPDATE `eff_users` SET `timeUse` = `timeUse` - 86400 WHERE `id` = ' . $eff['id'] . ' ');
}
// Действует только на:
// 1) где таймер меньше 12 часов. (чтобы очень старые походы не меняли время похода 4 свитка, и сутки назад, история походов некорректная).
// 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 = 'Хаосники не могут пользоваться пропуском!';
}
}
?>

View File

@ -1,22 +1,25 @@
<?php
if(!defined('GAME'))
{
use Helper\Conversion;
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
$tomorrow = mktime(0, 0, 0, date("m") , date("d")+1, date("Y"));
$tomorrow = mktime(0, 0, 0, idate("m"), idate("d") + 1, idate("Y"));
if( $tomorrow = 0 ){
if ($tomorrow = 0) {
echo 'Вы еще не справились с текущим заданием.';
} elseif( !isset( $tomorrow['id'] ) && $tomorrow == 0 ) {
} elseif (!isset($tomorrow['id'])) {
?>
<br />
<input type='button' value='Крутить' />
<br/>
<input type='button' value='Крутить'/>
<?php
} else {
echo 'Покрутить еще раз вы сможете <b>'.$tomorrow.'</b> <font color="">( Через '.$u->timeOut($tomorrow['time']+60*60*24-time()).' )</font>';
}
if($itm['magic_inci']=='ruletka') {
$idv=array(
} else {
echo 'Покрутить еще раз вы сможете <b>' . $tomorrow . '</b> ( Через ' . Conversion::secondsToTimeout($tomorrow['time'] + 60 * 60 * 24 - time()) . ' )';
}
if ($itm['magic_inci'] == 'ruletka') {
$idv = [
0 => '4349',
1 => '4306',
2 => '4327',
@ -95,12 +98,11 @@ $tomorrow = mktime(0, 0, 0, date("m") , date("d")+1, date("Y"));
75 => '10016',
76 => '10017',
77 => '10018',
78 => '10035'
);
$idve=$idv[rand(0,count($idv)-1)];
\User\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'].'';
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
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
if($tr['var_id'] == 1) {
if ($tr['var_id'] == 1) {
//Бронзовая книга
$pgs = array('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'].'"');
while($pl_pg = mysql_fetch_array($sp_pg)) {
$pg_id = $pl_pg['item_id']-3142;
if(!isset($pgs[$pg_id])) {
$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'] . '"'
);
while ($pl_pg = mysql_fetch_array($sp_pg)) {
$pg_id = $pl_pg['item_id'] - 3142;
if (!isset($pgs[$pg_id])) {
$pgs[$pg_id] = $pl_pg['id'];
if($pl_pg['gift'] != '') {
if ($pl_pg['gift'] != '') {
$pgs['sudba']++;
}
$pgs['all']++;
}
}
$lk = 1;
while($lk <= 50) {
if($pgs[$lk] < 1) {
$npgs .= ', '.$lk;
while ($lk <= 50) {
if ($pgs[$lk] < 1) {
$npgs .= ', ' . $lk;
}
$lk++;
}
if($pgs['all'] < 50) {
$npgs = ltrim($npgs,', ');
$io .= 'Не удалось собрать книгу, необходимо наличие всех страниц. ['.$pgs['all'].'/50]<br>Недостающие страницы: '.$npgs;
if ($pgs['all'] < 50) {
$npgs = ltrim($npgs, ', ');
$io .= 'Не удалось собрать книгу, необходимо наличие всех страниц. [' . $pgs['all'] . '/50]<br>Недостающие страницы: ' . $npgs;
$no_open_itm = true;
}else{
} else {
//забираем страницы
$pgs['delete'] = '';
$sp_pg = 1;
while($sp_pg <= 50) {
$pgs['delete'] .= '`id` = "'.$pgs[$sp_pg].'" OR ';
while ($sp_pg <= 50) {
$pgs['delete'] .= '`id` = "' . $pgs[$sp_pg] . '" OR ';
$sp_pg++;
}
if($pgs['delete'] != '') {
$pgs['delete'] = rtrim($pgs['delete'],' OR ');
$pgs['delete'] = '('.$pgs['delete'].') AND `uid` = "'.$this->info['id'].'" LIMIT 50';
mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE '.$pgs['delete']);
if ($pgs['delete'] != '') {
$pgs['delete'] = rtrim($pgs['delete'], ' OR ');
$pgs['delete'] = '(' . $pgs['delete'] . ') AND `uid` = "' . $this->info['id'] . '" LIMIT 50';
mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE ' . $pgs['delete']);
}
$sz = $this->testAction('`vars` = "gold_sanich_bonus" LIMIT 1',1);
/*if(!isset($sz['id'])) {
$this->addAction(time(),'gold_sanich_bonus','gold_sanich_bonus');
$sz = $this->testAction('`vars` = "gold_sanich_bonus" LIMIT 1', 1);
//выдаем книгу
if($pgs['sudba'] > 0) {
if ($pgs['sudba'] > 0) {
//привязанная
$this->addItem(3198,$this->info['id'],'|sudba='.$this->info['login']);
}else{
ItemsModel::addItem(3196, $this->info['id'], '|sudba=' . $this->info['login']);
} else {
//не привязанная
$this->addItem(3198,$this->info['id']);
}
$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']);
ItemsModel::addItem(3196, $this->info['id']);
}
$io .= 'Вы получили предмет &quot;Бронзовая Книга&quot;';
//}
//}
}
}else{
} else {
$io .= 'Данный предмет нельзя использовать!';
$no_open_itm = true;
}
?>
}

View File

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

View File

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

View File

@ -1,45 +1,46 @@
<?php
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
$io .= '<i>Подарочный комплект Мага Огня</i>, ';
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->addItem(4401,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']);
$io .= '<i>Подарочный комплект Мага Огня</i>, ';
ItemsModel::addItem(850, $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']);
ItemsModel::addItem(669, $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']);
ItemsModel::addItem(822, $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']);
ItemsModel::addItem(597, $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']);
ItemsModel::addItem(810, $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']);
ItemsModel::addItem(4543, $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']);
ItemsModel::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']);
ItemsModel::addItem(4401, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$io .= '<i>Свитки и прочие материалы....</i>, ';
$this->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']);
$this->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']);
$this->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']);
$this->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']); // элик
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']); //усилок
$this->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']);
$io .= '<i>Свитки и прочие материалы....</i>, ';
ItemsModel::addItem(2712, $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']);
ItemsModel::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']);
ItemsModel::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']);
ItemsModel::addItem(4736, $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']); // элик
ItemsModel::addItem(2139, $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']);
ItemsModel::addItem(5046, $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']);
ItemsModel::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']);
ItemsModel::addItem(4941, $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']);
ItemsModel::addItem(1460, $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']); //усилок
ItemsModel::addItem(1001, $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
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
$io .= '<i>Подарочный комплект Танка</i>, ';
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$io .= '<i>Подарочный комплект Танка</i>, ';
ItemsModel::addItem(4648, $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']);
ItemsModel::addItem(4647, $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']);
ItemsModel::addItem(2469, $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']);
ItemsModel::addItem(4968, $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']);
ItemsModel::addItem(4653, $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']);
ItemsModel::addItem(4987, $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']);
ItemsModel::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']);
ItemsModel::addItem(4649, $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>, ';
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$io .= '<i>Свитки и прочие материалы....</i>, ';
ItemsModel::addItem(2712, $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']);
ItemsModel::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']);
ItemsModel::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']);
ItemsModel::addItem(4736, $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']);
ItemsModel::addItem(2139, $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']);
ItemsModel::addItem(5046, $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']);
ItemsModel::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']);
ItemsModel::addItem(4941, $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']);
ItemsModel::addItem(1001, $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
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
$io .= '<i>Подарочный комплект Силача ( Топора )</i>, ';
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$io .= '<i>Подарочный комплект Силача ( Топора )</i>, ';
ItemsModel::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']);
ItemsModel::addItem(6484, $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']);
ItemsModel::addItem(2469, $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']);
ItemsModel::addItem(6487, $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']);
ItemsModel::addItem(6489, $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']);
ItemsModel::addItem(6491, $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']);
ItemsModel::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']);
ItemsModel::addItem(6493, $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>, ';
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->addItem(3102,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']);
$io .= '<i>Свитки и прочие материалы....</i>, ';
ItemsModel::addItem(2712, $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']);
ItemsModel::addItem(2665, $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']);
ItemsModel::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']);
ItemsModel::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']);
ItemsModel::addItem(870, $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']);
ItemsModel::addItem(2140, $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']);
ItemsModel::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']);
ItemsModel::addItem(2390, $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']);
ItemsModel::addItem(994, $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']);
ItemsModel::addItem(3102, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
?>

View File

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

View File

@ -1,45 +1,46 @@
<?php
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
$io .= '<i>Подарочный комплект Мага Воды</i>, ';
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->addItem(4401,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']);
$io .= '<i>Подарочный комплект Мага Воды</i>, ';
ItemsModel::addItem(851, $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']);
ItemsModel::addItem(670, $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']);
ItemsModel::addItem(823, $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']);
ItemsModel::addItem(598, $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']);
ItemsModel::addItem(812, $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']);
ItemsModel::addItem(4544, $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']);
ItemsModel::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']);
ItemsModel::addItem(4401, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$io .= '<i>Свитки и прочие материалы....</i>, ';
$this->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']);
$this->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']);
$this->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']);
$this->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']); // элик
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']); //усилок
$this->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']);
$io .= '<i>Свитки и прочие материалы....</i>, ';
ItemsModel::addItem(2712, $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']);
ItemsModel::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']);
ItemsModel::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']);
ItemsModel::addItem(4736, $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']); // элик
ItemsModel::addItem(2139, $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']);
ItemsModel::addItem(5046, $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']);
ItemsModel::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']);
ItemsModel::addItem(4941, $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']);
ItemsModel::addItem(1460, $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']); //усилок
ItemsModel::addItem(1001, $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
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
$io .= '<i>Подарочный комплект Мага Воздуха</i>, ';
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->addItem(4401,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']);
$io .= '<i>Подарочный комплект Мага Воздуха</i>, ';
ItemsModel::addItem(848, $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']);
ItemsModel::addItem(671, $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']);
ItemsModel::addItem(820, $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']);
ItemsModel::addItem(595, $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']);
ItemsModel::addItem(811, $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']);
ItemsModel::addItem(4545, $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']);
ItemsModel::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']);
ItemsModel::addItem(4401, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$io .= '<i>Свитки и прочие материалы....</i>, ';
$this->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']);
$this->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']);
$this->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']);
$this->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']); // элик
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']); //усилок
$this->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']);
$io .= '<i>Свитки и прочие материалы....</i>, ';
ItemsModel::addItem(2712, $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']);
ItemsModel::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']);
ItemsModel::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']);
ItemsModel::addItem(4736, $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']); // элик
ItemsModel::addItem(2139, $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']);
ItemsModel::addItem(5046, $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']);
ItemsModel::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']);
ItemsModel::addItem(4941, $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']);
ItemsModel::addItem(1460, $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']); //усилок
ItemsModel::addItem(1001, $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
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
$io .= '<i>Подарочный комплект Мага Земли</i>, ';
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->addItem(4401,$this->info['id'],'|nosale=1|srok=864000|sudba='.$this->info['login']);
$io .= '<i>Подарочный комплект Мага Земли</i>, ';
ItemsModel::addItem(849, $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']);
ItemsModel::addItem(668, $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']);
ItemsModel::addItem(821, $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']);
ItemsModel::addItem(596, $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']);
ItemsModel::addItem(809, $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']);
ItemsModel::addItem(4546, $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']);
ItemsModel::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']);
ItemsModel::addItem(4401, $this->info['id'], '|nosale=1|srok=864000|sudba=' . $this->info['login']);
$io .= '<i>Свитки и прочие материалы....</i>, ';
$this->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']);
$this->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']);
$this->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']);
$this->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']); // элик
$this->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']);
$this->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']);
$this->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']);
$this->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']);
$this->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']); //усилок
$this->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']);
$io .= '<i>Свитки и прочие материалы....</i>, ';
ItemsModel::addItem(2712, $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']);
ItemsModel::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']);
ItemsModel::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']);
ItemsModel::addItem(4736, $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']); // элик
ItemsModel::addItem(2139, $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']);
ItemsModel::addItem(5046, $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']);
ItemsModel::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']);
ItemsModel::addItem(4941, $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']);
ItemsModel::addItem(1460, $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']); //усилок
ItemsModel::addItem(1001, $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
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
if($tr['var_id'] > 4) {
if ($tr['var_id'] > 4) {
//маг
$itmadd = array(
$itmadd = [
//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;
}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']);
}else{
$i3[9] = ItemsModel::addItem(4676, $this->info['id'], '|notr=1|sudba=' . $this->info['login']);
} 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
$i4 = array(
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)]
);
$i4 = [
$itmadd[0][rand(0, count($itmadd[0]) - 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);
$i3[1] = $this->addItem($i4[1],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,75);
$i3[2] = $this->addItem($i4[2],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,75);
$i3[3] = $this->addItem(3044,$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,1);
if($io == '') {
if ($io == '') {
$io = 'Какие-то предметы добавлены к Вам в инвентарь...';
}
}elseif($tr['var_id'] == 2) {
} elseif ($tr['var_id'] == 2) {
// 400 екр. - 2 суперсвитка 0/15, 4 простых 0/75 + Эссенция Здоровья 0/2 + новогодний эликсир 0/7
$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)]
);
$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, 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);
$i3[0] = $this->addItem($i4[0],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,15);
$i3[1] = $this->addItem($i4[1],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,15);
$i3[6] = ItemsModel::addItem(3044, $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 2);
$i3[2] = $this->addItem($i4[2],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,75);
$i3[3] = $this->addItem($i4[3],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,75);
$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);
if($io == '') {
if ($io == '') {
$io = 'Какие-то предметы добавлены к Вам в инвентарь...';
}
}elseif($tr['var_id'] == 3) {
} elseif ($tr['var_id'] == 3) {
// 600 екр. - 2 суперсвитка 0/20, 4 простых 0/100 + Эссенция Здоровья 0/2 + новогодний эликсир 0/10
$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)]
);
$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] = $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);
$i3[0] = ItemsModel::addItem($i4[0], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 20);
$i3[1] = ItemsModel::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[3] = $this->addItem($i4[3],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100);
$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[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);
$i3[6] = $this->addItem(3044,$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,2);
$i3[6] = ItemsModel::addItem(3044, $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 2);
if($io == '') {
if ($io == '') {
$io = 'Какие-то предметы добавлены к Вам в инвентарь...';
}
}elseif($tr['var_id'] == 4) {
} elseif ($tr['var_id'] == 4) {
// 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)]
);
$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 = array();
$i3 = [];
$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);
$i3[3] = $this->addItem($i4[2],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,20);
$i3[0] = ItemsModel::addItem($i4[0], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 20);
$i3[1] = ItemsModel::addItem($i4[1], $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 20);
$i3[3] = ItemsModel::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);
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);
}
$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[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);
$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);
$i3[8] = $this->addItem(3044,$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,3);
$i3[8] = ItemsModel::addItem(3044, $this->info['id'], '|notr=1|sudba=' . $this->info['login'], null, 3);
if($io == '') {
if ($io == '') {
$io = 'Какие-то предметы добавлены к Вам в инвентарь...';
}
}
unset($itmadd,$i3,$i4);
?>
}
unset($itmadd, $i3, $i4);

View File

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

View File

@ -1,9 +1,11 @@
<?php
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
if($tr['var_id'] != '') {
if ($tr['var_id'] != '') {
$io = '';
@ -15,117 +17,127 @@ if(!defined('GAME'))
*/
$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'));
$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')
);
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');
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'
);
$trgos = true;
}
if( $trgos == true ) {
if( rand(0,100) == 57 || $this->info['admin'] > 0 ) {
if ($trgos == true) {
if (rand(0, 100) == 57 || $this->info['admin'] > 0) {
//Выдаем артефакт
$io .= '<i>Временный артефакт</i>, ';
$arts_1 = array();
$arts_1 = [];
$arts_lvl = $this->info['level'];
if( $arts_lvl < 4 ) {
if ($arts_lvl < 4) {
$arts_lvl = 4;
}elseif( $arts_lvl > 10 ) {
} elseif ($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.'%"');
while( $pl1 = mysql_fetch_array($sp1) ) {
$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)) {
$arts_1[] = $pl1['items_id'];
}
$arts_1 = $arts_1[rand(0,count($arts_1)-1)];
if( $arts_1 > 0 ) {
$this->addItem($arts_1,$this->info['id'],'|nosale=1|srok='.(1*259200).'',NULL,50);
$arts_1 = $arts_1[rand(0, count($arts_1) - 1)];
if ($arts_1 > 0) {
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.']';
}
$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кр
$ryay=rand(1,200); // 5%4274 - 400 кр / 15% 4392/4392 - 100 кр / 30% 4392 -50 кр/ 100% 4464 - 20кр
$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кр
$ryay = rand(1, 200); // 5%4274 - 400 кр / 15% 4392/4392 - 100 кр / 30% 4392 -50 кр/ 100% 4464 - 20кр
if( $recr > 199 ) {
if ($recr > 199) {
//Выдаем чек +40 екр.
$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 екр.
$io .= '<i>Чек на 20 екр.</i>, ';
$this->addItem(5021,$this->info['id'],'|sudba='.$this->info['login']);
}elseif( $recr > 192 ){
ItemsModel::addItem(5021, $this->info['id'], '|sudba=' . $this->info['login']);
} elseif ($recr > 192) {
//Выдаем чек +10 екр.
$io .= '<i>Чек на 10 екр.</i>, ';
$this->addItem(5020,$this->info['id'],'|sudba='.$this->info['login']);
}elseif( $recr > 180 ){
ItemsModel::addItem(5020, $this->info['id'], '|sudba=' . $this->info['login']);
} elseif ($recr > 180) {
//Выдаем чек +5 екр.
$io .= '<i>Чек на 5 екр.</i>, ';
$this->addItem(4465,$this->info['id'],'|sudba='.$this->info['login']);
}else{
ItemsModel::addItem(4465, $this->info['id'], '|sudba=' . $this->info['login']);
} else {
//Выдаем чек +1 екр.
$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 кр.
$io .= '<i>Чек на 400 кр.</i> ';
$this->addItem(4274,$this->info['id'],'|sudba='.$this->info['login']);
}elseif( $rcr > 84 ){
ItemsModel::addItem(4274, $this->info['id'], '|sudba=' . $this->info['login']);
} elseif ($rcr > 84) {
//Выдаем чек на 100 кр.
$io .= '<i>Чеки на сумму 100 кр.</i> ';
$this->addItem(4392,$this->info['id'],'|sudba='.$this->info['login']);
$this->addItem(4392,$this->info['id'],'|sudba='.$this->info['login']);
}elseif( $rcr > 69 ){
ItemsModel::addItem(4392, $this->info['id'], '|sudba=' . $this->info['login']);
ItemsModel::addItem(4392, $this->info['id'], '|sudba=' . $this->info['login']);
} elseif ($rcr > 69) {
//Выдаем чек на 50 кр.
$io .= '<i>Чек на 50 кр.</i> ';
$this->addItem(4392,$this->info['id'],'|sudba='.$this->info['login']);
}else{
ItemsModel::addItem(4392, $this->info['id'], '|sudba=' . $this->info['login']);
} else {
//Выдаем чек на 20 кр.
$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> ';
$this->addItem(6445,$this->info['id']);
ItemsModel::addItem(6445, $this->info['id']);
}
$elik_1 = array(
4037,4038,4039,4040
);
$elik_1 = $elik_1[rand(0,3)];
if( $elik_1 > 0 ) {
$elik_1 = [
4037, 4038, 4039, 4040,
];
$elik_1 = $elik_1[rand(0, 3)];
if ($elik_1 > 0) {
//Выдаем 1 из 4 эликов
$io .= '<i>Эликсир +22 статов</i>, ';
$this->addItem($elik_1,$this->info['id'],'|nosale=1|',NULL,1);
ItemsModel::addItem($elik_1, $this->info['id'], '|nosale=1|', null, 1);
}
//Выдаем свиток +200%
$io .= '<i>Свиток +100% опыта</i>, ';
$this->addItem(4466,$this->info['id'],'');
ItemsModel::addItem(4466, $this->info['id'], '');
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `ip`, `vals`, `val`) VALUES ("'.$this->info['id'].'","'.time().'","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"," ","","")'
);
mysql_query('UPDATE `users_achiv` SET `snt`= `snt`+1 WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
}else{
} else {
$no_open_itm = true;
$this->error = 'Требуется 4 различных ключа с поля битвы.';
}
}
unset($i5,$i3,$i4);
?>
}
unset($i5, $i3, $i4);

View File

@ -1,9 +1,11 @@
<?php
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
if($tr['var_id'] != '') {
if ($tr['var_id'] != '') {
$io = '';
@ -11,40 +13,39 @@ if(!defined('GAME'))
1. Требует 2 любых ключа
*/
$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] >= 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');
$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] >= 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'
);
$trgos = true;
}
if( $trgos == true ) {
if ($trgos) {
//
$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']);
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>, ';
$this->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']);
ItemsModel::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']);
ItemsModel::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']);
ItemsModel::addItem(4024, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
//
}else{
} else {
$no_open_itm = true;
$this->error = 'Требуется 2 ключа с поля битвы.';
}
}
unset($i5,$i3,$i4);
?>
}
unset($i5, $i3, $i4);

View File

@ -1,9 +1,11 @@
<?php
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
if($tr['var_id'] != '') {
if ($tr['var_id'] != '') {
$io = '';
@ -11,48 +13,46 @@ if(!defined('GAME'))
1. Требует 4 любых ключа
*/
$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] >= 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');
$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] >= 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'
);
$trgos = true;
}
if( $trgos == true ) {
if ($trgos) {
//
$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']);
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>, ';
$this->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']);
ItemsModel::addItem(1029, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
//
$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>, ';
$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>, ';
$this->addItem(724,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
mysql_query('UPDATE `items_users` SET `iznosMAX` = 1 WHERE `id` = "'.$iidtm.'" LIMIT 1');
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');
//
$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');
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');
//
}else{
} else {
$no_open_itm = true;
$this->error = 'Требуется 4 ключа с поля битвы.';
}
}
unset($i5,$i3,$i4);
?>
}
unset($i5, $i3, $i4);

View File

@ -1,9 +1,11 @@
<?php
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
if($tr['var_id'] != '') {
if ($tr['var_id'] != '') {
$io = '';
@ -11,54 +13,53 @@ if(!defined('GAME'))
1. Требует 6 любых ключа
*/
$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');
$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'
);
$trgos = true;
}
if( $trgos == true ) {
if ($trgos) {
//
$io .= '<i>Целебный пирог (х3)</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']);
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>, ';
$this->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']);
ItemsModel::addItem(1029, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
//
$io .= '<i>Восстановление энергии 900HP</i>, ';
$this->addItem(2711,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
ItemsModel::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']);
ItemsModel::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']);
ItemsModel::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');
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>, ';
$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');
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>, ';
$this->addItem(865,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
ItemsModel::addItem(865, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
//
}else{
} else {
$no_open_itm = true;
$this->error = 'Требуется 6 ключей с поля битвы.';
}
}
unset($i5,$i3,$i4);
?>
}
unset($i5, $i3, $i4);

View File

@ -1,9 +1,11 @@
<?php
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
if($tr['var_id'] != '') {
if ($tr['var_id'] != '') {
$io = '';
@ -11,58 +13,44 @@ if(!defined('GAME'))
1. Требует 8 любых ключа
*/
$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] >= 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');
$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] >= 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'
);
$trgos = true;
}
if( $trgos == true ) {
//
if ($trgos) {
$io .= '<i>Целебный пирог (х3)</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']);
//
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>, ';
$this->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']);
ItemsModel::addItem(1029, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$io .= '<i>Восстановление энергии 1500HP</i>, ';
$this->addItem(4022,$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>, ';
$this->addItem(4034,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
//
ItemsModel::addItem(4034, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$io .= '<i>Пропуск Забытых</i>, ';
$this->addItem(2412,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
//
ItemsModel::addItem(2412, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$io .= '<i>Нападение</i>, ';
$this->addItem(865,$this->info['id'],'|nosale=1|sudba='.$this->info['login']);
//
ItemsModel::addItem(865, $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');
//
ItemsModel::addItem(724, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$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');
//
ItemsModel::addItem(1187, $this->info['id'], '|nosale=1|sudba=' . $this->info['login']);
$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{
$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');
} else {
$no_open_itm = true;
$this->error = 'Требуется 8 ключей с поля битвы.';
}
}
unset($i5,$i3,$i4);
?>
}
unset($i5, $i3, $i4);

View File

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

View File

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

View File

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

View File

@ -1,51 +1,54 @@
<?php
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
}
//воин
$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],
];
// 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)]
);
// 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 = array();
$i3 = [];
if( $u->info['level'] > 8 ) {
$i3[0] = $this->addItem(2143,$this->info['id'],'|nosale=1|notr=1|sudba='.$this->info['login'],NULL,($u->info['level']*2-10));
$i3[1] = $this->addItem(2144,$this->info['id'],'|nosale=1|notr=1|sudba='.$this->info['login'],NULL,($u->info['level']*2-10));
}
if ($u->info['level'] > 8) {
$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));
}
$i3[3] = $this->addItem(4020,$this->info['id'],'|nosale=1|notr=1|sudba='.$this->info['login'],NULL,($u->info['level']*2-10));
$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');
$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 == '') {
if ($io == '') {
$io = 'Какие-то предметы добавлены к Вам в инвентарь...';
}
unset($itmadd,$i3,$i4);
?>
}
unset($itmadd, $i3, $i4);

View File

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

View File

@ -1,46 +1,46 @@
<?php
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
//лечение легких травм
$ov_item = \User\ItemsModel::addItem(4412,$u->info['id'],'|srok=43200|sudba='.$u->info['login'].'');
if($ov_item > 0) {
mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "'.$ov_item.'" LIMIT 1');
//лечение легких травм
$ov_item = ItemsModel::addItem(4412, $u->info['id'], '|srok=43200|sudba=' . $u->info['login'] . '');
if ($ov_item > 0) {
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'].'');
mysql_query('UPDATE `items_users` SET `iznosMAX` = "1" WHERE `id` = "'.$ov_item.'" LIMIT 1');
$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');
//жж6
$ov_item = \User\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');
$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');
//лечение средних травм
$ov_item = \User\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');
$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');
//право на подвиг (бездна)
$ov_item = \User\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');
$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');
//право на подвиг (грибница)
$ov_item = \User\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');
$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');
//Лечение тяжелых травм
$ov_item = \User\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');
$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');
//право на подвиг (ПТП)
$ov_item = \User\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');
$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');
//право на подвиг (Катакомбы)
$ov_item = \User\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');
$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');
//право на подвиг (Гора легиона)
$ov_item = \User\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');
$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 `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> право на подвиг(бездна), право на подвиг(грибница),
право на подвиг(ПТП), право на подвиг(катакомбы), право на подвиг(Гора легиона)';
}
?>
}

View File

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

View File

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

View File

@ -1,74 +1,52 @@
<?php
if(!defined('GAME'))
{
if (!defined('GAME')) {
die();
}
if(isset($po['finish_file']) && $po['finish_file']=='tznanie')
{
if (isset($po['finish_file']) && $po['finish_file'] == 'tznanie') {
//Добавляем слот
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');
}else{
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'
);
} else {
$st['timeRead'] = 0;
//$tst = $u->testAction('`uid` = "'.$u->info['id'].'" AND `time` > '.time().' AND `vars` = "read" LIMIT 1',1);
if(isset($tst['id']))
{
if (isset($tst['id'])) {
//Уже что-то изучаем
$u->error = 'Так не пойдет, вы уже что-то изучаете';
}else{
$tst = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "read" AND `vals` = "'.$itm['item_id'].'" LIMIT 1',1);
if(isset($tst['id']))
{
} else {
$tst = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "read" AND `vals` = "' . $itm['item_id'] . '" LIMIT 1', 1);
if (isset($tst['id'])) {
$u->error = 'Вы уже изучили данное знание';
}else{
$fn = ''; $tom_iz = 0;
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);
if(!isset($tst2['id']))
{
} else {
$fn = '';
$tom_iz = 0;
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);
if (!isset($tst2['id'])) {
$tom_iz = 1;
}
unset($tst2);
}
/*
if( $itm['item_id'] == 4811 ) {
//5 том знаний, нужен 1047
$tst2 = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "read" AND `vals` = "1047" LIMIT 1',1);
if(!isset($tst2['id']))
{
$tom_iz = 1;
}
unset($tst2);
}
*/
if($tom_iz==0)
{
if(($itm['item_id']>=1044 && $itm['item_id']<=1047) || $itm['item_id']==4813 || $itm['item_id']==4812)
{
mysql_query('UPDATE `stats` SET `priemslot` = `priemslot` + 1 WHERE `id` = "'.$itm['uid'].'" LIMIT 1');
if ($tom_iz == 0) {
if (($itm['item_id'] >= 1044 && $itm['item_id'] <= 1047) || $itm['item_id'] == 4813 || $itm['item_id'] == 4812) {
mysql_query('UPDATE `stats` SET `priemslot` = `priemslot` + 1 WHERE `id` = "' . $itm['uid'] . '" LIMIT 1');
$fn .= 'finish_file=tznanie';
}
if($itm['item_id']==4811)
{
mysql_query('UPDATE `stats` SET `priemslot` = `priemslot` + 2 WHERE `id` = "'.$itm['uid'].'" LIMIT 1');
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 = 'Вы изучили &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 = 'Требует изучения предыдущего тома';
}
unset($tom_iz);
}
}
}
?>

View File

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

View File

@ -1,6 +1,7 @@
<?php
use Core\Db;
use Helper\Conversion;
use User\ItemsModel;
class Quests
@ -368,9 +369,9 @@ class Quests
//Задержка между выполнением квеста
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'));
$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) {
$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>';
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'));
if (isset($x6['id2'])) {
$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++;
}

View File

@ -1473,7 +1473,7 @@ class User
)
);
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()
) . '\');" src="' . Config::img() . '/i/items/healvortex_' . $vid . '.png" width="40" height="25" title="Клодец HP (Задержка)"> ';
} else {
@ -1485,7 +1485,7 @@ class User
)
);
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()
) . '\');" src="' . Config::img() . '/i/items/manavortex_' . $vid . '.png" width="40" height="25" title="Клодец MP (Задержка)"> ';
} else {
@ -1495,16 +1495,6 @@ class User
return $r;
}
/**
* @param $ttm
* @return string
* @deprecated использовать ConversionHelper::secondsToTimeout()
*/
public function timeOut($ttm): string
{
return Conversion::secondsToTimeout($ttm);
}
public function insertAlign($an, $uid): void
{
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
{
$r = true;
@ -3053,7 +3026,7 @@ class User
if ($data['srok'] + $id['time_create'] - time() > 86400 + 30) {
$this->error = 'Нельзя использовать на предметы с сроком годности 30 и более дней.';
} 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']
) . '.';
@ -3121,11 +3094,11 @@ class User
$data['sv_yron_min'] += $add['upatack'];
$data['sv_yron_max'] += $add['upatack'];
$this->addDelo(
2, $this->info['id'],
'&quot;<font color="#4863A0">System.remont.upatack</font>&quot;: Заточка &quot;' . $data['upatack_name'] . '&quot; была успешно <strong>встроена</strong> в предмет &quot;' . $id['name'] . '&quot; [itm:' . $id['id'] . ']',
time(), $this->info['city'], 'System.remont.upatack', 0, 0
Delo::add(
2,
'System.remont.upatack',
$this->info['id'],
'&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);
@ -3173,12 +3146,13 @@ class User
}
}
$this->addDelo(
2, $this->info['id'],
'&quot;<font color="#4863A0">System.remont.upatack</font>&quot;: Заточка &quot;' . $data['upatack_name'] . '&quot; была успешно <strong>встроена</strong> в предмет &quot;' . $id['name'] . '&quot; [itm:' . $id['id'] . ']',
time(), $this->info['city'], 'System.remont.upatack', 0, 0
Delo::add(
2,
'System.remont.upatack',
$u->info['id'],
'&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'] . ' ';
$data = Conversion::arrayToDataString($data);
mysql_query(
@ -3663,13 +3637,13 @@ class User
}
}
if ($po['battleUseZd'] > 0) {
$is2 .= '<br>Задержка использования: ' . $this->timeOut($po['battleUseZd']) . '';
$is2 .= '<br>Задержка использования: ' . Conversion::secondsToTimeout($po['battleUseZd']) . '';
}
if (isset($po['srok']) && $po['srok'] > 0) {
$pl['srok'] = $po['srok'];
}
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']
) . ')';
}
@ -3683,7 +3657,7 @@ class User
)
);
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'
);
}
$is2 .= '<div style="color:brown;">Предмет будет недоступен через ' . $this->timeOut(
$is2 .= '<div style="color:brown;">Предмет будет недоступен через ' . Conversion::secondsToTimeout(
$pl['time_create'] - time()
) . '</div>';
} else {
@ -4234,7 +4208,7 @@ class User
if (($pl['time_create'] - time() + 86400 * 30) < 1) {
$is2 .= '<div style="color:brown;">Предмет рассыпался у Вас на глазах...</div>';
} else {
$is2 .= '<div style="color:brown;">Предмет исчезнет через ' . $this->timeOut(
$is2 .= '<div style="color:brown;">Предмет исчезнет через ' . Conversion::secondsToTimeout(
$pl['time_create'] - time() + 86400 * 30
) . '</div>';
}
@ -4302,7 +4276,7 @@ class User
} 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>';
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>';
} elseif ($type == 67) {
@ -4835,25 +4809,6 @@ class User
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
{
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
);
$this->error = 'Предметы "' . $itm['name'] . ' (x' . ($col + 1) . ')" выброшены';
$this->addDelo(
1, $uid,
'&quot;<font color="maroon">System.inventory</font>&quot;: Предметы &quot;<strong>' . $itm['name'] . ' (x' . $col . ')</strong>&quot; [itm:' . $itm['id'] . '=' . time() . '] были <strong>выброшены</strong>.', time(),
$this->info['city'], 'System.inventory', 0, 0
Delo::add(
1,
'System.inventory',
$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 {
$this->error = 'Предмет "' . $itm['name'] . '" выброшен';
$this->addDelo(
1, $uid,
'&quot;<font color="maroon">System.inventory</font>&quot;: Предмет &quot;<strong>' . $itm['name'] . '</strong>&quot; [itm:' . $itm['id'] . '] был <strong>выброшен</strong>.',
time(), $this->info['city'], 'System.inventory', 0, 0
Delo::add(
1,
'System.inventory',
$uid,
'&quot;<span style="color: maroon; ">System.inventory</span>&quot;: Предмет &quot;<strong>' . $itm['name'] . '</strong>&quot; [itm:' . $itm['id'] . '] был <strong>выброшен</strong>.',
);
}
return 1;

View File

@ -29,33 +29,36 @@ WHERE `iu`.`data` LIKE '%frompisher=1%' AND `iu`.`uid` = "3" AND `iu`.`delete` =
$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`
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))
{
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');
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> кр. малец.';
if ($sell > 0) {
$u->addKr($sell);
$txt .= '<br>Забрала у тебя <b style="color: #009999;">' . $selli . '</b> вещей.';
$txt .= '<br>Держи <b style="color: #009999;">' . $sell . '</b> кр. малец.';
$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>';
Delo::add(
1,
'Babka.' . $u->info['city'],
$u->info['id'],
'&quot;<span style="color: green; ">Babka.' . $u->info['city'] . '</span>&quot;: Продал бабке &quot;<b>' . $selli . '</b>&quot; предметов за <b>' . $sell . '</b> кр.',
(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 Штаны
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)
{
mysql_query('UPDATE `items_users` SET `delete`="'.time().'" WHERE `uid`="'.$u->info['id'].'" AND `item_id` = "6168" AND `delete` = 0 LIMIT 50;');
\User\ItemsModel::addItem(6167,$u->info['id'],'|sudba='.$u->info['login']);
$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'].' шт.';
$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);
}
else
{
$txt .= '<br><i>Чтож ты бабушку так разочаровал</i><br>Недостаточно Призрачной Пыли! У тебя: '.$itmm['total'].' шт. милок.';
use User\ItemsModel;
$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) {
mysql_query('UPDATE `items_users` SET `delete`="' . time() . '" WHERE `uid`="' . $u->info['id'] . '" AND `item_id` = "6168" AND `delete` = 0 LIMIT 50;');
ItemsModel::addItem(6167, $u->info['id'], '|sudba=' . $u->info['login']);
$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'] . ' шт.';
Delo::add(
1,
'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'] . ' шт. милок.';
}
/*
$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);
?>
unlink($sell, $itmm, $itm);

View File

@ -36,61 +36,38 @@ foreach (Db::getRows($q) as $row) {
if ($row['inGroup']) {
$col = $u->itemsX($row['id']);
if ($col > 1) {
$stmt = Db::prepare('
update items_users set inShop = 0, 1price = ?
where
item_id = ? and
inShop = 30 and
uid = ? and
inGroup = ?
limit ' . $col);
$stmt = Db::prepare(
'update items_users set inShop = 0, 1price = ?
where item_id = ? and inShop = 30 and uid = ? and inGroup = ? limit ' . $col);
if ($stmt->execute([$row['price1'], $row['item_id'], $row['uid'], $row['inGroup']])) {
$ld = $u->addDelo(
Delo::add(
1,
SHOP_TYPE,
$row['uid'],
sprintf(RETURN_GROUP, $row['item_id'], $row['name'], $row['price1'], $row['inGroup'] . '+1'),
time(),
$u->info['city'],
SHOP_TYPE,
0,
0
);
}
} else {
$stmt = Db::prepare('
update items_users set inShop = 0, 1price = ?
where
uid = ? and
id = ? and
inOdet = 0 and
`delete` = 0 and
inShop = 30
');
$stmt = Db::prepare('update items_users set inShop = 0, 1price = ?
where uid = ? and id = ? and inOdet = 0 and `delete` = 0 and inShop = 30');
if ($stmt->execute([$row['price1'], $row['uid'], $row['id']])) {
$ld = $u->addDelo(
Delo::add(
1,
SHOP_TYPE,
$row['uid'],
sprintf(RETURN_ONE, $row['item_id'], $row['name'], $row['price1']),
time(),
$u->info['city'],
SHOP_TYPE,
0,
0
);
}
}
} else {
$stmt = Db::prepare('update items_users set inShop = 0, 1price = ? where id = ? and inShop = 30');
if ($stmt->execute([$row['price1'], $row['id']])) {
$ld = $u->addDelo(
Delo::add(
1,
SHOP_TYPE,
$row['uid'],
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
//const GAME = true;
use Helper\Conversion;
if (!defined('GAME_VERSION')) {
require_once '_incl_data/autoload.php';
}
@ -62,9 +64,9 @@ while ($pl = mysql_fetch_array($sp)) {
if ($pl['arand'] > 0) {
$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()
) . '</b>, таймаут ' . $u->timeOut($pl['timeout']) . '</font>';
) . '</b>, таймаут ' . Conversion::secondsToTimeout($pl['timeout']) . '</font>';
if ($pl['priz'] > 0) {
$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) {
$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) {
$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(
'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()
) . '</b></font></small>) Призовой фонд на текущий момент: <b>' . round(
($pl['money'] / 100 * 85), 2

View File

@ -1,282 +1,335 @@
<?php
if(!defined('GAME'))
{
use Core\Config;
if (!defined('GAME')) {
die();
}
$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 ) {
}
$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()) {
} 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)
{
} 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']."'");
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{
} 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)
{
}
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']."'");
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{
} 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{
}
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{
}
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)) {
}
if ($_POST['save'] && ($u->info['clan_prava'] == 'glava' || $cpr[2] == 1)) {
$st = strip_tags($_POST['status']);
/*
$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;}
if ($_POST['editpriv']=='on') { $ecpr[2]=1; } else { $ecpr[2]=0;}
if ($_POST['givekazna']=='on') { $ecpr[3]=1; } else { $ecpr[3]=0;}
if ($_POST['usekazna']=='on') { $ecpr[4]=1; } else { $ecpr[4]=0;}
if ($_POST['priem'] == 'on') {
$ecpr[0] = 1;
} else {
$ecpr[0] = 0;
}
if ($_POST['vigon'] == 'on') {
$ecpr[1] = 1;
} else {
$ecpr[1] = 0;
}
if ($_POST['editpriv'] == 'on') {
$ecpr[2] = 1;
} else {
$ecpr[2] = 0;
}
if ($_POST['givekazna'] == 'on') {
$ecpr[3] = 1;
} else {
$ecpr[3] = 0;
}
if ($_POST['usekazna'] == 'on') {
$ecpr[4] = 1;
} else {
$ecpr[4] = 0;
}
$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");
$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");
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 'Что-то не так...';
}
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'])."'");
$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{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`-'".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'])."'");
$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{echo'Что-то не так...';}
$res['money1']-=$_POST['igogo'];
}
$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>
body {
margin: 5px 10px 10px;
background-color: #e2e0e0;
}
.modpow {
.modpow {
background-color: #ddd5bf;
}
background-color:#ddd5bf;
}
.mt {
background-color:#b1a993;
padding-left:10px;
padding-right:10px;
padding-top:5px;
padding-bottom:5px;
}
.md {
padding:10px;
}
.mt {
background-color: #b1a993;
padding: 5px 10px;
}
.md {
padding: 10px;
}
</style>
<body>
<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)
{
var d = document.getElementById('useMagic');
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';
}
}
function closeMod() {
const d = document.getElementById('useMagic');
if (d) {
document.getElementById('modtitle').innerHTML = '';
document.getElementById('moddata').innerHTML = '';
d.style.display = 'none';
}
}
</script>
<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>
<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>
<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 class="mt" id="modtitle"></div>
<div class="md" id="moddata"></div>
</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">
<TR><TD valign=top>
<small>Казна клана: <b><span style="color:green"><?=round($res['money1']);?></span> кр.</b></small>
<form method=post>
<input type=text value="0.00" style='width:40px;' name=igogo>
<?if($cpr[3]==1 || $u->info['clan_prava']=='glava'){?>
<input type=submit value="Положить" name=lojit>
<?}if($cpr[4]==1 || $u->info['clan_prava']=='glava'){?>
<input type=submit value="Забрать" name=zabrat>
<?}?>
</form>
<br><br>
<?php if($u->info['clan_prava'] == 'glava' || $cpr[0]==1) { ?>
<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>');">
(Это обойдется вам в <b>100 кр.</b>)<br>
<small>(Перед приемом в клан,персонаж должен пройти проверку у паладинов)</small><br>
<?php } 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\'>Логин: <input type=\'text\' style=\'width:144px;\' id=\'logingo\' name=\'logingo\'><br> <input style=\'float:right;\' type=\'submit\' name=\'dissmis\' value=\'Выгнать\'></form>');">
(Это обойдется вам в <b>30 кр.</b>)<br>
<?php } if($u->info['clan_prava'] == 'glava' || $cpr[2]==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){
<TR>
<TD valign=top>
<small>Казна клана: <b><span style="color:green"><?= round($res['money1']); ?></span> кр.</b></small>
<form method=post>
<input type=text value="0.00" style='width:40px;' name=igogo>
<?php if ($cpr[3] == 1 || $u->info['clan_prava'] == 'glava') { ?>
<input type=submit value="Положить" name=lojit>
<?php }
if ($cpr[4] == 1 || $u->info['clan_prava'] == 'glava') { ?>
<input type=submit value="Забрать" name=zabrat>
<?php } ?>
</form>
<br><br>
<?php if ($u->info['clan_prava'] == 'glava' || $cpr[0] == 1) { ?>
<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>');">
(Это обойдется вам в <b>100 кр.</b>)<br>
<small>(Перед приемом в клан,персонаж должен пройти проверку у паладинов)</small><br>
<?php }
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\'>Логин: <input type=\'text\' style=\'width:144px;\' id=\'logingo\' name=\'logingo\'><br> <input style=\'float:right;\' type=\'submit\' name=\'dissmis\' value=\'Выгнать\'></form>');">
(Это обойдется вам в <b>30 кр.</b>)<br>
<?php }
if ($u->info['clan_prava'] == 'glava' || $cpr[2] == 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>
Редактирование прав <b>'.htmlspecialchars($_POST['logingo'],NULL).'</b><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=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>
Редактирование прав <b>' . htmlspecialchars($_POST['logingo'], null) . '</b><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=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>';
}
?>
</TD><TD valign=top align=right>
}
?>
</TD>
<TD valign=top align=right>
<TABLE cellspacing=0 cellpadding=2 width="300"><TR><TD>
<center>
<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>
<TABLE cellspacing=0 cellpadding=2 width="300">
<TR>
<TD>
<center>
<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>
<table bgcolor=#eeeeee>
<tr>
<td align=left>
<?php
$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");
while($data = mysql_fetch_array($res1)) {
if ($data['online']>time()-120) {
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>
<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>';
<?php
$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"
);
while ($data = mysql_fetch_array($res1)) {
if ($data['online'] > time() - 120) {
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>
<img title="' . $res['name'] . '" src="' . Config::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="' . Config::img(
) . '/i/inf_capitalcity.gif"></a>';
if ($data['clan_prava'] == 'glava') {
echo ' - <b>Глава клана</b>';
} else {
echo ' - ',$data['mod_zvanie'],'';
echo ' - ', $data['mod_zvanie'], '';
}
echo '<BR>';
}
elseif ($data['online']<time()-120) {
echo '<img src="https://'.$c['img'].'/i/offline.gif" width=20 height=15>
<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>';
} elseif ($data['online'] < time() - 120) {
echo '<img src="' . Config::img() . '/i/offline.gif" width=20 height=15>
<img title="' . $res['name'] . '" src="' . Config::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="' . Config::img(
) . '/inf_dis.gif"></a>';
if ($data['clan_prava'] == 'glava') {
echo ' - <b>Глава клана</b>';
} else {
echo ' - ',$data['mod_zvanie'],'</font>';
echo ' - ', $data['mod_zvanie'], '</font>';
}
echo '<BR>';
}
//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>';
}
?>
}
?>
</td>
</tr>
</table>
</center>
</TD></TR><TR><TD>
<small>(список обновляется <strike>в полночь</strike> каждый раз)</small>
</TD></TR></TABLE><br />
</TD>
</TR>
</center>
</TD>
</TR>
</TABLE>
<br/>
</TD>
</TR>
</TABLE>
</FORM>
<hr>

View File

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

View File

@ -1493,7 +1493,7 @@ $tma = '';
echo '<div style="color: red; font-weight: bold;">Эффект &quot;' . $u->stats['effects'][$i]['name'] . '&quot; был принудительно завершен.</div>';
$clr = $clr == 'C7' ? 'D5' : 'C7';
} 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++;
@ -1540,7 +1540,7 @@ $tma = '';
$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) {
$ae .= 'width="30" style="float:left"';
}
@ -1574,7 +1574,7 @@ $tma = '';
$lvlp = explode(']', $lvlp[1]);
$lvlp = $lvlp[0];
$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) {
@ -1587,7 +1587,7 @@ $tma = '';
);
if (isset($psh['id'])) {
$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>
@ -2278,7 +2278,7 @@ $tma = '';
);
while ($pl = mysql_fetch_array($sp)) {
$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(
@ -2286,7 +2286,7 @@ $tma = '';
1
);
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>

View File

@ -1,273 +1,340 @@
<?php
if(!defined('GAME')) { die(); }
if($u->room['file'] == 'bsenter') {
use Helper\Conversion;
if (!defined('GAME')) {
die();
}
if ($u->room['file'] == 'bsenter') {
$r = 2;
if(isset($_GET['r'])) {
if (isset($_GET['r'])) {
$_GET['r'] = (int)$_GET['r'];
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; }
}
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){
function changeSleep($uid, $sleep_action)
{
global $u;
if( $sleep_action == 1 ){
if ($sleep_action == 1) {
//
mysql_query('INSERT INTO `sleep` (`uid`,`time`,`sleep`) VALUES ("'.$uid.'","'.time().'","1")');
mysql_query('INSERT INTO `sleep` (`uid`,`time`,`sleep`) VALUES ("' . $uid . '","' . time() . '","1")');
//
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%"');
$u->addAction(time(),'sleep',$u->info['city']);
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%"');
$u->addAction(time(), 'sleep', $u->info['city']);
//
} elseif( $sleep_action == 2 ){
} elseif ($sleep_action == 2) {
//
mysql_query('INSERT INTO `sleep` (`uid`,`time`,`sleep`) VALUES ("'.$uid.'","'.time().'","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) ) {
$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');
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`,`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']."' ");
$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');
}
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'));
if(isset($t['id'])) {
if($t['time_start'] > time()) {
$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'));
$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'));
$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'])) {
if ($t['time_start'] > time()) {
$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')
);
$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'
)
);
}
if(isset($_POST['coin']) && $t['time_start'] > time() ) {
$_POST['coin'] = round((int)$_POST['coin'],2);
if((round((int)$tz['money'], 2) + $_POST['coin']) > 3*$u->info['level'] || $tz_all[0] > 3*$u->info['level']) {
$error = 'Вам нельзя делать ставку выше '.(3* $u->info['level']).' кр.';
} elseif(($_POST['coin'] >= $t['min_money'] || (isset($tz['id']) && $_POST['coin'] >= 1)) && $u->info['money'] >= $_POST['coin']) {
if (isset($_POST['coin']) && $t['time_start'] > time()) {
$_POST['coin'] = round((int)$_POST['coin'], 2);
if ((round((int)$tz['money'], 2) + $_POST['coin']) > 3 * $u->info['level'] || $tz_all[0] > 3 * $u->info['level']) {
$error = 'Вам нельзя делать ставку выше ' . (3 * $u->info['level']) . ' кр.';
} elseif (($_POST['coin'] >= $t['min_money'] || (isset($tz['id']) && $_POST['coin'] >= 1)) && $u->info['money'] >= $_POST['coin']) {
$t['money'] += $_POST['coin'];
$u->info['money'] -= $_POST['coin'];
if(isset($tz['id'])) {
if (isset($tz['id'])) {
$tz['money'] += $_POST['coin'];
mysql_query('UPDATE `bs_zv` SET `money` = "'.$tz['money'].'" WHERE `id` = "'.$tz['id'].'" LIMIT 1');
mysql_query('UPDATE `bs_zv` SET `money` = "' . $tz['money'] . '" WHERE `id` = "' . $tz['id'] . '" LIMIT 1');
} else {
//создаем
$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'].'")');
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 ) {
$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'] . '")'
);
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).' кр.)';
$error = 'Ваша ставка была возвращена. (' . round($_POST['coin'], 2) . ' кр.)';
}
$t['users']++;
$tz = array('id'=>1, 'bsid'=>$t['id'], 'money'=>$_POST['coin'], 'time'=>$t['time_start'], 'finish'=>0);
$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');
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;
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">
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">
<td>
<div style="padding-left:0px;" align="center">
<h3><?= $u->room['name']; ?></h3>
</div></td>
<td width="200"><div align="right">
</div>
</td>
<td width="200">
<div align="right">
<table cellspacing="0" cellpadding="0">
<tr>
<td width="100%">&nbsp;</td>
<td><table border="0" cellpadding="0" cellspacing="0">
<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">
<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>
<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>
</div></td>
</td>
</tr>
</table>
<center><h4><font color=green>Поздравляем! Вы успешно допускаетесь к турниру!</font></h4></center><br>
<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>
<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>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<center><h4><font color=green>Поздравляем! Вы успешно допускаетесь к турниру!</font></h4></center><br>
<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>
<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 {
if($t['status'] == 0) {
?>
Начало турнира в Башне Смерти: <span class=date><?=date('d.m.Y H:i:',$t['time_start']);?>59</span><BR>
Призовой фонд на текущий момент: <B><?=round(($t['money']-($t['money']/100*15)),2);?></B> кр. и <B>1</B> екр.<BR>
Всего подано заявок: <B><?=$t['users'];?></B><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($t['id'])) {
echo '<br><center>К сожалению турниры данного типа не проводятся в этом городе</center><br>';
} else {
if ($t['status'] == 0) {
?>
Начало турнира в Башне Смерти: <span class=date><?= date('d.m.Y H:i:', $t['time_start']); ?>59</span><BR>
Призовой фонд на текущий момент: <B><?= round(($t['money'] - ($t['money'] / 100 * 15)), 2); ?></B> кр. и <B>1</B> екр.<BR>
Всего подано заявок: <B><?= $t['users']; ?></B><BR>
<?php
if ($error != '') {
echo '<font color=red><b>' . $error . '</b></font><Br>';
}
?>
<?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">
<input type="submit" value="Подать заявку" name="docoin"><BR>
Чем выше ваша ставка, тем больше шансов принять участие в турнире.<BR>
Сколько ставите кредитов? (минимальная ставка <b><?= $t['min_money']; ?>.00 кр.</B> у вас в наличии <b><?= floor($u->info['money']); ?> кр.</b>)<BR>
<input type="text" name="coin" value="20.00" size="8">
<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>
Вам нужно набраться опыта.<BR>
Для регистрации в турнире нужно: <span style="color:green;"><b>250000</b></span> опыта у вас: <span style="color:red;"><b><?= $u->info['exp']; ?></b></span> опыта<BR>
Вам нужно набраться опыта.<BR>
<?php }}else{ ?>
<?php }
} else { ?>
Вы уже сделали ставку <b><?= floor($tz['money']); ?> кр.</b> (У вас в наличии <b><?= floor($u->info['money']); ?> кр.</b>) Сделать повторную ставку?<br />
<small><b><font color=red>Внимание! Покинув помещение Башни Смерти все Ваши ставки будут потеряны!</font></b></small><br>
<input type="text" name="coin" value="1.00" size="8" id="coin" />
<input type="submit" value="Увеличить ставку" name="docoin2" />
<?php } } elseif($t['status'] == 1) { ?>
<?php
$r = ''; $p = ''; $b = '<table width="100%" cellpadding="0" cellspacing="0" border="0">
Вы уже сделали ставку <b><?= floor($tz['money']); ?> кр.</b> (У вас в наличии <b><?= floor($u->info['money']); ?> кр.</b>) Сделать повторную ставку?<br/>
<small><b><font color=red>Внимание! Покинув помещение Башни Смерти все Ваши ставки будут потеряны!</font></b></small><br>
<input type="text" name="coin" value="1.00" size="8" id="coin"/>
<input type="submit" value="Увеличить ставку" name="docoin2"/>
<?php }
} elseif ($t['status'] == 1) { ?>
<?php
$r = '';
$p = '';
$b = '<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr valign="top">
<td valign="bottom" nowrap="" title=""><input onClick="location=location;" style="padding:5px;" type="submit" name="analiz2" value="Обновить"></td>
</tr>
</tbody>
</table>';
$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'));
if(!isset($log['id'])) {
$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'));
if (!isset($log['id'])) {
$notowerlog = true;
$r = '<div>Скорее всего Архивариус снова потерял пергамент с хрониками турниров ...</div>';
} else {
$sp = mysql_query('SELECT * FROM `bs_logs` WHERE `count_bs` = "'.$log['count_bs'].'" ORDER BY `id` ASC');
while( $pl = mysql_fetch_array($sp) ) {
} else {
$sp = mysql_query('SELECT * FROM `bs_logs` WHERE `count_bs` = "' . $log['count_bs'] . '" ORDER BY `id` ASC');
while ($pl = mysql_fetch_array($sp)) {
$datesb = '';
if( $pl['type'] == 2 ) {
if ($pl['type'] == 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 = '';
$sp = mysql_query('SELECT `id` FROM `users` WHERE `inTurnir` = "'.$t['id'].'"');
while( $plu = mysql_fetch_array($sp) ) {
$pl = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`align`,`clan`,`level` FROM `users` WHERE `inUser` = "'.$plu['id'].'"'));
if( isset($pl['id']) ) {
$sp = mysql_query('SELECT `id` FROM `users` WHERE `inTurnir` = "' . $t['id'] . '"');
while ($plu = mysql_fetch_array($sp)) {
$pl = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`align`,`clan`,`level` FROM `users` WHERE `inUser` = "' . $plu['id'] . '"'));
if (isset($pl['id'])) {
$alc = '';
if( $pl['align'] > 0 ) {
$alc .= '<img width=12 height=15 src=//img.new-combats.tech/i/align/align'.$pl['align'].'.gif >';
if ($pl['align'] > 0) {
$alc .= '<img width=12 height=15 src=//img.new-combats.tech/i/align/align' . $pl['align'] . '.gif >';
}
if( $pl['clan'] > 0 ) {
$alc .= '<img width=24 height=15 src=//img.new-combats.tech/i/clan/'.$pl['clan'].'.gif >';
if ($pl['clan'] > 0) {
$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,', ').')';
unset($liveusers,$alc);
}
if( $notowerlog == false ) {?>
Призовой фонд: <b><?=$log['m']?> кр.</b>
<?php } echo $r; ?>
<?php } } ?>
<BR>
</fieldset>
</form>
<h4>Топ 10 игроков (новая статистиика) турнир 5<?//=$t['level']?> уровней</h4>
<?php
$sp = mysql_query('SELECT * FROM `users` WHERE `win_bs`>0 ORDER BY `win_bs` DESC LIMIT 10');
$i = 1;
while ($pl = mysql_fetch_array($sp)) {
$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 ) {
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/'.$pl['clan'].'.gif>'.$wuser;
$r .= '<br><br>Всего живых участников на данный момент: <b>' . $t['users'] . '</b> (' . ltrim($liveusers, ', ') . ')';
unset($liveusers, $alc);
}
if( $pl['align'] > 0 ) {
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align'.$pl['align'].'.gif>'.$wuser;
if ($notowerlog == false) { ?>
Призовой фонд: <b><?= $log['m'] ?> кр.</b>
<?php }
echo $r; ?>
<?php }
} ?>
<BR>
</fieldset>
</form>
<h4>Топ 10 игроков (новая статистиика) турнир 5<? //=$t['level']?> уровней</h4>
<?php
$sp = mysql_query('SELECT * FROM `users` WHERE `win_bs`>0 ORDER BY `win_bs` DESC LIMIT 10');
$i = 1;
while ($pl = mysql_fetch_array($sp)) {
$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) {
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/' . $pl['clan'] . '.gif>' . $wuser;
}
echo '<b>'.$i.'.</b> Место: '.$wuser.' побед: <b>'.$pl['win_bs'].'</b><br>';
if ($pl['align'] > 0) {
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align' . $pl['align'] . '.gif>' . $wuser;
}
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');
$i = 1;
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 ) {
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/'.$pl['wclan'].'.gif>'.$wuser;
}
if( $pl['walign'] > 0 ) {
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align'.$pl['walign'].'.gif>'.$wuser;
?>
<h4>Победители 10-ти предыдущих турниров для 5<? //=$t['level']?> уровней</h4>
<?php
$sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `id` DESC LIMIT 10');
$i = 1;
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) {
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/' . $pl['wclan'] . '.gif>' . $wuser;
}
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>';
if ($pl['walign'] > 0) {
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align' . $pl['walign'] . '.gif>' . $wuser;
}
echo $i . '. Победитель: ' . $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++;
}
?>
<h4>Максимальный выигрыш для 5<?//=$t['level']?> уровней</h4>
<?php
$sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `money` DESC LIMIT 1');
$i = 1;
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 ) {
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/'.$pl['wclan'].'.gif>'.$wuser;
}
if( $pl['walign'] > 0 ) {
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align'.$pl['walign'].'.gif>'.$wuser;
?>
<h4>Максимальный выигрыш для 5 уровней</h4>
<?php
$sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `money` DESC LIMIT 1');
$i = 1;
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) {
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/' . $pl['wclan'] . '.gif>' . $wuser;
}
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['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++;
}
?>
<h4>Самый продолжительный турнир для 5<?//=$t['level']?> уровней</h4>
<?php
$sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `time_sf` DESC LIMIT 1');
$i = 1;
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 ) {
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/'.$pl['wclan'].'.gif>'.$wuser;
}
if( $pl['walign'] > 0 ) {
$wuser = '<img width=12 height=15 src=//img.new-combats.tech/i/align/align'.$pl['walign'].'.gif>'.$wuser;
?>
<h4>Самый продолжительный турнир для 5<? //=$t['level']?> уровней</h4>
<?php
$sp = mysql_query('SELECT * FROM `bs_statistic` WHERE `wuid` > 0 ORDER BY `time_sf` DESC LIMIT 1');
$i = 1;
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) {
$wuser = '<img width=24 height=15 src=//img.new-combats.tech/i/clan/' . $pl['wclan'] . '.gif>' . $wuser;
}
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['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 } } ?>
}
?>
<br/><br/>
<?php }
} ?>

View File

@ -1,4 +1,7 @@
<?php
use Helper\Conversion;
if (!defined('GAME')) {
die();
}
@ -8,7 +11,8 @@ if ($u->room['file'] != 'dragopsh') {
}
$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;
$cmsg = new ChatMessage();
$cmsg->setCity($u->info['city']);
@ -55,13 +59,23 @@ $dies = $dies[0];
$map_d = json_decode($map['data']);
$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 = '';
$effed = '';
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 ($var['obj']['take'] == 0) {
$var['sex'] = '';
@ -84,7 +98,13 @@ if (isset($_GET['takeitm'])) {
$errors = '<b style="color: red">Предмет не найден...</b>';
}
} 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 ($var['obj']['use'] == 0) {
if ($var['obj']['type'] == 1) {
@ -101,9 +121,11 @@ if (isset($_GET['takeitm'])) {
$var['itm'] = $var['itm'][0];
$var['itm'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "' . $var['itm'] . '" LIMIT 1'));
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"
)');
)'
);
} else {
$var['itm']['name'] = 'Предмет рассыпался на глазах...';
}
@ -135,9 +157,11 @@ if (isset($_GET['takeitm'])) {
$var['itm'] = $var['itm'][0];
$var['itm'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "' . $var['itm'] . '" LIMIT 1'));
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"
)');
)'
);
} else {
$var['itm']['name'] = 'Предмет рассыпался на глазах...';
}
@ -146,9 +170,11 @@ if (isset($_GET['takeitm'])) {
$var['itm'] = $var['itm'][0];
$var['itm'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `items_main` WHERE `id` = "' . $var['itm'] . '" LIMIT 1'));
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"
)');
)'
);
} else {
$var['itm']['name'] = 'Предмет рассыпался на глазах...';
}
@ -207,7 +233,9 @@ if ($real_x > count($map_d) - 7) {
$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)) {
$objs[$pl['x']][$pl['y']] = $pl;
}
@ -260,7 +288,9 @@ if (isset($_GET['goto'])) {
}
$u->info['timeGo'] = time() + $varos['timego'];
$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) {
$j = 0;
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"
)');
)'
);
$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');
} elseif ($mitm['type'] == 2) {
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'])) {
//вступаем в поединок
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;
$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",
"' . $lab['id'] . '",
"' . $u->info['x'] . '",
@ -393,7 +428,8 @@ if (isset($objs[$u->info['x']][$u->info['y']]['id'])) {
"' . $btld['travmChance'] . '",
"' . $btld['typeBattle'] . '",
"' . $btld['addExp'] . '",
"' . $btld['money'] . '")');
"' . $btld['money'] . '")'
);
$btl_id = mysql_insert_id();
}
if ($btl_id > 0) {
@ -444,14 +480,23 @@ if (isset($objs[$u->info['x']][$u->info['y']]['id'])) {
} elseif ($mitm['type'] == 4) {
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);
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 {
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'] . '"
)');
)'
);
}
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'] . ' в ловушку...';
$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);
$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);
}
$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)) {
$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');
}
\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 `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');
@ -510,7 +565,9 @@ if ($itms != '') {
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;
while ($pl = mysql_fetch_array($sp)) {
$objs[$pl['x']][$pl['y']] = [2 => '<div title="Игрок: ' . $pl['login'] . '" class="ddp1ee' . $pi . '"></div>']; //Персонаж 1
@ -556,7 +613,9 @@ $mapsee = '<div style="width:165px;height:165px;padding:10px;">' . $mapsee . '</
//Эффекты на персонаже
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);
?>
@ -665,9 +724,9 @@ unset($varos);
height: 15px;
background-image: url("//img.new-combats.tech/drgn/bg/e5.gif");
}
</style>
<script type="text/javascript" src="js/jquery.js"></script>
<script>
</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";
@ -679,8 +738,8 @@ unset($varos);
location.href = "main.php?goto=4";
}
});
</script>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#E2E0E0">
</script>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#E2E0E0">
<tbody>
<tr>
<td></td>
@ -934,9 +993,7 @@ unset($varos);
<td width="67" height="74"></td>
<td width="165" height="165">
<div>
<?php
echo $mapsee;
?>
<?= $mapsee; ?>
</div>
</td>
<td width="64"></td>
@ -957,5 +1014,3 @@ unset($varos);
</tr>
</tbody>
</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'])) { ?>
<button class="btn btn-success" onclick="location.href='/main.php?rz=1&add_quest=1&city_quest=capitalcity'">Пещера Тысячи Проклятий</button>
<?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"'/>
<?php }
if (!isset($hgo2['id'])) { ?>
@ -1078,7 +1080,7 @@ if ($roomSection == 1) {
}
}
} else {
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . $u->timeOut(
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(
60 * 60 * 2 - time() + $dungeon_timeout['time']
) . '<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

View File

@ -1,277 +1,261 @@
<?php
if(!defined('GAME'))
{
use Helper\Conversion;
if (!defined('GAME')) {
die();
}
if($u->room['file']=='entergrib')
{
if ($u->room['file'] == 'entergrib') {
if(isset($_GET['rz'])) {
if (isset($_GET['rz'])) {
$rz = 1;
}else{
} else {
$rz = 0;
}
}
$dun = 10; //для новичков 2-7 лвл
$dun = 10; //для новичков 2-7 лвл
$er = '';
$er = '';
$dzs = '';
$dzs = '';
$g111 = 1;
//Задержка в Санд
$g11 = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "psh2" AND `time`>'.(time()-7200).' LIMIT 1',1);
$g111 = 1;
//Задержка в Санд
$g11 = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `vars` = "psh2" 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');
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(isset($g11['id']))
{
$g111 = 0;
if(isset($_GET['start']))
{
$re = 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']);
}
}
if(isset($_GET['start']) && $zv['uid']==$u->info['id'] && $g111 == 1)
{
if (isset($g11['id'])) {
$g111 = 0;
if (isset($_GET['start'])) {
$re = 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(7200 - time() + $g11['time']);
}
}
if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $g111 == 1) {
//начинаем поход
//начинаем поход
$ig = 1;
if($ig>0)
{
if ($ig > 0) {
//перемещаем игроков в пещеру
//$u->addAction(time(),'psh2','');
$ins = mysql_query('INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
VALUES ("'.$zv['city'].'","'.$zv['uid'].'","'.$dun.'","Катакомбы","'.time().'")');
if($ins)
{
$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).'');
$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(),'psh2','',$pu['id']);
while ($pu = mysql_fetch_array($su)) {
$ids .= ' `id` = "' . $pu['id'] . '" OR';
$u->addAction(time(), 'psh2', '', $pu['id']);
}
$ids = rtrim($ids,'OR');
$upd1 = mysql_query('UPDATE `stats` SET `s`="0",`res_s`="0",`x`="0",`y`="0",`res_x`="0",`res_y`="0",`dn` = "0",`dnow` = "'.$zid.'" WHERE '.$ids.' LIMIT '.($zv['team_max']+1).'');
if($upd1)
{
$upd2 = mysql_query('UPDATE `users` SET `room` = "305" WHERE '.$ids.' LIMIT '.($zv['team_max']+1).'');
$ids = rtrim($ids, 'OR');
$upd1 = mysql_query(
'UPDATE `stats` SET `s`="0",`res_s`="0",`x`="0",`y`="0",`res_x`="0",`res_y`="0",`dn` = "0",`dnow` = "' . $zid . '" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . ''
);
if ($upd1) {
$upd2 = mysql_query('UPDATE `users` SET `room` = "305" 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'].'"),';
$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 = 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'].'"),';
$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,',');
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.'');
}else{
$vls = rtrim($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 . ''
);
} else {
$ins2 = true;
}
if($upd2 && $ins1 && $ins2)
{
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv['id'].'" LIMIT 1');
die('<script>location="main.php?rnd='.$code.'";</script>');
}else{
if ($upd2 && $ins1 && $ins2) {
mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
die('<script>location="main.php?rnd=' . $code . '";</script>');
} else {
$re = 'Ошибка перехода в подземелье...';
}
}else{
} else {
$re = 'Ошибка перехода в подземелье...';
}
}else{
} else {
$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($u->info['level']>7)
{
} 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 ($u->info['level'] > 7) {
$row = 0;
if(5>$row)
{
$upd = mysql_query('UPDATE `stats` SET `dn` = "'.$zv['id'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
if(!$upd)
{
if (5 > $row) {
$upd = mysql_query('UPDATE `stats` SET `dn` = "' . $zv['id'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
if (!$upd) {
$re = 'Не удалось вступить в эту группу';
unset($zv);
}else{
} else {
$u->info['dn'] = $zv['id'];
}
}else{
} else {
$re = 'В группе нет места';
unset($zv);
}
}else{
} else {
$re = 'Вы не подходите по уровню';
unset($zv);
}
}else{
} else {
$re = 'Заявка не найдена';
}
}else{
} else {
$re = 'Вы уже находитесь в группе';
}
}elseif(isset($_POST['leave']) && isset($zv['id']) && $g111 == 1)
{
if($zv['uid']==$u->info['id'])
{
} 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']))
{
$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');
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{
} 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');
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{
} else {
//просто выходим с группы
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;
unset($zv);
}
}elseif(isset($_POST['add']) && $u->info['level']>1 && $g111 == 1)
{
if($u->info['dn']==0)
{
$ins = mysql_query('INSERT INTO `dungeon_zv`
} elseif (isset($_POST['add']) && $u->info['level'] > 1 && $g111 == 1) {
if ($u->info['dn'] == 0) {
$ins = mysql_query(
'INSERT INTO `dungeon_zv`
(`city`,`time`,`uid`,`dun`,`pass`,`com`,`lvlmin`,`lvlmax`,`team_max`) VALUES
("'.$u->info['city'].'","'.time().'","'.$u->info['id'].'","'.$dun.'",
"'.mysql_real_escape_string($_POST['pass']).'",
"'.mysql_real_escape_string($_POST['text']).'",
("' . $u->info['city'] . '","' . time() . '","' . $u->info['id'] . '","' . $dun . '",
"' . mysql_real_escape_string($_POST['pass']) . '",
"' . mysql_real_escape_string($_POST['text']) . '",
"8",
"21",
"5")');
if($ins)
{
"5")'
);
if ($ins) {
$u->info['dn'] = mysql_insert_id();
$zv['id'] = $u->info['dn'];
$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 = 'Вы успешно создали группу';
}else{
} else {
$re = 'Не удалось создать группу';
}
}else{
} else {
$re = 'Вы уже находитесь в группе';
}
}
//Генерируем список групп
$sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "'.$u->info['city'].'" AND `dun` = "3" AND `delete` = "0" AND `time` > "'.(time()-60*60*2).'"');
while($pl = mysql_fetch_array($sp))
{
$dzs .= '<div style="padding:2px;">';
if($u->info['dn']==0)
{
$dzs .= '<input type="radio" name="goid" id="goid" value="'.$pl['id'].'" />';
}
$dzs .= '<span class="date">'.date('H:i',$pl['time']).'</span> ';
//Генерируем список групп
$sp = mysql_query('SELECT * FROM `dungeon_zv` WHERE `city` = "' . $u->info['city'] . '" AND `dun` = "3" AND `delete` = "0" AND `time` > "' . (time() - 60 * 60 * 2) . '"');
while ($pl = mysql_fetch_array($sp)) {
$dzs .= '<div style="padding:2px;">';
if ($u->info['dn'] == 0) {
$dzs .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
}
$dzs .= '<span class="date">' . date('H:i', $pl['time']) . '</span> ';
$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).'');
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>';
$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)) {
$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;
if($pl['com']!='')
{
if ($pl['com'] != '') {
$dl = '';
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)
{
mysql_query('UPDATE `dungeon_zv` SET `dcom` = "'.$u->info['id'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
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) {
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>';
}
if($pl['dcom']>0)
{
if($moder['boi']==1 || $u->info['admin']>0)
{
$pl['com'] = '<font color="red">'.$pl['com'].'</font>';
}else{
if ($pl['dcom'] > 0) {
if ($moder['boi'] == 1 || $u->info['admin'] > 0) {
$pl['com'] = '<font color="red">' . $pl['com'] . '</font>';
} else {
$pl['com'] = '';
}
}
$dzs .= '<small> | '.$pl['com'].''.$dl.'</small>';
$dzs .= '<small> | ' . $pl['com'] . '' . $dl . '</small>';
}
$dzs .= '</div>';
}
?>
<style>
body
{
background-color:#E2E2E2;
}
?>
<style>
body {
background-color: #E2E2E2;
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
background-repeat:no-repeat;background-position:top right;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
background-repeat: no-repeat;
background-position: top right;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div style="padding-left:0px;" align="center">
<td>
<div style="padding-left:0px;" align="center">
<h3><?= $u->room['name']; ?></h3>
</div></td>
<td width="200"><div align="right">
</div>
</td>
<td width="200">
<div align="right">
<table cellspacing="0" cellpadding="0">
<tr>
<td width="100%">&nbsp;</td>
<td>
<?php if($rz==0) { ?>
<?php if ($rz == 0) { ?>
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">
<td><!-- -->
@ -279,180 +263,185 @@ body
<!-- -->
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td nowrap="nowrap"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
<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.9&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.9',1); ?>">Центральная площадь</a></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" onclick="location='main.php?loc=1.180.0.9&rnd=<?= $code; ?>';" title="<?php thisInfRm(
'1.180.0.9', 1
); ?>">Центральная площадь</a></td>
</tr>
</table>
</td>
</tr>
</table></td>
</table>
</td>
</tr>
</table>
<?php } ?>
</td>
</tr>
</table>
</div></td>
</div>
</td>
</tr>
</table>
<?php if($rz == 1) { ?>
</table>
<?php if ($rz == 1) { ?>
<div align="center" style="float:right;width:100px;">
<p>
<input type='button' onclick='location="main.php?rz=1"' value="Обновить" />
<br />
<input type='button' onclick='location="main.php"' value="Вернуться" />
<input type='button' onclick='location="main.php?rz=1"' value="Обновить"/>
<br/>
<input type='button' onclick='location="main.php"' value="Вернуться"/>
</p>
</div>
<?php }else{ ?>
<div align="center" style="float:right;width:100px;">
<?php } else { ?>
<div align="center" style="float:right;width:100px;">
<p>
<input type='button' onclick='location="main.php"' value="Обновить" />
<br />
<input type='button' onclick='location="main.php?rz=1"' value="Задания" />
<input type='button' onclick='location="main.php"' value="Обновить"/>
<br/>
<input type='button' onclick='location="main.php?rz=1"' value="Задания"/>
</p>
</div>
<?php } ?>
<?php
if($re!='')
{
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 = '';
}else{
if(!isset($zv['id']))
{
if($g111==1)
{
} else {
if (!isset($zv['id'])) {
if ($g111 == 1) {
$pr = '<input name="go" type="submit" value="Вступить в группу">';
}
$dzs = '<form action="main.php?rnd='.$code.'" method="post">'.$pr.'<br>'.$dzs.''.$pr.'</form>';
$dzs = '<form action="main.php?rnd=' . $code . '" method="post">' . $pr . '<br>' . $dzs . '' . $pr . '</form>';
}
$dzs .= '<hr>';
}
}
if($rz==0) { echo $dzs; }
if($rz == 1) {
?>
<div>
if ($rz == 0) {
echo $dzs;
}
if ($rz == 1) {
?>
<div>
<form action='/dungeon.pl' method="post" name="F1" id="F1">
<?php
$qsee = '';
$qx = 0;
$hgo = $u->testAction('`uid` = "'.$u->info['id'].'" AND `time` >= '.(time()-60*60*24).' AND `vars` = "psh_qt_allcity" LIMIT 1',1);
if(isset($_GET['add_quest'])) {
if(isset($hgo['id'])) {
<?php
$qsee = '';
$qx = 0;
$hgo = $u->testAction('`uid` = "' . $u->info['id'] . '" AND `time` >= ' . (time() - 60 * 60 * 24) . ' AND `vars` = "psh_qt_allcity" LIMIT 1', 1);
if (isset($_GET['add_quest'])) {
if (isset($hgo['id'])) {
echo '<font color="red"><b>Нельзя получать задания чаще одного раза в сутки</b></font><br>';
}else{
} else {
$sp = mysql_query('SELECT * FROM `quests` WHERE `line` = 4');
$dq_add = array();
while($pl = mysql_fetch_array($sp)) {
$dq_add = [];
while ($pl = mysql_fetch_array($sp)) {
$dq_add[count($dq_add)] = $pl;
}
$dq_add = $dq_add[rand(0,count($dq_add)-1)];
$dq_add = $dq_add[rand(0, count($dq_add) - 1)];
if($q->testGood($dq_add)==1)
{
if ($q->testGood($dq_add) == 1) {
$q->startq_dn($dq_add['id']);
echo '<font color="red"><b>Вы успешно получили новое задание &quot;'.$dq_add['name'].'&quot;.</b></font><br>';
echo '<font color="red"><b>Вы успешно получили новое задание &quot;' . $dq_add['name'] . '&quot;.</b></font><br>';
$hgo['id'] = 1;
$u->addAction(time(),'psh_qt_allcity',$dq_add['id']);
}else{
echo '<font color="red"><b>Не удалось получить задание &quot;'.$dq_add['name'].'&quot;. Попробуйте еще...</b></font><br>';
$u->addAction(time(), 'psh_qt_allcity', $dq_add['id']);
} else {
echo '<font color="red"><b>Не удалось получить задание &quot;' . $dq_add['name'] . '&quot;. Попробуйте еще...</b></font><br>';
}
unset($dq_add);
}
}
}
//Генерируем список текущих квестов
$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))
{
$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>';
//Генерируем список текущих квестов
$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)) {
$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>';
$qx++;
}
}
if($qsee == '')
{
if ($qsee == '') {
$qsee = 'К сожалению у вас нет ни одного задания';
}
?>
<Br />
<FIELDSET>
<LEGEND><B>Текущие задания: </B>[<?=$qx?>/28]</LEGEND>
<?=$qsee?>
<span style="padding-left: 10">
}
?>
<Br/>
<FIELDSET>
<LEGEND><B>Текущие задания: </B>[<?= $qx ?>/28]</LEGEND>
<?= $qsee ?>
<span style="padding-left: 10">
<?php
if(!isset($hgo['id'])) {
?>
<br />
<input type='button' value='Получить задание' onclick='location="main.php?rz=1&add_quest=1"' />
<?php
}else{
echo 'Получить новое задание можно <b>'.date('d.m.Y H:i',$hgo['time']+60*60*24).'</b> <font color="grey">( Через '.$u->timeOut($hgo['time']+60*60*24-time()).' )</font>';
if (!isset($hgo['id'])) {
?>
<br/>
<input type='button' value='Получить задание' onclick='location="main.php?rz=1&add_quest=1"'/>
<?php
} else {
echo 'Получить новое задание можно <b>' . date('d.m.Y H:i', $hgo['time'] + 60 * 60 * 24) . '</b> <font color="grey">( Через ' . Conversion::secondsToTimeout(
$hgo['time'] + 60 * 60 * 24 - time()
) . ' )</font>';
}
?>
</span>
</FIELDSET>
</FIELDSET>
</form>
<br />
<br/>
<?php
//Начисление бонуса награды
if(isset($_GET['buy1'])) {
if($_GET['buy1']==1) {
if (isset($_GET['buy1'])) {
if ($_GET['buy1'] == 1) {
//покупаем статы
if(25-$u->rep['add_stats']>0 && $u->rep['repsuncity']-$u->rep['nu_suncity']>=2000) {
if (25 - $u->rep['add_stats'] > 0 && $u->rep['repsuncity'] - $u->rep['nu_suncity'] >= 2000) {
echo '<font color="red"><b>Вы успешно приобрели 1 способность за 2000 ед. награды</b></font><br>';
$u->info['ability'] += 1;
$u->rep['nu_suncity'] += 2000;
$u->rep['add_stats'] += 1;
mysql_query('UPDATE `rep` SET `add_stats` = `add_stats`+1,`nu_suncity` = "'.$u->rep['nu_suncity'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
mysql_query('UPDATE `stats` SET `ability` = "'.$u->info['ability'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
}else{
mysql_query('UPDATE `rep` SET `add_stats` = `add_stats`+1,`nu_suncity` = "' . $u->rep['nu_suncity'] . '" 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 '<font color="red"><b>Ничего не получилось...</b></font><br>';
}
}elseif($_GET['buy1']==2) {
} elseif ($_GET['buy1'] == 2) {
//покупаем статы
if(10-$u->rep['add_skills']>0 && $u->rep['repsuncity']-$u->rep['nu_suncity']>=2000) {
if (10 - $u->rep['add_skills'] > 0 && $u->rep['repsuncity'] - $u->rep['nu_suncity'] >= 2000) {
echo '<font color="red"><b>Вы успешно приобрели 1 умение за 2000 ед. награды</b></font><br>';
$u->info['skills'] += 1;
$u->rep['nu_suncity'] += 2000;
$u->rep['add_skills'] += 1;
mysql_query('UPDATE `rep` SET `add_skills` = `add_skills`+1,`nu_suncity` = "'.$u->rep['nu_suncity'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
mysql_query('UPDATE `stats` SET `skills` = "'.$u->info['skills'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
}else{
mysql_query('UPDATE `rep` SET `add_skills` = `add_skills`+1,`nu_suncity` = "' . $u->rep['nu_suncity'] . '" 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 '<font color="red"><b>Ничего не получилось...</b></font><br>';
}
}elseif($_GET['buy1']==3) {
} elseif ($_GET['buy1'] == 3) {
//покупаем статы
if($u->rep['repsuncity']-$u->rep['nu_suncity']>=100) {
if ($u->rep['repsuncity'] - $u->rep['nu_suncity'] >= 100) {
echo '<font color="red"><b>Вы успешно приобрели 10 кр. за 100 ед. награды</b></font><br>';
$u->info['money'] += 10;
$u->rep['nu_suncity'] += 100;
$u->rep['add_money'] += 10;
mysql_query('UPDATE `rep` SET `add_money` = `add_money`+10,`nu_suncity` = "'.$u->rep['nu_suncity'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
mysql_query('UPDATE `users` SET `money` = "'.$u->info['money'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
}else{
mysql_query('UPDATE `rep` SET `add_money` = `add_money`+10,`nu_suncity` = "' . $u->rep['nu_suncity'] . '" 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 '<font color="red"><b>Ничего не получилось...</b></font><br>';
}
}elseif($_GET['buy1']==4) {
} elseif ($_GET['buy1'] == 4) {
//покупаем статы
if(5-$u->rep['add_skills2']>0 && $u->rep['repsuncity']-$u->rep['nu_suncity']>=3000) {
if (5 - $u->rep['add_skills2'] > 0 && $u->rep['repsuncity'] - $u->rep['nu_suncity'] >= 3000) {
echo '<font color="red"><b>Вы успешно приобрели 1 особенность за 3000 ед. награды</b></font><br>';
$u->info['nskills'] += 1;
$u->rep['nu_suncity'] += 3000;
$u->rep['add_skills2'] += 1;
mysql_query('UPDATE `rep` SET `add_skills2` = `add_skills2`+1,`nu_suncity` = "'.$u->rep['nu_suncity'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
mysql_query('UPDATE `stats` SET `nskills` = "'.$u->info['nskills'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
}else{
mysql_query('UPDATE `rep` SET `add_skills2` = `add_skills2`+1,`nu_suncity` = "' . $u->rep['nu_suncity'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
mysql_query('UPDATE `stats` SET `nskills` = "' . $u->info['nskills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
} else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
}
}
@ -460,113 +449,124 @@ if(!isset($hgo['id'])) {
?>
<fieldset style='padding: 5,5,5,5'>
<legend>Награда: <b>
<?=($u->rep['repsuncity']-$u->rep['nu_suncity'])?>
<?= ($u->rep['repsuncity'] - $u->rep['nu_suncity']) ?>
ед.</b></legend>
<table>
<tr>
<td>Способность (еще <?=(25-$u->rep['add_stats'])?>)</td>
<td>Способность (еще <?= (25 - $u->rep['add_stats']) ?>)</td>
<td style='padding-left: 10'>за 2000 ед.</td>
<td style='padding-left: 10'><input type='button' value='Купить'
onclick="if (confirm('Купить: Способность?\n\nКупив способность, Вы сможете увеличить характеристики персонажа.\nНапример, можно увеличить силу.')) {location='main.php?rz=1&buy1=1'}" /></td>
onclick="if (confirm('Купить: Способность?\n\nКупив способность, Вы сможете увеличить характеристики персонажа.\nНапример, можно увеличить силу.')) {location='main.php?rz=1&buy1=1'}"/>
</td>
</tr>
<tr>
<td>Умение (еще <?=(10-$u->rep['add_skills'])?>)</td>
<td>Умение (еще <?= (10 - $u->rep['add_skills']) ?>)</td>
<td style='padding-left: 10'>за 2000 ед.</td>
<td style='padding-left: 10'><input type='button' value='Купить'
onclick="if (confirm('Купить: Умение?\n\nУмение даёт возможность почуствовать себя мастером меча, топора, магии и т.п.')) {location='main.php?rz=1&buy1=2'}" /></td>
onclick="if (confirm('Купить: Умение?\n\nУмение даёт возможность почуствовать себя мастером меча, топора, магии и т.п.')) {location='main.php?rz=1&buy1=2'}"/>
</td>
</tr>
<tr>
<td>Деньги (10 кр.)</td>
<td style='padding-left: 10'>за 100 ед.</td>
<td style='padding-left: 10'><input type='button' value='Купить'
onclick="if (confirm('Купить: Деньги (10 кр.)?\n\nНаграду можно получить полновесными кредитами.')) {location='main.php?rz=1&buy1=3'}" /></td>
onclick="if (confirm('Купить: Деньги (10 кр.)?\n\nНаграду можно получить полновесными кредитами.')) {location='main.php?rz=1&buy1=3'}"/>
</td>
</tr>
<tr>
<td>Особенность (еще <?=(5-$u->rep['add_skills2'])?>)</td>
<td>Особенность (еще <?= (5 - $u->rep['add_skills2']) ?>)</td>
<td style='padding-left: 10'>за 3000 ед.</td>
<td style='padding-left: 10'><input type='button' value='Купить'
onclick="if (confirm('Купить: Особенность?\n\nОсобенность - это дополнительные возможности персонажа, не дающие преимущества в боях.\nНапример, можно увеличить скорость восстановления HP')) {location='main.php?rz=1&buy1=4'}" /></td>
onclick="if (confirm('Купить: Особенность?\n\nОсобенность - это дополнительные возможности персонажа, не дающие преимущества в боях.\nНапример, можно увеличить скорость восстановления HP')) {location='main.php?rz=1&buy1=4'}"/>
</td>
</tr>
</table>
<p><span style="padding-left: 10">
<?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'));
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');
while($chk_pl = mysql_fetch_array($chk_cl)) {
if(mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$chk_pl['id'].'" LIMIT 1'));
$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) {
$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)) {
if (mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $chk_pl['id'] . '" LIMIT 1')) {
;
}
{
$x++; $prc += $chk_pl['price1'];
$x++;
$prc += $chk_pl['price1'];
}
}
$u->info['money'] += $prc;
mysql_query('UPDATE `users` SET `money` = "'.$u->info['money'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
echo '<font color="red"><b>Вы успешно сдали чеки в количестве '.$x.' шт. на сумму '.$prc.' кр.</b></font><br>';
mysql_query('UPDATE `users` SET `money` = "' . $u->info['money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
echo '<font color="red"><b>Вы успешно сдали чеки в количестве ' . $x . ' шт. на сумму ' . $prc . ' кр.</b></font><br>';
$chk[0] = 0;
}
if($chk[0]>0) {
if ($chk[0] > 0) {
?>
<input type='button' value='Сдать чеки'
onclick="if (confirm('Сдать все чеки (<?=$chk[0]?> шт.) находящиеся у Вас в инвентаре за <?=$chk[1]?> кр. ?')) {location='main.php?rz=1&buy777=1'}" />
onclick="if (confirm('Сдать все чеки (<?= $chk[0] ?> шт.) находящиеся у Вас в инвентаре за <?= $chk[1] ?> кр. ?')) {location='main.php?rz=1&buy777=1'}"/>
<?php } ?>
</span></p>
</fieldset>
<br />
Репутация в Sun city: <?=$u->rep['repsuncity']?>
<br />
</div>
<?php
}else{
if($g111 == 1)
{
if($u->info['dn']==0)
{
?>
<table width="350" border="0" cellspacing="0" cellpadding="0">
<br/>
Репутация в Sun city: <?= $u->rep['repsuncity'] ?>
<br/>
</div>
<?php
} else {
if ($g111 == 1) {
if ($u->info['dn'] == 0) {
?>
<table width="350" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<form id="from" name="from" action="main.php?pz1=<?= $code; ?>" method="post">
<fieldset style='padding-left: 5; width=50%'>
<legend><b> Группа </b> </legend>
<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="submit" name="add" value="Создать группу" />
&nbsp;<br />
<input type="password" name="pass" maxlength="25" size="25"/>
<br/>
<input type="submit" name="add" value="Создать группу"/>
&nbsp;<br/>
</fieldset>
</form>
</td>
</tr>
</table>
<?php
}else{
</table>
<?php
} else {
$psh_start = '';
if(isset($zv['id']))
{
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;';
if (isset($zv['id'])) {
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%\'>
<LEGEND><B> Группа </B> </LEGEND>
'.$psh_start.'
' . $psh_start . '
<INPUT type=\'submit\' name=\'leave\' value=\'Покинуть группу\'>
</FIELDSET>
</FORM>';
}
}
?>
}
?>
<?php
}else{
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']).'<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>';
<?php
} else {
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(
7200 - time() + $g11['time']
) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>';
}
}
}
}
}
?>

View File

@ -1,170 +1,155 @@
<?php
if(!defined('GAME'))
{
use Helper\Conversion;
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;
$g11 = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "psh1" AND `time`>'.(time()-7200).' LIMIT 1',1);
$g111 = 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');
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(isset($g11['id']))
{
$g111 = 0;
if(isset($_GET['start']))
{
$re = 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']);
}
}
if(isset($_GET['start']) && $zv['uid']==$u->info['id'] && $g111 == 1)
{
if (isset($g11['id'])) {
$g111 = 0;
if (isset($_GET['start'])) {
$re = 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(7200 - time() + $g11['time']);
}
}
if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $g111 == 1) {
//начинаем поход
//начинаем поход
$ig = 1;
if($ig>0)
{
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)
{
$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).'');
$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']);
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`="1",`y`="-6",`dn` = "0",`dnow` = "'.$zid.'" WHERE '.$ids.' LIMIT '.($zv['team_max']+1).'');
if($upd1)
{
$upd2 = mysql_query('UPDATE `users` SET `room` = "297" WHERE '.$ids.' LIMIT '.($zv['team_max']+1).'');
$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) . '');
if ($upd1) {
$upd2 = mysql_query('UPDATE `users` SET `room` = "297" 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'].'"),';
$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 = 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'].'"),';
$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,',');
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.'');
}else{
$vls = rtrim($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 . ''
);
} else {
$ins2 = true;
}
if($upd2 && $ins1 && $ins2)
{
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv['id'].'" LIMIT 1');
die('<script>location="main.php?rnd='.$code.'";</script>');
}else{
if ($upd2 && $ins1 && $ins2) {
mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
die('<script>location="main.php?rnd=' . $code . '";</script>');
} else {
$re = 'Ошибка перехода в подземелье...';
}
}else{
} else {
$re = 'Ошибка перехода в подземелье...';
}
}else{
} else {
$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($u->info['level']>5)
{
} 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 ($u->info['level'] > 5) {
$row = 0;
if(5>$row)
{
$upd = mysql_query('UPDATE `stats` SET `dn` = "'.$zv['id'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
if(!$upd)
{
if (5 > $row) {
$upd = mysql_query('UPDATE `stats` SET `dn` = "' . $zv['id'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
if (!$upd) {
$re = 'Не удалось вступить в эту группу';
unset($zv);
}else{
} else {
$u->info['dn'] = $zv['id'];
}
}else{
} else {
$re = 'В группе нет места';
unset($zv);
}
}else{
} else {
$re = 'Вы не подходите по уровню';
unset($zv);
}
}else{
} else {
$re = 'Заявка не найдена';
}
}else{
} else {
$re = 'Вы уже находитесь в группе';
}
}elseif(isset($_POST['leave']) && isset($zv['id']) && $g111 == 1)
{
if($zv['uid']==$u->info['id'])
{
} 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']))
{
$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');
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{
} 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');
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{
} else {
//просто выходим с группы
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;
unset($zv);
}
}elseif(isset($_POST['add']) && $u->info['level']>1 && $g111 == 1)
{
if($u->info['dn']==0)
{
} elseif (isset($_POST['add']) && $u->info['level'] > 1 && $g111 == 1) {
if ($u->info['dn'] == 0) {
$lmn = 6;
$lmx = 21;
$tmx = 5;
@ -172,198 +157,196 @@ if(isset($_GET['start']) && $zv['uid']==$u->info['id'] && $g111 == 1)
//только своего уровня
$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
("'.$u->info['city'].'","'.time().'","'.$u->info['id'].'","'.$dun.'",
"'.mysql_real_escape_string($_POST['pass']).'",
"'.mysql_real_escape_string($_POST['text']).'",
"'.$lmn.'",
"'.$lmx.'",
"'.$tmx.'")');
if($ins)
{
("' . $u->info['city'] . '","' . time() . '","' . $u->info['id'] . '","' . $dun . '",
"' . mysql_real_escape_string($_POST['pass']) . '",
"' . mysql_real_escape_string($_POST['text']) . '",
"' . $lmn . '",
"' . $lmx . '",
"' . $tmx . '")'
);
if ($ins) {
$u->info['dn'] = mysql_insert_id();
$zv['id'] = $u->info['dn'];
$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 = 'Вы успешно создали группу';
}else{
} else {
$re = 'Не удалось создать группу';
}
}else{
} else {
$re = 'Вы уже находитесь в группе';
}
}
//Генерируем список групп
$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))
{
$dzs .= '<div style="padding:2px;">';
if($u->info['dn']==0)
{
$dzs .= '<input type="radio" name="goid" id="goid" value="'.$pl['id'].'" />';
}
$dzs .= '<span class="date">'.date('H:i',$pl['time']).'</span> ';
//Генерируем список групп
$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)) {
$dzs .= '<div style="padding:2px;">';
if ($u->info['dn'] == 0) {
$dzs .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
}
$dzs .= '<span class="date">' . date('H:i', $pl['time']) . '</span> ';
$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).'');
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>';
$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)) {
$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;
if($pl['com']!='')
{
if ($pl['com'] != '') {
$dl = '';
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)
{
mysql_query('UPDATE `dungeon_zv` SET `dcom` = "'.$u->info['id'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
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) {
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>';
}
if($pl['dcom']>0)
{
if($moder['boi']==1 || $u->info['admin']>0)
{
$pl['com'] = '<font color="red">'.$pl['com'].'</font>';
}else{
if ($pl['dcom'] > 0) {
if ($moder['boi'] == 1 || $u->info['admin'] > 0) {
$pl['com'] = '<font color="red">' . $pl['com'] . '</font>';
} else {
$pl['com'] = '';
}
}
$dzs .= '<small> | '.$pl['com'].''.$dl.'</small>';
$dzs .= '<small> | ' . $pl['com'] . '' . $dl . '</small>';
}
$dzs .= '</div>';
}
?>
<style>
body
{
background-color:#E2E2E2;
}
?>
<style>
body {
background-color: #E2E2E2;
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
background-repeat:no-repeat;background-position:top right;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
background-repeat: no-repeat;
background-position: top right;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div style="padding-left:0px;" align="center">
<td>
<div style="padding-left:0px;" align="center">
<h3><?= $u->room['name']; ?></h3>
</div></td>
<td width="200"><div align="right">
</div>
</td>
<td width="200">
<div align="right">
<table cellspacing="0" cellpadding="0">
<tr>
<td width="100%">&nbsp;</td>
<td><table border="0" cellpadding="0" cellspacing="0">
<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">
<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>
<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>
</div></td>
</td>
</tr>
</table>
<?php
if($re!='')
{
echo '<font color="red"><b>'.$re.'</b></font><br>';
}
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<?php
if ($re != '') {
echo '<font color="red"><b>' . $re . '</b></font><br>';
}
//отображаем
if($dzs=='')
{
//отображаем
if ($dzs == '') {
$dzs = '';
}else{
if(!isset($zv['id']))
{
if($g111==1)
{
} else {
if (!isset($zv['id'])) {
if ($g111 == 1) {
$pr = '<input name="go" type="submit" value="Вступить в группу">';
}
$dzs = '<form action="main.php?rnd='.$code.'" method="post">'.$pr.'<br>'.$dzs.''.$pr.'</form>';
$dzs = '<form action="main.php?rnd=' . $code . '" method="post">' . $pr . '<br>' . $dzs . '' . $pr . '</form>';
}
$dzs .= '<hr>';
}
}
echo $dzs;
if($g111 == 1)
{
if($u->info['dn']==0)
{
?>
<table width="350" border="0" cellspacing="0" cellpadding="0">
echo $dzs;
if ($g111 == 1) {
if ($u->info['dn'] == 0) {
?>
<table width="350" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<form id="from" name="from" action="main.php?pz1=<?= $code; ?>" method="post">
<fieldset style='padding-left: 5; width=50%'>
<legend><b> Группа </b> </legend>
<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="submit" name="add" value="Создать группу" />
&nbsp;<br />
<input type="password" name="pass" maxlength="25" size="25"/>
<br/>
<input type="submit" name="add" value="Создать группу"/>
&nbsp;<br/>
</fieldset>
</form>
</td>
</tr>
</table>
<?php
}else{
</table>
<?php
} else {
$psh_start = '';
if(isset($zv['id']))
{
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;';
if (isset($zv['id'])) {
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%\'>
<LEGEND><B> Группа </B> </LEGEND>
'.$psh_start.'
' . $psh_start . '
<INPUT type=\'submit\' name=\'leave\' value=\'Покинуть группу\'>
</FIELDSET>
</FORM>';
}
}
?>
}
?>
<?php
}else{
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']).'<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>';
<?php
} else {
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
use Helper\Conversion;
if (!defined('GAME')) {
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); // Проверка - последний визит?
// if($u->info['admin']>0) unset($dungeon_timeout); // $dungeon_timeout - задержка на посещение пещеры.
if (isset($dungeon_timeout['id'])) // Кто-то передумал и не пойдет в пещеру, так-как уже там был.
{
$dungeonGo = 0;
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) {
//перемещаем игроков в пещеру
//$u->addAction(time(),'psh'.$dun,'');
$ins = mysql_query('INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
VALUES ("' . $zv['city'] . '","' . $zv['uid'] . '","' . $dungeon['id'] . '","Бездна","' . time() . '")');
$ins = mysql_query(
'INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
VALUES ("' . $zv['city'] . '","' . $zv['uid'] . '","' . $dungeon['id'] . '","Бездна","' . time() . '")'
);
if ($ins) {
$zid = mysql_insert_id();
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 = '';
$map_locs = [];
@ -100,17 +107,21 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
while ($j < $xr2[1]) {
$cord = $map_locs[rand(0, count($map_locs) - 1)];
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'] . '"
)');
)'
);
}
$j++;
}
} 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'] . '"
)');
)'
);
}
//
}
@ -121,7 +132,9 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
//
}
$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) {
$upd2 = mysql_query('UPDATE `users` SET `room` = "374" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . '');
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dungeon['id']
@ -141,7 +154,9 @@ if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $dungeonGo == 1) {
}
$vls = rtrim($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 {
$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) {
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 ($zv['pass'] != '' && $_POST['pass_com'] != $zv['pass']) {
$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) {
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
("' . $u->info['city'] . '","' . time() . '","' . $u->info['id'] . '","' . $dungeon['id'] . '",
"' . mysql_real_escape_string($_POST['pass']) . '",
"' . mysql_real_escape_string($_POST['text']) . '",
"8",
"21",
"5")');
"5")'
);
if ($ins) {
$u->info['dn'] = mysql_insert_id();
$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) . '"');
while ($pl = mysql_fetch_array($sp)) {
$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> ';
$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)) {
$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 .= ', ';
@ -252,7 +275,9 @@ while ($pl = mysql_fetch_array($sp)) {
$dungeonGroupList .= $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'] != '') {
$dl = '';
@ -286,15 +311,15 @@ while ($pl = mysql_fetch_array($sp)) {
$dungeonGroupList .= '</div>';
}
?>
<style>
<style>
body {
background-color: #E2E2E2;
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
background-repeat: no-repeat;
background-position: top right;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div style="padding-left:0px;" align="center">
@ -358,7 +383,7 @@ while ($pl = mysql_fetch_array($sp)) {
</div>
</td>
</tr>
</table>
</table>
<?php if ($roomSection == 1) { ?>
<div align="center" style="float:right;width:100px;">
<p>
@ -377,7 +402,9 @@ while ($pl = mysql_fetch_array($sp)) {
</div>
<?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 == '') {
@ -411,11 +438,11 @@ if ($roomSection == 1) {
echo '<font color="red"><b>Нельзя получать задания чаще одного раза в сутки</b></font><br>';
} else {
//if($u->info['admin']>0){
// $sp = mysql_query('SELECT * FROM `quests` WHERE `id` = "236" && `tr_date` LIKE "%tr_dn:=:'.$dun.'%"'); // Только дашку
//} else {
//if($u->info['admin']>0){
// $sp = mysql_query('SELECT * FROM `quests` WHERE `id` = "236" && `tr_date` LIKE "%tr_dn:=:'.$dun.'%"'); // Только дашку
//} else {
$sp = mysql_query('SELECT * FROM `quests` WHERE `line` = ' . $dungeon['id'] . '');
//}
//}
$dq_add = [];
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');
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'));
$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++;
}
@ -482,7 +511,7 @@ if (!isset($hgo['id'])) {
<input type='button' value='Получить задание' onclick='location="main.php?rz=1&add_quest=1"'/>
<?php
} 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>
@ -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 `stats` SET `ability` = "' . $u->info['ability'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
} else echo 'Недостаточно репутации.';
} else {
echo 'Недостаточно репутации.';
}
} else {
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 `stats` SET `skills` = "' . $u->info['skills'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
} else echo 'Недостаточно репутации.';
} else {
echo 'Недостаточно репутации.';
}
} else {
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 `users` SET `money` = "' . $u->info['money'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
} else echo 'Недостаточно репутации.';
} else {
echo 'Недостаточно репутации.';
}
} else {
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 `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>';
// $u->info['nskills'] += 1;
@ -668,11 +705,19 @@ if (!isset($hgo['id'])) {
</table>
<p><span style="padding-left: 10px">
<?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) {
$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)) {
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++;
$prc += $chk_pl['price1'];
@ -750,7 +795,9 @@ if (!isset($hgo['id'])) {
}
}
} 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,171 +1,160 @@
<?php
if(!defined('GAME'))
{
use Helper\Conversion;
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)
{
$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']))
{
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
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'));
if (!isset($zv_dn['id'])) {
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
$u->info['dn'] = 0;
}
}
if(isset($g11['id']))
{
$g111 = 0;
if(isset($_GET['start']))
{
$re = 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']);
}
}
if(isset($_GET['start']) && $zv_dn['uid']==$u->info['id'] && $g111 == 1)
{
if (isset($g11['id'])) {
$g111 = 0;
if (isset($_GET['start'])) {
$re = 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(7200 - time() + $g11['time']);
}
}
if (isset($_GET['start']) && $zv_dn['uid'] == $u->info['id'] && $g111 == 1) {
//начинаем поход
//начинаем поход
$ig = 1;
if($ig>0)
{
if ($ig > 0) {
//перемещаем игроков в пещеру
//$u->addAction(time(),'psh1','');
$ins = mysql_query('INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
VALUES ("'.$zv_dn['city'].'","'.$zv_dn['uid'].'","'.$dun.'","Ледяная пещера","'.time().'")');
if($ins)
{
$ins = mysql_query(
'INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
VALUES ("' . $zv_dn['city'] . '","' . $zv_dn['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_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 = '';
while($pu = mysql_fetch_array($su))
{
$ids .= ' `id` = "'.$pu['id'].'" OR';
$u->addAction(time(),'psh1','',$pu['id']);
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_dn['team_max']+1).'');
if($upd1)
{
$upd2 = mysql_query('UPDATE `users` SET `room` = "304" WHERE '.$ids.' LIMIT '.($zv_dn['team_max']+1).'');
$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) . '');
if ($upd1) {
$upd2 = mysql_query('UPDATE `users` SET `room` = "304" WHERE ' . $ids . ' LIMIT ' . ($zv_dn['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'].'"),';
$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 = 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'].'"),';
$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,',');
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.'');
}else{
$vls = rtrim($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 . ''
);
} else {
$ins2 = true;
}
if($upd2 && $ins1 && $ins2)
{
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv_dn['id'].'" LIMIT 1');
die('<script>location="main.php?rnd='.$code.'";</script>');
}else{
if ($upd2 && $ins1 && $ins2) {
mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv_dn['id'] . '" LIMIT 1');
die('<script>location="main.php?rnd=' . $code . '";</script>');
} else {
$re = 'Ошибка перехода в подземелье...';
}
}else{
} else {
$re = 'Ошибка перехода в подземелье...';
}
}else{
} else {
$re = 'Ошибка перехода в подземелье...';
}
}
}elseif(isset($_POST['go'],$_POST['goid']) && $g111==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($u->info['level']>5)
{
} elseif (isset($_POST['go'], $_POST['goid']) && $g111 == 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 ($u->info['level'] > 5) {
$row = 0;
if(5>$row)
{
$upd = mysql_query('UPDATE `stats` SET `dn` = "'.$zv_dn['id'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
if(!$upd)
{
if (5 > $row) {
$upd = mysql_query('UPDATE `stats` SET `dn` = "' . $zv_dn['id'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
if (!$upd) {
$re = 'Не удалось вступить в эту группу';
unset($zv_dn);
}else{
} else {
$u->info['dn'] = $zv_dn['id'];
}
}else{
} else {
$re = 'В группе нет места';
unset($zv_dn);
}
}else{
} else {
$re = 'Вы не подходите по уровню';
unset($zv_dn);
}
}else{
} else {
$re = 'Заявка не найдена';
}
}else{
} else {
$re = 'Вы уже находитесь в группе';
}
}elseif(isset($_POST['leave']) && isset($zv_dn['id']) && $g111 == 1)
{
if($zv_dn['uid']==$u->info['id'])
{
} elseif (isset($_POST['leave']) && isset($zv_dn['id']) && $g111 == 1) {
if ($zv_dn['uid'] == $u->info['id']) {
//ставим в группу нового руководителя
$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']))
{
$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'])) {
$zv_dn['uid'] = $ld['id'];
mysql_query('UPDATE `dungeon_zv` SET `uid` = "'.$zv_dn['uid'].'" WHERE `id` = "'.$zv_dn['id'].'" LIMIT 1');
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');
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
$u->info['dn'] = 0;
unset($zv_dn);
}else{
} else {
//удаляем группу целиком
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv_dn['id'].'" LIMIT 1');
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');
mysql_query('UPDATE `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
$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 `stats` SET `dn` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
$u->info['dn'] = 0;
unset($zv_dn);
}
}elseif(isset($_POST['add']) && $u->info['level']>1 && $g111 == 1)
{
if($u->info['dn']==0)
{
} elseif (isset($_POST['add']) && $u->info['level'] > 1 && $g111 == 1) {
if ($u->info['dn'] == 0) {
$lmn = 6;
$lmx = 21;
$tmx = 5;
@ -173,198 +162,196 @@ if(isset($_GET['start']) && $zv_dn['uid']==$u->info['id'] && $g111 == 1)
//только своего уровня
$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
("'.$u->info['city'].'","'.time().'","'.$u->info['id'].'","'.$dun.'",
"'.mysql_real_escape_string($_POST['pass']).'",
"'.mysql_real_escape_string($_POST['text']).'",
"'.$lmn.'",
"'.$lmx.'",
"'.$tmx.'")');
if($ins)
{
("' . $u->info['city'] . '","' . time() . '","' . $u->info['id'] . '","' . $dun . '",
"' . mysql_real_escape_string($_POST['pass']) . '",
"' . mysql_real_escape_string($_POST['text']) . '",
"' . $lmn . '",
"' . $lmx . '",
"' . $tmx . '")'
);
if ($ins) {
$u->info['dn'] = mysql_insert_id();
$zv_dn['id'] = $u->info['dn'];
$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 = 'Вы успешно создали группу';
}else{
} else {
$re = 'Не удалось создать группу';
}
}else{
} else {
$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).'"');
while($pl = mysql_fetch_array($sp))
{
$dzs .= '<div style="padding:2px;">';
if($u->info['dn']==0)
{
$dzs .= '<input type="radio" name="goid" id="goid" value="'.$pl['id'].'" />';
}
$dzs .= '<span class="date">'.date('H:i',$pl['time']).'</span> ';
//Генерируем список групп
$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)) {
$dzs .= '<div style="padding:2px;">';
if ($u->info['dn'] == 0) {
$dzs .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
}
$dzs .= '<span class="date">' . date('H:i', $pl['time']) . '</span> ';
$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).'');
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>';
$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)) {
$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;
if($pl['com']!='')
{
if ($pl['com'] != '') {
$dl = '';
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)
{
mysql_query('UPDATE `dungeon_zv` SET `dcom` = "'.$u->info['id'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
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) {
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>';
}
if($pl['dcom']>0)
{
if($moder['boi']==1 || $u->info['admin']>0)
{
$pl['com'] = '<font color="red">'.$pl['com'].'</font>';
}else{
if ($pl['dcom'] > 0) {
if ($moder['boi'] == 1 || $u->info['admin'] > 0) {
$pl['com'] = '<font color="red">' . $pl['com'] . '</font>';
} else {
$pl['com'] = '';
}
}
$dzs .= '<small> | '.$pl['com'].''.$dl.'</small>';
$dzs .= '<small> | ' . $pl['com'] . '' . $dl . '</small>';
}
$dzs .= '</div>';
}
?>
<style>
body
{
background-color:#E2E2E2;
}
?>
<style>
body {
background-color: #E2E2E2;
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
background-repeat:no-repeat;background-position:top right;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
background-repeat: no-repeat;
background-position: top right;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div style="padding-left:0px;" align="center">
<td>
<div style="padding-left:0px;" align="center">
<h3><?= $u->room['name']; ?></h3>
</div></td>
<td width="200"><div align="right">
</div>
</td>
<td width="200">
<div align="right">
<table cellspacing="0" cellpadding="0">
<tr>
<td width="100%">&nbsp;</td>
<td><table border="0" cellpadding="0" cellspacing="0">
<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">
<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>
<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>
</div></td>
</td>
</tr>
</table>
<?php
if($re!='')
{
echo '<font color="red"><b>'.$re.'</b></font><br>';
}
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<?php
if ($re != '') {
echo '<font color="red"><b>' . $re . '</b></font><br>';
}
//отображаем
if($dzs=='')
{
//отображаем
if ($dzs == '') {
$dzs = '';
}else{
if(!isset($zv_dn['id']))
{
if($g111==1)
{
} else {
if (!isset($zv_dn['id'])) {
if ($g111 == 1) {
$pr = '<input name="go" type="submit" value="Вступить в группу">';
}
$dzs = '<form action="main.php?rnd='.$code.'" method="post">'.$pr.'<br>'.$dzs.''.$pr.'</form>';
$dzs = '<form action="main.php?rnd=' . $code . '" method="post">' . $pr . '<br>' . $dzs . '' . $pr . '</form>';
}
$dzs .= '<hr>';
}
}
echo $dzs;
if($g111 == 1)
{
if($u->info['dn']==0)
{
?>
<table width="350" border="0" cellspacing="0" cellpadding="0">
echo $dzs;
if ($g111 == 1) {
if ($u->info['dn'] == 0) {
?>
<table width="350" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<form id="from" name="from" action="main.php?pz1=<?= $code; ?>" method="post">
<fieldset style='padding-left: 5; width=50%'>
<legend><b> Группа </b> </legend>
<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="submit" name="add" value="Создать группу" />
&nbsp;<br />
<input type="password" name="pass" maxlength="25" size="25"/>
<br/>
<input type="submit" name="add" value="Создать группу"/>
&nbsp;<br/>
</fieldset>
</form>
</td>
</tr>
</table>
<?php
}else{
</table>
<?php
} else {
$psh_start = '';
if(isset($zv_dn['id']))
{
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;';
if (isset($zv_dn['id'])) {
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%\'>
<LEGEND><B> Группа </B> </LEGEND>
'.$psh_start.'
' . $psh_start . '
<INPUT type=\'submit\' name=\'leave\' value=\'Покинуть группу\'>
</FIELDSET>
</FORM>';
}
}
?>
}
?>
<?php
}else{
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']).'<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>';
<?php
} else {
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: ' . Conversion::secondsToTimeout(
7200 - time() + $g11['time']
) . '<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>';
}
}
}
?>

View File

@ -1,5 +1,10 @@
<?php
if (!defined('GAME')) die();
use Helper\Conversion;
if (!defined('GAME')) {
die();
}
if ($u->room['file'] == 'house_belaun') {
$notify = ['type' => '', 'text' => '']; // Ошибки или Уведомления здесь!
$action = '';
@ -292,7 +297,9 @@ if ($u->room['file'] == 'house_belaun') {
</div>
<div class="Content">
<?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") {
}
@ -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) . '"');
while ($pl = mysql_fetch_array($sp)) {
$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><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 = ''; //группа
$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)) {
$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 .= ', ';
@ -320,7 +331,9 @@ if ($u->room['file'] == 'house_belaun') {
$dungeonGroupList .= $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'] != '') {
$dl = '';
@ -427,7 +440,11 @@ if ($u->room['file'] == 'house_belaun' && false) {
$error = ''; // Собираем ошибки.
$dungeonGroupList = ''; // Сюда помещаем список Групп.
$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 = [
12 => ['capitalcity', 'Пещера Тысячи Проклятий'],
@ -439,9 +456,13 @@ if ($u->room['file'] == 'house_belaun' && false) {
//106 => array('devilscity','Туманные Низины')
];
if (isset($_GET['rz']) && $dungeon['quest'] == 1) $roomSection = 1; // Получаем Задание
else $roomSection = 0; // Собираем группу для похода
//if( $u->info['admin'] > 0 ) var_info($dungeon);
if (isset($_GET['rz']) && $dungeon['quest'] == 1) {
$roomSection = 1;
} // Получаем Задание
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 ');
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);
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'])) // Кто-то передумал и не пойдет в пещеру, так-как уже там был.
{
$dungeonGo = 0;
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) {
$ig = 1;
if ($ig > 0) { //перемещаем игроков в пещеру
//$u->addAction(time(),'psh'.$dun,'');
//
$ins = mysql_query('INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
VALUES ("' . $zv['city'] . '","' . $zv['uid'] . '","' . $zv['dun'] . '","' . $dunname[$zv['dun']][1] . '","' . time() . '")');
$ins = mysql_query(
'INSERT INTO `dungeon_now` (`city`,`uid`,`id2`,`name`,`time_start`)
VALUES ("' . $zv['city'] . '","' . $zv['uid'] . '","' . $zv['dun'] . '","' . $dunname[$zv['dun']][1] . '","' . time() . '")'
);
if ($ins) {
$zid = mysql_insert_id();
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 = '';
$map_locs = [];
@ -500,9 +525,13 @@ if ($u->room['file'] == 'house_belaun' && false) {
$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)) {
$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'])) {
$act = explode(',', $pl['act_date']);
$i = 0;
@ -523,27 +552,39 @@ if ($u->room['file'] == 'house_belaun' && false) {
$ml_arr = [];
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 ($ml[1] > $actdate['tk_itm_fromY'] && $actdate['tk_itm_toY'] > $ml[1]) $ml_arr[] = $ml;
elseif (!isset($actdate['tk_itm_fromY']) && $actdate['tk_itm_toY'] > $ml[1]) $ml_arr[] = $ml;
} else $ml_arr[] = $ml;
if ($ml[1] > $actdate['tk_itm_fromY'] && $actdate['tk_itm_toY'] > $ml[1]) {
$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;
while ($j < $xr2[1]) {
$cord = $ml_arr[rand(0, count($ml_arr) - 1)];
if ($cord[0] != 0 || $cord[1] != 0) {
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'] . '"
)');
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'] . '"
)'
);
}
$j++;
}
} 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'] . '"
)');
)'
);
}
}
$i++;
@ -554,7 +595,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
}
$ids = rtrim($ids, 'OR');
$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) {
$upd2 = mysql_query('UPDATE `users` SET `room` = "405" WHERE ' . $ids . ' LIMIT ' . ($zv['team_max'] + 1) . '');
//Добавляем ботов и обьекты в пещеру $zid с for_dn = $dungeon['id']
@ -566,7 +609,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
$bots = explode(',', $pl['bot_group']);
$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);
}
$vls = rtrim($vls, ',');
@ -692,7 +737,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
//
$vls = rtrim($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 {
$ins2 = true;
}
@ -839,14 +886,16 @@ if ($u->room['file'] == 'house_belaun' && false) {
$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
("all","' . time() . '","' . $u->info['id'] . '","' . $dun5 . '",
"' . mysql_real_escape_string($_POST['pass']) . '",
"' . mysql_real_escape_string($_POST['text']) . '",
"8",
"21",
"5")');
"5")'
);
if ($ins) {
$u->info['dn'] = mysql_insert_id();
$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) . '"');
while ($pl = mysql_fetch_array($sp)) {
$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><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 = ''; //группа
$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)) {
$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 .= ', ';
@ -881,7 +934,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
$dungeonGroupList .= $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'] != '') {
$dl = '';
@ -1011,7 +1066,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
?></a></td>
</tr>
<?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'])) {
?>
<tr>
@ -1057,9 +1114,11 @@ if ($u->room['file'] == 'house_belaun' && false) {
</div>
<?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 == '') {
$dungeonGroupList = '';
} else {
@ -1089,14 +1148,20 @@ if ($u->room['file'] == 'house_belaun' && false) {
<form autocomplete="off" action='/main.php' method="post" name="F1" id="F1">
<?php
$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
//Генерируем список текущих квестов
$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)) {
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'));
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 .= '
<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"'/>
<?php
} 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>
@ -1202,7 +1267,11 @@ if ($u->room['file'] == 'house_belaun' && false) {
if (isset($cur_price['nu_' . $val]) && isset($u->rep['nu_' . $val]) && $rt == 1) {
$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');
if ($r) $rt = 1; else $rt = 0;
if ($r) {
$rt = 1;
} else {
$rt = 0;
}
}
}
if ($rt == 1) {
@ -1214,7 +1283,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
} else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
}
} else echo 'Недостаточно репутации.';
} else {
echo 'Недостаточно репутации.';
}
} else {
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) {
$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');
if ($r) $rt = 1; else $rt = 0;
if ($r) {
$rt = 1;
} else {
$rt = 0;
}
}
}
if ($rt == 1) {
@ -1245,7 +1320,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
} else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
}
} else echo 'Недостаточно репутации.';
} else {
echo 'Недостаточно репутации.';
}
} else {
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) {
$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');
if ($r) $rt = 1; else $rt = 0;
if ($r) {
$rt = 1;
} else {
$rt = 0;
}
}
}
if ($rt == 1) {
@ -1276,7 +1357,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
} else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
}
} else echo 'Недостаточно репутации.';
} else {
echo 'Недостаточно репутации.';
}
} else {
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) {
$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');
if ($r) $rt = 1; else $rt = 0;
if ($r) {
$rt = 1;
} else {
$rt = 0;
}
}
}
if ($rt == 1) {
@ -1307,7 +1394,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
} else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
}
} else echo 'Недостаточно репутации.';
} else {
echo 'Недостаточно репутации.';
}
} else {
echo '<font color="red"><b>Ничего не получилось...</b></font><br>';
@ -1350,15 +1439,23 @@ if ($u->room['file'] == 'house_belaun' && false) {
</table>
</fieldset>
<?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) {
?>
<fieldset style='margin-top:15px;'>
<p><span style="padding-left: 10px">
<?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)) {
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++;
$prc += $chk_pl['price1'];
@ -1468,7 +1565,9 @@ if ($u->room['file'] == 'house_belaun' && false) {
}
}
} 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
use Core\Config;
if (!defined('GAME')) {
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 `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->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 {
$u->error = 'Что то пошло не так';
}
@ -76,17 +84,17 @@ if (isset($_GET['ekrobmen'])) {
$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 {
$u->error = 'Не хватает средств!';
}
}
?>
<style type="text/css">
<style>
.pH3 {
COLOR: #8f0000;
FONT-FAMILY: Arial;
FONT-FAMILY: Arial, serif;
FONT-SIZE: 12pt;
FONT-WEIGHT: bold;
}
@ -96,13 +104,13 @@ if (isset($_GET['ekrobmen'])) {
<td valign="top">
<div align="center" class="pH3"><?= $u->room['name'] ?></div>
<br/>
<font color=red><b><?= $u->error ?></b></font><br/>
<b style="color: red"><?= $u->error ?></b><br/>
<?php if ($u->info['jail'] > time()) { ?>
Вы заточены в карцере до <?= date('d.m.Y H:i', $u->info['jail']) ?> <br>
Освобождение возможно при условии оплаты Штрафа:
<?php
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">
<INPUT class="btn btn-success" TYPE="submit" disabled value="Оплатить">&nbspНедостаточно средств!
@ -115,7 +123,7 @@ if (isset($_GET['ekrobmen'])) {
} 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">
<INPUT class="btn btn-success" TYPE="submit" value="Оплатить">
@ -141,9 +149,14 @@ if (isset($_GET['ekrobmen'])) {
<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?karcer_back=1';">Выйти из
карцера</a></td>
<td bgcolor="#D3D3D3">
<img src="<?= Config::img() ?>/i/move/links.gif" width="9" height="7">
</td>
<td bgcolor="#D3D3D3" nowrap="nowrap">
<a href="#" id="greyText" class="menutop" onclick="location='main.php?karcer_back=1';">
Выйти из карцера
</a>
</td>
</tr>
</table>
</td>

View File

@ -1,391 +1,385 @@
<?php
if(!defined('GAME'))
{
use Helper\Conversion;
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;
$g11 = $u->testAction('`uid` = "'.$u->info['id'].'" AND `vars` = "psh1" AND `time`>'.(time()-7200).' LIMIT 1',1);
$g111 = 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');
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(isset($g11['id']))
{
$g111 = 0;
if(isset($_GET['start']))
{
$re = 'Поход в пещеры запрещен. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']);
}
}
if(isset($_GET['start']) && $zv['uid']==$u->info['id'] && $g111 == 1)
{
if (isset($g11['id'])) {
$g111 = 0;
if (isset($_GET['start'])) {
$re = 'Поход в пещеры запрещен. Осталось еще: ' . Conversion::secondsToTimeout(7200 - time() + $g11['time']);
}
}
if (isset($_GET['start']) && $zv['uid'] == $u->info['id'] && $g111 == 1) {
//начинаем поход
//начинаем поход
$ig = 1;
if($ig>0)
{
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)
{
$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).'');
$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']);
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).'');
$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'].'"),';
$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 = 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'].'"),';
$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.'');
$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($upd2 && $ins1 && $ins2)
{
mysql_query('UPDATE `dungeon_zv` SET `delete` = "'.time().'" WHERE `id` = "'.$zv['id'].'" LIMIT 1');
die('<script>location="main.php?rnd='.$code.'";</script>');
}else{
if ($upd2 && $ins1 && $ins2) {
mysql_query('UPDATE `dungeon_zv` SET `delete` = "' . time() . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
die('<script>location="main.php?rnd=' . $code . '";</script>');
} else {
$re = 'Ошибка перехода в подземелье...';
}
}else{
} else {
$re = 'Ошибка перехода в подземелье...';
}
}else{
} else {
$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)
{
} 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)
{
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{
} else {
$u->info['dn'] = $zv['id'];
}
}else{
} else {
$re = 'В группе нет места';
unset($zv);
}
}else{
} else {
$re = 'Вы не подходите по уровню';
unset($zv);
}
}else{
} else {
$re = 'Заявка не найдена';
}
}else{
} else {
$re = 'Вы уже находитесь в группе';
}
}elseif(isset($_POST['leave']) && isset($zv['id']) && $g111 == 1)
{
if($zv['uid']==$u->info['id'])
{
} 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']))
{
$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');
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{
} 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');
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{
} else {
//просто выходим с группы
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;
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;
} 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($lmn>7){ $lmn = 7; }
if($lmx<2){ $lmx = 2; }
if($lmx>7){ $lmx = 7; }
if ($lmn < 2) {
$lmn = 2;
}
if ($lmn > 7) {
$lmn = 7;
}
if ($lmx < 2) {
$lmx = 2;
}
if ($lmx > 7) {
$lmx = 7;
}
if($u->info['level']>=6 && $u->info['admin']==0)
{
if ($u->info['level'] >= 6 && $u->info['admin'] == 0) {
$tmx = 0;
}else{
} else {
$tmx = 5;
}
//только своего уровня
$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
("'.$u->info['city'].'","'.time().'","'.$u->info['id'].'","'.$dun.'",
"'.mysql_real_escape_string($_POST['pass']).'",
"'.mysql_real_escape_string($_POST['text']).'",
"'.$lmn.'",
"'.$lmx.'",
"'.$tmx.'")');
if($ins)
{
("' . $u->info['city'] . '","' . time() . '","' . $u->info['id'] . '","' . $dun . '",
"' . mysql_real_escape_string($_POST['pass']) . '",
"' . mysql_real_escape_string($_POST['text']) . '",
"' . $lmn . '",
"' . $lmx . '",
"' . $tmx . '")'
);
if ($ins) {
$u->info['dn'] = mysql_insert_id();
$zv['id'] = $u->info['dn'];
$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 = 'Вы успешно создали группу';
}else{
} else {
$re = 'Не удалось создать группу';
}
}else{
} else {
$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).'"');
while($pl = mysql_fetch_array($sp))
{
$dzs .= '<div style="padding:2px;">';
if($u->info['dn']==0)
{
$dzs .= '<input type="radio" name="goid" id="goid" value="'.$pl['id'].'" />';
}
$dzs .= '<span class="date">'.date('H:i',$pl['time']).'</span> ';
//Генерируем список групп
$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) . '"'
);
while ($pl = mysql_fetch_array($sp)) {
$dzs .= '<div style="padding:2px;">';
if ($u->info['dn'] == 0) {
$dzs .= '<input type="radio" name="goid" id="goid" value="' . $pl['id'] . '" />';
}
$dzs .= '<span class="date">' . date('H:i', $pl['time']) . '</span> ';
$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).'');
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>';
$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)) {
$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;
if($pl['com']!='')
{
if ($pl['com'] != '') {
$dl = '';
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)
{
mysql_query('UPDATE `dungeon_zv` SET `dcom` = "'.$u->info['id'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
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) {
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>';
}
if($pl['dcom']>0)
{
if($moder['boi']==1 || $u->info['admin']>0)
{
$pl['com'] = '<font color="red">'.$pl['com'].'</font>';
}else{
if ($pl['dcom'] > 0) {
if ($moder['boi'] == 1 || $u->info['admin'] > 0) {
$pl['com'] = '<font color="red">' . $pl['com'] . '</font>';
} else {
$pl['com'] = '';
}
}
$dzs .= '<small> | '.$pl['com'].''.$dl.'</small>';
$dzs .= '<small> | ' . $pl['com'] . '' . $dl . '</small>';
}
$dzs .= '</div>';
}
?>
<style>
body
{
background-color:#E2E2E2;
}
?>
<style>
body {
background-color: #E2E2E2;
background-image: url(//img.new-combats.tech/i/misc/showitems/dungeon.jpg);
background-repeat:no-repeat;background-position:top right;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
background-repeat: no-repeat;
background-position: top right;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div style="padding-left:0px;" align="center">
<td>
<div style="padding-left:0px;" align="center">
<h3><?= $u->room['name']; ?></h3>
</div></td>
<td width="200"><div align="right">
</div>
</td>
<td width="200">
<div align="right">
<table cellspacing="0" cellpadding="0">
<tr>
<td width="100%">&nbsp;</td>
<td><table border="0" cellpadding="0" cellspacing="0">
<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">
<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=<?php if($u->info['city']=='fallenearth'){ echo '6.180.0.102'; } else {echo '1.180.0.321'; }?>&rnd=<?= $code; ?>';" title="<?php
if($u->info['city']=='fallenearth'){
thisInfRm('6.180.0.102',1);
}else {
thisInfRm('1.180.0.321',1);
<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=<?php if ($u->info['city'] == 'fallenearth') {
echo '6.180.0.102';
} else {
echo '1.180.0.321';
} ?>&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 "Темный Портал";
}else {
} else {
echo "Магический Портал";
}
?></a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</table>
</td>
</tr>
</table>
</div></td>
</td>
</tr>
</table>
<?php
if($re!='')
{
echo '<font color="red"><b>'.$re.'</b></font><br>';
}
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<?php
if ($re != '') {
echo '<font color="red"><b>' . $re . '</b></font><br>';
}
//отображаем
if($dzs=='')
{
//отображаем
if ($dzs == '') {
$dzs = '';
}else{
if(!isset($zv['id']))
{
if($g111==1)
{
} else {
if (!isset($zv['id'])) {
if ($g111 == 1) {
$pr = '<input name="go" type="submit" value="Вступить в группу">';
}
$dzs = '<form action="main.php?rnd='.$code.'" method="post">'.$pr.'<br>'.$dzs.''.$pr.'</form>';
$dzs = '<form action="main.php?rnd=' . $code . '" method="post">' . $pr . '<br>' . $dzs . '' . $pr . '</form>';
}
$dzs .= '<hr>';
}
}
echo $dzs;
if($g111 == 1)
{
if($u->info['dn']==0)
{
?>
<table width="350" border="0" cellspacing="0" cellpadding="0">
echo $dzs;
if ($g111 == 1) {
if ($u->info['dn'] == 0) {
?>
<table width="350" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<form autocomplete="off" id="from" name="from" action="main.php?pz1=<?= $code; ?>" method="post">
<fieldset style='padding-left: 5; width=50%'>
<legend><b> Группа </b> </legend>
<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="submit" name="add" value="Создать группу" />
&nbsp;<br />
<input type="password" name="pass" maxlength="25" size="25"/>
<br/>
<input type="submit" name="add" value="Создать группу"/>
&nbsp;<br/>
</fieldset>
</form>
</td>
</tr>
</table>
<?php
}else{
</table>
<?php
} else {
$psh_start = '';
if(isset($zv['id']))
{
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;';
if (isset($zv['id'])) {
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%\'>
<LEGEND><B> Группа </B> </LEGEND>
'.$psh_start.'
' . $psh_start . '
<INPUT type=\'submit\' name=\'leave\' value=\'Покинуть группу\'>
</FIELDSET>
</FORM>';
}
}
?>
}
?>
<?php
}else{
echo 'Поход в пещеры разрешен один раз в два часа. Осталось еще: '.$u->timeOut(7200-time()+$g11['time']).'<br><small style="color:grey">Но Вы всегда можете приобрести ключ от прохода у любого &quot;копателя пещер&quot; в Торговом зале ;)</small>';
<?php
} else {
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) {
//улучшение предмета
$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'])) {
$po = [];
$po = Conversion::dataStringToArray($ir['data']);
@ -112,9 +118,14 @@ if (isset($_GET['upgrade']) && true == false) {
$po['add_hpAll'] += $fadd[3];
$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);
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) {
//модификация
$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%")
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'])) {
$po = [];
$po = Conversion::dataStringToArray($ir['data']);
@ -266,7 +281,13 @@ if (isset($_GET['upgrade']) && 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'])) {
@ -291,7 +312,13 @@ if (isset($_GET['upgrade']) && true == false) {
$pcena -= 14; // Уменьшаем цену после извлеченния заточки.
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) { // Если старый предмет не удален из базы, мы его восстанавливаем.
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');
@ -313,7 +340,9 @@ if (isset($_GET['upgrade']) && true == false) {
if ($upattack['uptype'] == 22) {
$po['add_m11'] -= $upattack['upatack'] * 2;
$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 {
$po['sv_yron_min'] -= $upattack['upatack'];
$po['sv_yron_max'] -= $upattack['upatack'];
@ -339,7 +368,13 @@ if (isset($_GET['upgrade']) && true == false) {
}
} elseif (isset($_GET['unrune'])) {
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'])) {
$po = [];
$po = Conversion::dataStringToArray($ir['data']);
@ -356,12 +391,12 @@ if (isset($_GET['upgrade']) && true == false) {
/** Самое новое изъятие рун. ;)*/
$item_and_rune = Runes::removeRuneData($po);
if (!empty($item_and_rune)) {
# Добавляем предмет без руны
# Добавляем предмет без руны
mysql_query(sprintf("update items_users set data = '%s' where id = %d", $item_and_rune['item'], $ir['id']));
# Отнимаем деньги
# Отнимаем деньги
$u->info['money'] -= $pcena;
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);
} else {
/** Если пытаемся извлечь любую руну кроме 6001, 6002, 6003. */
@ -374,7 +409,13 @@ if (isset($_GET['upgrade']) && true == false) {
$re = '<div>Подходящий предмет не найден в инвентаре</div>';
}
} 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'])) {
$po = [];
$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);
$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']);
$po = Conversion::arrayToDataString($po);
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;
} else {
$re = '<div align="left">У вас не достаточно средств для извлечения, стоимость извлечения заточки ' . $pcena . ' кр</div>';
$re = '<div>У вас не достаточно средств для извлечения, стоимость извлечения заточки ' . $pcena . ' кр</div>';
}
} else {
$re = '<div align="left">Подходящий предмет не найден в инвентаре</div>';
$re = '<div>Подходящий предмет не найден в инвентаре</div>';
}
} 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'])) {
$pcena = 30;
if ($ir['type'] == 22) {
@ -458,7 +511,13 @@ if (isset($_GET['upgrade']) && true == false) {
$re = '<div align="left">Подходящий предмет не найден в инвентаре</div>';
}
} 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'])) {
$pcena = 30;
if ($ir['type'] == 22) {
@ -491,7 +550,13 @@ if (isset($_GET['upgrade']) && true == false) {
$re = '<div align="left">Подходящий предмет не найден в инвентаре</div>';
}
} 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'])) {
$po = [];
$po = Conversion::dataStringToArray($ir['data']);
@ -525,7 +590,13 @@ if (isset($_GET['upgrade']) && true == false) {
} elseif ($_GET['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_all = round($ir['price1'] * $ir['iznosNOW'] * 0.1 / 100, 2);//цена ремонта full
@ -590,7 +661,12 @@ if (isset($_GET['upgrade']) && true == false) {
$re2 .= '<br>К сожалению, максимальная долговечность предмета из-за ремонта уменьшилась.';
$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 {
$re2 = 'Что-то здесь не так...';
}
@ -600,7 +676,13 @@ if (isset($_GET['upgrade']) && true == false) {
$re2 = 'Предмет подходящий для ремонта не найден в инвентаре';
}
} 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'])) {
$ur = mysql_fetch_array(mysql_query('SELECT * FROM `items_upgrade` WHERE `iid` = "' . $ir['item_id'] . '" LIMIT 1'));
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'));
$ui2 = mysql_fetch_array(mysql_query('SELECT * FROM `items_main_data` WHERE `items_id` = "' . $ur['iup'] . '" LIMIT 1'));
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'] . ' екр.';
$u->info['money2'] -= $ur['price2'];
$u->addEkr(-$ur['price2']);
@ -635,11 +719,16 @@ if ($r == 1) {
$see = $see[2];
} 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];
} 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];
} elseif ($r == 4) {
//вытаскивание рун
@ -651,17 +740,25 @@ if ($r == 1) {
$see = $see[2];
} 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
(`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 = $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
(`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];
} 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];
} elseif ($r == 8) {
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];
}
} 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 . ')');
} 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];
}

View File

@ -1,4 +1,7 @@
<?php
use Helper\Conversion;
if (!defined('GAME')) {
die();
}
@ -446,14 +449,14 @@ if (!isset($u->info['noreal']) && $c['bonussocial'] == true) {
$gd = 0;
$zdml = 3600; //час
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()
) . '</font></center>';
) . '</span></center>';
$gd = 1;
} elseif (!preg_match(
'#^[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;
}

View File

@ -1,86 +1,80 @@
<?php
if(!defined('GAME'))
{
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
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'));
$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 ($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'));
$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($uu['marry']>0)
{
if ($uu['marry'] > 0) {
$uer = 'Персонаж уже находится в браке<br>';
}elseif($uu['marry']>0)
{
} elseif ($uu['marry'] > 0) {
$uer = 'Персонаж уже находится в браке<br>';
}elseif($uu['align']>1 && $uu['align']<2 && $u->info['admin']==0)
{
} elseif ($uu['align'] > 1 && $uu['align'] < 2 && $u->info['admin'] == 0) {
$uer = 'Вы не можете использовать данное заклятие на Паладинов.<br>';
}elseif($uu['align']>3 && $uu['align']<4 && $u->info['admin']==0)
{
} elseif ($uu['align'] > 3 && $uu['align'] < 4 && $u->info['admin'] == 0) {
$uer = 'Вы не можете использовать данное заклятие на Тарманов.<br>';
}elseif($uu['admin']>0 && $u->info['admin']==0)
{
} elseif ($uu['admin'] > 0 && $u->info['admin'] == 0) {
$uer = 'Вы не можете накладывать заклятие на Ангелов';
}elseif($uu['city']!=$u->info['city'] && $p['citym1']==0){
} elseif ($uu['city'] != $u->info['city'] && $p['citym1'] == 0) {
$uer = 'Персонаж находится в другом городе';
}elseif($uu['id']==$u->info['id'] && $u->info['admin']==0){
} elseif ($uu['id'] == $u->info['id'] && $u->info['admin'] == 0) {
$uer = 'Вы не можете использовать на самого себя';
}elseif($uu2['align']>1 && $uu['align']<2 && $u->info['admin']==0)
{
} elseif ($uu2['align'] > 1 && $uu['align'] < 2 && $u->info['admin'] == 0) {
$uer = 'Вы не можете использовать данное заклятие на Паладинов.<br>';
}elseif($uu2['align']>3 && $uu['align']<4 && $u->info['admin']==0)
{
} elseif ($uu2['align'] > 3 && $uu['align'] < 4 && $u->info['admin'] == 0) {
$uer = 'Вы не можете использовать данное заклятие на Тарманов.<br>';
}elseif($uu2['admin']>0 && $u->info['admin']==0)
{
} elseif ($uu2['admin'] > 0 && $u->info['admin'] == 0) {
$uer = 'Вы не можете накладывать заклятие на Ангелов';
}elseif($uu2['city']!=$u->info['city'] && $p['citym1']==0){
} elseif ($uu2['city'] != $u->info['city'] && $p['citym1'] == 0) {
$uer = 'Персонаж находится в другом городе';
}elseif($uu2['id']==$u->info['id'] && $u->info['admin']==0){
} elseif ($uu2['id'] == $u->info['id'] && $u->info['admin'] == 0) {
$uer = 'Вы не можете использовать на самого себя';
}else{
$uu['palpro'] = time()+60*60*24*7;
$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)
{
} else {
$uu['palpro'] = time() + 60 * 60 * 24 * 7;
$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)
{
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;.';
$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->setCity($u->info['city']);
$cmsg->setRoom($u->info['room']);
$cmsg->setText($rtxt);
$cmsg->setType(6);
$cmsg->setTypeTime(1);
(new Chat())->sendMsg($cmsg);
$rtxt = $rang.' &quot;'.$u->info['login'].'&quot; подтвердил'.$sx.' законность брака с '.$uu2['id'].'.';
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)");
$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)");
$cmsg = new ChatMessage();
$cmsg->setRoom($u->info['room']);
$cmsg->setText($rtxt);
$cmsg->setType(6);
$cmsg->setTypeTime(1);
(new Chat())->sendMsg($cmsg);
$rtxt = $rang . ' &quot;' . $u->info['login'] . '&quot; подтвердил' . $sx . ' законность брака с ' . $uu2['id'] . '.';
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)"
);
$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');
$this->addItem(76,$uu2['id'],'sudba='.$uu2['login'].'|noremont=1|notransfer=1');
ItemsModel::addItem(76, $uu['id'], 'sudba=' . $uu['login'] . '|noremont=1|notransfer=1');
ItemsModel::addItem(76, $uu2['id'], 'sudba=' . $uu2['login'] . '|noremont=1|notransfer=1');
$uer = 'Вы успешно зафиксировали брак "'.$uu['login'].'" и "'.$uu2['login'].'".';
}else{
$uer = 'Вы успешно зафиксировали брак "' . $uu['login'] . '" и "' . $uu2['login'] . '".';
} else {
$uer = 'Не удалось использовать данное заклятие';
}
}
}else{
} else {
$uer = 'Персонаж не найден в этом городе';
}
}else{
} else {
$uer = 'У Вас нет прав на использование данного заклятия';
}
?>

View File

@ -527,11 +527,8 @@ foreach ($sp as $pl) {
}
if ($wn > 0 || $wn2 > 0) {
$u->addDelo(
1, $pl2['uid'],
'&quot;Casino.' . $u->info['city'] . '&quot;: Выиграл ' . $nmn . ' екр.',
time(), $u->info['city'], 'Casino.' . $u->info['city'], 0, 0
);
Delo::add(1, 'Casino', $pl2['uid'], '&quot;Casino.&quot;: Выиграл ' . $nmn . ' екр.');
if (!isset($u_w[1][$pl2['uid']])) {
$u_w[0][count($u_w[0])] = $pl2['uid'];
$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'
);
if ($upd) {
$u->addDelo(
2, $inf[$u->tfer['uid1']]['id'],
'&quot;<font color="green">System.transfer.MONEY</font>&quot;: Передано ' . $mn1 . ' кр. персонажу &quot;' . $inf[$u->tfer['uid2']]['login'] . '&quot; (' . $inf[$u->tfer['uid2']]['id'] . ').',
time(), $u->info['city'], 'System.transfer', 0, 0
Delo::add(
2,
'System.transfer',
$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(
2, $inf[$u->tfer['uid2']]['id'],
'&quot;<font color="green">System.transfer.MONEY</font>&quot;: Получено ' . $mn1 . ' кр. от персонажа &quot;' . $inf[$u->tfer['uid1']]['login'] . '&quot; (' . $inf[$u->tfer['uid1']]['id'] . ').',
time(), $u->info['city'], 'System.transfer', 0, 0
Delo::add(
2,
'System.transfer',
$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 {
$u->addDelo(
2, $inf[$u->tfer['uid1']]['id'],
'&quot;<font color="green">System.transfer.MONEY</font>&quot;: Передано ' . $mn1 . ' кр. персонажу &quot;' . $inf[$u->tfer['uid2']]['login'] . '&quot; (' . $inf[$u->tfer['uid2']]['id'] . '), ошибка во время передачи.',
time(), $u->info['city'], 'System.transfer', 0, 0
Delo::add(
2,
'System.transfer',
$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'
);
if ($upd) {
$u->addDelo(
2, $inf[$u->tfer['uid2']]['id'],
'&quot;<font color="green">System.transfer.MONEY</font>&quot;: Передано ' . $mn2 . ' кр. персонажу &quot;' . $inf[$u->tfer['uid1']]['login'] . '&quot; (' . $inf[$u->tfer['uid1']]['id'] . ').',
time(), $u->info['city'], 'System.transfer', 0, 0
Delo::add(
2,
'System.transfer',
$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(
2, $inf[$u->tfer['uid1']]['id'],
'&quot;<font color="green">System.transfer.MONEY</font>&quot;: Получено ' . $mn2 . ' кр. от персонажа &quot;' . $inf[$u->tfer['uid2']]['login'] . '&quot; (' . $inf[$u->tfer['uid2']]['id'] . ').',
time(), $u->info['city'], 'System.transfer', 0, 0
Delo::add(
2,
'System.transfer',
$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 {
$u->addDelo(
2, $inf[$u->tfer['uid2']]['id'],
'&quot;<font color="green">System.transfer.MONEY</font>&quot;: Передано ' . $mn2 . ' кр. персонажу &quot;' . $inf[$u->tfer['uid1']]['login'] . '&quot; (' . $inf[$u->tfer['uid1']]['id'] . '), ошибка во время передачи.',
time(), $u->info['city'], 'System.transfer', 0, 0
Delo::add(
2,
'System.transfer',
$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 = '[Предмет из подземелья]';
}
//заносим в личные дела
$u->addDelo(
2, $fu,
'&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'] . '.',
time(), $u->info['city'], 'System.transfer', 0, 0
Delo::add(
2,
'System.transfer',
$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(
2, $pl['uid'],
'&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'] . '.',
time(), $u->info['city'], 'System.transfer', 0, 0
Delo::add(
2,
'System.transfer',
$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 {
echo 'Ошибка передачи предмета';