game/modules_data/moder/usempa.php
2022-06-07 00:30:34 +03:00

38 lines
1.2 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 `mpNow` = `mpNow` + "1200" WHERE `id` = "'.$uu['id'].'" LIMIT 1');
if($upd)
{
$sx = '';
if($u->info['sex']==1)
{
$sx = 'à';
}
$rtxt = '[img[items/cureMana1000.gif]] '.$rang.' &quot;'.$u->info['cast_login'].'&quot; âîññòàíîâèë'.$sx.' ìàíó ïåðñîíàæà &quot;'.$uu['login'].'&quot;';
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 = 'Ó Âàñ íåò ïðàâ íà èñïîëüçîâàíèå äàííîãî çàêëÿòèÿ';
}
?>