game/_incl_data/class/magic/noose.php
2022-06-07 00:30:34 +03:00

28 lines
1.3 KiB
PHP

<?
if(!defined('GAME'))
{
die();
}
if($u->info['login'] == $usr['login']) {
$u->error = 'Íåëüçÿ èñïîëüçîâàòü íà ñåáÿ!';
}elseif($usr['room']==217 || $usr['room']==218 || $usr['room']==219) {
$u->error = 'Ïåðñîíàæ '.$u->microLogin($usr['id'],1).' íàõîäèòñÿ â Îáùåæèòèè!';
}elseif($usr['dnow'] > 0 ) {
$u->error = 'Ïåðñîíàæ '.$u->microLogin($usr['id'],1).' íàõîäèòñÿ â Ïîäçåìåëüå';
}elseif($usr['real']==1) {
$u->error = 'Ïåðåìåùàòü ìîæíî òîëüêî ðåàëüíûõ èãðîêîâ!';
}elseif($usr['bot'] > 0) {
$u->error = 'Âû íå ìîæåòå ïîéìàòü áîòà ;)';
}elseif($usr['battle'] > 0) {
$u->error = 'Ïåðñîíàæ '.$u->microLogin($usr['id'],1).' íàõîäèòñÿ â ïîåäèíêå';
}elseif($usr['room']==274) {
$u->error = 'Ïåðñîíàæ '.$u->microLogin($usr['id'],1).' íàõîäèòñÿ â Çàòî÷åíèè!';
}elseif($usr['online']<time()-520) {
$u->error = 'Ïåðñîíàæ íå â ñåòè';
}else{
mysql_query('UPDATE `users` SET `room` = "'.$u->info['room'].'" WHERE `id` = "'.$usr['id'].'" LIMIT 1');
$u->error = 'Óñïåøíî!';
$txt = '[img[items/noose.gif]] Ïåðñîíàæ '.$u->info['login'].' ïîéìàë ïåðñîíàæà '.$usr['login'].' ñ ïîìîùüþ çàêëÿòèÿ Àðêàíû';
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$txt."','".time()."','6','0','1')");
}
?>