2020-08-30 16:28:15 +00:00
|
|
|
<?php
|
2021-03-10 21:03:59 +00:00
|
|
|
if (in_array($user->getRoom(), CAVE_ROOMS)) {
|
|
|
|
$cavedata = CAVE_DATA ?? [];
|
2020-09-29 22:39:06 +00:00
|
|
|
$floor = mysql_fetch_row(mysql_query("SELECT `floor` FROM `caveparties` WHERE `user` = '$user[id]' LIMIT 1"));
|
2021-02-01 19:20:23 +00:00
|
|
|
if (!isset($cavedata[$user->getRoom()]['x' . $floor])) {
|
2020-09-29 22:39:06 +00:00
|
|
|
$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_) {
|
2021-03-10 21:03:59 +00:00
|
|
|
if (in_array($user->getRoom(), CAVE_ROOMS)) {
|
2021-02-01 19:20:23 +00:00
|
|
|
mysql_query("UPDATE `caveparties` SET `floor` = $floor, `x` = '" . $cavedata[$user->getRoom()]['x' . $floor] . "', `y` = '" . $cavedata[$user->getRoom()]['y' . $floor] . "', `dir` = '" . $cavedata[$user->getRoom()]['dir' . $floor] . "', `loses` = (`loses`+1) WHERE `user` = '$v' LIMIT 1");
|
2020-09-29 22:39:06 +00:00
|
|
|
}
|
|
|
|
if ($user['laba'] > 0) {
|
|
|
|
mysql_query('UPDATE `users` SET `x` = `xf`, `y` = `yr` WHERE `id` = "' . $v . '" LIMIT 1');
|
2020-09-30 12:01:33 +00:00
|
|
|
exit('Suka');
|
2020-09-29 22:39:06 +00:00
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
}
|
|
|
|
}
|