$curr_attacker_ship = new SMR_SHIP($curr_attacker->account_id, SmrSession::$game_id); //this player has successfully shot the port. $db->query("SELECT * FROM player_attacks_port WHERE game_id = " . SmrSession::$game_id . " AND sector_id = {$sector->sector_id} AND account_id = {$curr_attacker->account_id}"); //is he already recorded? If so we don't want to lower the lvl of the port he is attacking. if (!$db->next_record()) { $db->query("REPLACE INTO player_attacks_port (game_id, account_id, sector_id, time, level) VALUES (" . SmrSession::$game_id . ", {$curr_attacker->account_id}, {$sector->sector_id}, {$time}, {$port->level})"); } $atts[] = $curr_att_id; // reduce his relations $curr_attacker->get_relations(); $curr_attacker->relations[$port->race_id] -= 5; if ($curr_attacker->relations[$port->race_id] < -500) { $curr_attacker->relations[$port->race_id] = -500; } // save what we got so far $curr_attacker->update(); // disable cloak $curr_attacker_ship->disable_cloak(); // the damage this attacker is going to do $attacker_damage = 0; // and his message array $damage_msg = array(); $weapon = new SmrMySqlDatabase(); $weapon->query("SELECT * FROM ship_has_weapon NATURAL JOIN weapon_type " . "WHERE account_id = {$curr_attacker->account_id} AND " . "game_id = {$curr_attacker->game_id} " . "ORDER BY order_id"); // iterate over all existing weapons while ($weapon->next_record()) { //vars $weapon_name = $weapon->f("weapon_name"); $shield_damage = $weapon->f("shield_damage"); $armor_damage = $weapon->f("armor_damage"); $accuracy = $weapon->f("accuracy");
<?php require_once get_file_loc("smr_planet.inc"); $planet = new SMR_PLANET($player->sector_id, $player->game_id); $planet_player = new SMR_PLAYER($var["account_id"], SmrSession::$game_id); $owner = new SMR_PLAYER($planet->owner_id, $player->game_id); if ($owner->alliance_id != $player->alliance_id) { create_error("You can not kick someone off a planet your alliance does not own!"); } $message = "You have been kicked from {$planet->planet_name} in #{$player->sector_id}"; $player->send_message($planet_player->account_id, 2, format_string($message, false)); $planet_player->land_on_planet = "FALSE"; //update their last active time so that they are visable if kicked $worst = time() - 1500; if ($planet_player->last_active < $worst) { $planet_player->last_active = $worst; } $planet_player->update(); forward(create_container("skeleton.php", "planet_main.php"));
require_once get_file_loc("smr_port.inc"); require_once get_file_loc('smr_sector.inc'); $player = new SMR_PLAYER(SmrSession::$old_account_id, SmrSession::$game_id); $ship = new SMR_SHIP(SmrSession::$old_account_id, SmrSession::$game_id); $sector = new SMR_SECTOR($player->sector_id, SmrSession::$game_id, SmrSession::$old_account_id); // update turns on that player $player->update_turns($ship->speed); // we cant move if we are dead //check if we are in kill db...if we are we don't do anything $db->query("SELECT * FROM kills WHERE dead_id = {$player->account_id} AND game_id = {$player->game_id}"); if (!$db->next_record()) { if ($ship->hardware[HARDWARE_SHIELDS] == 0 && $ship->hardware[HARDWARE_ARMOR] == 0 && ($var["body"] != "trader_attack.php" && $var["url"] != "trader_attack_processing.php" && $var["body"] != "port_attack.php" && $var["url"] != "port_attack_processing.php" && $var["body"] != "planet_attack.php" && $var["url"] != "planet_attack_processing.php")) { $player->sector_id = $player->get_home(); $player->newbie_turns = 100; $player->mark_dead(); $player->update(); $ship->get_pod(); //print("$var[body], $var[url]"); $container = array(); $container["url"] = "skeleton.php"; $container["body"] = "current_sector.php"; forward($container); } } elseif (!isset($var["ahhh"])) { $db->query("SELECT * FROM kills WHERE dead_id = {$player->account_id} AND processed = 'TRUE' AND game_id = {$player->game_id}"); if ($db->next_record() && $var["body"] != "trader_attack.php") { $container = array(); $container["url"] = "skeleton.php"; $container["body"] = "death.php"; $container["ahhh"] = "Yes"; forward($container);