38 lines
1.3 KiB
PHP
38 lines
1.3 KiB
PHP
<?
|
|
if(!defined('GAME'))
|
|
{
|
|
die();
|
|
}
|
|
|
|
if($p['heal'] == 1)
|
|
{
|
|
$uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['logingo']).'" LIMIT 1'));
|
|
if(isset($uu['id']))
|
|
{
|
|
if($uu['city']!=$u->info['city'] && $p['citym1']==0){
|
|
$uer = 'Ïåðñîíàæ íàõîäèòñÿ â äðóãîì ãîðîäå';
|
|
}elseif($uu['battle']>0){
|
|
$uer = 'Ïåðñîíàæ íàõîäèòñÿ â ïîåäèíêå';
|
|
}else{
|
|
$upd = mysql_query('UPDATE `stats` SET `hpNow` = `hpNow` + "1200" WHERE `id` = "'.$uu['id'].'" LIMIT 1');
|
|
if($upd)
|
|
{
|
|
$sx = '';
|
|
if($u->info['sex']==1)
|
|
{
|
|
$sx = 'à';
|
|
}
|
|
$rtxt = '[img[items/cureHP120.gif]] '.$rang.' "'.$u->info['cast_login'].'" âîññòàíîâèë'.$sx.' çäîðîâüå ïåðñîíàæà "'.$uu['login'].'"';
|
|
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
|
$uer = 'Âû óñïåøíî âîññòàíîâèëè çäîðîâüå ïåðñîíàæà "'.$uu['login'].'".';
|
|
}else{
|
|
$uer = 'Íå óäàëîñü èñïîëüçîâàòü äàííîå çàêëÿòèå';
|
|
}
|
|
}
|
|
}else{
|
|
$uer = 'Ïåðñîíàæ íå íàéäåí â ýòîì ãîðîäå';
|
|
}
|
|
}else{
|
|
$uer = 'Ó Âàñ íåò ïðàâ íà èñïîëüçîâàíèå äàííîãî çàêëÿòèÿ';
|
|
}
|
|
?>
|