if ($ar[0] == 1) { myquery("UPDATE game_items SET item_uselife='{$weight}', item_cost=1 WHERE id=" . $ar[1] . ""); $Item->setOpis($ar[1], $to_opis); //c весом юзера еще посмотрим myquery("UPDATE game_users SET CW = CW+'{$weight}' WHERE user_id = " . $user_id . ""); } } else { //echo 'Старое!'; //апдейтим предмет $item = mysql_fetch_array($items); if ($item['item_cost'] + 1 == $quest['par1_value']) { myquery("UPDATE quest_engine_users SET done=1 WHERE quest_type=2 AND user_id='{$user_id}' AND quest_owner_id=" . $quest['quest_owner_id'] . "") or die(mysql_error()); } myquery("UPDATE game_items SET item_cost=item_cost+1, item_uselife=item_uselife+'{$weight}' WHERE user_id='{$user_id}' AND item_for_quest=" . $quest['quest_owner_id'] . "") or die(mysql_error()); $Opis = new Item($item['id']); $opis_buf = $Opis->getOpis(); $opis_buf .= ", " . $to_opis; $Opis->setOpis($item['id'], $opis_buf); //с весом перса еще предстоит разбираться myquery("UPDATE game_users SET CW = CW+'{$weight}' WHERE user_id = " . $user_id . ""); } /*if($check==0) { //$name=''.$quest['par1_name'].' монстра: 1 штука.'; $Item = new Item(); $ar = $Item->add_user($id_item_part_monster,$user_id,0,$quest['quest_owner_id']); if($ar[0]==1) { $weight = $npc['npc_max_hp']/100; myquery("UPDATE game_items SET item_uselife='$weight', item_cost=1 WHERE id=".$ar[1].""); }
} echo '<hr color="#5A5A5A" style="clear: both;"/><span style="margin-left: 2px; float: left;">Прочность:</span> <span style="float: right;"><font face="verdana" color="' . $color . '">' . $Item->item['item_uselife'] . '%</font></span> <br style="clear: both;"/><span style="margin-left: 2px; float: left;">Долговечность:</span> <span style="float: right;"><font face="verdana">' . $Item->item['item_uselife_max'] . ' / ' . $Item->fact['item_uselife_max'] . '</font></span>'; } } else { if ($player_kuzn) { $color = "#FF0000"; if ($Item->item['item_uselife'] == 100) { $color = "#00FF00"; } elseif ($Item->item['item_uselife'] >= $kuzn_border_by_level) { $color = "#FFFF00"; } echo '<hr color="#5A5A5A" style="clear: both;"/><span style="margin-left: 2px; float: left;">Прочность:</span> <span style="float: right;"><font face="verdana" color="' . $color . '">' . $Item->item['item_uselife'] . '%</font></span> <br style="clear: both;"/><span style="margin-left: 2px; float: left;">Долговечность:</span> <span style="float: right;"><font face="verdana">' . $Item->item['item_uselife_max'] . ' / ' . $Item->fact['item_uselife_max'] . '</font></span>'; } echo '<br style="clear: both;"/><hr color="#5A5A5A"/><span style="margin-left:2px; float: left;">Описание:</span><span style="float: right; text-align: right;">' . $Item->getOpis() . "</span>"; } echo '</td> <td style="width:7px;" background="http://' . img_domain . '/nav/quote/quote_rt.gif"><img src="http://' . img_domain . '/nav/x.gif" width="1" height="1" border="0"></td> </tr> <tr> <td style="width:7px;"><img src="http://' . img_domain . '/nav/quote/quote_dl.gif" width="7" height="7" border="0" alt=""></td> <td background="http://' . img_domain . '/nav/quote/quote_bt.gif"><img src="http://' . img_domain . '/nav/x.gif" width="1" height="1" border="0"></td> <td style="width:7px;"><img src="http://images.rpg.su/nav/quote/quote_dr.gif" width="7" height="7" border="0" alt=""></td> </tr> </table>'; if ($is_clan_town && $n == 3) { $n = 0; echo '<br style="clear: both;">'; } }
$selname = myquery("SELECT name FROM game_users_archive WHERE user_id=" . $Item->getItem('user_id') . ""); } list($name_from) = mysql_fetch_array($selname); $selname = myquery("SELECT name FROM game_users WHERE user_id=" . $Item->getItem('post_to') . ""); if (!mysql_num_rows($selname)) { $selname = myquery("SELECT name FROM game_users_archive WHERE user_id=" . $Item->getItem('post_to') . ""); } list($name_to) = mysql_fetch_array($selname); echo '<br><font color="#ffff00">' . $Item->getFact('name') . '</font></div><center>'; echo 'Доступен до:<br><b>' . $left_time . '</b>'; echo '</center></td><td width=150 valign="top"><div align="left"><img src="http://' . img_domain . '/nav/x.gif" width="0" height="0" hspace="40" border="0"><br> Отправитель: <font size=1 face=verdana color=ff0000><b>' . $name_from . '</b></font><br> Получатель: <font size=1 face=verdana color=ff0000><b>' . $name_to . '</b></font><br><br>'; $Item->info(0, 0, 1); echo '<br><br><input type="button" value="Забрать посылку" onClick=location.replace("town.php?option=' . $option . '&town_id=' . $town . '&do=buy&it=' . $items['id'] . '")>'; echo '</div></td><td valign=top>Описание:<br>' . $Item->getOpis() . ''; if ($char['name'] == 'The_Elf' or $char['name'] == 'blazevic') { echo '<br><br><br><input type="button" value="Вернуть владельцу" onClick=location.replace("town.php?option=' . $option . '&town_id=' . $town . '&do=del&it=' . $items['id'] . '")>'; } echo '</td></tr></table></td></tr></table>'; } } elseif ($do == 'del') { $sel = myquery("select user_id from game_items where priznak=3 and id='{$it}'"); list($userid) = mysql_fetch_array($sel); if ($char['name'] == 'The_Elf' or $char['name'] == 'blazevic' or $char['user_id'] == $userid) { $Item = new Item($items['id']); $Item->del_market(0, $userid); $town_select = myquery("select rustown from game_gorod where town='{$town}'"); list($rustown) = mysql_fetch_array($town_select); $ma = myquery("INSERT INTO game_pm (komu, otkogo, theme, post, view, time) VALUES ('{$userid}', '0', 'Почтовая служба', 'Твой предмет " . $Item->getFact('name') . " снят со склада почтовой службы в городе " . $rustown . "! он возвращен в твой инвентарь','0','" . time() . "')"); echo '<br/>Вещь возвращена владельцу<br/><br/><meta http-equiv="refresh" content="1;url=town.php?option=' . $option . '">';