let elem = document.getElementById('se-pre-con'); elem.parentNode.removeChild(elem); "; if (!defined('GAME')) { die(); } if ($u->room['file'] != 'dungeon') { return; } $pd = [1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, //передняя стенка, в 2-х шагах 10 => 0, 11 => 0, 12 => 0, 13 => 0, 14 => 0, 15 => 0, 16 => 0, 17 => 0, 18 => 0, 19 => 0, 20 => 0, 21 => 0, 22 => 0, 23 => 0, /* Растояние: 1 шаг */ 24 => 0, //стена прямо слева от персонажа (1) 25 => 0, //стена прямо справа от персонажа (1) 26 => 0, //стена прямо перед персонажем (1) 27 => 0, //стена слева от персонажа (1) 28 => 0, //стена справа от персонажа (1) ]; if (isset($_POST['go_to_admin']) && $u->info['admin'] == 1 && $u->info['login'] == 'Crowley') { mysql_query('UPDATE `stats` SET `x` = "' . round((int)$_POST['g__x']) . '", `y` = "' . round((int)$_POST['g__y']) . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); if ($_POST['g__restorebot']) { mysql_query('UPDATE `dungeon_bots` SET `delete` = "0" WHERE `dn` = "' . $u->info['dnow'] . '" AND `delete` = 1 LIMIT 50'); } header('Location: /main.php'); } if (isset($_GET['back'])) { $dp = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_now` WHERE `id` = "' . $u->info['dnow'] . '" LIMIT 1')); $dp = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_map` WHERE `id_dng` = "' . $dp['id2'] . '" AND `x` = "' . $u->info['x'] . '" AND `y` ="' . $u->info['y'] . '" LIMIT 1')); if ($dp['file'] != '0') { $file = explode('=', $dp['file']); if (isset($file[1])) { if ($file[3] < 1 || $file[3] > 4) { $file[3] = 1; } mysql_query('UPDATE `stats` SET `x` = "' . $file[1] . '",`y` = "' . $file[2] . '",`s` = "' . $file[3] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); $u->info['x'] = $file[1]; $u->info['y'] = $file[2]; $u->info['s'] = $file[3]; } } unset($dp); } $d = new Dungeon; if (!isset($d->info['id'])) { $_GET['exitd'] = true; } $dies = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `dungeon_actions` WHERE `uid` = "' . $u->info['id'] . '" AND `dn` = "' . $u->info['dnow'] . '" AND `vars` = "die" LIMIT 1')); $dies = $dies[0]; if ($dies >= 3) { $_GET['exitd'] = true; } $d->initPoint($u->info['x'], $u->info['y']); if (!isset($d->point['id'])) { $d->point['css'] = 'css'; } if (isset($_GET['new_leader'])) { echo $d->n_lead($_GET['new_leader'], $u->info['id']); } if (isset($_GET['go_from_psh'])) { echo $d->go_to_hell($_GET['go_from_psh'], $u->info['id']); } if ($u->info['dnow'] == 0) { //выкидываем из пещеры die('Ошибки инициализации'); } else { if ($d->info['bsid'] == 0 && $d->info['id2'] != 106 && isset($_GET['exitd'])) { //Удаляем обьекты и т.д. из старых пещер $rb = 321; // Магический портал $sp = mysql_query('SELECT * FROM `dungeon_now` WHERE `time_finish` = "0" LIMIT 50'); while ($pl = mysql_fetch_array($sp)) { $cn = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `dnow` = "' . $pl['id'] . '" LIMIT 1')); if (!isset($cn['id'])) { mysql_query('DELETE FROM `dungeon_bots` WHERE `dn` = "' . $pl['id'] . '" AND `for_dn` = "0"'); mysql_query('DELETE FROM `dungeon_obj` WHERE `dn` = "' . $pl['id'] . '" AND `for_dn` = "0"'); mysql_query('DELETE FROM `dungeon_items` WHERE `dn` = "' . $pl['id'] . '" AND `for_dn` = "0"'); mysql_query('DELETE FROM `dungeon_bots` WHERE `dn` = "' . $pl['id'] . '" AND `for_dn` = "0"'); mysql_query('DELETE FROM `dungeon_actions` WHERE `dn` = "' . $pl['id'] . '"'); mysql_query('UPDATE `dungeon_now` SET `time_finish` = "' . time() . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1'); } } $cn = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `dnow` = "' . $d->info['id'] . '" AND `id` != "' . $u->info['id'] . '" ORDER BY `exp` DESC LIMIT 1')); if (isset($cn['id'])) { if ($d->info['uid'] == $u->info['id']) { $cn = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`sex` FROM `users` WHERE `id` = "' . $cn['id'] . '" LIMIT 1')); mysql_query('UPDATE `dungeon_now` SET `uid` = "' . $cn['id'] . '" WHERE `id` = "' . $d->info['id'] . '" LIMIT 1'); if ($cn['sex'] == 0) { if ($u->info['sex'] == 0) { $d->sys_chat('' . $u->info['login'] . ' покинул подземелье, новым лидером группы стал ' . $cn['login'] . ''); } else { $d->sys_chat('' . $u->info['login'] . ' покинула подземелье, новым лидером группы стал ' . $cn['login'] . ''); } } else { if ($u->info['sex'] == 0) { $d->sys_chat('' . $u->info['login'] . ' покинул подземелье, новым лидером группы стала ' . $cn['login'] . ''); } else { $d->sys_chat('' . $u->info['login'] . ' покинула подземелье, новым лидером группы стала ' . $cn['login'] . ''); } } } else { if ($u->info['sex'] == 0) { $d->sys_chat('' . $u->info['login'] . ' покинул подземелье!'); } else { $d->sys_chat('' . $u->info['login'] . ' покинула подземелье!'); } } } $city = mysql_fetch_assoc(mysql_query('SELECT `id`, `city` FROM `room` WHERE `id` = "' . $rb . '" LIMIT 1')); mysql_query('UPDATE `stats` SET `dnow` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); mysql_query('UPDATE `users` SET `room` = "' . $rb . '", `city`="' . $city['city'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); //удаляем все предметы которые пропадают после выхода из пещеры mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `uid` = "' . $u->info['id'] . '" AND `dn_delete` = "1" LIMIT 1000'); mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `uid` = "' . $u->info['id'] . '" AND (`item_id` = "1189" OR `item_id` = "4447" OR `item_id` = "1174") LIMIT 1000'); //header("Location: main.php"); echo ''; die(); } } if ($d->point['fileadd'] == 1 && $d->point['file'] != '0' && $d->point['file'] != '') { $file = explode('=', $d->point['file']); if (file_exists('modules_data/location/' . $file[0])) { $information = ''; include_once('modules_data/location/' . $file[0]); #header('Location: /main.php'); } else { if ($file[3] < 1 || $file[3] > 4) { $file[3] = 1; } echo '

Локация "' . str_replace('.php', '', $file[0]) . '" не определена, вернуться назад
'; mysql_query('UPDATE `stats` SET `x` = "' . $file[1] . '",`y` = "' . $file[2] . '",`s` = "' . $file[3] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); } } if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] != '') { $file = explode('=', $d->point['file']); if (file_exists('modules_data/location/' . $file[0])) { require_once('modules_data/location/' . $file[0]); } else { if ($file[3] < 1 || $file[3] > 4) { $file[3] = 1; } echo '

Локация "' . str_replace('.php', '', $file[0]) . '" не определена, вернуться назад
'; mysql_query('UPDATE `stats` SET `x` = "' . $file[1] . '",`y` = "' . $file[2] . '",`s` = "' . $file[3] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); } } else { ?>

 error)) { echo '' . $d->error . '
'; } ?>

info['bsid'] == 0 && $d->info['id2'] != 106) { ?>

Выйти

info['bsid'] == 0) { echo $d->usersDng(); if ($dies > 0) { echo '

Кол-во смертей: ' . $dies . '

'; } } else { if ($d->info['id2'] != 15) { //Живые участники и архивариусы echo '

Живые участники:

'; echo $d->usersDng(); } else { echo '

Игровой счет. Красные: ' . (0 + $tm1win) . ' - Синие: ' . (0 + $tm2win) . '

'; if ($dies > 0) { echo '

Кол-во смертей: ' . $dies . '

'; } if (isset($sb['id'])) { echo '

Шайба у вас, забейте её в ворота противника!

'; } } } //Генерируем список текущих квестов $qsee = ''; $dungeon_enter = mysql_fetch_array(mysql_query('SELECT * FROM `dungeon_room` WHERE `dungeon_room` = "' . $u->info['room'] . '" LIMIT 1')); $sp = mysql_query('SELECT * FROM `actions` WHERE `uid` = "' . $u->info['id'] . '" AND `vars` LIKE "%start_quest%" AND `vals` = "go" LIMIT 1000'); while ($pl = mysql_fetch_array($sp)) { $pq = mysql_fetch_array(mysql_query('SELECT * FROM `quests` WHERE `id` = "' . str_replace('start_quest', '', $pl['vars']) . '" AND (`tr_date` LIKE "%tr_dn:=:' . $d->info['id2'] . '" OR `tr_date` LIKE "%tr_dn:=:' . $d->info['id2'] . '|%" OR `tr_date` NOT LIKE "%tr_dn:=:%") LIMIT 1')); if (isset($pq['id'])) { $qsee .= 'Задание:   ' . $pq['name'] . ' ' . $q->infoDng($pq) . '
'; $qx++; } } $sp = mysql_query('SELECT * FROM `dialog_act` WHERE `uid` = "' . $u->info['id'] . '" AND `val` = 0 AND `info` != ""'); while ($pl = mysql_fetch_array($sp)) { $xrz = $pl['now']; $r = $pl['max']; if ($xrz > $r) { $xrz = $r; } $r = '
' . $xrz . '/' . $r . '

'; $qsee .= 'Задание:   ' . $pl['info'] . ' ' . $r . '
'; } if ($qsee != '') { echo '

' . $qsee; } ?>
itemsMap(); ?>
information)) { echo $d->information; } ?>
'; $j = 1; $htmlv2 = ''; while ($j <= 9) { $htmlv2 = '' . $htmlv2; $j++; } $htmlv .= $htmlv2 . ''; $i++; } echo $htmlv; unset($htmlv, $htmlv2); ?>
testGone(3) > 0) { ?> testGone(4) > 0) { ?> testGone(2) > 0) { ?> testGone(1) > 0) { ?>
info['admin'] == 0){ ?>
 


info['admin'] == 1) { echo '
X - Y -

S:' . $u->info['s']; } }