room['file'] != 'ab/hram') { exit(); } require_once $_SERVER['DOCUMENT_ROOT'] . '/_incl_data/class/Insallah/Runes/Runes.php'; $qst_hram = true; if (isset($_GET['itm']) && $qst_hram && $_GET['itm'] > 0) { if ($_GET['r'] == 1) { $_GET['itm'] = (int)$_GET['itm']; //Переплавка вещей $resz = $u->plavka($_GET['itm'], 1); $re = '' . $resz . ''; unset($resz); } elseif ($_GET['r'] == 2) { //Переплавка рун $resz = ''; $itm123 = explode('x', $_GET['itm']); $itm1 = round((int)$itm123[0]); $itm2 = round((int)$itm123[1]); $itm3 = round((int)$itm123[2]); $itm1 = 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($itm1) . '" AND `a`.`uid` = "' . $u->info['id'] . '" AND `a`.`delete` = 0 AND `a`.`inShop` = 0 AND `a`.`inTransfer` = 0 LIMIT 1')); $itm2 = 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($itm2) . '" 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']) { $resz = 'Не удалось расплавить одну руну, она не сгорела.'; } elseif (!isset($itm1['id']) || !isset($itm2['id']) || !isset($itm3['id'])) { $resz = 'Недостаточно компонентов для преобразования.'; } elseif ($itm1['level'] != $itm2['level'] || $itm1['level'] != $itm3['level']) { $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) { $newRuneLevel = 0; $newitm = 0; if ($itm1['item_id'] == 10038 && $itm2['item_id'] == 10038 && $itm3['item_id'] == 10038 && $u->rep['rep1'] > 100) { $newitm = 6001; $newRuneLevel = 8; mysql_query('UPDATE `users_achiv` SET `rp`= `rp`+1 WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); } elseif ($itm1['item_id'] == 10039 && $itm2['item_id'] == 10039 && $itm3['item_id'] == 10039 && $u->rep['rep1'] > 1000) { $newitm = 6002; $newRuneLevel = 9; mysql_query('UPDATE `users_achiv` SET `rn`= `rn`+1 WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); } elseif ($itm1['item_id'] == 10040 && $itm2['item_id'] == 10040 && $itm3['item_id'] == 10040 && $u->rep['rep1'] > 10000) { $newitm = 6003; $newRuneLevel = 10; mysql_query('UPDATE `users_achiv` SET `rb`= `rb`+1 WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); } $newRune = \Insallah\Runes::get($newRuneLevel); if (!empty($newRune)) { $u->addItem($newitm, $u->info['id'], $newRune[0]); $resz = $newRune[1]; 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) { $u->repexp_add($u->info['id'], 10); //Репутация плавка рун +10 } } } else { $resz = 'Заготовки должны быть одного уровня или у вас недостаточен уровень прокачки храма знаний!'; } } elseif ($itm1['level'] == 1) { //$resz = 'Унируны нельзя преобразовывать'; $itm4 = []; $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'); while ($pl = mysql_fetch_array($sp)) { $itm4[] = $pl; } $itm4 = $itm4[rand(0, count($itm4) - 1)]; mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $itm3['iid'] . '" OR `id` = "' . $itm2['iid'] . '" OR `id` = "' . $itm1['iid'] . '"'); $u->addItem($itm4['id'], $u->info['id']); $resz = 'Удачно преобразованы руны "' . $itm1['name'] . '","' . $itm2['name'] . '" и "' . $itm3['name'] . '" в "' . $itm4['name'] . '".'; } else { $itm4 = []; $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'] . '"'); while ($pl = mysql_fetch_array($sp)) { $itm4[] = $pl; } $itm4 = $itm4[rand(0, count($itm4) - 1)]; mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `id` = "' . $itm3['iid'] . '" OR `id` = "' . $itm2['iid'] . '" OR `id` = "' . $itm1['iid'] . '"'); $u->addItem($itm4['id'], $u->info['id']); $resz = 'Удачно преобразованы руны "' . $itm1['name'] . '","' . $itm2['name'] . '" и "' . $itm3['name'] . '" в "' . $itm4['name'] . '".'; } $re = '' . $resz . ''; unset($resz); } ?>
if (isset($_GET['r'])) { ?>
Храм Знаний if ($_GET['r'] == 2) {
echo ', Алтарь рун';
} elseif ($_GET['r'] == 1) {
echo ', Алтарь предметов';
} ?>
if ($re != '') {
echo '' . $re . '';
} ?>
|
|
$usee = $u->getInfoPers($u->info['id'], 0); if ($usee) { echo $usee[0]; } else { echo 'information is lost.'; } ?> | include('modules_data/stats_loc.php'); ?> |
= !empty($re) ? '' . $re . '' : '' ?>
src="https://img.new-combats.com/city/ap_exit.gif"
width="57" height="26" class="aFilter"/>
onclick="location.href='main.php?r=1'" } ?>
title="Алтарь Предметов"
src="https://img.new-combats.com/city/ap_altar1.gif"
width="147" height="93" class="aFilter"/>
onclick="location.href='main.php?r=2'" } ?>
title="Алтарь Рун"
src="https://img.new-combats.com/city/ap_altar2.gif"
width="147" height="93" class="aFilter"/>
src="https://img.new-combats.com/city/ap_exit.gif"
width="57" height="26" class="aFilter"/>
= $goline ?> |
= $u->microLogin($u->info['id'], 1) ?> | Подходящие предметы в инвентаре |
Репутация: echo 0 + $u->rep['rep1']; ?>
Внимание! Предметы при растворении и заготовки при слиянии необратимо теряются. |
|
= $u->microLogin($u->info['id'], 1) ?> | Подходящие предметы в инвентаре | |||
Репутация: echo 0 + $u->rep['rep1']; ?>
Внимание! Предметы при растворении и заготовки при слиянии необратимо теряются. |
|