Сделать возможность вынимать руны из предметов #2

This commit is contained in:
Ivor Barhansky 2022-06-07 23:47:50 +03:00
parent c5fb9868e6
commit dcc6f0ade4
3 changed files with 405 additions and 615 deletions

View File

@ -4,6 +4,11 @@ namespace Insallah;
class Runes class Runes
{ {
/** Создаём руну в зависимости от уровня.
* @param $level
*
* @return array
*/
public static function get($level) public static function get($level)
{ {
if (!in_array($level, [8, 9, 10])) { if (!in_array($level, [8, 9, 10])) {
@ -20,22 +25,22 @@ class Runes
['s5', 'm11', 'mpAll', 'pzm'] ['s5', 'm11', 'mpAll', 'pzm']
]; ];
$vars = [ $vars = [
's1' => ['Сила', mt_rand(1, 3)], 's1' => ['Сила', mt_rand(1, 3)],
's2' => ['Ловкость', mt_rand(1, 3)], 's2' => ['Ловкость', mt_rand(1, 3)],
's3' => ['Интуиция', mt_rand(1, 3)], 's3' => ['Интуиция', mt_rand(1, 3)],
's5' => ['Интеллект', mt_rand(1, 3)], 's5' => ['Интеллект', mt_rand(1, 3)],
'pa1' => ['Мощности Колющего урона', mt_rand(1, $power[$level])], 'pa1' => ['Мощности Колющего урона', mt_rand(1, $power[$level])],
'pa2' => ['Мощности Рубящего урона', mt_rand(1, $power[$level])], 'pa2' => ['Мощности Рубящего урона', mt_rand(1, $power[$level])],
'pa3' => ['Мощности Дробящего урона', mt_rand(1, $power[$level])], 'pa3' => ['Мощности Дробящего урона', mt_rand(1, $power[$level])],
'pa4' => ['Мощности Режущего урона', mt_rand(1, $power[$level])], 'pa4' => ['Мощности Режущего урона', mt_rand(1, $power[$level])],
'm2' => ['???', mt_rand(5, 15)], 'm2' => ['???', mt_rand(5, 15)],
'm3' => ['МК', mt_rand(1, 3)], 'm3' => ['МК', mt_rand(1, 3)],
'antm3' => ['ПМК', mt_rand(1, 3)], 'antm3' => ['ПМК', mt_rand(1, 3)],
'm5' => ['???', mt_rand(5, 10)], 'm5' => ['???', mt_rand(5, 10)],
'm11' => ['Мощности Магии стихии', mt_rand(1, $power[$level])], 'm11' => ['Мощности Магии стихии', mt_rand(1, $power[$level])],
'hpAll' => ['HP', mt_rand(5, 15)], 'hpAll' => ['HP', mt_rand(5, 15)],
'mpAll' => ['MP', mt_rand(10, 20)], 'mpAll' => ['MP', mt_rand(10, 20)],
'pzm' => ['Подавление защиты от магии', 1] 'pzm' => ['Подавление защиты от магии', 1]
]; ];
$rune = $runes[array_rand($runes)]; // arr (s, pa\m, rand9\mpAll, other) $rune = $runes[array_rand($runes)]; // arr (s, pa\m, rand9\mpAll, other)
@ -43,23 +48,69 @@ class Runes
$runeVals = [$vars[$rune[0][1]], $vars[$rune[1][1]], $vars[$rune[2][1]], $vars[$rune[3][1]]]; $runeVals = [$vars[$rune[0][1]], $vars[$rune[1][1]], $vars[$rune[2][1]], $vars[$rune[3][1]]];
$resultRune = array_combine($rune, $runeVals); $resultRune = array_combine($rune, $runeVals);
$resultText = array_combine($runeTxt, array_map('self::addPlus', $runeVals)); $resultText = array_combine($runeTxt, array_map('self::addPlus', $runeVals));
if ($level < 10) { // Отрезаем параметр 4. if ($level < 10) { // Отрезаем параметр 4.
array_pop($resultRune); array_pop($resultRune);
array_pop($resultText); array_pop($resultText);
} }
if ($level < 9) { // Отрезаем параметр 3. if ($level < 9) { // Отрезаем параметр 3.
array_pop($resultRune); array_pop($resultRune);
array_pop($resultText); array_pop($resultText);
} }
//Строчка data в базу //Строчка data в базу
$returnData = '|' . http_build_query($resultRune, 'add_', '|'); $returnData = '|' . http_build_query($resultRune, 'add_', '|');
//Строчка человекопонятных параметров в статус. //Строчка человекопонятных параметров в статус.
$returnText = implode(', ', $resultText); $returnText = implode(', ', $resultText);
return [$returnData, $returnText]; return [$returnData, $returnText];
} }
private static function addPlus($var) private static function addPlus($var)
{ {
return '+' . (string)$var; return '+' . $var;
}
/** Выкусывает руну из предмета.
*
* @param array $itemData
* data предмета
*
* @return array массив, item - предмет, rune - руна из предмета, rune_id - id руны.
* Оба в подготовленном строчном формате для data
*/
public static function removeRuneData($itemData)
{
# Ищем есть ли в предмете руна определённого типа.
$runeid = array_search('rune_id', array_flip($itemData));
if (!in_array($runeid, [6001, 6002, 6003])) {
return [];
}
$bonusArgs = 0;
# В зависимости от типа руны считаем количество элементов-бонусов.
if ($runeid === 6001) {
$bonusArgs = 2;
}
if ($runeid === 6002) {
$bonusArgs = 3;
}
if ($runeid === 6003) {
$bonusArgs = 4;
}
$args = 0; //basic rune values - rune, id, name, lvl
$rune = [];
foreach ($itemData as $key => $value) {
if ($key == 'rune') {
$args = 4 + $bonusArgs;
}
if ($args > 0) {
$rune[$key] = $value;
$args--;
}
}
$runeData = urldecode('|' . http_build_query($rune, '', '|'));
$itemWithoutRuneData = str_replace($runeData, '', $itemData);
return [
'item' => (string)$itemWithoutRuneData,
'rune' => $runeData,
'rune_id' => (int)$runeid
];
} }
} }

View File

@ -11,12 +11,12 @@ $qst_hram = true;
if (isset($_GET['itm']) && $qst_hram && $_GET['itm'] > 0) { if (isset($_GET['itm']) && $qst_hram && $_GET['itm'] > 0) {
if ($_GET['r'] == 1) { if ($_GET['r'] == 1) {
$_GET['itm'] = (int)$_GET['itm']; $_GET['itm'] = (int)$_GET['itm'];
//Ïåðåïëàâêà âåùåé //Переплавка вещей
$resz = $u->plavka($_GET['itm'], 1); $resz = $u->plavka($_GET['itm'], 1);
$re = '<font color=red><b>' . $resz . '</b></font>'; $re = '<font color=red><b>' . $resz . '</b></font>';
unset($resz); unset($resz);
} elseif ($_GET['r'] == 2) { } elseif ($_GET['r'] == 2) {
//Ïåðåïëàâêà ðóí //Переплавка рун
$resz = ''; $resz = '';
$itm123 = explode('x', $_GET['itm']); $itm123 = explode('x', $_GET['itm']);
@ -31,12 +31,12 @@ if (isset($_GET['itm']) && $qst_hram && $_GET['itm'] > 0) {
$itm3 = mysql_fetch_array(mysql_query('SELECT `a`.`id` AS `iid`,`a`.*,`b`.* FROM `items_users` AS `a` LEFT JOIN `items_main` AS `b` ON (`b`.`id` = `a`.`item_id` AND `b`.`type` = 31) WHERE `a`.`id` = "' . mysql_real_escape_string($itm3) . '" AND `a`.`uid` = "' . $u->info['id'] . '" AND `a`.`delete` = 0 AND `a`.`inShop` = 0 AND `a`.`inTransfer` = 0 LIMIT 1')); $itm3 = mysql_fetch_array(mysql_query('SELECT `a`.`id` AS `iid`,`a`.*,`b`.* FROM `items_users` AS `a` LEFT JOIN `items_main` AS `b` ON (`b`.`id` = `a`.`item_id` AND `b`.`type` = 31) WHERE `a`.`id` = "' . mysql_real_escape_string($itm3) . '" AND `a`.`uid` = "' . $u->info['id'] . '" AND `a`.`delete` = 0 AND `a`.`inShop` = 0 AND `a`.`inTransfer` = 0 LIMIT 1'));
if ($itm1['iid'] == $itm2['iid'] || $itm2['iid'] == $itm3['iid'] || $itm1['iid'] == $itm3['iid']) { if ($itm1['iid'] == $itm2['iid'] || $itm2['iid'] == $itm3['iid'] || $itm1['iid'] == $itm3['iid']) {
$resz = 'Íå óäàëîñü ðàñïëàâèòü îäíó ðóíó, îíà íå ñãîðåëà.'; $resz = 'Не удалось расплавить одну руну, она не сгорела.';
//mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$itm3['iid'].'" OR `id` = "'.$itm2['iid'].'" OR `id` = "'.$itm1['iid'].'"'); //mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$itm3['iid'].'" OR `id` = "'.$itm2['iid'].'" OR `id` = "'.$itm1['iid'].'"');
} elseif (!isset($itm1['id']) || !isset($itm2['id']) || !isset($itm3['id'])) { } elseif (!isset($itm1['id']) || !isset($itm2['id']) || !isset($itm3['id'])) {
$resz = 'Íåäîñòàòî÷íî êîìïîíåíòîâ äëÿ ïðåîáðàçîâàíèÿ.'; $resz = 'Недостаточно компонентов для преобразования.';
} elseif ($itm1['level'] != $itm2['level'] || $itm1['level'] != $itm3['level']) { } elseif ($itm1['level'] != $itm2['level'] || $itm1['level'] != $itm3['level']) {
$resz = 'Ðóíû äîëæíû áûòü îäíîãî óðîâíÿ.'; $resz = 'Руны должны быть одного уровня.';
} elseif ($itm1['item_id'] == 10038 || $itm1['item_id'] == 10039 || $itm1['item_id'] == 10040 || $itm2['item_id'] == 10038 || $itm2['item_id'] == 10039 || $itm2['item_id'] == 10040 || $itm3['item_id'] == 10038 || $itm3['item_id'] == 10039 || $itm3['item_id'] == 10040) { } elseif ($itm1['item_id'] == 10038 || $itm1['item_id'] == 10039 || $itm1['item_id'] == 10040 || $itm2['item_id'] == 10038 || $itm2['item_id'] == 10039 || $itm2['item_id'] == 10040 || $itm3['item_id'] == 10038 || $itm3['item_id'] == 10039 || $itm3['item_id'] == 10040) {
$newRuneLevel = 0; $newRuneLevel = 0;
@ -60,19 +60,19 @@ if (isset($_GET['itm']) && $qst_hram && $_GET['itm'] > 0) {
$newRune = \Insallah\Runes::get($newRuneLevel); $newRune = \Insallah\Runes::get($newRuneLevel);
if (!empty($newRune)) { if (!empty($newRune)) {
$u->addItem($newitm, $u->info['id'], $newRune[0] . '|sudba=' . $u->info['login']); $u->addItem($newitm, $u->info['id'], $newRune[0] . '|sudba=' . $u->info['login']);
$resz = 'Õàðàêòåðèñòèêè Ðóíû: ' . $newRune[1]; $resz = 'Характеристики Руны: ' . $newRune[1];
mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $itm3['iid'] . '" OR `id` = "' . $itm2['iid'] . '" OR `id` = "' . $itm1['iid'] . '"'); mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $itm3['iid'] . '" OR `id` = "' . $itm2['iid'] . '" OR `id` = "' . $itm1['iid'] . '"');
if (date('w') == 0 || date('w') == 6 || date('w') == 2) { if (date('w') == 0 || date('w') == 6 || date('w') == 2) {
$u->repexp_add($u->info['id'], 10); //Ðåïóòàöèÿ ïëàâêà ðóí +10 $u->repexp_add($u->info['id'], 10); //Репутация плавка рун +10
} }
} }
} else { } else {
$resz = 'Çàãîòîâêè äîëæíû áûòü îäíîãî óðîâíÿ èëè ó âàñ íåäîñòàòî÷åí óðîâåíü ïðîêà÷êè õðàìà çíàíèé!'; $resz = 'Заготовки должны быть одного уровня или у вас недостаточен уровень прокачки храма знаний!';
} }
} elseif ($itm1['level'] == 1) { } elseif ($itm1['level'] == 1) {
//$resz = 'Óíèðóíû íåëüçÿ ïðåîáðàçîâûâàòü'; //$resz = 'Унируны нельзя преобразовывать';
$itm4 = []; $itm4 = [];
$sp = mysql_query('SELECT * FROM `items_main` WHERE `level` = "' . $itm1['level'] . '" AND `type` = 31 $sp = mysql_query('SELECT * FROM `items_main` WHERE `level` = "' . $itm1['level'] . '" AND `type` = 31
AND `id` != "' . $itm1['item_id'] . '" AND `id` != "' . $itm2['item_id'] . '" AND `id` != "' . $itm3['item_id'] . '" AND `id` < 6000'); AND `id` != "' . $itm1['item_id'] . '" AND `id` != "' . $itm2['item_id'] . '" AND `id` != "' . $itm3['item_id'] . '" AND `id` < 6000');
@ -84,8 +84,8 @@ if (isset($_GET['itm']) && $qst_hram && $_GET['itm'] > 0) {
//$u->rep['rep1'] += 10; //$u->rep['rep1'] += 10;
//mysql_query('UPDATE `rep` SET `rep1` = "'.$u->rep['rep1'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); //mysql_query('UPDATE `rep` SET `rep1` = "'.$u->rep['rep1'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$u->addItem($itm4['id'], $u->info['id']); $u->addItem($itm4['id'], $u->info['id']);
$resz = 'Óäà÷íî ïðåîáðàçîâàíû ðóíû &quot;' . $itm1['name'] . '&quot;,&quot;' . $itm2['name'] . '&quot; è &quot;' . $itm3['name'] . '&quot; â &quot;' . $itm4['name'] . '&quot;.'; $resz = 'Удачно преобразованы руны &quot;' . $itm1['name'] . '&quot;,&quot;' . $itm2['name'] . '&quot; и &quot;' . $itm3['name'] . '&quot; в &quot;' . $itm4['name'] . '&quot;.';
//$resz .= '<Br>Äîáàâëåíà ðåïóòàöèÿ Õðàìà Çíàíèé +10'; //$resz .= '<Br>Добавлена репутация Храма Знаний +10';
} else { } else {
$itm4 = []; $itm4 = [];
$sp = mysql_query('SELECT * FROM `items_main` WHERE `level` = "' . $itm1['level'] . '" AND `type` = 31 $sp = mysql_query('SELECT * FROM `items_main` WHERE `level` = "' . $itm1['level'] . '" AND `type` = 31
@ -98,8 +98,8 @@ if (isset($_GET['itm']) && $qst_hram && $_GET['itm'] > 0) {
//$u->rep['rep1'] += 1; //$u->rep['rep1'] += 1;
//mysql_query('UPDATE `rep` SET `rep1` = "'.$u->rep['rep1'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); //mysql_query('UPDATE `rep` SET `rep1` = "'.$u->rep['rep1'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$u->addItem($itm4['id'], $u->info['id']); $u->addItem($itm4['id'], $u->info['id']);
$resz = 'Óäà÷íî ïðåîáðàçîâàíû ðóíû &quot;' . $itm1['name'] . '&quot;,&quot;' . $itm2['name'] . '&quot; è &quot;' . $itm3['name'] . '&quot; â &quot;' . $itm4['name'] . '&quot;.'; $resz = 'Удачно преобразованы руны &quot;' . $itm1['name'] . '&quot;,&quot;' . $itm2['name'] . '&quot; и &quot;' . $itm3['name'] . '&quot; в &quot;' . $itm4['name'] . '&quot;.';
//$resz .= '<Br>Äîáàâëåíà ðåïóòàöèÿ Õðàìà Çíàíèé +1'; //$resz .= '<Br>Добавлена репутация Храма Знаний +1';
} }
$re = '<font color=red><b>' . $resz . '</b></font>'; $re = '<font color=red><b>' . $resz . '</b></font>';
@ -163,10 +163,10 @@ if (isset($_GET['itm']) && $qst_hram && $_GET['itm'] > 0) {
<TABLE width="100%" cellspacing="0" cellpadding="0"> <TABLE width="100%" cellspacing="0" cellpadding="0">
<tr> <tr>
<td valign="top"> <td valign="top">
<div align="center" class="pH3">Õðàì Çíàíèé <? if ($_GET['r'] == 2) { <div align="center" class="pH3">Храм Знаний <? if ($_GET['r'] == 2) {
echo ', Àëòàðü ðóí'; echo ', Алтарь рун';
} elseif ($_GET['r'] == 1) { } elseif ($_GET['r'] == 1) {
echo ', Àëòàðü ïðåäìåòîâ'; echo ', Алтарь предметов';
} ?></div> } ?></div>
<div align="left"><? if ($re != '') { <div align="left"><? if ($re != '') {
echo '<font color="red"><b>' . $re . '</b></font>'; echo '<font color="red"><b>' . $re . '</b></font>';
@ -194,8 +194,8 @@ if (isset($_GET['itm']) && $qst_hram && $_GET['itm'] > 0) {
id="greyText" id="greyText"
class="menutop" class="menutop"
onclick="location='main.php?loc=3.180.0.267&rnd=<? echo $code; ?>';" onclick="location='main.php?loc=3.180.0.267&rnd=<? echo $code; ?>';"
title="<? thisInfRm('3.180.0.267', 1); ?>">Öåíòðàëüíàÿ title="<? thisInfRm('3.180.0.267', 1); ?>">Центральная
ïëîùàäü</a></td> площадь</a></td>
</tr> </tr>
</table> </table>
</td> </td>
@ -211,11 +211,11 @@ if (isset($_GET['itm']) && $qst_hram && $_GET['itm'] > 0) {
</tr> </tr>
</table> </table>
<br/><br/> <br/><br/>
<input type="button" class="btn" value="Îáíîâèòü" onclick="location.href = '<? if (isset($_GET['r'])) { <input type="button" class="btn" value="Обновить" onclick="location.href = '<? if (isset($_GET['r'])) {
echo 'main.php?r=' . floor($_GET['r']); echo 'main.php?r=' . floor($_GET['r']);
} else { } else {
echo 'main.php'; echo 'main.php';
} ?>';"/><? if (isset($_GET['r'])) { ?> &nbsp; <input class="btn" type="button" value="Âåðíóòüñÿ" } ?>';"/><? if (isset($_GET['r'])) { ?> &nbsp; <input class="btn" type="button" value="Вернуться"
onclick="location.href = 'main.php';"/><? } ?><br><br> onclick="location.href = 'main.php';"/><? } ?><br><br>
</td> </td>
</table> </table>
@ -223,7 +223,7 @@ if (isset($_GET['itm']) && $qst_hram && $_GET['itm'] > 0) {
<? <?
} }
if (!isset($_GET['r'])) { if (!isset($_GET['r'])) {
//Äèàëîãîâûé ïåðñ //Диалоговый перс
?> ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
@ -252,7 +252,7 @@ if (!isset($_GET['r'])) {
style="cursor:pointer; font-weight:bold; color:#D8D8D8; font-size:10px;"> style="cursor:pointer; font-weight:bold; color:#D8D8D8; font-size:10px;">
&nbsp; <span onmousemove="this.runtimeStyle.color = 'white';" &nbsp; <span onmousemove="this.runtimeStyle.color = 'white';"
onmouseout="this.runtimeStyle.color = this.parentElement.style.color;" onmouseout="this.runtimeStyle.color = this.parentElement.style.color;"
onclick="window.open('https://new-combats.com/forum', 'forum', 'location=yes,menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,scrollbars=yes')">Ôîðóì</span> onclick="window.open('https://new-combats.com/forum', 'forum', 'location=yes,menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,scrollbars=yes')">Форум</span>
&nbsp; &nbsp;
</div> </div>
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
@ -275,19 +275,19 @@ if (!isset($_GET['r'])) {
<img onclick="location.href='main.php?talk=11'" <img onclick="location.href='main.php?talk=11'"
src="https://img.new-combats.com/city/1269_igsetee.png" src="https://img.new-combats.com/city/1269_igsetee.png"
width="120" height="220" class="aFilter" width="120" height="220" class="aFilter"
title="Äèàëîã ñ Àðêâèåððî"/></div> title="Диалог с Арквиерро"/></div>
<div style="position: absolute; left: 30px; top: 127px; width: 48px; height: 33px; z-index: 94;"> <div style="position: absolute; left: 30px; top: 127px; width: 48px; height: 33px; z-index: 94;">
<img <? if ($qst_hram == false) { <img <? if ($qst_hram == false) {
echo 'onclick="alert(\'Àðêâèåððî: Âû íå äîïóùåíû ê êîòëàì! (Âûïîëíèòå çàäàíèå)\');"'; echo 'onclick="alert(\'Арквиерро: Вы не допущены к котлам! (Выполните задание)\');"';
} else { ?> onclick="location.href='main.php?r=1'" <? } ?> } else { ?> onclick="location.href='main.php?r=1'" <? } ?>
title="Àëòàðü Ïðåäìåòîâ" title="Алтарь Предметов"
src="https://img.new-combats.com/city/ap_altar1.gif" src="https://img.new-combats.com/city/ap_altar1.gif"
width="147" height="93" class="aFilter"/></div> width="147" height="93" class="aFilter"/></div>
<div style="position: absolute; left: 333px; top: 129px; width: 48px; height: 33px; z-index: 94;"> <div style="position: absolute; left: 333px; top: 129px; width: 48px; height: 33px; z-index: 94;">
<img <? if ($qst_hram == false) { <img <? if ($qst_hram == false) {
echo 'onclick="alert(\'Àðêâèåððî: Âû íå äîïóùåíû ê êîòëàì! (Âûïîëíèòå çàäàíèå)\');"'; echo 'onclick="alert(\'Арквиерро: Вы не допущены к котлам! (Выполните задание)\');"';
} else { ?> onclick="location.href='main.php?r=2'" <? } ?> } else { ?> onclick="location.href='main.php?r=2'" <? } ?>
title="Àëòàðü Ðóí" title="Алтарь Рун"
src="https://img.new-combats.com/city/ap_altar2.gif" src="https://img.new-combats.com/city/ap_altar2.gif"
width="147" height="93" class="aFilter"/></div> width="147" height="93" class="aFilter"/></div>
<div style="position: absolute; left: 437px; top: 96px; width: 48px; height: 33px; z-index: 94;"> <div style="position: absolute; left: 437px; top: 96px; width: 48px; height: 33px; z-index: 94;">
@ -304,20 +304,20 @@ if (!isset($_GET['r'])) {
<div style="display:none; height:0px " id="moveto"></div> <div style="display:none; height:0px " id="moveto"></div>
<INPUT class="btn" <INPUT class="btn"
onclick="window.open('/forum?read=974&rnd=1', 'help', 'height=500,width=1024,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes')" onclick="window.open('/forum?read=974&rnd=1', 'help', 'height=500,width=1024,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes')"
value="Ïîäñêàçêà äëÿ íîâè÷êîâ" style="color:red;" type="button"> value="Подсказка для новичков" style="color:red;" type="button">
</small> </small>
</div> </div>
</td> </td>
<td><!-- <br /><span class="menutop"><nobr>Êîìíàòà äëÿ íîâè÷êîâ</nobr></span>--></td> <td><!-- <br /><span class="menutop"><nobr>Комната для новичков</nobr></span>--></td>
</tr> </tr>
</table> </table>
<small> <small>
<hr/> <hr/>
<br/> <br/>
<strong>Âíèìàíèå!</strong> Íèêîãäà è íèêîìó íå ãîâîðèòå ïàðîëü îò ñâîåãî ïåðñîíàæà. Íå ââîäèòå ïàðîëü íà äðóãèõ <strong>Внимание!</strong> Никогда и никому не говорите пароль от своего персонажа. Не вводите пароль на других
ñàéòàõ, òèïà &quot;íîâûé ãîðîä&quot;, &quot;ëîòåðåÿ&quot;, &quot;òàì, ãäå âñå äàþò íà õàëÿâó&quot;. Ïàðîëü íå сайтах, типа &quot;новый город&quot;, &quot;лотерея&quot;, &quot;там, где все дают на халяву&quot;. Пароль не
íóæåí íè ïàëàäèíàì, íè êëàíàì, íè àäìèíèñòðàöèè, <U>òîëüêî âçëîìùèêàì</U> äëÿ êðàæè âàøåãî ãåðîÿ.<br/> нужен ни паладинам, ни кланам, ни администрации, <U>только взломщикам</U> для кражи вашего героя.<br/>
<em>Àäìèíèñòðàöèÿ.</em></small> <br/> <em>Администрация.</em></small> <br/>
<? echo $rowonmax; ?><br/> <? echo $rowonmax; ?><br/>
</div></td> </div></td>
</tr> </tr>
@ -328,19 +328,19 @@ $itmAll = '';
$itmAllSee = ''; $itmAllSee = '';
$itmAll = $u->genInv(11, '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete` = "0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`data` NOT LIKE "%fromshop=2%" ORDER BY `lastUPD` DESC'); $itmAll = $u->genInv(11, '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete` = "0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`data` NOT LIKE "%fromshop=2%" ORDER BY `lastUPD` DESC');
if ($itmAll[0] == 0) { if ($itmAll[0] == 0) {
$itmAllSee = '<tr><td align="center" bgcolor="#e2e0e0">ÏÓÑÒÎ (íåò ïîäõîäÿùèõ ïðåäìåòîâ)</td></tr>'; $itmAllSee = '<tr><td align="center" bgcolor="#e2e0e0">ПУСТО (нет подходящих предметов)</td></tr>';
} else { } else {
$itmAllSee = $itmAll[2]; $itmAllSee = $itmAll[2];
} }
//Óäà÷íî ðàñòâîðåí ïðåäìåò "Óêðåïëåííûé Êîñòûëü". Ïîëó÷åíà ðóíà "Ìîíî Áàóíè". //Удачно растворен предмет "Укрепленный Костыль". Получена руна "Моно Бауни".
?> ?>
<script> <script>
function takeItRun(img, id, vl) { function takeItRun(img, id, vl) {
if (id != urlras) { if (id != urlras) {
urlras = id; urlras = id;
document.getElementById('use_item').innerHTML = '<img src="https://<?=$c['img'];?>/i/items/' + img + '" title="Ïðåäìåò äëÿ ïåðåïëàâêè"/><br><a href="javascript:void(0);" onClick="cancelItRun()">Îòìåíèòü</a>'; document.getElementById('use_item').innerHTML = '<img src="https://<?=$c['img'];?>/i/items/' + img + '" title="Предмет для переплавки"/><br><a href="javascript:void(0);" onClick="cancelItRun()">Отменить</a>';
if (vl == 0) { if (vl == 0) {
document.getElementById('add_rep').innerHTML = ' + ' + vl + '<br><div><b><font color="red"><small>(Íåîáõîäèì ïðåäìåò ïîäõîäÿùåãî óðîâíÿ, èíà÷å âû íå ïîëó÷èòå ðåïóòàöèþ)</small></font></b></div>'; document.getElementById('add_rep').innerHTML = ' + ' + vl + '<br><div><b><font color="red"><small>(Необходим предмет подходящего уровня, иначе вы не получите репутацию)</small></font></b></div>';
} else { } else {
document.getElementById('add_rep').innerHTML = ' + ' + vl; document.getElementById('add_rep').innerHTML = ' + ' + vl;
} }
@ -351,7 +351,7 @@ $itmAllSee = $itmAll[2];
function cancelItRun() { function cancelItRun() {
urlras = 0; urlras = 0;
document.getElementById('use_item').innerHTML = 'Ïðåäìåò íå âûáðàí'; document.getElementById('use_item').innerHTML = 'Предмет не выбран';
document.getElementById('add_rep').innerHTML = ''; document.getElementById('add_rep').innerHTML = '';
} }
@ -360,19 +360,19 @@ $itmAllSee = $itmAll[2];
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<td align="center" valign="top" bgcolor="#D6D6D6"><?= $u->microLogin($u->info['id'], 1) ?></td> <td align="center" valign="top" bgcolor="#D6D6D6"><?= $u->microLogin($u->info['id'], 1) ?></td>
<td align="center" valign="top" bgcolor="#D6D6D6"><B>Ïîäõîäÿùèå ïðåäìåòû â èíâåíòàðå</B></td> <td align="center" valign="top" bgcolor="#D6D6D6"><B>Подходящие предметы в инвентаре</B></td>
</tr> </tr>
<tr> <tr>
<td width="300" valign="top"> <td width="300" valign="top">
<b>Ðåïóòàöèÿ: <? echo 0 + $u->rep['rep1']; ?></b><span id="add_rep"></span> <b>Репутация: <? echo 0 + $u->rep['rep1']; ?></b><span id="add_rep"></span>
<br/><br/> <br/><br/>
<center><span id="use_item">Ïðåäìåò íå âûáðàí</span><br/><br/> <center><span id="use_item">Предмет не выбран</span><br/><br/>
<input class="btn" type="button" value="Ðàñòâîðèòü" <input class="btn" type="button" value="Растворить"
onclick="location = '?r=<?= $_GET['r'] . '&rnd=' . $code . '&itm='; ?>'+urlras;"/></center> onclick="location = '?r=<?= $_GET['r'] . '&rnd=' . $code . '&itm='; ?>'+urlras;"/></center>
<br/> <br/>
<br/><small> <br/><small>
<font color="red">Âíèìàíèå!</font><br/> <font color="red">Внимание!</font><br/>
Ïðåäìåòû ïðè ðàñòâîðåíèè è çàãîòîâêè ïðè ñëèÿíèè íåîáðàòèìî òåðÿþòñÿ.</small> Предметы при растворении и заготовки при слиянии необратимо теряются.</small>
</td> </td>
<td valign="top"> <td valign="top">
<!-- --> <!-- -->
@ -380,7 +380,7 @@ $itmAllSee = $itmAll[2];
<? if ($u->info['invBlock'] == 0) { <? if ($u->info['invBlock'] == 0) {
echo $itmAllSee; echo $itmAllSee;
} else { } else {
echo '<div align="center" style="padding:10px;background-color:#A5A5A5;"><form method="post" action="main.php?inv=1&otdel=' . $_GET['otdel'] . '&relockinvent"><b>Ðþêçàê çàêðûò.</b><br><img title="Çàìîê äëÿ ðþêçàêà" src="https://img.new-combats.com/i/items/box_lock.gif"> Ââåäèòå ïàðîëü: <input id="relockInv" name="relockInv" type="password"><input type="submit" value="Îòêðûòü"></form></div>'; echo '<div align="center" style="padding:10px;background-color:#A5A5A5;"><form method="post" action="main.php?inv=1&otdel=' . $_GET['otdel'] . '&relockinvent"><b>Рюкзак закрыт.</b><br><img title="Замок для рюкзака" src="https://img.new-combats.com/i/items/box_lock.gif"> Введите пароль: <input id="relockInv" name="relockInv" type="password"><input type="submit" value="Открыть"></form></div>';
} ?> } ?>
</table> </table>
<!-- --> <!-- -->
@ -392,17 +392,17 @@ $itmAll = '';
$itmAllSee = ''; $itmAllSee = '';
$itmAll = $u->genInv(14, '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete` = "0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND ((`im`.`type` = 31 AND `im`.`id` != 6001 AND `im`.`id` != 6002 AND `im`.`id` != 6003) OR`im`.`type` = 72) ORDER BY `lastUPD` DESC'); $itmAll = $u->genInv(14, '`iu`.`uid`="' . $u->info['id'] . '" AND `iu`.`delete` = "0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND ((`im`.`type` = 31 AND `im`.`id` != 6001 AND `im`.`id` != 6002 AND `im`.`id` != 6003) OR`im`.`type` = 72) ORDER BY `lastUPD` DESC');
if ($itmAll[0] == 0) { if ($itmAll[0] == 0) {
$itmAllSee = '<tr><td align="center" bgcolor="#e2e0e0">ÏÓÑÒÎ (íåò ïîäõîäÿùèõ ïðåäìåòîâ)</td></tr>'; $itmAllSee = '<tr><td align="center" bgcolor="#e2e0e0">ПУСТО (нет подходящих предметов)</td></tr>';
} else { } else {
$itmAllSee = $itmAll[2]; $itmAllSee = $itmAll[2];
} }
//Óäà÷íî ðàñòâîðåí ïðåäìåò "Óêðåïëåííûé Êîñòûëü". Ïîëó÷åíà ðóíà "Ìîíî Áàóíè". //Удачно растворен предмет "Укрепленный Костыль". Получена руна "Моно Бауни".
?> ?>
<script> <script>
function takeItRun(img, id, vl) { function takeItRun(img, id, vl) {
if (id != urlras) { if (id != urlras) {
urlras = id; urlras = id;
document.getElementById('use_item').innerHTML = '<img src="https://<?=$c['img'];?>/i/items/' + img + '" title="Ïðåäìåò äëÿ ïåðåïëàâêè"/><br><a href="javascript:void(0);" onClick="cancelItRun()">Îòìåíèòü</a>'; document.getElementById('use_item').innerHTML = '<img src="https://<?=$c['img'];?>/i/items/' + img + '" title="Предмет для переплавки"/><br><a href="javascript:void(0);" onClick="cancelItRun()">Отменить</a>';
} else { } else {
cancelItRun(); cancelItRun();
} }
@ -410,7 +410,7 @@ $itmAllSee = $itmAll[2];
function cancelItRun() { function cancelItRun() {
urlras = 0; urlras = 0;
document.getElementById('use_item').innerHTML = 'Ïóñòî'; document.getElementById('use_item').innerHTML = 'Пусто';
document.getElementById('add_rep').innerHTML = ''; document.getElementById('add_rep').innerHTML = '';
} }
@ -420,7 +420,7 @@ $itmAllSee = $itmAll[2];
function takeItRun2(img, id, vl) { function takeItRun2(img, id, vl) {
if (id != urlras2) { if (id != urlras2) {
urlras2 = id; urlras2 = id;
document.getElementById('use_item2').innerHTML = '<img src="https://<?=$c['img'];?>/i/items/' + img + '" title="Ïðåäìåò äëÿ ïåðåïëàâêè"/><br><a href="javascript:void(0);" onClick="cancelItRun2()">Îòìåíèòü</a>'; document.getElementById('use_item2').innerHTML = '<img src="https://<?=$c['img'];?>/i/items/' + img + '" title="Предмет для переплавки"/><br><a href="javascript:void(0);" onClick="cancelItRun2()">Отменить</a>';
} else { } else {
cancelItRun2(); cancelItRun2();
} }
@ -428,7 +428,7 @@ $itmAllSee = $itmAll[2];
function cancelItRun2() { function cancelItRun2() {
urlras2 = 0; urlras2 = 0;
document.getElementById('use_item2').innerHTML = 'Ïóñòî'; document.getElementById('use_item2').innerHTML = 'Пусто';
} }
urlras2 = 0; urlras2 = 0;
@ -437,7 +437,7 @@ $itmAllSee = $itmAll[2];
function takeItRun3(img, id, vl) { function takeItRun3(img, id, vl) {
if (id != urlras3) { if (id != urlras3) {
urlras3 = id; urlras3 = id;
document.getElementById('use_item3').innerHTML = '<img src="https://<?=$c['img'];?>/i/items/' + img + '" title="Ïðåäìåò äëÿ ïåðåïëàâêè"/><br><a href="javascript:void(0);" onClick="cancelItRun3()">Îòìåíèòü</a>'; document.getElementById('use_item3').innerHTML = '<img src="https://<?=$c['img'];?>/i/items/' + img + '" title="Предмет для переплавки"/><br><a href="javascript:void(0);" onClick="cancelItRun3()">Отменить</a>';
} else { } else {
cancelItRun3(); cancelItRun3();
} }
@ -445,7 +445,7 @@ $itmAllSee = $itmAll[2];
function cancelItRun3() { function cancelItRun3() {
urlras3 = 0; urlras3 = 0;
document.getElementById('use_item3').innerHTML = 'Ïóñòî'; document.getElementById('use_item3').innerHTML = 'Пусто';
} }
urlras3 = 0; urlras3 = 0;
@ -470,30 +470,30 @@ $itmAllSee = $itmAll[2];
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<td align="center" valign="top" bgcolor="#D6D6D6"><?= $u->microLogin($u->info['id'], 1) ?></td> <td align="center" valign="top" bgcolor="#D6D6D6"><?= $u->microLogin($u->info['id'], 1) ?></td>
<td align="center" valign="top" bgcolor="#D6D6D6"><b>Ïîäõîäÿùèå ïðåäìåòû â èíâåíòàðå</b></td> <td align="center" valign="top" bgcolor="#D6D6D6"><b>Подходящие предметы в инвентаре</b></td>
</tr> </tr>
<tr> <tr>
<td width="300" valign="top"> <td width="300" valign="top">
<b>Ðåïóòàöèÿ: <? echo 0 + $u->rep['rep1']; ?></b><span id="add_rep"></span> <b>Репутация: <? echo 0 + $u->rep['rep1']; ?></b><span id="add_rep"></span>
<br/><br/> <br/><br/>
<center> <center>
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<td width="80" align="center"><span id="use_item">Ïóñòî</span></td> <td width="80" align="center"><span id="use_item">Пусто</span></td>
<td width="80" align="center"><span id="use_item2">Ïóñòî</span></td> <td width="80" align="center"><span id="use_item2">Пусто</span></td>
<td width="80" align="center"><span id="use_item3">Ïóñòî</span></td> <td width="80" align="center"><span id="use_item3">Пусто</span></td>
</tr> </tr>
</table> </table>
<br/><br/> <br/><br/>
<input class="btn" type="button" value="Ïðåîáðàçîâàòü" <input class="btn" type="button" value="Преобразовать"
onclick="location.href = '?r=<?= $_GET['r'] . '&rnd=' . $code . '&itm='; ?>'+urlras+'x'+urlras2+'x'+urlras3;"/> onclick="location.href = '?r=<?= $_GET['r'] . '&rnd=' . $code . '&itm='; ?>'+urlras+'x'+urlras2+'x'+urlras3;"/>
</center> </center>
<br/> <br/>
<br/><small> <br/><small>
<font color="red">Âíèìàíèå!</font><br/> <font color="red">Внимание!</font><br/>
Ïðåäìåòû ïðè ðàñòâîðåíèè è çàãîòîâêè ïðè ñëèÿíèè íåîáðàòèìî òåðÿþòñÿ.</small> Предметы при растворении и заготовки при слиянии необратимо теряются.</small>
</td> </td>
<td valign="top"> <td valign="top">
<!-- --> <!-- -->
@ -501,7 +501,7 @@ $itmAllSee = $itmAll[2];
<? if ($u->info['invBlock'] == 0) { <? if ($u->info['invBlock'] == 0) {
echo $itmAllSee; echo $itmAllSee;
} else { } else {
echo '<div align="center" style="padding:10px;background-color:#A5A5A5;"><form method="post" action="main.php?inv=1&otdel=' . $_GET['otdel'] . '&relockinvent"><b>Ðþêçàê çàêðûò.</b><br><img title="Çàìîê äëÿ ðþêçàêà" src="https://img.new-combats.com/i/items/box_lock.gif"> Ââåäèòå ïàðîëü: <input id="relockInv" name="relockInv" type="password"><input type="submit" value="Îòêðûòü"></form></div>'; echo '<div align="center" style="padding:10px;background-color:#A5A5A5;"><form method="post" action="main.php?inv=1&otdel=' . $_GET['otdel'] . '&relockinvent"><b>Рюкзак закрыт.</b><br><img title="Замок для рюкзака" src="https://img.new-combats.com/i/items/box_lock.gif"> Введите пароль: <input id="relockInv" name="relockInv" type="password"><input type="submit" value="Открыть"></form></div>';
} ?> } ?>
</table> </table>
<!-- --> <!-- -->

File diff suppressed because it is too large Load Diff