function login($userName, $password) { start: $time = time(); $var = @file_get_contents("http://159.203.92.38/server1/game/login_api.php?jsonpcallback=jsonp" . $time . "&_=" . ($time + 1485495) . "&username="******"&password="******"&picture=&session=temp&_l=en&_p=EW-DROID-KR-"); if (!(strpos($var, '})') !== false)) { goto start; } $key = stripTojSon($var, $time); return $key; }
function getAllCity($key) { start: $time = time(); $var = @file_get_contents("http://159.203.92.38/server1/game/get_userinfo_api.php?jsonpcallback=jsonp" . $time . "&_=" . ($time + 1485495) . "&key=" . $key . "&_l=en&_p=EW-DROID-KR-"); if (!(strpos($var, '})') !== false)) { goto start; } $city = stripTojSon($var, $time); if (count(@$city['ret']['user']['city']) > 0) { //for($ctr=0;$ctr<count($city['ret']['user']['city']);$ctr++){ getHeroes($key, $city['ret']['user']['city'][0]['id']); //} } }
$var = @file_get_contents("http://159.203.92.38/server1/game/gen_conscribe_api.php?jsonpcallback=jsonp" . $time . "&_=" . ($time + 1485495) . "&key=" . $key . "&lv=" . $getHero['ret']['hero'][$hero]['g'] . "&_l=en&_p=EW-DROID-KR-"); if (!(strpos($var, '})') !== false)) { goto getOpponent; } $getOpponent = stripTojSon($var, $time); //d($getOpponent); $jay = 0; for ($ctr = 0; $ctr < count($getOpponent); $ctr++) { if ($getOpponent['ret']['hero'][$ctr]['g'] >= $getHero['ret']['hero'][$hero]['g']) { fight: $time = time(); $var = @file_get_contents("http://159.203.92.38/server1/game/gen_conscribe_api.php?jsonpcallback=jsonp" . $time . "&_=" . ($time + 1485495) . "&key=" . $key . "&gid=" . $getHero['ret']['hero'][$hero]['id'] . "&tgid=" . $getOpponent['ret']['hero'][$ctr]['id'] . "&_l=en&_p=EW-DROID-KR-"); if (!(strpos($var, '})') !== false)) { goto fight; } $result = stripTojSon($var, $time); # Get Vigor //sleep(2); //print_r($result);die(); if (@$result['code'] == "8303") { addVigor($id, $key, $city); //echo "Vigor"; goto fight; } if (@$result['ret']['win'] > 0) { echo "W1n!"; } else { echo "Lose!<br>"; } /* $ex = $ex+$result['ret']['exp'];
} $getCity = stripTojSon($var, $time); if ($getCity['code'] == 2) { //header('Location: '.$_SERVER['HTTP_REFERER']); //print_r($_SERVER);die(); echo "<script>window.location.href=window.location.href</script>"; } $city = $getCity['ret']['user']['city'][0]['id']; ######################################################################################################################## getList: $time = time(); $var = @file_get_contents("http://159.203.92.38/server1/game/gen_visit_api.php?jsonpcallback=jsonp" . $time . "&_=" . ($time + 1485495) . "&key=" . $key . "&_l=en&_p=EW-DROID-KR-"); if (!(strpos($var, '})') !== false)) { goto getList; } $getList = stripTojSon($var, $time); ######################################################################################################################### $visitedList = explode(",", $getList['ret']['visited_list']); #Auto Claim 5 the same hero if (count($visitedList) == 5) { start: $time = time(); $var = @file_get_contents("http://159.203.92.38/server1/game/gen_visit_api.php?jsonpcallback=jsonp" . $time . "&_=" . ($time + 1485495) . "&key=" . $key . "&action=getprice&price_type=5_same&_l=en&_p=RE"); if (!(strpos($var, '})') !== false)) { goto start; } //echo "Claimed"; } ########################################################################################################################### # Get the hero list that a player can visit $genList = explode(",", $getList['ret']['can_visit_list']);