фикс переходов по комнатам
This commit is contained in:
parent
d664739b70
commit
03ef404848
8
city.php
8
city.php
@ -98,7 +98,7 @@ switch ($location[0]) {
|
||||
if ($user['room'] == 20) {
|
||||
switch ($location[1]) {
|
||||
case 'level1':
|
||||
header('location: main.php?setch=1');
|
||||
header('location: main.php?goto=arena');
|
||||
die();
|
||||
break;
|
||||
case 'level7':
|
||||
@ -364,9 +364,9 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time
|
||||
buildset(6, "cap_gate", 170, 340, "Городские ворота", 1);
|
||||
buildset(660, "cap_vokzal", 163, 43, "Общежитие");
|
||||
buildset(5, "cap_znah", 195, 538, "Хижина Знахаря");
|
||||
buildset(21, "cap_2sk", 249, 416, "Средняя скамейка");
|
||||
buildset(20, "cap_3sk", 250, 630, "Большая скамейка");
|
||||
buildset(22, "cap_1sk", 228, 490, "Маленькая скамейка");
|
||||
// buildset(21, "cap_2sk", 249, 416, "Средняя скамейка");
|
||||
// buildset(20, "cap_3sk", 250, 630, "Большая скамейка");
|
||||
// buildset(22, "cap_1sk", 228, 490, "Маленькая скамейка");
|
||||
buildset(3, "cap_arr_left", 259, 27, "Замковая площадь", 1);
|
||||
buildset(4, "cap_arr_right", 259, 715, "Центральная площадь", 1);
|
||||
echo "</div>";
|
||||
|
169
functions.php
169
functions.php
@ -55,175 +55,6 @@ $caverooms = [621];
|
||||
$userslots = ['sergi', 'kulon', 'perchi', 'weap', 'bron', 'r1', 'r2', 'r3', 'helm', 'shit', 'boots', 'rybax', 'plaw', 'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm8', 'm9', 'm10'];
|
||||
|
||||
|
||||
/* === проверяем соответствие комнаты и скрипта === */
|
||||
if (in_array($user['room'], [20, 21, 26, 48, 51, 52, 651, 2655, 2601, 2701, 2702, 2111], 1)) {
|
||||
header('Location: city.php');
|
||||
die();
|
||||
}
|
||||
|
||||
if ($user['room'] == 22) {
|
||||
header('Location: shop.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 23) {
|
||||
header('Location: repair.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 25) {
|
||||
header('Location: comission.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 27) {
|
||||
header('Location: post.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 29) {
|
||||
header('Location: bank.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 31) {
|
||||
header('Location: tower.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 30) {
|
||||
header('Location: clan_create.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 34) {
|
||||
header('Location: fshop.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 42) {
|
||||
header('Location: lotery.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 43) {
|
||||
header('Location: znahar.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 44) {
|
||||
header('Location: new_year.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 45) {
|
||||
header('Location: clan_castle.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 47) {
|
||||
header('Location: wall_build.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 49) {
|
||||
header('Location: dig.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 50) {
|
||||
header('Location: ashop.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 53) {
|
||||
header('Location: library.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 61) {
|
||||
header('Location: akadem.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 650) {
|
||||
header('Location: ul_clans.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 222 OR $user['room'] == 223 OR $user['room'] == 224) {
|
||||
header('Location: bench.php');
|
||||
die();
|
||||
}
|
||||
//БС
|
||||
if ($user['in_tower'] == 1) {
|
||||
header('Location: towerin.php');
|
||||
die();
|
||||
}
|
||||
//Храм древнх
|
||||
if ($user['room'] == 203) {
|
||||
header('Location: church.php');
|
||||
die();
|
||||
}
|
||||
//ЦХ
|
||||
if ($user['room'] == 600) {
|
||||
header('Location: c_haos.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 601) {
|
||||
header('Location: c_haos_in.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 602) {
|
||||
header('Location: c_park.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 603) {
|
||||
header('Location: aren_of_angels.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 620) {
|
||||
header('Location: enter_cave.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 621) {
|
||||
header('Location: cave.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 660) {
|
||||
header('Location: hostel.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 661) {
|
||||
header('Location: hostel_room.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 662) {
|
||||
header('Location: quest_room.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 760) {
|
||||
header('Location: c_forest.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 1000) {
|
||||
header('Location: solib/enterbezdna.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 1001) {
|
||||
header('Location: solib/dungeon.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 1051) {
|
||||
header('Location: lab_enter.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 1052) {
|
||||
header('Location: labirint.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 402) {
|
||||
header('Location: vxod.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 403) {
|
||||
header('Location: canalizaciya.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 1054) {
|
||||
header('Location: fontan_luck.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 1055) {
|
||||
header('Location: group_arena.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 666) {
|
||||
header('Location: jail.php');
|
||||
die();
|
||||
}
|
||||
|
||||
function getuserdata($id = 0)
|
||||
{
|
||||
|
170
main.php
170
main.php
@ -16,6 +16,176 @@ if ($user['battle'] != 0) {
|
||||
die();
|
||||
}
|
||||
|
||||
/* === проверяем соответствие комнаты и скрипта === */
|
||||
if (in_array($user['room'], [20, 21, 26, 48, 51, 52, 651, 2655, 2601, 2701, 2702, 2111], 1)) {
|
||||
header('Location: city.php');
|
||||
die();
|
||||
}
|
||||
|
||||
if ($user['room'] == 22) {
|
||||
header('Location: shop.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 23) {
|
||||
header('Location: repair.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 25) {
|
||||
header('Location: comission.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 27) {
|
||||
header('Location: post.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 29) {
|
||||
header('Location: bank.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 31) {
|
||||
header('Location: tower.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 30) {
|
||||
header('Location: clan_create.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 34) {
|
||||
header('Location: fshop.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 42) {
|
||||
header('Location: lotery.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 43) {
|
||||
header('Location: znahar.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 44) {
|
||||
header('Location: new_year.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 45) {
|
||||
header('Location: clan_castle.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 47) {
|
||||
header('Location: wall_build.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 49) {
|
||||
header('Location: dig.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 50) {
|
||||
header('Location: ashop.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 53) {
|
||||
header('Location: library.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 61) {
|
||||
header('Location: akadem.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 650) {
|
||||
header('Location: ul_clans.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 222 OR $user['room'] == 223 OR $user['room'] == 224) {
|
||||
header('Location: bench.php');
|
||||
die();
|
||||
}
|
||||
//БС
|
||||
if ($user['in_tower'] == 1) {
|
||||
header('Location: towerin.php');
|
||||
die();
|
||||
}
|
||||
//Храм древнх
|
||||
if ($user['room'] == 203) {
|
||||
header('Location: church.php');
|
||||
die();
|
||||
}
|
||||
//ЦХ
|
||||
if ($user['room'] == 600) {
|
||||
header('Location: c_haos.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 601) {
|
||||
header('Location: c_haos_in.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 602) {
|
||||
header('Location: c_park.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 603) {
|
||||
header('Location: aren_of_angels.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 620) {
|
||||
header('Location: enter_cave.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 621) {
|
||||
header('Location: cave.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 660) {
|
||||
header('Location: hostel.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 661) {
|
||||
header('Location: hostel_room.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 662) {
|
||||
header('Location: quest_room.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 760) {
|
||||
header('Location: c_forest.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 1000) {
|
||||
header('Location: solib/enterbezdna.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 1001) {
|
||||
header('Location: solib/dungeon.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 1051) {
|
||||
header('Location: lab_enter.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 1052) {
|
||||
header('Location: labirint.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 402) {
|
||||
header('Location: vxod.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 403) {
|
||||
header('Location: canalizaciya.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 1054) {
|
||||
header('Location: fontan_luck.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 1055) {
|
||||
header('Location: group_arena.php');
|
||||
die();
|
||||
}
|
||||
if ($user['room'] == 666) {
|
||||
header('Location: jail.php');
|
||||
die();
|
||||
}
|
||||
|
||||
function sum_mf($u)
|
||||
{
|
||||
$sum = db::c()->query('SELECT SUM(`add_proc_mf`) AS `mf` FROM `inventory` WHERE `dressed` = 1 AND `add_proc_mf` > 0 AND `owner` = ?i', $u);
|
||||
|
Loading…
Reference in New Issue
Block a user