21 lines
1.1 KiB
PHP
21 lines
1.1 KiB
PHP
<?php
|
||
$effect = mysql_fetch_array(mysql_query("SELECT `id` FROM `effects` WHERE `owner` = '{$user['id']}' AND `can` = '1' LIMIT 1"));
|
||
$vip = mysql_fetch_array(mysql_query('SELECT `id`, `uid`, `unsleep` FROM `abils_vip` WHERE `uid` = "'.$user['id'].'" LIMIT 1'));
|
||
|
||
if($vip['unsleep'] <= 0) {
|
||
echo 'Магия была исчерпана ...';
|
||
} elseif($_POST['target'] != $user['login']) {
|
||
echo 'Только на себя ...';
|
||
} elseif($user['battle'] > 0) {
|
||
echo "Не в бою ...";
|
||
} elseif(!isset($effect['id'])) {
|
||
echo "Нечего снимать...";
|
||
} else {
|
||
if($user['invis'] == 1) { $user['login'] = 'невидимка'; }
|
||
mysql_query("DELETE FROM `effects` WHERE `owner` = '".$user['id']."' AND `id` = '".$effect['id']."' LIMIT 1");
|
||
$vip['unsleep'] -= 1;
|
||
mysql_query('UPDATE `abils_vip` SET `unsleep` = "'.$vip['unsleep'].'" WHERE `id` = "'.$vip['id'].'" LIMIT 1');
|
||
echo "<font color=red><b>На персонажа \"{$user['login']}\" наложено заклятие \"Снять заклятие молчания\" </b></font>";
|
||
}
|
||
?>
|