2022-06-06 21:30:34 +00:00
< ?
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 ) {
2023-01-10 16:29:32 +00:00
$uer = 'Персонаж находится в поединке.<br>' ;
2022-06-06 21:30:34 +00:00
} elseif ( ! isset ( $trvm [ 'id' ]) || $trvm [ 'v1' ] == 4 ) {
2023-01-10 16:29:32 +00:00
$uer = 'У персонажа нет травмы либо она не излечима.<br>' ;
2022-06-06 21:30:34 +00:00
} 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 )
{
2023-01-10 16:29:32 +00:00
$sx = 'а ' ;
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
$rtxt = '[img[items/cure3.gif]] ' . $rang . ' "' . $u -> info [ 'cast_login' ] . '" излечил' . $sx . ' персонажа "' . $uu [ 'login' ] . '" от травм.' ;
2023-01-28 02:24:37 +00:00
$cmsg = new ChatMessage ();
$cmsg -> setCity ( $u -> info [ 'city' ]);
$cmsg -> setRoom ( $u -> info [ 'room' ]);
$cmsg -> setText ( $rtxt );
$cmsg -> setType ( 6 );
$cmsg -> setTypeTime ( 1 );
( new Chat ()) -> sendMsg ( $cmsg );
2023-01-10 16:29:32 +00:00
$rtxt = $rang . ' "' . $u -> info [ 'login' ] . '" излечил' . $sx . ' от травм' ;
2022-06-06 21:30:34 +00:00
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) " );
2023-01-10 16:29:32 +00:00
$uer = 'Вы успешно излечили персонажу "' . $uu [ 'login' ] . '" от травм.' ;
2022-06-06 21:30:34 +00:00
} else {
2023-01-10 16:29:32 +00:00
$uer = 'Н е удалось использовать данное заклятие' ;
2022-06-06 21:30:34 +00:00
}
}
} else {
2023-01-10 16:29:32 +00:00
$uer = 'Персонаж не найден в этом городе' ;
2022-06-06 21:30:34 +00:00
}
} else {
2023-01-10 16:29:32 +00:00
$uer = 'У В а с нет прав на использование данного заклятия' ;
2022-06-06 21:30:34 +00:00
}
?>