battles/magic/antedot.php

27 lines
1.7 KiB
PHP
Raw Permalink 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
$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 "РС РЅРµ отравлены";
}