Файл: DARK WARS/dark_war/place/finish.php
Строк: 29
<?php
if ($player->hp <= 0) {
$msg = "Вы потерпели поражение от $creep[name]";
if ($player->set_journal_place) {
$jo = new journal($player->id, $msg, 'После наподения');
}
mysql_query("UPDATE `dark_war_users` SET `hp` = '10', `energy` = (`energy`-'2') WHERE `id` = '{$player->id}'");
mysql_query("DELETE FROM `dark_war_attack_creep` WHERE `id_player` = '{$player->id}' LIMIT 1");
header ("Location: /dark_war/place/view.php?id=$creep[id_place]");
exit();
}
if ($ar['hp'] <= 0) {
$rand = mt_rand(50,100);
$gold = ceil($creep['max_gold'] * $rand / 100);
$silver = ceil($creep['max_silver'] * $rand / 100);
$expe = ceil($creep['max_expe'] * $rand / 100);
$msg = "Вы одержали победу над $creep[name] nr Вы получили nr Золото: $gold nr Серебро: $silver nr Опыт: $expe";
$se = new get_item();
if ($se->dis()) {
$msg .= "nТак же вы выбили предмет " . $se->dis();
}
if ($player->set_journal_place) {
$jo = new journal($player->id, $msg, 'После наподения');
}
mysql_query("UPDATE `dark_war_users` SET `present_level` = (`present_level`+'$expe'),
`silver` = (`silver`+'$silver'), `gold` = (`gold`+'$gold'), `energy` = (`energy`-'4'),
`max_creep_attack` = `max_creep_attack` + '1', `time_next_attack` = '".TIME."'
WHERE `id` = '{$player->id}'");
mysql_query("DELETE FROM `dark_war_attack_creep` WHERE `id_player` = '{$player->id}'");
header ("Location: /dark_war/place/view.php?id=$creep[id_place]");
exit();
}
?>