2018-01-28 16:40:49 +00:00
|
|
|
|
<?php
|
2018-03-09 02:13:08 +00:00
|
|
|
|
/**
|
|
|
|
|
* Центральная площадь
|
|
|
|
|
*/
|
2021-08-25 15:24:12 +00:00
|
|
|
|
|
2022-01-26 23:15:33 +00:00
|
|
|
|
use Battles\Database\Db;
|
2021-08-25 15:24:12 +00:00
|
|
|
|
use Battles\Template;
|
2022-01-26 23:15:33 +00:00
|
|
|
|
use Battles\User;
|
2021-08-25 15:24:12 +00:00
|
|
|
|
|
2020-09-29 22:39:06 +00:00
|
|
|
|
require_once "functions.php";
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2022-01-26 23:15:33 +00:00
|
|
|
|
if (User::getInstance()->getZayavka()) {
|
2020-09-29 22:39:06 +00:00
|
|
|
|
exit;
|
2018-02-12 19:53:19 +00:00
|
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2022-01-26 23:15:33 +00:00
|
|
|
|
$online = Db::getInstance()->fetchColumn('select count(*) from online where real_time >= ?', time()-60);
|
2018-03-09 14:53:10 +00:00
|
|
|
|
$location = explode('/', filter_input(INPUT_SERVER, 'QUERY_STRING'));
|
2020-10-26 18:16:28 +00:00
|
|
|
|
|
2018-03-09 14:53:10 +00:00
|
|
|
|
switch ($location[0]) {
|
2020-10-26 18:16:28 +00:00
|
|
|
|
default:
|
|
|
|
|
break;
|
2018-03-09 14:53:10 +00:00
|
|
|
|
case 'cp':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(20,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'strah':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(21,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'bps':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(26,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'ps':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(51,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'zaliv':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(2111,User::getInstance()->getRoom());
|
2018-03-09 14:54:54 +00:00
|
|
|
|
break;
|
2018-03-09 14:53:10 +00:00
|
|
|
|
case 'zamk':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(2601,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'abog':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(2655,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'torg':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(2702,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'got':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
if (User::getInstance()->getRoom() == 20) {
|
2018-03-09 14:53:10 +00:00
|
|
|
|
switch ($location[1]) {
|
2020-10-26 18:16:28 +00:00
|
|
|
|
default:
|
|
|
|
|
break;
|
2018-03-09 14:53:10 +00:00
|
|
|
|
case 'level1':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(1,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level7':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(21,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level8':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(26,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level13':
|
|
|
|
|
header('location: quest_room.php');
|
|
|
|
|
break;
|
|
|
|
|
case 'level222':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(2702,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level17':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(50,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level2':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(22,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level4':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(23,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level6':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(27,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
2022-01-26 23:15:33 +00:00
|
|
|
|
} elseif (User::getInstance()->getRoom() == 21) {
|
2018-03-09 14:53:10 +00:00
|
|
|
|
switch ($location[1]) {
|
2020-10-26 18:16:28 +00:00
|
|
|
|
default:
|
|
|
|
|
break;
|
2018-03-09 14:53:10 +00:00
|
|
|
|
case 'level4':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(20,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level3':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(2111,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level13':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(34,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level5':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(29,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level16':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(31,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level14':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(30,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level650':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(650,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
2022-01-26 23:15:33 +00:00
|
|
|
|
} elseif (User::getInstance()->getRoom() == 2111) {
|
2018-03-09 14:53:10 +00:00
|
|
|
|
switch ($location[1]) {
|
2020-10-26 18:16:28 +00:00
|
|
|
|
default:
|
|
|
|
|
break;
|
2018-03-09 14:53:10 +00:00
|
|
|
|
case 'level1':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(21,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level203':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(1055,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level1000':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(620,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'room666':
|
2020-10-27 00:36:29 +00:00
|
|
|
|
//Нет на карте
|
2022-01-26 23:15:33 +00:00
|
|
|
|
//Battles\Travel::toRoom(666,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
2022-01-26 23:15:33 +00:00
|
|
|
|
} elseif (User::getInstance()->getRoom() == 2601) {
|
2018-03-09 14:53:10 +00:00
|
|
|
|
switch ($location[1]) {
|
2020-10-26 18:16:28 +00:00
|
|
|
|
default:
|
|
|
|
|
break;
|
2018-03-09 14:53:10 +00:00
|
|
|
|
case 'level4':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(26,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level55':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(2655,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level1':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(37,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level1051':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(1051,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level5':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(404,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
2022-01-26 23:15:33 +00:00
|
|
|
|
} elseif (User::getInstance()->getRoom() == 2701) {
|
2018-03-09 14:53:10 +00:00
|
|
|
|
switch ($location[1]) {
|
2020-10-26 18:16:28 +00:00
|
|
|
|
default:
|
|
|
|
|
break;
|
2018-03-09 14:53:10 +00:00
|
|
|
|
case 'level1':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(2111,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level2':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(402,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
2022-01-26 23:15:33 +00:00
|
|
|
|
} elseif (User::getInstance()->getRoom() == 2702) {
|
2018-03-09 14:53:10 +00:00
|
|
|
|
switch ($location[1]) {
|
2020-10-26 18:16:28 +00:00
|
|
|
|
default:
|
|
|
|
|
break;
|
2018-03-09 14:53:10 +00:00
|
|
|
|
case 'level10':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(20,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level6':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(61,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
2022-01-26 23:15:33 +00:00
|
|
|
|
} elseif (User::getInstance()->getRoom() == 2655) {
|
2018-03-09 14:53:10 +00:00
|
|
|
|
switch ($location[1]) {
|
2020-10-26 18:16:28 +00:00
|
|
|
|
default:
|
|
|
|
|
break;
|
2018-03-09 14:53:10 +00:00
|
|
|
|
case 'level10':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(2601,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level2055':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(603,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
2022-01-26 23:15:33 +00:00
|
|
|
|
} elseif (User::getInstance()->getRoom() == 26) {
|
2018-03-09 14:53:10 +00:00
|
|
|
|
switch ($location[1]) {
|
2020-10-26 18:16:28 +00:00
|
|
|
|
default:
|
|
|
|
|
break;
|
2018-03-09 14:53:10 +00:00
|
|
|
|
case 'level4':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(20,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level3':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(2601,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level660':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(660,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
|
|
|
|
case 'level7':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(777,User::getInstance()->getRoom());
|
2018-03-09 14:53:10 +00:00
|
|
|
|
break;
|
2019-01-18 19:56:07 +00:00
|
|
|
|
case 'level56':
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\Travel::toRoom(401,User::getInstance()->getRoom());
|
2019-01-18 19:56:07 +00:00
|
|
|
|
break;
|
2018-03-09 14:53:10 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2018-03-09 02:13:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
2021-08-25 15:24:12 +00:00
|
|
|
|
Template::header('city');
|
2022-01-21 16:17:56 +00:00
|
|
|
|
echo sprintf('<div style="text-align: right;">Сейчас в игре: %s игроков.></div>', $online);
|
2022-01-26 23:15:33 +00:00
|
|
|
|
if (in_array(User::getInstance()->getRoom(), [20, 21, 26, 2601, 2655, 2111, 2701, 2702])) {
|
2020-10-26 18:16:28 +00:00
|
|
|
|
/* Улицы:
|
|
|
|
|
* 20 Центральная
|
|
|
|
|
* 21 Страшилкина
|
|
|
|
|
* 26 Парковая
|
|
|
|
|
* 2601 Замковая
|
|
|
|
|
* 2655 С ареной
|
|
|
|
|
* 2111 С ристалищем
|
|
|
|
|
* 2701 С ещё одним ристалищем?
|
|
|
|
|
* 2702 Торговая
|
|
|
|
|
*/
|
2022-01-26 23:15:33 +00:00
|
|
|
|
Battles\City::showStreet(User::getInstance()->getRoom());
|
2020-10-26 18:16:28 +00:00
|
|
|
|
}
|