41 lines
1.8 KiB
PHP
41 lines
1.8 KiB
PHP
<?
|
|
if(!defined('GAME'))
|
|
{
|
|
die();
|
|
}
|
|
|
|
if($p['useuntravm']==1)
|
|
{
|
|
$uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['logingo']).'" LIMIT 1'));
|
|
if(isset($uu['id']))
|
|
{
|
|
$trvm = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE (`id_eff` = "4" OR `id_eff` = "5") AND `uid` = "'.$uu['id'].'" AND `delete` = "0" LIMIT 1'));
|
|
if($uu['battle'] > 0) {
|
|
$uer = 'Ïåðñîíàæ íàõîäèòñÿ â ïîåäèíêå.<br>';
|
|
}elseif(!isset($trvm['id']) || $trvm['v1'] == 4) {
|
|
$uer = 'Ó ïåðñîíàæà íåò òðàâìû ëèáî îíà íå èçëå÷èìà.<br>';
|
|
}else{
|
|
$upd = mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'" WHERE (`id_eff` = "4" OR `id_eff` = "5") AND `uid` = "'.$uu['id'].'" AND `delete` = "0"');
|
|
if($upd)
|
|
{
|
|
$sx = '';
|
|
if($u->info['sex']==1)
|
|
{
|
|
$sx = 'à';
|
|
}
|
|
$rtxt = '[img[items/cure3.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')");
|
|
$rtxt = $rang.' "'.$u->info['login'].'" èçëå÷èë'.$sx.' îò òðàâì';
|
|
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
|
$uer = 'Âû óñïåøíî èçëå÷èëè ïåðñîíàæó "'.$uu['login'].'" îò òðàâì.';
|
|
}else{
|
|
$uer = 'Íå óäàëîñü èñïîëüçîâàòü äàííîå çàêëÿòèå';
|
|
}
|
|
}
|
|
}else{
|
|
$uer = 'Ïåðñîíàæ íå íàéäåí â ýòîì ãîðîäå';
|
|
}
|
|
}else{
|
|
$uer = 'Ó Âàñ íåò ïðàâ íà èñïîëüçîâàíèå äàííîãî çàêëÿòèÿ';
|
|
}
|
|
?>
|