require_once get_file_loc('smr_sector.inc'); $sector = new SMR_SECTOR($player->sector_id, SmrSession::$game_id, SmrSession::$old_account_id); $good_id = $var["good_id"]; $good_name = $var["good_name"]; $amount = $_REQUEST['amount']; if (!is_numeric($amount)) { create_error("Numbers only please"); } if ($amount <= 0) { create_error("You must actually enter an ammount > 0!"); } //lets make sure there is actually that much on the ship if ($amount > $ship->cargo[$good_id]) { create_error("You can't dump more than you have."); } if ($sector->has_fed_beacon()) { create_error("You can't dump cargo in a Federal Sector!"); } if ($player->turns < 1) { create_error("You do not have enough turns to dump cargo!"); } require_once "shop_goods.inc"; // get the distance $good_distance = get_good_distance($good_id, "Buy"); $lost_xp = (round($amount / 30) + 1) * 2 * $good_distance; $player->experience -= $lost_xp; if ($player->experience < 0) { $player->experience = 0; } // take turn $player->take_turns(1);