Exemplo n.º 1
0
$db->query("SELECT * FROM player WHERE game_id = {$player->game_id} AND " . "sector_id = " . $var["target_sector"] . " AND " . "last_active > {$last_active} AND " . "land_on_planet = 'FALSE' AND " . "account_id NOT IN (" . implode(',', $HIDDEN_PLAYERS) . ")");
while ($db->next_record()) {
    // we may skip player if this is a protected gal.
    if ($sector->is_protected_gal()) {
        $curr_account = new SMR_ACCOUNT();
        $curr_account->get_by_id($db->f("account_id"));
        // if one is vet and the other is newbie we skip it
        if (different_level($rank_id, $curr_account->get_rank(), $account->veteran, $curr_account->veteran)) {
            continue;
        }
    }
    $curr_player = new SMR_PLAYER($db->f("account_id"), $player->game_id);
    $curr_ship = new SMR_SHIP($db->f("account_id"), $player->game_id);
    // he's a friend if he's in our alliance (and we are not in a 0 alliance
    if ($player->alliance_id != 0 && $curr_player->alliance_id == $player->alliance_id) {
        $friendly_vessel += $curr_ship->attack_rating();
    } else {
        $enemy_vessel += $curr_ship->defense_rating() * 10;
    }
}
print "<p>";
print "<table cellspacing=\"0\" cellpadding=\"3\" border=\"0\" class=\"standard\">";
print "<tr>";
print "<th>&nbsp;</th>";
print "<th align=\"center\">Scan Results</th>";
print "</tr>";
print "<tr>";
print "<td>Friendly vessels</td>";
print "<td align=\"center\">{$friendly_vessel}</td>";
print "</tr>";
print "<tr>";
Exemplo n.º 2
0
print "<td valign=\"top\">";
if ($attacker_list == "()") {
    print "&nbsp;";
} else {
    $db->query("SELECT * FROM player WHERE game_id = " . SmrSession::$game_id . " AND " . "account_id IN {$attacker_list}");
    while ($db->next_record()) {
        $curr_player = new SMR_PLAYER($db->f("account_id"), SmrSession::$game_id);
        $curr_ship = new SMR_SHIP($db->f("account_id"), SmrSession::$game_id);
        print "{$player->level_name}<br>";
        print "<span style=\"color:yellow;\">{$curr_player->player_name} ({$curr_player->player_id})</span><br>";
        print "Race: {$curr_player->race_name}<br>";
        print "Level: {$curr_player->level_id}<br>";
        print "Alliance: {$curr_player->alliance_name}<br><br>";
        print "<small>";
        print "{$curr_ship->ship_name}<br>";
        print "Rating : " . $curr_ship->attack_rating() . "/" . $curr_ship->defense_rating() . "<br>";
        print "Shields : " . $curr_ship->shield_low() . "-" . $curr_ship->shield_high() . "<br>";
        print "Armor : " . $curr_ship->armor_low() . "-" . $curr_ship->armor_high() . "<br>";
        print "Hard Points: {$curr_ship->weapon_used}<br>";
        print "Combat Drones: " . $curr_ship->combat_drones_low() . "-" . $curr_ship->combat_drones_high();
        print "</small><br><br><br>";
    }
}
print "</td>";
print "<td valign=\"top\">";
// ********************************
// *
// * F o r c e s
// *
// ********************************
if ($attacker->alliance_id != 0 && $forces_owner->alliance_id == $attacker->alliance_id) {