Больше нельзя телепортироваться в поединки.
This commit is contained in:
parent
5ec1219b04
commit
c937f7a0ba
145
main.php
145
main.php
@ -50,7 +50,7 @@ while ($row = $data->fetch_assoc()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Обработчики нажатий на кнопки.
|
//Обработчики нажатий на кнопки.
|
||||||
if ($_POST['battlefield'] ?? 0) {
|
if ($_POST['battlefield'] ?? 0 && $user->room == 1) {
|
||||||
header('Location: zayavka.php');
|
header('Location: zayavka.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
@ -62,7 +62,7 @@ if ($_POST['move_inside'] ?? 0 && $user->room == 20) {
|
|||||||
header('Location: main.php?goto=arena');
|
header('Location: main.php?goto=arena');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($_POST['move_outside'] ?? 0 && $user->room != 20) {
|
if ($_POST['move_outside'] ?? 0 && $user->room == 1) {
|
||||||
header('Location: main.php?goto=plo');
|
header('Location: main.php?goto=plo');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
@ -71,137 +71,138 @@ if ($_POST['main_page'] ?? 0) {
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* === проверяем соответствие комнаты и скрипта === */
|
if ($edit === null) {
|
||||||
if (in_array($user->room, [20, 21, 26, 48, 51, 52, 651, 2655, 2601, 2701, 2702, 2111], 1)) {
|
/* === проверяем соответствие комнаты и скрипта === */
|
||||||
|
if (in_array($user->room, [20, 21, 26, 48, 51, 52, 651, 2655, 2601, 2701, 2702, 2111])) {
|
||||||
header('Location: city.php');
|
header('Location: city.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 22) {
|
if ($user->room == 22) {
|
||||||
header('Location: shop.php');
|
header('Location: shop.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 23) {
|
if ($user->room == 23) {
|
||||||
header('Location: repair.php');
|
header('Location: repair.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 25) {
|
if ($user->room == 25) {
|
||||||
header('Location: comission.php');
|
header('Location: comission.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 27) {
|
if ($user->room == 27) {
|
||||||
header('Location: post.php');
|
header('Location: post.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 29) {
|
if ($user->room == 29) {
|
||||||
header('Location: bank.php');
|
header('Location: bank.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 31) {
|
if ($user->room == 31) {
|
||||||
header('Location: tower.php');
|
header('Location: tower.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 30) {
|
if ($user->room == 30) {
|
||||||
header('Location: clan_create.php');
|
header('Location: clan_create.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 34) {
|
if ($user->room == 34) {
|
||||||
header('Location: fshop.php');
|
header('Location: fshop.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 45) {
|
if ($user->room == 45) {
|
||||||
header('Location: clan_castle.php');
|
header('Location: clan_castle.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 50) {
|
if ($user->room == 50) {
|
||||||
header('Location: ashop.php');
|
header('Location: ashop.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 53) {
|
if ($user->room == 53) {
|
||||||
header('Location: library.php');
|
header('Location: library.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 61) {
|
if ($user->room == 61) {
|
||||||
header('Location: akadem.php');
|
header('Location: akadem.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 650) {
|
if ($user->room == 650) {
|
||||||
header('Location: ul_clans.php');
|
header('Location: ul_clans.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
//ЦХ
|
//ЦХ
|
||||||
if ($user->room == 600) {
|
if ($user->room == 600) {
|
||||||
header('Location: c_haos.php');
|
header('Location: c_haos.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 601) {
|
if ($user->room == 601) {
|
||||||
header('Location: c_haos_in.php');
|
header('Location: c_haos_in.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 602) {
|
if ($user->room == 602) {
|
||||||
header('Location: c_park.php');
|
header('Location: c_park.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 603) {
|
if ($user->room == 603) {
|
||||||
header('Location: aren_of_angels.php');
|
header('Location: aren_of_angels.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 620) {
|
if ($user->room == 620) {
|
||||||
header('Location: enter_cave.php');
|
header('Location: enter_cave.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 621) {
|
if ($user->room == 621) {
|
||||||
header('Location: cave.php');
|
header('Location: cave.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 660) {
|
if ($user->room == 660) {
|
||||||
header('Location: hostel.php');
|
header('Location: hostel.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 661) {
|
if ($user->room == 661) {
|
||||||
header('Location: hostel_room.php');
|
header('Location: hostel_room.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 662) {
|
if ($user->room == 662) {
|
||||||
header('Location: quest_room.php');
|
header('Location: quest_room.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 760) {
|
if ($user->room == 760) {
|
||||||
header('Location: c_forest.php');
|
header('Location: c_forest.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 1000) {
|
if ($user->room == 1000) {
|
||||||
header('Location: solib/enterbezdna.php');
|
header('Location: solib/enterbezdna.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 1001) {
|
if ($user->room == 1001) {
|
||||||
header('Location: solib/dungeon.php');
|
header('Location: solib/dungeon.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 1051) {
|
if ($user->room == 1051) {
|
||||||
header('Location: lab_enter.php');
|
header('Location: lab_enter.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 1052) {
|
if ($user->room == 1052) {
|
||||||
header('Location: labirint.php');
|
header('Location: labirint.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 402) {
|
if ($user->room == 402) {
|
||||||
header('Location: vxod.php');
|
header('Location: vxod.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 403) {
|
if ($user->room == 403) {
|
||||||
header('Location: canalizaciya.php');
|
header('Location: canalizaciya.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 1055) {
|
if ($user->room == 1055) {
|
||||||
header('Location: group_arena.php');
|
header('Location: group_arena.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($user->room == 666) {
|
if ($user->room == 666) {
|
||||||
header('Location: jail.php');
|
header('Location: jail.php');
|
||||||
exit();
|
exit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function del_efs($id, $type)
|
function del_efs($id, $type)
|
||||||
{
|
{
|
||||||
if ($id && !in_array($type, [2, 3, 4, 5, 8, 10, 11, 12, 13, 14, 20])) {
|
if ($id && !in_array($type, [2, 3, 4, 5, 8, 10, 11, 12, 13, 14, 20])) {
|
||||||
@ -308,14 +309,14 @@ if ($goto) {
|
|||||||
err('У вас тяжелая травма, вы не можете передвигатся...');
|
err('У вас тяжелая травма, вы не можете передвигатся...');
|
||||||
$imove = false;
|
$imove = false;
|
||||||
}
|
}
|
||||||
if ($goto == 'plo' && !$user->zayavka && $imove == true && $user->room != 20) {
|
if ($goto == 'plo' && !$user->zayavka && $imove && $user->room != 20) {
|
||||||
db::c()->query('UPDATE users, online SET users.room = 20, online.room = 20 WHERE online.user_id = users.id AND online.user_id = ?i', $_SESSION['uid']);
|
db::c()->query('UPDATE users, online SET users.room = 20, online.room = 20 WHERE online.user_id = users.id AND online.user_id = ?i', $_SESSION['uid']);
|
||||||
header('Location: city.php');
|
header('Location: city.php');
|
||||||
exit("<i>Топ-топ-топ...</i>");
|
exit("<i>Топ-топ-топ...</i>");
|
||||||
} else {
|
} else {
|
||||||
err('Подали заявку на бой и убегаете из клуба? Нехорошо...');
|
err('Подали заявку на бой и убегаете из клуба? Нехорошо...');
|
||||||
}
|
}
|
||||||
if ($goto == 'arena' && $user->room == 20 && $imove == true) {
|
if ($goto == 'arena' && $user->room == 20 && $imove) {
|
||||||
db::c()->query('UPDATE users, online SET users.room = 1, online.room = 1 WHERE online.user_id = users.id AND online.user_id = ?i', $_SESSION['uid']);
|
db::c()->query('UPDATE users, online SET users.room = 1, online.room = 1 WHERE online.user_id = users.id AND online.user_id = ?i', $_SESSION['uid']);
|
||||||
header('Location: main.php');
|
header('Location: main.php');
|
||||||
exit("<i>Топ-топ-топ...</i>");
|
exit("<i>Топ-топ-топ...</i>");
|
||||||
@ -559,13 +560,13 @@ Template::header('Игра');
|
|||||||
title="Образы">
|
title="Образы">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
<input class="button primary" type="submit" name="battlefield" value="Поединки">
|
|
||||||
<input class="button" type="submit" name="module_quest" value="Активные задания">
|
|
||||||
<?php if ($user->room == 20): ?>
|
<?php if ($user->room == 20): ?>
|
||||||
<input class="button icon move" type="submit" name="move_inside" value="Войти внутрь">
|
<input class="button icon move" type="submit" name="move_inside" value="Войти внутрь">
|
||||||
<?php else: ?>
|
<?php elseif ($user->room == 1): ?>
|
||||||
|
<input class="button primary" type="submit" name="battlefield" value="Поединки">
|
||||||
<input class="button icon move" type="submit" name="move_outside" value="Выйти на улицу">
|
<input class="button icon move" type="submit" name="move_outside" value="Выйти на улицу">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
<input class="button" type="submit" name="module_quest" value="Активные задания">
|
||||||
<input class="button" type="submit" name="main_page" value="На главную">
|
<input class="button" type="submit" name="main_page" value="На главную">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user