document.getElementById('se-pre-con').parentNode.removeChild(document.getElementById('se-pre-con'));"; if (!defined('GAME')) { die(); } if ($u->room['file'] != 'dungeon') { return; } if (isset($_GET['back'])) { $dp = Db::getValue('select file from dungeon_map where id_dng = (select id2 from dungeon_now where id = ?) and x = ? and y = ?', [$u->info['dnow'], $u->info['x'], $u->info['y']]); if ($dp != '0') { $file = explode('=', $dp['file']); if (isset($file[1])) { if ($file[3] < 1 || $file[3] > 4) { $file[3] = 1; } Db::sql('update stats set x = ?, y = ?, s = ? where id = ?', [$file[1], $file[2], $file[3], $u->info['id']]); $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 = Db::getValue('select count(id) from dungeon_actions where uid = ? and dn = ? and vars = ?', [$u->info['id'], $u->info['dnow'], 'die']); 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'])) { $d->n_lead($_GET['new_leader'], $u->info['id']); } if (isset($_GET['go_from_psh'])) { $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) { ?>
'4_0r', 4 => '4_0l', 5 => '3_2l', 6 => '3_2r', 9 => '3_1f', 10 => '3_1l', 11 => '3_1r', 13 => '3_0l', 14 => '2_1l', 15 => '2_1r', 16 => '2_1f', 18 => '2_0l', 19 => '1_1l', 20 => '1_1r', 21 => '1_1f', 23 => '1_0l', 24 => '0_1l', 25 => '0_1r', 26 => '0_0f', 28 => '0_0l', ]; $map = [ 1 => 'LeftSide4_1', 2 => 'RightSide4_1', 3 => 'RightSide4_0', 4 => 'LeftSide4_0', 5 => 'LeftFront3_2', 6 => 'RightFront3_2', 7 => 'LeftFront3_1', 8 => 'RightFront3_1', 9 => 'LeftFront3_0', 10 => 'LeftFront3_1', 11 => 'RightFront3_1', 12 => 'LeftSide3_0', 13 => 'RightSide3_0', 14 => 'LeftFront2_1', 15 => 'RightFront2_1', 16 => 'LeftFront2_0', 17 => 'LeftSide2_0', 18 => 'RightSide2_0', 19 => 'LeftFront1_1', 20 => 'RightFront1_1', 21 => 'LeftFront1_0', 22 => 'LeftSide1_0', 23 => 'RightSide1_0', 24 => 'LeftFront0_1', 25 => 'RightFront0_1', 26 => 'LeftFront0_0', 27 => 'LeftSide0_0', 28 => 'RightSide0_0', ]; foreach ($map as $k => $v) { if ($d->walls[$k] === 1) { continue; } $map[$k] = ''; } ?>
$layer) { if (!$layer) { continue; } $id = !empty($mapIDs[$key]) ? " id='" . $mapIDs[$key] . "'" : ''; echo "
"; } ?>
 


isAdmin()) { echo 'S:' . $u->info['s']; } }