35 lines
1.4 KiB
PHP
35 lines
1.4 KiB
PHP
|
<?php
|
|||
|
$us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `date` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
|
|||
|
$travma = mysql_query("SELECT * FROM `effects` WHERE `owner` = '".$us['id']."' AND (`type`='11' OR `type`='12' OR `type`='13' OR `type`='14');");
|
|||
|
if ($user['battle'] > 0) {
|
|||
|
echo "Не в бою...";
|
|||
|
} elseif ($us['battle'] > 0) {
|
|||
|
echo "Персонаж в бою...";
|
|||
|
} elseif (!$travma) {
|
|||
|
echo "У персонажа нет травм...";
|
|||
|
} elseif ($user['room'] != $us['room']) {
|
|||
|
echo "Персонаж в другой комнате!";
|
|||
|
} elseif (!$us['online']) {
|
|||
|
echo "Персонаж не в игре!";
|
|||
|
} elseif ($user['align'] > 0 && $user['align'] < 9) {
|
|||
|
|
|||
|
if ($user['sex'] == 1) {$action="исцелил";}
|
|||
|
else {$action="исцелила";}
|
|||
|
if ($user['align'] > '2' && $user['align'] < '3') {
|
|||
|
$angel="Ангел";
|
|||
|
}
|
|||
|
elseif ($user['align'] > '1' && $user['align'] < '2') {
|
|||
|
$angel="Персонаж";
|
|||
|
}
|
|||
|
|
|||
|
addch("<img src=i/magic/cure3.gif> $angel "{$user['login']}" ".$action." от травм "{$_POST['target']}"");
|
|||
|
while ($owntravma=mysql_fetch_array($travma)) {
|
|||
|
deltravma($owntravma['id']);
|
|||
|
addActions(time(), 'heal_'.$owntravma['id'], 0, $user['id']);
|
|||
|
}
|
|||
|
$outok=1;
|
|||
|
|
|||
|
} else {
|
|||
|
echo "Что-то тут не то...";
|
|||
|
}
|
|||
|
?>
|