Exemplo n.º 1
0
    forward(create_container("skeleton.php", $var["target_page"]));
}
// get from and to sectors
$from = $player->sector_id;
if (empty($to) || $to == '') {
    create_error("Where do you want to go today?");
}
// initialize random generator.
mt_srand((double) microtime() * 1000000);
// get our rank
$rank_id = $account->get_rank();
// you can't move while on planet
if ($player->land_on_planet == "TRUE") {
    create_error("You are on a planet! You must launch first!");
}
if ($sector->has_forces()) {
    $db->query("SELECT * FROM sector_has_forces, player " . "WHERE sector_has_forces.game_id = player.game_id AND " . "sector_has_forces.owner_id = player.account_id AND " . "sector_has_forces.game_id = {$player->game_id} AND " . "sector_has_forces.sector_id = {$player->sector_id} AND " . "mines > 0 AND " . "owner_id != {$player->account_id} AND " . "(alliance_id != {$player->alliance_id} OR alliance_id = 0)");
    while ($db->next_record()) {
        // we may skip forces if this is a protected gal.
        if ($sector->is_protected_gal()) {
            $forces_account = new SMR_ACCOUNT();
            $forces_account->get_by_id($db->f("owner_id"));
            // if one is vet and the other is newbie we skip it
            if (different_level($rank_id, $forces_account->get_rank(), $account->veteran, $forces_account->veteran)) {
                continue;
            }
        }
        create_error("You cant jump when there are unfriendly forces in the sector!");
    }
}
// check for turns