2020-08-30 16:28:15 +00:00
|
|
|
<?php
|
2020-09-29 22:39:06 +00:00
|
|
|
if (in_array($user['room'], Config::$caverooms)) {
|
|
|
|
$cavedata = Config::$cavedata ?? [];
|
|
|
|
$floor = mysql_fetch_row(mysql_query("SELECT `floor` FROM `caveparties` WHERE `user` = '$user[id]' LIMIT 1"));
|
|
|
|
if (!isset($cavedata[$user['room']]['x' . $floor])) {
|
|
|
|
$floor = 1;
|
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$lomka1 = $lomka;
|
|
|
|
|
2020-09-29 22:39:06 +00:00
|
|
|
foreach ($lomka1 as $k => $v) {
|
|
|
|
if ($v < _BOTSEPARATOR_) {
|
|
|
|
if (in_array($user['room'], Config::$caverooms)) {
|
|
|
|
mysql_query("UPDATE `caveparties` SET `floor` = $floor, `x` = '" . $cavedata[$user['room']]['x' . $floor] . "', `y` = '" . $cavedata[$user['room']]['y' . $floor] . "', `dir` = '" . $cavedata[$user['room']]['dir' . $floor] . "', `loses` = (`loses`+1) WHERE `user` = '$v' LIMIT 1");
|
|
|
|
}
|
|
|
|
if ($user['laba'] > 0) {
|
|
|
|
mysql_query('UPDATE `users` SET `x` = `xf`, `y` = `yr` WHERE `id` = "' . $v . '" LIMIT 1');
|
|
|
|
die('Suka');
|
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
}
|
|
|
|
}
|