438 lines
25 KiB
PHP
438 lines
25 KiB
PHP
<?php
|
||
|
||
use Core\Db;
|
||
use User\ItemsModel;
|
||
|
||
echo "<script>
|
||
let elem = document.getElementById('se-pre-con');
|
||
elem.parentNode.removeChild(elem);
|
||
</script>";
|
||
|
||
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;
|
||
}
|
||
|
||
?>
|
||
<html>
|
||
<head>
|
||
<link rel="stylesheet" type="text/css" href="//img.new-combats.tech/css/main.css"/>
|
||
<meta http-equiv="Cache-Control" content="no-cache, max-age=0, must-revalidate, no-store"/>
|
||
<meta http-equiv="PRAGMA" content="NO-CACHE"/>
|
||
<meta http-equiv="Expires" content="0"/>
|
||
<style>
|
||
.row {
|
||
cursor: pointer;
|
||
}
|
||
|
||
#answer1 {
|
||
color: #003388;
|
||
font-weight: bold;
|
||
text-decoration: none;
|
||
}
|
||
</style>
|
||
<script type="text/javascript">
|
||
function show(ele) {
|
||
var srcElement = document.getElementById(ele);
|
||
if (srcElement != null) {
|
||
if (srcElement.style.display == "block") {
|
||
srcElement.style.display = 'none';
|
||
} else {
|
||
srcElement.style.display = 'block';
|
||
}
|
||
}
|
||
}
|
||
|
||
function OpenDiv(vr) {
|
||
var dg01 = document.getElementById(vr);
|
||
if (dg01.style.display == '') {
|
||
dg01.style.display = 'none'
|
||
} else {
|
||
dg01.style.display = ''
|
||
}
|
||
}
|
||
</script>
|
||
<script type="text/javascript"
|
||
src="//img.new-combats.tech/js/inf.0.104.js?<?= mt_rand(1436, 1293286936) / 10000000000 ?>"
|
||
charset="utf-8"></script>
|
||
</head>
|
||
<body leftmargin=5 topmargin=5 marginwidth=5 marginheight=5 bgcolor="#d7d7d7" onLoad="">
|
||
<div id=hint4 class=ahint></div>
|
||
<TABLE cellspacing=0 cellpadding=2 width=100%>
|
||
<TD style="width: 40%; vertical-align: top; ">
|
||
<TABLE cellspacing=0 cellpadding=2 style="width: 100%; ">
|
||
<tr>
|
||
<TD align=center><h4>Мастерская Забытых Мастеров</h4></TD>
|
||
</tr>
|
||
<TR>
|
||
</TABLE>
|
||
</TD>
|
||
<TD style="width: 5%; vertical-align: top; "> </TD>
|
||
</TR>
|
||
</TABLE>
|
||
</html>
|
||
<?php if ($err != '') {
|
||
echo "<center><b style='color: Red;'>" . $err . "</b></center>";
|
||
} ?>
|
||
<table width="100%">
|
||
<tr>
|
||
<td width="255" valign="top">
|
||
<div align="left"><?php $st = [];
|
||
$st2 = [];
|
||
$st = $u->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.';
|
||
} ?></div>
|
||
<div align="left"></div>
|
||
<div align="left"></div>
|
||
<div style="float: left">
|
||
<td valign="top"><br/>
|
||
<div id="step1" style="margin-left: 20px;"></div>
|
||
<br/><br/>
|
||
<table>
|
||
<tr>
|
||
<td>
|
||
<div id="answer1">
|
||
• <a href="#" onclick="OpenDiv('clip76')">Черная метка <img
|
||
src="//img.new-combats.tech/i/items/spell_curse.gif"></a><br/>
|
||
<div id="clip76" style="display: none; color: black;">
|
||
<p style="color:<?= getColor(950, 1) ?>"> Лучистое Серебро <img
|
||
src="//img.new-combats.tech/<?= getImg(950, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(907, 1) ?>"> Сгусток эфира <img
|
||
src="//img.new-combats.tech/<?= getImg(907, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(902, 1) ?>"> Кристалл голоса предков <img
|
||
src="//img.new-combats.tech/<?= getImg(902, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(878, 1) ?>"> Камень затаенного солнца <img
|
||
src="//img.new-combats.tech/<?= getImg(878, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(905, 1) ?>"> Шепот гор <img
|
||
src="//img.new-combats.tech/<?= getImg(905, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(903, 1) ?>"> Эссенция праведного гнева <img
|
||
src="//img.new-combats.tech/<?= getImg(903, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<form action="" method="POST">
|
||
<input type="submit" name="clip76_" value="Собрать"/>
|
||
</form>
|
||
</div>
|
||
|
||
• <a href="#" onclick="OpenDiv('clip80')">Клаустрофобия <img
|
||
src="//img.new-combats.tech/i/items/d_blat24.gif"></a><br/>
|
||
<div id="clip80" style="display: none; color: black;">
|
||
<p style="color:<?= getColor(950, 1) ?>"> Кожа общего врага <img
|
||
src="//img.new-combats.tech/<?= getImg(950, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(907, 1) ?>"> Кристалл стабильности <img
|
||
src="//img.new-combats.tech/<?= getImg(907, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(902, 1) ?>"> Плод змеиного дерева <img
|
||
src="//img.new-combats.tech/<?= getImg(902, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(878, 1) ?>"> Лучистый топаз <img
|
||
src="//img.new-combats.tech/<?= getImg(878, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(905, 1) ?>"> Стихиалия <img
|
||
src="//img.new-combats.tech/<?= getImg(905, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(903, 1) ?>"> Тысячелетний камень <img
|
||
src="//img.new-combats.tech/<?= getImg(903, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<form action="" method="POST">
|
||
<input type="submit" name="clip80_" value="Собрать"/>
|
||
</form>
|
||
</div>
|
||
|
||
• <a href="#" onclick="OpenDiv('clip81')">Проклятье Умирающей Земли <img
|
||
src="//img.new-combats.tech/i/items/m_ptp_1.gif"></a><br/>
|
||
<div id="clip81" style="display: none; color: black;">
|
||
<p style="color:<?= getColor(906, 1) ?>"> Кристалл голоса предков <img
|
||
src="//img.new-combats.tech/<?= getImg(906, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(907, 1) ?>"> Кристалл стабильности <img
|
||
src="//img.new-combats.tech/<?= getImg(907, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<form action="" method="POST">
|
||
<input type="submit" name="clip81_" value="Собрать"/>
|
||
</form>
|
||
</div>
|
||
|
||
• <a href="#" onclick="OpenDiv('clip82')">Проклятье Стихающего Ветра <img
|
||
src="//img.new-combats.tech/i/items/m_ptp_2.gif"></a><br/>
|
||
<div id="clip82" style="display: none; color: black;">
|
||
<p style="color:<?= getColor(877, 1) ?>"> Сталь <img
|
||
src="//img.new-combats.tech/<?= getImg(877, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(890, 1) ?>"> Сгусток астрала <img
|
||
src="//img.new-combats.tech/<?= getImg(890, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(902, 1) ?>"> Плод змеиного дерева <img
|
||
src="//img.new-combats.tech/<?= getImg(902, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(903, 1) ?>"> Тысячелетний камень <img
|
||
src="//img.new-combats.tech/<?= getImg(903, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(888, 1) ?>"> Шепот гор <img
|
||
src="//img.new-combats.tech/<?= getImg(888, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<form action="" method="POST">
|
||
<input type="submit" name="clip82_" value="Собрать"/>
|
||
</form>
|
||
</div>
|
||
|
||
• <a href="#" onclick="OpenDiv('clip89')">Проклятье Замерзающей Воды <img
|
||
src="//img.new-combats.tech/i/items/m_ptp_3.gif"></a><br/>
|
||
<div id="clip89" style="display: none; color: black;">
|
||
<p style="color:<?= getColor(900, 1) ?>"> Кора змеиного дерева <img
|
||
src="//img.new-combats.tech/<?= getImg(900, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(882, 1) ?>"> Глубинный камень <img
|
||
src="//img.new-combats.tech/<?= getImg(882, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(903, 1) ?>"> Тысячелетний камень <img
|
||
src="//img.new-combats.tech/<?= getImg(903, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(904, 1) ?>"> Кристалл времен <img
|
||
src="//img.new-combats.tech/<?= getImg(904, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(908, 1) ?>"> Камень затаенного солнца <img
|
||
src="//img.new-combats.tech/<?= getImg(908, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<form action="" method="POST">
|
||
<input type="submit" name="clip89_" value="Собрать"/>
|
||
</form>
|
||
</div>
|
||
|
||
• <a href="#" onclick="OpenDiv('clip90')">Проклятье Угасающего Огня <img
|
||
src="//img.new-combats.tech/i/items/m_ptp_4.gif"></a><br/>
|
||
<div id="clip90" style="display: none; color: black;">
|
||
<p style="color:<?= getColor(950, 1) ?>"> Кожа Общего Врага <img
|
||
src="//img.new-combats.tech/<?= getImg(950, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(889, 1) ?>"> Сгусток эфира <img
|
||
src="//img.new-combats.tech/<?= getImg(889, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(902, 1) ?>"> Плод змеиного дерева <img
|
||
src="//img.new-combats.tech/<?= getImg(902, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(903, 1) ?>"> Тысячелетний камень <img
|
||
src="//img.new-combats.tech/<?= getImg(903, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(878, 1) ?>"> Лучистый топаз <img
|
||
src="//img.new-combats.tech/<?= getImg(878, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<form action="" method="POST">
|
||
<input type="submit" name="clip90_" value="Собрать"/>
|
||
</form>
|
||
</div>
|
||
|
||
• <a href="#" onclick="OpenDiv('clip91')">Проклятье Легкого Отупления <img
|
||
src="//img.new-combats.tech/i/items/m_ptp_5.gif"></a><br/>
|
||
<div id="clip91" style="display: none; color: black;">
|
||
<p style="color:<?= getColor(907, 1) ?>"> Кристалл стабильности <img
|
||
src="//img.new-combats.tech/<?= getImg(907, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(881, 1) ?>"> Лучистый рубин <img
|
||
src="//img.new-combats.tech/<?= getImg(881, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(905, 1) ?>"> Стихиалия <img
|
||
src="//img.new-combats.tech/<?= getImg(905, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<form action="" method="POST">
|
||
<input type="submit" name="clip91_" value="Собрать"/>
|
||
</form>
|
||
</div>
|
||
|
||
|
||
• <a href="#" onclick="OpenDiv('clip92')">Проклятье Уязвимости <img
|
||
src="//img.new-combats.tech/i/items/m_ptp_6.gif"></a><br/>
|
||
<div id="clip92" style="display: none; color: black;">
|
||
<p style="color:<?= getColor(907, 1) ?>"> Кристалл стабильности <img
|
||
src="//img.new-combats.tech/<?= getImg(907, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(881, 1) ?>"> Лучистый рубин <img
|
||
src="//img.new-combats.tech/<?= getImg(881, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(905, 1) ?>"> Стихиалия <img
|
||
src="//img.new-combats.tech/<?= getImg(905, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<form action="" method="POST">
|
||
<input type="submit" name="clip92_" value="Собрать"/>
|
||
</form>
|
||
</div>
|
||
|
||
|
||
• <a href="#" onclick="OpenDiv('clip93')">Зачаровать кольцо: Вытягивание души [1]
|
||
<img src="//img.new-combats.tech/i/items/enhp_6_revamp10.gif"></a><br/>
|
||
<div id="clip93" style="display: none; color: black;">
|
||
<p style="color:<?= getColor(901, 1) ?>"> Кристалл тысячи ответов <img
|
||
src="//img.new-combats.tech/<?= getImg(901, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(889, 1) ?>"> Сгусток эфира <img
|
||
src="//img.new-combats.tech/<?= getImg(889, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(890, 1) ?>"> Сгусток астрала <img
|
||
src="//img.new-combats.tech/<?= getImg(890, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<form action="" method="POST">
|
||
<input type="submit" name="clip93_" value="Собрать"/>
|
||
</form>
|
||
</div>
|
||
|
||
|
||
• <a href="#" onclick="OpenDiv('clip94')">Зачаровать кольцо: Вытягивание души [2]
|
||
<img src="//img.new-combats.tech/i/items/enhp_6_revamp10_2.gif"></a><br/>
|
||
<div id="clip94" style="display: none; color: black;">
|
||
<p style="color:<?= getColor(4685, 1) ?>"> Зачаровать кольцо: Вытягивание души
|
||
[1] <img src="//img.new-combats.tech/<?= getImg(4685, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(4688, 1) ?>"> Топливо для Големов <img
|
||
src="//img.new-combats.tech/<?= getImg(4688, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(4689, 1) ?>"> Смазка для Големов <img
|
||
src="//img.new-combats.tech/<?= getImg(4689, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<p style="color:<?= getColor(4690, 1) ?>"> Ускоритель для Големов <img
|
||
src="//img.new-combats.tech/<?= getImg(4690, 1) ?>" width="13"
|
||
height="13"/></p>
|
||
<form action="" method="POST">
|
||
<input type="submit" name="clip94_" value="Собрать"/>
|
||
</form>
|
||
</div>
|
||
<br>
|
||
• <a href="?go_away=1">Уйти. (Выход)</a>
|
||
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</div>
|
||
<div style="float:left">
|
||
|
||
<td width="120">
|
||
<table width="100" border="0" cellspacing="0" cellpadding="0">
|
||
<tr>
|
||
<td>
|
||
<TABLE border=0 cellSpacing=1 cellPadding=0 width="100%">
|
||
<TBODY>
|
||
<TR vAlign=top>
|
||
<TD>
|
||
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
|
||
<TBODY>
|
||
</TBODY>
|
||
</TABLE>
|
||
</TD>
|
||
<TD>
|
||
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
|
||
<TBODY>
|
||
|
||
</TBODY>
|
||
</TABLE>
|
||
</TD>
|
||
</TR>
|
||
</TBODY>
|
||
</TABLE>
|
||
</TD>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<TABLE width=100% align="right">
|
||
<tr>
|
||
<td>
|
||
<br/>
|
||
<br/>
|
||
<br/>
|
||
|
||
</TD>
|
||
</tr>
|
||
</TABLE>
|
||
</body>
|
||
</html>
|