2018-01-28 16:40:49 +00:00
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
2020-09-30 12:30:00 +00:00
|
|
|
|
if (empty($_SESSION['uid'])) {
|
2020-09-30 12:01:33 +00:00
|
|
|
|
header("Location: index.php");
|
|
|
|
|
exit;
|
|
|
|
|
}
|
2020-09-30 12:30:00 +00:00
|
|
|
|
|
2020-09-30 12:01:33 +00:00
|
|
|
|
if($user['invis'] == 1) { $user['login'] = '<b><i>невидимка</i></b>'; }
|
|
|
|
|
if (($user->room > 2000) && ($user->room < 2100)) {echo "Не в Проходе...";}
|
2018-01-28 16:40:49 +00:00
|
|
|
|
else {
|
|
|
|
|
$magictime = (time()+10*60);
|
|
|
|
|
$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 {
|
|
|
|
|
|
2020-09-30 12:01:33 +00:00
|
|
|
|
if ($tar['room']==$user->room) {
|
2018-01-28 16:40:49 +00:00
|
|
|
|
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="Персонаж "{$user['login']}" $action путы на "$target"";
|
|
|
|
|
|
|
|
|
|
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>";
|
|
|
|
|
}}
|
2019-01-16 17:45:30 +00:00
|
|
|
|
|