let elem = document.getElementById('se-pre-con');
elem.parentNode.removeChild(elem);
";
if (!defined('GAME')) {
die();
}
if ($_GET['go_away']) {
header('location: main.php');
die();
}
if ($u->info['battle'] != 0) {
header('location: main.php');
die();
}
function combineItems(array $parts, int $result, string $data = '|frompisher=12'): string
{
global $u;
$obj = Db::getRow('select * from items_main where id = ?', [$result]);
$checkItems = ItemsModel::hasNoItemsInInventory($parts);
if (empty($checkItems)) {
$u->addItem($result, $u->info['id'], $data, $obj);
foreach ($parts as $part) {
ItemsModel::deleteItemsById($part);
}
return 'Вы получили ' . ItemsModel::getNamesByIds([$result]);
} else {
return 'Не хватает ресурсов: ' . ItemsModel::getNamesByIds($checkItems);
}
}
if (isset($_POST['clip76_'])) {
combineItems([878, 902, 903, 905, 907, 950], 4677);
} elseif (isset($_POST['clip80_'])) {
combineItems([878, 902, 903, 905, 907, 950, 1035], 4758, '|frompisher=12|onlyOne=1|oneType=84');
} elseif (isset($_POST['clip81_'])) {
combineItems([906, 907], 4679);
} elseif (isset($_POST['clip82_'])) {
combineItems([877, 888, 890, 902, 903], 4680);
} elseif (isset($_POST['clip89_'])) {
combineItems([882,900,903,904,908], 4681);
} elseif (isset($_POST['clip90_'])) {
combineItems([878, 889, 902, 906, 950], 4682);
} elseif (isset($_POST['clip91_'])) {
combineItems([881, 905, 907], 4683);
} elseif (isset($_POST['clip92_'])) {
combineItems([881, 905, 907], 4684);
} elseif (isset($_POST['clip93_'])) {
combineItems([889, 890, 901], 4685);
} elseif (isset($_POST['clip94_'])) {
combineItems([4685, 4688, 4689, 4690], 4686);
}
function getColor($id, $num)
{
global $u;
$color = 'green';
$ch = mysql_query(
"SELECT `id` FROM `items_users` WHERE `uid` = " . $u->info['id'] . " AND `delete` = 0 AND `item_id` = " . (int)$id . " AND inShop = 0 AND inOdet = 0"
);
if (mysql_num_rows($ch) < $num) {
$color = 'red';
}
return $color;
}
function getImg($id, $num)
{
global $u;
$img = 'good.png';
$ch = mysql_query(
"SELECT `id` FROM `items_users` WHERE `uid` = " . $u->info['id'] . " AND `delete` = 0 AND `item_id` = " . (int)$id . " AND inShop = 0 AND inOdet = 0"
);
if (mysql_num_rows($ch) < $num) {
$img = 'i/clear.gif';
}
return $img;
}
?>
Мастерская Забытых Мастеров |
|
|
" . $err . "";
} ?>
getStats($u->info['id'], 1);
$st2 = $st[1];
$st = $st[0];
$rgd = $u->regen($u->info['id'], $st, 1);
$us = $u->getInfoPers($u->info['id'], 1, $st);
if ($us != false) {
echo $us[0];
} else {
echo 'information is lost.';
} ?>
|