Last active
July 24, 2016 12:54
-
-
Save MightyPork/aabffffe1f0dc113724dd8ceea83516e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(function () { | |
| // milliseconds | |
| var RED_BUTTON_TIME = 60000; // time between pushing thbe red button | |
| var CLICK_SEQ_TIME = 15000; // Time between refreshing the nearby area by clicking | |
| var CLICK_TIME = 1000; // time between individual clicks | |
| // Put your home coords here - this will be refreshed using the red button | |
| // All coords are [Latitude, Longitude] | |
| var home = [43.43696596521823, 14.677734375000002]; | |
| // Those coords will be scanned by 'clicking' | |
| // Put some coords around your area here | |
| var nearby = [ | |
| home, | |
| [43.9777694, 15.4215656], // your nearby coords (you can find them in the browser URL bar) | |
| // ... | |
| ]; | |
| var nearbyN = 0; | |
| function reload() { | |
| App.home.findNearbyPokemon(home[0], home[1], true); | |
| setTimeout(reload, RED_BUTTON_TIME); | |
| } | |
| function loadNearby() { | |
| nearbyN++; | |
| if (nearbyN == nearby.length) nearbyN = 0; | |
| console.log('Loading nearby #' + nearbyN); | |
| var coord = nearby[nearbyN]; | |
| App.home.findNearbyPokemon(coord[0], coord[1], false); | |
| setTimeout(loadNearby, nearbyN == nearby.length - 1 ? CLICK_SEQ_TIME : CLICK_TIME); | |
| } | |
| setTimeout(reload, RED_BUTTON_TIME); | |
| loadNearby(); | |
| // Use this if you hate the pokébals | |
| //$('.home-map-loading').remove(); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment