battles/magic/stop_200.php

47 lines
1.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
if ($_SESSION['uid'] == null) {
header("Location: index.php");
exit;
}
if($user['invis'] == 1) { $user['login'] = '<b><i>невидимка</i></b>'; }
if (($user->room > 2000) && ($user->room < 2100)) {echo "Не в Проходе...";}
else {
$magictime = (time()+10*60*10);
$target=$_POST['target'];
$tar = mysql_fetch_array(mysql_query("SELECT `id`,`align`,`room` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
if ($tar['id']) {
$effect = mysql_fetch_array(mysql_query("SELECT `time` FROM `effects` WHERE `owner` = '{$tar['id']}' and `type` = '10' LIMIT 1;"));
if ($effect['time']) {
echo "<font color=red><b>На персонаже \"$target\" уже есть путы </b></font>";
}
else {
if ($tar['room']==$user->room) {
if (mysql_query("INSERT INTO `effects` (`owner`,`name`,`time`,`type`) values ('".$tar['id']."','Паралич','$magictime',10);")) {
$ldtarget=$target;
if ($user['sex'] == 1) {$action="паролизовал";}
else {$action="паролизовала";}
$messch="Персонаж &quot;{$user['login']}&quot; $action &quot;$target&quot;";
addch("<img src=i/magic/chains.gif> $messch");
echo "<font color=red><b>Вы парализовали персонажа \"$target\"</b></font>";
$bet=1;
}
else {
echo "<font color=red><b>Произошла ошибка!<b></font>";
}
}
else {
echo "<font color=red><b>Персонаж в другой комнате<b></font>";
}
}
}
else {
echo "<font color=red><b>Персонаж \"$target\" не существует!<b></font>";
}}