Пещеры заселились живностью.
This commit is contained in:
+159
-286
@@ -1,48 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Core\Config;
|
||||
use Core\Db;
|
||||
|
||||
echo "
|
||||
<script>
|
||||
let elem = document.getElementById('se-pre-con');
|
||||
elem.parentNode.removeChild(elem);
|
||||
</script>
|
||||
";
|
||||
echo "<script>document.getElementById('se-pre-con').parentNode.removeChild(document.getElementById('se-pre-con'));</script>";
|
||||
|
||||
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') {
|
||||
$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;
|
||||
}
|
||||
mysql_query('UPDATE `stats` SET `x` = "' . $file[1] . '",`y` = "' . $file[2] . '",`s` = "' . $file[3] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 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];
|
||||
@@ -57,8 +36,7 @@ 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];
|
||||
$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;
|
||||
@@ -71,11 +49,11 @@ if (!isset($d->point['id'])) {
|
||||
}
|
||||
|
||||
if (isset($_GET['new_leader'])) {
|
||||
echo $d->n_lead($_GET['new_leader'], $u->info['id']);
|
||||
$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']);
|
||||
$d->go_to_hell($_GET['go_from_psh'], $u->info['id']);
|
||||
}
|
||||
|
||||
|
||||
@@ -209,7 +187,11 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
bott = 0;
|
||||
if (stor == 1) {
|
||||
<?php
|
||||
$bottem = mysql_fetch_assoc(mysql_query('SELECT `id2` FROM `dungeon_bots` WHERE `dn` = "' . $u->info['dnow'] . '" AND `delete` = "0" AND `x` = "' . ($u->info['x']) . '" AND `y` = "' . ($u->info['y'] + 1) . '" LIMIT 1'));
|
||||
$bottem = mysql_fetch_assoc(
|
||||
mysql_query(
|
||||
'SELECT `id2` FROM `dungeon_bots` WHERE `dn` = "' . $u->info['dnow'] . '" AND `delete` = "0" AND `x` = "' . ($u->info['x']) . '" AND `y` = "' . ($u->info['y'] + 1) . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($bottem['id2']))
|
||||
{
|
||||
?> bott = <?= $bottem['id2'];?>;<?php
|
||||
@@ -217,7 +199,11 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
?>
|
||||
} else if (stor == 2) {
|
||||
<?php
|
||||
$bottem = mysql_fetch_assoc(mysql_query('SELECT `id2` FROM `dungeon_bots` WHERE `dn` = "' . $u->info['dnow'] . '" AND `delete` = "0" AND `x` = "' . ($u->info['x'] - 1) . '" AND `y` = "' . ($u->info['y']) . '" LIMIT 1'));
|
||||
$bottem = mysql_fetch_assoc(
|
||||
mysql_query(
|
||||
'SELECT `id2` FROM `dungeon_bots` WHERE `dn` = "' . $u->info['dnow'] . '" AND `delete` = "0" AND `x` = "' . ($u->info['x'] - 1) . '" AND `y` = "' . ($u->info['y']) . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($bottem['id2']))
|
||||
{
|
||||
?> bott = <?= $bottem['id2'];?>;<?php
|
||||
@@ -225,7 +211,11 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
?>
|
||||
} else if (stor == 3) {
|
||||
<?php
|
||||
$bottem = mysql_fetch_assoc(mysql_query('SELECT `id2` FROM `dungeon_bots` WHERE `dn` = "' . $u->info['dnow'] . '" AND `delete` = "0" AND `x` = "' . ($u->info['x']) . '" AND `y` = "' . ($u->info['y'] - 1) . '" LIMIT 1'));
|
||||
$bottem = mysql_fetch_assoc(
|
||||
mysql_query(
|
||||
'SELECT `id2` FROM `dungeon_bots` WHERE `dn` = "' . $u->info['dnow'] . '" AND `delete` = "0" AND `x` = "' . ($u->info['x']) . '" AND `y` = "' . ($u->info['y'] - 1) . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($bottem['id2']))
|
||||
{
|
||||
?> bott = <?= $bottem['id2'];?>;<?php
|
||||
@@ -233,7 +223,11 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
?>
|
||||
} else if (stor == 4) {
|
||||
<?php
|
||||
$bottem = mysql_fetch_assoc(mysql_query('SELECT `id2` FROM `dungeon_bots` WHERE `dn` = "' . $u->info['dnow'] . '" AND `delete` = "0" AND `x` = "' . ($u->info['x'] + 1) . '" AND `y` = "' . ($u->info['y']) . '" LIMIT 1'));
|
||||
$bottem = mysql_fetch_assoc(
|
||||
mysql_query(
|
||||
'SELECT `id2` FROM `dungeon_bots` WHERE `dn` = "' . $u->info['dnow'] . '" AND `delete` = "0" AND `x` = "' . ($u->info['x'] + 1) . '" AND `y` = "' . ($u->info['y']) . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($bottem['id2']))
|
||||
{
|
||||
?> bott = <?= $bottem['id2'];?>;<?php
|
||||
@@ -246,7 +240,11 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
}
|
||||
} else if (event.which == 32 || event.which == 90) {
|
||||
itemtake = 0;
|
||||
<?php $sp = mysql_fetch_assoc(mysql_query('SELECT `ish`.* FROM `dungeon_items` AS `ish` WHERE `ish`.`dn` = "' . $u->info['dnow'] . '" AND `ish`.`take` = "0" AND `ish`.`delete` = "0" AND ( `ish`.`onlyfor` = "0" OR `ish`.`onlyfor` = "' . $u->info['id'] . '" ) AND `ish`.`x` = "' . $u->info['x'] . '" AND `ish`.`y` = "' . $u->info['y'] . '" LIMIT 1'));
|
||||
<?php $sp = mysql_fetch_assoc(
|
||||
mysql_query(
|
||||
'SELECT `ish`.* FROM `dungeon_items` AS `ish` WHERE `ish`.`dn` = "' . $u->info['dnow'] . '" AND `ish`.`take` = "0" AND `ish`.`delete` = "0" AND ( `ish`.`onlyfor` = "0" OR `ish`.`onlyfor` = "' . $u->info['id'] . '" ) AND `ish`.`x` = "' . $u->info['x'] . '" AND `ish`.`y` = "' . $u->info['y'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($sp['id']))
|
||||
{ ?>
|
||||
itemtake = <?= $sp['id'];?>;
|
||||
@@ -330,21 +328,21 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
|
||||
var objects = {};
|
||||
//i:{id,login,mapPoint,sex,obraz,type,users_p},
|
||||
var users = {<?= $d->genUsers(); ?>};
|
||||
const users = {<?= $d->genUsers(); ?>};
|
||||
var objs = {<?= $d->genObjects(); ?>};
|
||||
var items = {};
|
||||
var actions = {};
|
||||
var dsee = <?= 0 + $d->gs; ?>;
|
||||
var mapp = {
|
||||
1: '0_0f', 2: '0_0f', 3: '0_0f', 4: '1_1f', 5: '1_1f', 6: '1_1f'
|
||||
, 7: '2_1f', 8: '2_1f', 9: '2_1f'
|
||||
, 11: '3_1l', 12: '3_1f', 13: '3_1r'
|
||||
1: '0_0f', 2: '0_0f', 3: '0_0f', 4: '1_1f',
|
||||
5: '1_1f', 6: '1_1f', 7: '2_1f', 8: '2_1f',
|
||||
9: '2_1f', 11: '3_1l', 12: '3_1f', 13: '3_1r'
|
||||
}
|
||||
var zmap = {5: 894, 8: 0, 12: 0}
|
||||
var zfloor0 = {1: '', 2: '', 3: '', 4: '', 5: ''};
|
||||
|
||||
function genMap() {
|
||||
var i = 0, m = false, mz = false;
|
||||
let i = 0, m = false, mz = false;
|
||||
while (i < users['count']) {
|
||||
if (users[i] != undefined) {
|
||||
mz = mapp[users[i][2]];
|
||||
@@ -355,7 +353,10 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
}
|
||||
i++;
|
||||
}
|
||||
var i = 0, m = false, mz = false;
|
||||
|
||||
i = 0;
|
||||
m = false;
|
||||
mz = false;
|
||||
while (i < objs['count']) {
|
||||
if (objs[i] != undefined) {
|
||||
mz = mapp[objs[i][2]];
|
||||
@@ -369,7 +370,7 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
}
|
||||
i++;
|
||||
}
|
||||
var i = 5;
|
||||
i = 5;
|
||||
while (i >= 1) {
|
||||
if (zfloor0[i] != '') {
|
||||
document.getElementById('Floor0').innerHTML += zfloor0[i];
|
||||
@@ -691,51 +692,16 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
$tmGol = $u->info['timeGo'] - $u->info['timeGoL']; //сколько секунд идти всего
|
||||
echo 'var tgo = ' . ($tmGo * 10) . '; var tgol = ' . ($tmGol * 10) . ';'; ?>
|
||||
</script>
|
||||
<link href="//img.new-combats.tech/css/dungeon_<?= $d->point['css']; ?>.css" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<style>
|
||||
.hintDm {
|
||||
position: absolute;
|
||||
background-color: #E4E4E4;
|
||||
padding: 5px;
|
||||
border: 1px solid #999;
|
||||
z-index: 1;
|
||||
width: 70px;
|
||||
}
|
||||
<link rel="stylesheet" href="<?= Config::img() ?>/css/dungeon.css">
|
||||
<link rel="stylesheet" href="<?= Config::img() ?>/css/dungeon_<?= $d->point['css']; ?>.css">
|
||||
|
||||
.dUser {
|
||||
max-height: 220px;
|
||||
max-width: 120px;
|
||||
min-width: 30px;
|
||||
min-height: 55px;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.dObj {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.test1 {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#pline1 {
|
||||
background-image: url(//img.new-combats.tech/wait3.gif);
|
||||
height: 9px;
|
||||
z-index: 1000;
|
||||
}
|
||||
</style>
|
||||
<div id="deMenu" class="hintDm" style="display:none;z-index:5000;"></div>
|
||||
<div style="margin-right:1px;">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<p style="float:left;"> <?php if (isset($d->error)) {
|
||||
echo '<font color="red">' . $d->error . '</font><br>';
|
||||
<p style="float:left; color: red;"> <?php if (isset($d->error)) {
|
||||
echo $d->error . '<br>';
|
||||
} ?></p>
|
||||
<?php if ($d->info['bsid'] == 0 && $d->info['id2'] != 106) { ?><p style="float:right;"><a
|
||||
onClick="if(confirm('Выйти из пещеры?')){ location.href = '/main.php?exitd=<?= $code; ?>'; }"
|
||||
@@ -777,7 +743,13 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
$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'));
|
||||
$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 .= '<small>Задание: ' . $pq['name'] . ' ' . $q->infoDng($pq) . '</small><br>';
|
||||
$qx++;
|
||||
@@ -814,7 +786,7 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
<div style="position:relative;">
|
||||
|
||||
<div style="position:absolute;z-index:1;left:397px;top:0px;">
|
||||
<div id="pline1" style="width:1px;"></div>
|
||||
<div id="pline1"></div>
|
||||
</div>
|
||||
<div style="position:absolute; z-index:50; left: 374px; top: 110px;">
|
||||
<img src="//img.new-combats.tech/podzem-map.png"/>
|
||||
@@ -884,7 +856,9 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
$i = 0;
|
||||
$uxy = [];
|
||||
if ($u->room['name'] != 'Башня Смерти') {
|
||||
$sp = mysql_query('SELECT `u`.`login`,`u`.`id`,`s`.`x`,`s`.`y`,`s`.`s` FROM `stats` AS `s` LEFT JOIN `users` AS `u` ON `u`.`id` = `s`.`id` WHERE `s`.`dnow` = "' . $u->info['dnow'] . '" AND `u`.`id` != "' . $u->info['id'] . '" LIMIT 10');
|
||||
$sp = mysql_query(
|
||||
'SELECT `u`.`login`,`u`.`id`,`s`.`x`,`s`.`y`,`s`.`s` FROM `stats` AS `s` LEFT JOIN `users` AS `u` ON `u`.`id` = `s`.`id` WHERE `s`.`dnow` = "' . $u->info['dnow'] . '" AND `u`.`id` != "' . $u->info['id'] . '" LIMIT 10'
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$uxy[$pl['x'] . '_' . $pl['y']] = $pl;
|
||||
}
|
||||
@@ -892,18 +866,22 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
if ($u->info['admin'] > 0 || $d->id_dng == 106) {
|
||||
$bxy = [];
|
||||
if ($u->room['name'] != 'Башня Смерти') {
|
||||
$sp = mysql_query('SELECT `db`.*, `tb`.`login`, `tb`.`obraz`, `tb`.`sex` FROM `dungeon_bots` as `db` LEFT JOIN `test_bot` as `tb` ON `tb`.`id`=`db`.`id_bot`
|
||||
$sp = mysql_query(
|
||||
'SELECT `db`.*, `tb`.`login`, `tb`.`obraz`, `tb`.`sex` FROM `dungeon_bots` as `db` LEFT JOIN `test_bot` as `tb` ON `tb`.`id`=`db`.`id_bot`
|
||||
WHERE `db`.`dn` = "' . $u->info['dnow'] . '" AND `db`.`delete`=0 AND
|
||||
(`db`.`x` >= ' . ($u->info['x'] - 5) . ' AND `db`.`x` <= ' . ($u->info['x'] + 5) . ') AND
|
||||
(`db`.`y` >= ' . ($u->info['y'] - 5) . ' AND `db`.`y` <= ' . ($u->info['y'] + 5) . ')
|
||||
LIMIT 100');
|
||||
LIMIT 100'
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$bxy[$pl['x'] . '_' . $pl['y']] = $pl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_map` WHERE `id_dng` = "' . $d->id_dng . '" AND (`x` >= ' . ($u->info['x'] - 5) . ' AND `x` <= ' . ($u->info['x'] + 5) . ') AND (`y` >= ' . ($u->info['y'] - 5) . ' AND `y` <= ' . ($u->info['y'] + 5) . ') ORDER BY `y` ASC , `x` ASC LIMIT 100');
|
||||
$sp = mysql_query(
|
||||
'SELECT * FROM `dungeon_map` WHERE `id_dng` = "' . $d->id_dng . '" AND (`x` >= ' . ($u->info['x'] - 5) . ' AND `x` <= ' . ($u->info['x'] + 5) . ') AND (`y` >= ' . ($u->info['y'] - 5) . ' AND `y` <= ' . ($u->info['y'] + 5) . ') ORDER BY `y` ASC , `x` ASC LIMIT 100'
|
||||
);
|
||||
|
||||
$rzn = [0 => 'top', 3 => 'right', 2 => 'bottom', 1 => 'left'];
|
||||
|
||||
@@ -946,7 +924,11 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
} elseif ($tm['team'] == 2) {
|
||||
$tmbth = 2;
|
||||
}
|
||||
$tbshin = mysql_fetch_array(mysql_query('SELECT `id` FROM `items_users` WHERE `uid` = "' . $uxy[$pl['x'] . '_' . $pl['y']]['id'] . '" AND `item_id` = 4910 AND `delete` = 0 LIMIT 1'));
|
||||
$tbshin = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id` FROM `items_users` WHERE `uid` = "' . $uxy[$pl['x'] . '_' . $pl['y']]['id'] . '" AND `item_id` = 4910 AND `delete` = 0 LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($tbshin['id'])) {
|
||||
echo '$("#min_' . $pl['x'] . '_' . $pl['y'] . '").html("<img class=\"u_rot' . $u->info['s'] . '\" title=\"Шайба!\" style=\"margin:2px 3px 3px 2px;background-image:url(//img.new-combats.tech/i/move/shb.gif)\" src=\"//img.new-combats.tech/1x1.gif\" width=\"7\" height=\"7\">");';
|
||||
} else {
|
||||
@@ -976,190 +958,105 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
</script>
|
||||
</div>
|
||||
<div style="position:absolute; z-index:50; left: 374px; top: 110px;">
|
||||
<img src="//img.new-combats.tech/podzem-map2.png"/>
|
||||
<img src="//img.new-combats.tech/podzem-map2.png" alt=""/>
|
||||
</div>
|
||||
<img src="//img.new-combats.tech/g1.jpg"
|
||||
title="Обновить, X:<?= $u->info['x'] ?> ,Y:<?= $u->info['y'] ?>"
|
||||
width="31" height="18" id="g1"
|
||||
style="position: absolute; cursor:pointer; left: 435px; top: 53px;"/>
|
||||
<img src="//img.new-combats.tech/g1.jpg" title="Обновить, X:<?= $u->info['x'] ?> ,Y:<?= $u->info['y'] ?>" width="31" height="18" id="g1" style="position: absolute; cursor:pointer; left: 435px; top: 53px;" alt=""/>
|
||||
<?php if ($d->testGone(3) > 0) { ?>
|
||||
<img src="//img.new-combats.tech/g2.jpg"
|
||||
onclick="goToLoca(3,'направо');" width="27" height="48"
|
||||
id="g2"
|
||||
style="position:absolute;cursor:pointer; left: 492px; top: 40px;"/>
|
||||
<img src="//img.new-combats.tech/g2.jpg" onclick="goToLoca(3,'направо');" width="27" height="48" id="g2" style="position:absolute;cursor:pointer; left: 492px; top: 40px;" alt=""/>
|
||||
<?php }
|
||||
if ($d->testGone(4) > 0) { ?>
|
||||
<img src="//img.new-combats.tech/g3.jpg"
|
||||
onclick="goToLoca(4,'налево');" width="28" height="46"
|
||||
id="g3"
|
||||
style="position:absolute;cursor:pointer; left: 382px; top: 40px;"/>
|
||||
<img src="//img.new-combats.tech/g3.jpg" onclick="goToLoca(4,'налево');" width="28" height="46" id="g3" style="position:absolute;cursor:pointer; left: 382px; top: 40px;" alt=""/>
|
||||
<?php }
|
||||
if ($d->testGone(2) > 0) { ?>
|
||||
<img src="//img.new-combats.tech/g4.jpg"
|
||||
onclick="goToLoca(2,'назад');" width="45" height="25"
|
||||
id="g4"
|
||||
style="position:absolute;cursor:pointer; left: 428px; top: 72px;"/>
|
||||
<img src="//img.new-combats.tech/g4.jpg" onclick="goToLoca(2,'назад');" width="45" height="25" id="g4" style="position:absolute;cursor:pointer; left: 428px; top: 72px;" alt=""/>
|
||||
<?php }
|
||||
if ($d->testGone(1) > 0) { ?>
|
||||
<img src="//img.new-combats.tech/g5.jpg"
|
||||
onclick="goToLoca(1,'вперед');" width="46" height="26"
|
||||
id="g5"
|
||||
style="position:absolute;cursor:pointer; left: 428px; top: 26px;"/>
|
||||
<img src="//img.new-combats.tech/g5.jpg" onclick="goToLoca(1,'вперед');" width="46" height="26" id="g5" style="position:absolute;cursor:pointer; left: 428px; top: 26px;" alt=""/>
|
||||
<?php } ?>
|
||||
<img src="//img.new-combats.tech/g6.jpg" width="30" height="19"
|
||||
id="g6"
|
||||
style="position:absolute;cursor:pointer; left: 399px; top: 28px;"/>
|
||||
<img src="//img.new-combats.tech/g7.jpg" width="24" height="19"
|
||||
id="g7"
|
||||
style="position:absolute;cursor:pointer; left: 476px; top: 28px;"/>
|
||||
<div id="Dungeon" class="Dungeon" align="center"
|
||||
style="width:352px;height:240px;padding:0px;margin:10px;">
|
||||
<img src="//img.new-combats.tech/g6.jpg" width="30" height="19" id="g6" style="position:absolute;cursor:pointer; left: 399px; top: 28px;" alt=""/>
|
||||
<img src="//img.new-combats.tech/g7.jpg" width="24" height="19" id="g7" style="position:absolute;cursor:pointer; left: 476px; top: 28px;" alt=""/>
|
||||
<div id="Dungeon" class="Dungeon" style="width:352px;height:240px;padding:0;margin:10px;text-align:center;">
|
||||
<!-- / MAP \ -->
|
||||
|
||||
<?php
|
||||
$mapIDs = [ // к этой хереборе вяжется javascript
|
||||
3 => '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] = '';
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="Floor0" class="Floor0">
|
||||
<div class="Floor1">
|
||||
<div class="<?php if ($pd[1] == 1) {
|
||||
echo 'LeftSide4_1';
|
||||
} ?>">
|
||||
<div class="<?php if ($pd[2] == 1) {
|
||||
echo 'RightSide4_1';
|
||||
} ?>">
|
||||
<div id="4_0r" class="<?php if ($pd[3] == 1) {
|
||||
echo 'RightSide4_0';
|
||||
} ?>">
|
||||
<div id="4_0l" class="<?php if ($pd[4] == 1) {
|
||||
echo 'LeftSide4_0';
|
||||
} ?>">
|
||||
<div id="3_2l"
|
||||
class="<?php if ($pd[5] == 1) {
|
||||
echo 'LeftFront3_2';
|
||||
} ?>">
|
||||
<div id="3_2r"
|
||||
class="<?php if ($pd[6] == 1) {
|
||||
echo 'RightFront3_2';
|
||||
} ?>">
|
||||
<div class="<?php if ($pd[7] == 1) {
|
||||
echo 'LeftFront3_1';
|
||||
} ?>">
|
||||
<div class="<?php if ($pd[8] == 1) {
|
||||
echo 'RightFront3_1';
|
||||
} ?>">
|
||||
<div id="3_1l"
|
||||
class="<?php if ($pd[10] == 1) {
|
||||
echo 'LeftFront3_1';
|
||||
} ?>">
|
||||
<div id="3_1f"
|
||||
class="<?php if ($pd[9] == 1) {
|
||||
echo 'LeftFront3_0';
|
||||
} ?>">
|
||||
<div id="3_1r"
|
||||
class="<?php if ($pd[11] == 1) {
|
||||
echo 'RightFront3_1';
|
||||
} ?>">
|
||||
<div class="<?php if ($pd[12] == 1) {
|
||||
echo 'LeftSide3_0';
|
||||
} ?>">
|
||||
<div id="3_0l"
|
||||
class="<?php if ($pd[13] == 1) {
|
||||
echo 'RightSide3_0';
|
||||
} ?>">
|
||||
<div id="2_1l"
|
||||
class="<?php if ($pd[14] == 1) {
|
||||
echo 'LeftFront2_1';
|
||||
} ?>">
|
||||
<div id="2_1r"
|
||||
class="<?php if ($pd[15] == 1) {
|
||||
echo 'RightFront2_1';
|
||||
} ?>">
|
||||
<div id="2_1f"
|
||||
class="<?php if ($pd[16] == 1) {
|
||||
echo 'LeftFront2_0';
|
||||
} ?>">
|
||||
<div class="<?php if ($pd[17] == 1) {
|
||||
echo 'LeftSide2_0';
|
||||
} ?>">
|
||||
<div id="2_0l"
|
||||
class="<?php if ($pd[18] == 1) {
|
||||
echo 'RightSide2_0';
|
||||
} ?>">
|
||||
<div id="1_1l"
|
||||
class="<?php if ($pd[19] == 1) {
|
||||
echo 'LeftFront1_1';
|
||||
} ?>">
|
||||
<div id="1_1r"
|
||||
class="<?php if ($pd[20] == 1) {
|
||||
echo 'RightFront1_1';
|
||||
} ?>">
|
||||
<div id="1_1f"
|
||||
class="<?php if ($pd[21] == 1) {
|
||||
echo 'LeftFront1_0';
|
||||
} ?>">
|
||||
<div class="<?php if ($pd[22] == 1) {
|
||||
echo 'LeftSide1_0';
|
||||
} ?>">
|
||||
<div id="1_0l"
|
||||
class="<?php if ($pd[23] == 1) {
|
||||
echo 'RightSide1_0';
|
||||
} ?>">
|
||||
<div id="0_1l"
|
||||
class="<?php if ($pd[24] == 1) {
|
||||
echo 'LeftFront0_1';
|
||||
} ?>">
|
||||
<div id="0_1r"
|
||||
class="<?php if ($pd[25] == 1) {
|
||||
echo 'RightFront0_1';
|
||||
} ?>">
|
||||
<div id="0_0f"
|
||||
class="<?php if ($pd[26] == 1) {
|
||||
echo 'LeftFront0_0';
|
||||
} ?>">
|
||||
<div class="<?php if ($pd[27] == 1) {
|
||||
echo 'LeftSide0_0';
|
||||
} ?>">
|
||||
<div id="0_0l"
|
||||
class="<?php if ($pd[28] == 1) {
|
||||
echo 'RightSide0_0';
|
||||
} ?>">
|
||||
<?php if ($u->info['admin'] == 0){ ?>
|
||||
<div id="divWindowImg">
|
||||
<img src="//img.new-combats.tech/i/1x1.gif"
|
||||
usemap="#ObjectsMap"
|
||||
border="0"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
foreach ($map as $key => $layer) {
|
||||
if (!$layer) {
|
||||
continue;
|
||||
}
|
||||
$id = !empty($mapIDs[$key]) ? " id='" . $mapIDs[$key] . "'" : '';
|
||||
echo "<div class='$layer'$id></div>";
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- / MAP \ -->
|
||||
<span class="<?php if ($pd[28] == 1) {
|
||||
echo 'RightSide0_0';
|
||||
} ?>">
|
||||
<?php } ?>
|
||||
<span class="<?= $map[28] ?>">
|
||||
</span></div>
|
||||
</div>
|
||||
</td>
|
||||
@@ -1178,46 +1075,22 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
locGoLineDng();
|
||||
|
||||
$("document").ready(function () {
|
||||
|
||||
$('#g1').click(function () {
|
||||
/* $.ajax({
|
||||
url: "main.php?ajax=1",
|
||||
cache: false,
|
||||
success: function(html) {
|
||||
$("body").html(html);
|
||||
}
|
||||
});*/
|
||||
location.href = "/main.php";
|
||||
});
|
||||
|
||||
$('#g6').click(function () {
|
||||
/* $.ajax({
|
||||
url: "main.php?look=1&rnd=<?=$code;?>&ajax=1",
|
||||
cache: false,
|
||||
success: function(html) {
|
||||
$("body").html(html);
|
||||
}
|
||||
});*/
|
||||
location.href = "/main.php?look=1&rnd=<?=$code;?>";
|
||||
location.href = "/main.php?look=1&rnd=<?=$code?>";
|
||||
});
|
||||
|
||||
$('#g7').click(function () {
|
||||
/*$.ajax({
|
||||
url: "main.php?look=2&rnd=<?=$code;?>&ajax=1",
|
||||
cache: false,
|
||||
success: function(html) {
|
||||
$("body").html(html);
|
||||
}
|
||||
});*/
|
||||
location.href = "/main.php?look=2&rnd=<?=$code;?>";
|
||||
location.href = "/main.php?look=2&rnd=<?=$code?>";
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<br/><br/>
|
||||
<?php
|
||||
if ($u->info['admin'] == 1) {
|
||||
echo '<form method="POST">X - <input type="text" name="g__x" autocomplete="off" value="' . $u->info['x'] . '" size="4" /> Y - <input type="text" name="g__y" autocomplete="off" value="' . $u->info['y'] . '" size="4" /> <input type="submit" value="Перейти" name="go_to_admin" /><br/><input id="restorbot" type="checkbox" name="g__restorebot" autocomplete="off" /> <label for="restorbot">Восстановить павших ботов </label></form><br>
|
||||
S:' . $u->info['s'];
|
||||
if ($u->isAdmin()) {
|
||||
echo 'S:' . $u->info['s'];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user