<?php require_once dirname(__FILE__) . '/../classes/WarOfNations2.class.php'; require_once dirname(__FILE__) . '/../classes/data/DataLoad.class.php'; if (count($argv) == 2) { $world = $argv[1]; echo "Got Command Line Argument for World [{$world}]\r\n"; } else { $world = 13; echo "No Command Line Argument Found. Using Default World [{$world}]\r\n"; } $won = new WarOfNations(); $won->setDataLoadId(DataLoadDAO::initNewLoad($won->db, 'JOIN_WORLD', 0, "World {$world}")); DataLoadDAO::startLoad($won->db, $won->data_load_id); $won->JoinNewWorld($world); DataLoadDAO::loadComplete($won->db, $won->data_load_id);
<?php require_once dirname(__FILE__) . '/../classes/WarOfNations2.class.php'; require_once dirname(__FILE__) . '/../classes/data/DataLoad.class.php'; $won = new WarOfNations(); $won->setDataLoadId(DataLoadDAO::initNewLoad($won->db, 'TEST_AUTHENTICATE2', 0)); DataLoadDAO::startLoad($won->db, $won->data_load_id); $won->Authenticate(); DataLoadDAO::loadComplete($won->db, $won->data_load_id);
<?php require_once dirname(__FILE__) . '/../classes/WarOfNations2.class.php'; require_once dirname(__FILE__) . '/../classes/data/DataLoad.class.php'; $won = new WarOfNations(); $won->setDataLoadId(DataLoadDAO::initNewLoad($won->db, 'TEST_WORLDMAP2', 0)); DataLoadDAO::startLoad($won->db, $won->data_load_id); $won->GetWorldMap(-1000, 1400, 100, 100); DataLoadDAO::loadComplete($won->db, $won->data_load_id);
<?php require_once dirname(__FILE__) . '/../classes/WarOfNations2.class.php'; require_once dirname(__FILE__) . '/../classes/data/DataLoad.class.php'; $won = new WarOfNations(); $won->setDataLoadId(DataLoadDAO::initNewLoad($won->db, 'TEST_LEADERBOARDS2', 0)); DataLoadDAO::startLoad($won->db, $won->data_load_id); $won->GetLeaderboard(1, 0);
// Recommended setting for detailed scanning: 1400 $min_radius = 0; if (count($argv) == 2) { $world = $argv[1]; echo "Got Command Line Argument for World [{$world}]\r\n"; } else { $world = 13; echo "No Command Line Argument Found. Using Default World [{$world}]\r\n"; } /* ======================================================= ============== Authenticate the Phone ================= ======================================================= */ $won = new WarOfNations(); $won->setDataLoadId(DataLoadDAO::initNewLoad($won->db, 'WORLD_MAP', 0, "World {$world}")); DataLoadDAO::startLoad($won->db, $won->data_load_id); $won->Authenticate(); // Check if we're in the correct world if ($won->auth->world_id != $world) { // Switch world if not if ($won->SwitchWorld($world) === false) { // If we didn't switch successfully, join a new world $won->JoinNewWorld($world); } } // If we're still not in the right world, quit if ($won->auth->world_id != $world) { DataLoadDAO::loadFailed($won->db, $won->data_load_id); die("ERROR: Not Authenticated to World {$world}"); }
$stop = PgrmConfigDAO::getConfigProperty($won->db, 'value1', 'STOP_TROOP_FLYER'); if ($stop == 'Y') { echo "Stop Signal Detected!\n"; DataLoadLogDAO::logEvent2($won->db, $func_log_id, $log_seq++, 'INFO', 'Stop Signal Detected!'); break; } // If enough time has passed, start out with a new session if (time() - $last_session_time > $hours_between_sessions * 60 * 60) { DataLoadLogDAO::logEvent2($won->db, $func_log_id, $log_seq++, 'INFO', "At least {$hours_between_sessions} hour(s) have passed. Starting new session.\n"); // Save the data load for later, we don't want a new one $data_load_id = $won->data_load_id; // Re-initialize the WarOfNations object unset($won); $won = new WarOfNations(); // Set the data load back $won->setDataLoadId($data_load_id); // Reauthenticate to start a new session $auth_result = $won->Authenticate(false, $device_id, true); $last_session_time = time(); } else { // Otherwise, if this isn't the first run, call player sync to get updated information if (!$first_run) { $auth_result = $game->SyncPlayer(); } } if (!$auth_result) { echo "Sync or Authentication Failed. Quitting.\n"; DataLoadLogDAO::logEvent2($won->db, $func_log_id, $log_seq++, 'ERROR', 'Sync or Authentication Failed. Quitting.', null, 1); break; } // Setup/clear out our lists
// Use this when first == false //$current = strtotime('2015-07-23 04:57:54'); //$training_landing_time = 1437645510; //$training_landing_time->setTimezone(new DateTimeZone('America/Chicago')); //echo "$current\r\n"; //echo "$training_landing_time\r\n"; //echo $training_landing_time - $current; //die(); // Pause before starting //usleep(45 * 60 * 1000000); // TODO: Build something so that I can control this remotely // TODO: If we run out of commanders to jeep with, make the program wait some time and then try to start again // Need this initalized so that we can use the database! $won = new WarOfNations(); // Initalize the data load tracker $won->setDataLoadId(DataLoadDAO::initNewLoad($won->db, 'TRAIN_COMMANDERS', 0)); DataLoadDAO::startLoad($won->db, $won->data_load_id); // Send a text message to tell us that this is starting. This is really just a test of the texting feature. $won->sendWarningText('Starting Commander Training!', false); // Initialize Settings $training_base_id = 2; // Banner 38: 101013177372837 // Zion 38: 101013171988840 // HQ 38: 101013100928452 // My 34: 101013101930604 $npc_id = '101013177372837'; /* Commander IDs: 207: Hellborn 208: Iron Wing 209: Fury Forge
<?php require_once dirname(__FILE__) . '/../classes/WarOfNations2.class.php'; require_once dirname(__FILE__) . '/../classes/data/DataLoad.class.php'; require_once dirname(__FILE__) . '/../vendor/autoload.php'; use WebSocket\Client; // Need this initalized so that we can use the database! $won = new WarOfNations(); // Initalize the data load tracker $won->setDataLoadId(DataLoadDAO::initNewLoad($won->db, 'SUBSCRIBE_SERVICE', 0)); DataLoadDAO::startLoad($won->db, $won->data_load_id); // Get an instance of our game operations class $game = $won->GetGameOperations(); // Subscribe $purchase = $game->CheckPurchaseBundle('jp.gree.warofnations.gold01');
$top_x_alliances = 1000; $interval = 50; if (count($argv) == 2) { $world = $argv[1]; echo "Got Command Line Argument for World [{$world}]\r\n"; } else { $world = 13; echo "No Command Line Argument Found. Using Default World [{$world}]\r\n"; } /* ======================================================= ============== Authenticate the Phone ================= ======================================================= */ $won = new WarOfNations(); $won->setDataLoadId(DataLoadDAO::initNewLoad($won->db, 'PLAYER_LEADERBOARDS', $top_x_players / $interval, "World {$world}")); DataLoadDAO::startLoad($won->db, $won->data_load_id); $won->Authenticate(); // Check if we're in the correct world if ($won->auth->world_id != $world) { // Switch world if not if ($won->SwitchWorld($world) === false) { // If we didn't switch successfully, join a new world $won->JoinNewWorld($world); } } // If we're still not in the right world, quit if ($won->auth->world_id != $world) { DataLoadDAO::loadFailed($won->db, $won->data_load_id); die("ERROR: Not Authenticated to World {$world}"); }
// Initialize Variables $alliance_to_join = '101013232844480'; // 1st_HQ $amount_needed = 58; $amount_donated = 0; // Login to Main $won_main = new WarOfNations(); $won_main->setDataLoadId(DataLoadDAO::initNewLoad($won_main->db, 'OPERATION_CONCRETE', 0)); DataLoadDAO::startLoad($won_main->db, $won_main->data_load_id); $won_main->Authenticate(false, 5); $game_main = $won_main->GetGameOperations(); // Start Loop Here while ($amount_donated < $amount_needed) { // Create Alt $won_alt = new WarOfNations(); $won_alt->setDataLoadId($won_main->data_load_id); // Create a new account $won_alt->auth->CreateNewPlayer(); //$won_alt->Authenticate(false, 17); // Use if something fails usleep(1000000); // Join World 13 if ($won_alt->auth->world_id != 13) { $won_alt->auth->JoinNewWorld(13); } usleep(1000000); // Buy Reinforced Concrete (180000) $game_alt = $won_alt->GetGameOperations(); $game_alt->PurchaseItem('180000', 2); usleep(1000000); // Change Name $new_name = 'Player' . mt_rand(1000000, 9999999);