Exemple #1
0
    $player = getUser($config);
    $player->town = getTown($config, $player);
    echo $msg . "<br/>";
}
if (!empty($_GET['add_skill'])) {
    require_once 'functions/HeroMgr.php';
    $HeroMgr = new HeroMgr();
    $msg = $HeroMgr->skill_add($config, $player, $_GET['add_skill']);
    $player = getUser($config);
    $player->town = getTown($config, $player);
    echo $msg . "<br/>";
}
if (!empty($_GET['stop'])) {
    require_once 'functions/HeroMgr.php';
    $HeroMgr = new HeroMgr();
    $msg = $HeroMgr->quest_stop($config, $player);
    $player = getUser($config);
    $player->town = getTown($config, $player);
    echo $msg . "<br/>";
}
if (!empty($_GET['type']) && $_GET['type'] == 'quests') {
    $quests = get_all("select * from quests");
    foreach ($quests as $quest) {
        echo "\n\t\t<h2>" . $quest->q_name . "</h2>\n\t\t\t<div class='messageWrapper'>\n\t\t\t\t<div class='userDetails'>\n\t\t\t\t\t<div class='avatar' style='width:102px'>\n\t\t\t\t\t<img src='themes/new/quests/" . $quest->q_id . ".jpg' alt='quest' style='width:102px'></div>\n\t\t\t\t\t<div class='details'><small></small></div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class='box message'>\n\t\t\t\t\t<p>Wyprawa trwa " . date("H:i:s", $quest->q_time - 3600) . "<br/></p>\n\t\t\t\t\t<p><br/>" . $quest->q_text . "</p>\n\t\t";
        if ($quest->q_exp > 0) {
            $quest->q_exp = floor($quest->q_exp * ($player->lvl + 1) * 1.77);
            echo "\n\t\t\t\t\t<p><br/>Za wykonanie misji otrzymasz " . $quest->q_exp . " doświadczenia</p>\n\t\t            ";
        }
        if ($quest->q_res > 0) {
            $quest->q_res = floor($quest->q_res * ($player->lvl + 1) * 1.77);
            echo "\n\t\t\t\t\t<p><br/>Za wykonanie misji otrzymasz " . $quest->q_res . " każdego z surowców</p>\n\t\t            ";