27 lines
1.7 KiB
PHP
27 lines
1.7 KiB
PHP
<?php
|
||
$defaultEffects = mysql_fetch_assoc(mysql_query("SELECT id, name FROM effects WHERE type = 9994 AND owner = " . $user['id'] . " ORDER BY id DESC"));
|
||
$chaosEffects = mysql_fetch_array(mysql_query('SELECT * FROM `laba_act` WHERE `uid` = "' . $user['id'] . '" AND `lib` = "' . $user['laba'] . '" AND `time` > "'.time().'" AND `vars` = "trap1" ORDER BY `time` DESC LIMIT 1'));
|
||
if ($defaultEffects) {
|
||
global $nodrink;
|
||
if (in_array($user["room"],$nodrink)) {
|
||
echo "Здесь запрещено пить эликсиры!";
|
||
} elseif ($user['battle'] > 0) {
|
||
echo "РќРµ РІ Р±РѕСЋ...";
|
||
} else {
|
||
mysql_query('DELETE FROM effects WHERE id = ' . $defaultEffects['id']);
|
||
echo "Вы успешно вылечены от яда " . $defaultEffects['name'];
|
||
addchp ('<font color=red>Внимание!</font> Вы успешно вылечены от яда <b>' . $defaultEffects['name'] . '</b>', '{[]}'.$user['login'].'{[]}');
|
||
$bet=1;
|
||
}
|
||
} else if ($chaosEffects) {
|
||
if ($user['battle'] > 0) {
|
||
echo "РќРµ РІ Р±РѕСЋ...";
|
||
} else {
|
||
mysql_query('DELETE FROM `laba_act` WHERE `id` = "'.$chaosEffects['id'].'"');
|
||
echo "Вы успешно сняли путы";
|
||
addchp ('<font color=red>Внимание!</font> Вы успешно сняли путы', '{[]}'.$user['login'].'{[]}');
|
||
$bet=1;
|
||
}
|
||
} else {
|
||
echo "Вы не отравлены";
|
||
} |