2022-06-06 21:30:34 +00:00
< ?
if ( ! defined ( 'GAME' )) {
die ();
}
2023-01-10 16:29:32 +00:00
//выбираем эффект жертвы $usr
2022-06-06 21:30:34 +00:00
$eff = mysql_fetch_array ( mysql_query ( 'SELECT * FROM `eff_users` WHERE `id_eff` = "309" AND `uid` = "' . $usr [ 'id' ] . '" AND `delete` = "0" LIMIT 1' ));
2023-01-10 16:29:32 +00:00
//эффект свой
2022-06-06 21:30:34 +00:00
$eff_users = mysql_fetch_array ( mysql_query ( 'SELECT * FROM `eff_users` WHERE `id_eff` = "309" AND `uid` = "' . $u -> info [ 'id' ] . '" AND `delete` = "0" LIMIT 1' ));
2023-01-10 16:29:32 +00:00
//эффект защиты от вора
2022-06-06 21:30:34 +00:00
$no_vor = mysql_fetch_array ( mysql_query ( 'SELECT * FROM `eff_users` WHERE `id_eff` = "459" AND `uid` = "' . $usr [ 'id' ] . '" AND `delete` = "0" LIMIT 1' ));
if ( $u -> info [ 'login' ] == $usr [ 'login' ]) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Глупец, ты не можешь украсть сам у себя ;)' ;
2022-06-06 21:30:34 +00:00
} elseif ( isset ( $no_vor [ 'id' ])) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Персонаж ' . $usr [ 'login' ] . ' не дремлет, будьте осторожны' ;
2022-06-06 21:30:34 +00:00
} elseif ( $usr [ 'battle' ] > 0 ) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Персонаж ' . $usr [ 'login' ] . ' в поединке!' ;
2022-06-06 21:30:34 +00:00
} elseif ( ! isset ( $eff [ 'id' ])) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Н а персонаже ' . $usr [ 'login' ] . ' нету эффекта "Нектар Разума"' ;
2022-06-06 21:30:34 +00:00
} elseif ( $eff_users [ 'name' ] && $eff_users [ 'delete' ] == 0 ) {
2023-01-10 16:29:32 +00:00
$u -> error = 'У вас есть Нектар Разума' ;
2022-06-06 21:30:34 +00:00
} else {
2023-01-10 16:29:32 +00:00
//воруем эффект
2022-06-06 21:30:34 +00:00
mysql_query ( 'UPDATE `eff_users` SET `uid` = "' . $u -> info [ 'id' ] . '" WHERE `uid` = "' . $usr [ 'id' ] . '" AND `name` = "' . $eff [ 'name' ] . '" LIMIT 1' );
2023-01-10 16:29:32 +00:00
$u -> error = 'Вы украли эффект ' . $eff [ 'name' ] . ' у персонажа ' . $usr [ 'login' ] . '!' ;
//отправляем системку
mysql_query ( " INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','',' " . $usr [ 'login' ] . " ',' Персонаж <b> " . $u -> info [ 'login' ] . " </b>украл у вас эффект " . $eff [ 'name' ] . " .','-1','6','0') " );
$txt = '<font color=red>Внимание!</font> <b>' . $u -> info [ 'login' ] . '</b> украл эффект <b>' . $eff [ 'name' ] . '</b> у персонажа <b>' . $usr [ 'login' ] . '</b>' ;
2022-06-06 21:30:34 +00:00
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') " );
2023-01-10 16:29:32 +00:00
//уменьшаем износ
2022-06-06 21:30:34 +00:00
mysql_query ( 'UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm [ 'id' ] . ' LIMIT 1' );
}
?>