New User Guide (Windows) - Trustmania/PGO-mapscan-opt GitHub Wiki

New User Guide (Windows)

created by Kie723, slightly edited by seikur0

Step 1

First I'd recommend having at least 30 PTC accounts, depending on the area you want to cover. You can sign up lots of accounts easily using the same email address by doing +1, +2, etc before the @. For example, if you own the [email protected] address, then you'll receive mails for [email protected] and [email protected] as well and it may be working with other email hosts too. You should also accept the terms and conditions for each account by logging in to each one in the Pokemon Go app and catching your first Pokemon, which is a bit time consuming, but worth the effort. As a rough guide, I did 30 accounts in about an hour including signing up and accepting T&C for each. Don't do that. You don't want them connecting your mobile, which you use with your main account, to your scanning activities. For the tos you can use the -tos parameter.

Step 2

Make sure you have admin privileges on the PC you're using.

Step 3

Download Python 2.7.12, if you don't know what you're doing, you're probably fine with the "Windows x86 MSI installer" one.

Step 4

Install it, for example to C:\ drive, i.e. C:\Python27.

Step 5

Download the PGO-mapscan-opt files from the github page and extract the folder to desktop or somewhere easy to access.

Step 6

Go into the PGO-mapscan-opt-master folder, hold Shift and right click on it, then select 'Open command window here' - This allows for cmd actions within your current folder without having to navigate in the cmd window.

Step 6

Ideally the installer should have added the folders ";D:\Python27;D:\Python27\Scripts" to your system path variable. Check if that's true by entering first "python -V" in the command window and hitting enter, then do the same for "pip -V", if it gives you an "unknown command" error, do step 7, otherwise skip it.

Step 7

Go into system settings > system > advanced system settings > environment variables. Then find the Path variable in the system variables. Choose edit and append ";C:\Python27" to the end, if the "python -V" command wasn't recognized and/or append ";C:\Python27\Scripts" if the "pip -V" command wasn't recognized. Obviously if your Python folder is located somewhere else, change the path in the quotations. Be careful, so you don't accidentally delete parts of the string. With that done, hit the okay button, then repeat step 6 to recheck.

Step 8

In the cmd window, type "pip install -r requirements.txt". It will take some time to download the required python packages and should complete successfully. If not, see the github page for more options on this step. Note: I tried this on an old laptop from scratch and had to upgrade pip, which you can do in the same cmd window by typing "pip install --upgrade pip" As a windows user you have to get Visual C++ for Python 2.7: https://www.microsoft.com/en-au/download/details.aspx?id=44266 After doing these two, it worked fine. I'm not sure if upgrading pip helped, but C++ is a necessity. If the pip install is still giving you troubles after that, you can try getting the problematic package directly as wheel and install it directly with pip.

Step 10

Okay now we can start setting up the scanner. Go to the res folder and you'll see usersettings.json.example Remove the ".example" and edit the document in notepad (right-click -> open with -> Notepad) If you hate Notepad, now is the time to actually get a good editor, Notepad++, that's not required though. Profiles with same ids form a scan group. They use the location and the (optional) proxy from the first profile in that group.

Step 11

Go through the settings and familiarize yourself with them, you'll have to edit some things. Settings Guide

(13) PTC accounts: Main thing here is enter the username and passwords for all your accounts. You can copy/paste down under the last one to add more accounts. Just make sure all but the last one end in "}," The other thing you need to add is latitude and longitude for your center point, which you can get from Google Maps by clicking on the location you wish to be your center point.

Step 12

Now we can run the scanner. Before we do that, let's make a few script files so you can run the scanner and the webserver script from files. a) Create a new text document and in there type: start python main0.py b) The above simply runs the main0 python script, which is the scanner. c) Save as -> filename.bat (I called mine SpawnScan.bat for example). Make sure the dropdown box is set to "All files" not ".txt". (Having file extensions active in the folder settings is always pretty helpful too.) Save the file in the root folder (PGO-mapscan-opt-master) d) Create another new text document and type: start python pokesite.py - Follow steps b) and c) with that. I called mine SpawnSite.bat e) Create another new text document and type: start python spawnfix.py - Follow steps b) and c) with that as well. I called mine SpawnFix.bat.

Step 13

Now double-click on SpawnScan and SpawnSite bats to start them running.

Step 14

Open up your browser and type your IP address and port number, at home it's http://localhost:1234, from outside your network you can replace localhost with your real ip (google that). To allow for access from outside your network you'll also need to open the port in your router. Then if you don't want to look up that ip everytime you should look into a dynamic dns service like No-IP, that'll enable you to access it from for example http://johnsmith.zapto.org:1234. All you do is sign up, pick a domain, download DUC, open DUC, sign in with your account, pick your domain (tick the box) and press okay. Now you're ready to go with a webserver. Instead of DUC you can also set it up directly in your router for most router models, it's easier than having to install DUC and have it running.

Step 15

You'll soon start seeing pokemon appear on the map. That means the first phase has begun.

Step 16

Now I mentioned that a radius of 30 would need about 60 accounts. To explain, the scanner needs a maximum of one hour to create a .json file, called learning or spawn file. After this learning phase that'll be used by the scanner to scan only the spawn points with a massively increased efficiency. It should do each run within 10 minutes to ensure each pokemon is found (since pokemon can despawn after 15 mins). 11 or 12 mins might do, 15 is cutting it fine madness. Always watch the first run and check the time, which it tells you at the end. If 15mins have passed and you haven't finished the first run, you either need to add more accounts to usersettings or reduce the scan radius. Another option is to lower your scan radius such that you can finish a run in 10mins, create the .json file, and then change you lat/long to cover areas that you didn't get to. It's all about hexagons, so draw them out and figure out where the best center points are for the areas you want.

Step 17

If you're getting around 10mins a run, then after an hour, you'll get a .json file with your lat/long as the filename (located in the res folder). This is your first spawn file. You can then change coordinates in the usersettings file and do a different location for another hour, and keep going until you have all the spawn files you want.

Step 18

Copy all your .json files into the root folder and then double click on your SpawnFix.bat file and it'll merge all of them into one file, which gets created in the same folder, mapdata_rename_this.json, this is the one you want, see step 19. It also creates mapdata_readable_can delete.json, you can look inside to see the spawn points listed in an easily readable format, however this file is not needed for the scan at all and can be deleted.

Step 19

Rename the new file as the lat and long that you currently have in the usersettings file (it'll be the same name as the most recent json file you generated from a scan) and then copy it back into the res folder, replacing the existing file if necessary.

Step 20

Run the SpawnScan again and you'll see that all your previous locations are included in the scan. With the learning file it'll do spawn point scanning, also called intelligent scanning or simply iscan. In iscan mode you'll need much less accounts to keep it running than before, 20% as an estimate.

Advanced usage / troubleshooting

encrypt.so errors

For rare OS types you may need to compile the required encrypt.so yourself, see here. Compile it, put it into the res folder and add it in the main0.py.

visualization

You can use https://github.com/brandonshults/pipoam to visualize the whole area and fine select, which points you want, don't ask me for support on it, figure it out yourself or don't use it ;)

scan area customization

You can use the spawnfix.py file to merge all learning files in its folder into one, then rename that 'mapdata.json' file to fit the parameters of some of your profiles, for example "123.1234_1.1234_30_70.0.json" and it'll scan all the points.