A quick note:
This is a fork of the project PokemonGo-Bot by PokemonGoF.
The goal of this fork is to progress the bot in an organized manner, and to promote a clean and functional codebase. As a result, OpenPoGoBot will be more reliable and secure than PokemonGo-Bot.
See CONTRIBUTING.md
- Spin Pokestops
- Catch Pokemon
- Release low cp pokemon
- Walk to a location
- Catch nearby pokemon when you have pokeballs available
- Switch between catching pokemon and farming pokestops automatically
- Filter certain pokemon
- Use superior ball types when necessary
- When out of normal pokeballs, use the next type of ball unless there are less than 10 of that type, in which case start automatically farming pokestops
- Bot Navigation via Google Directions API
- Incubate eggs
- Python 2.7.x
- pip
- git
- virtualenv (Optional)
- protobuf 3 (OS Dependent, see below)
- OS X:
brew update && brew install --devel protobuf - Windows: Download protobuf 3.0: here and unzip
bin/protoc.exeinto a folder in your PATH. - Linux:
apt-get install python-protobuf
git clone --recursive https://www.github.com/OpenPoGo/OpenPoGoBot
cd OpenPoGoBot
virtualenv env
source env/bin/activate
pip install -r requirements.txt
$ python pokecli.py [flags]
| Flag | Short Flag | Description |
|---|---|---|
| --help | -h | Show this help message and exit |
| --config-json | -j | Load a config JSON file. Any arguments specified on command line override those specified in the file. |
| --auth-service [AUTH_SERVICE] | -a [AUTH_SERVICE] | Auth Service ('ptc' or 'google') |
| --username [USERNAME] | -u [USERNAME] | Username |
| --password [PASSWORD] | -p [PASSWORD] | Password |
| --location [LOCATION] | -l [LOCATION] | Location (Address or 'xx.yyyy,zz.ttttt') |
| --location-cache | -lc | Bot will start at last known location |
| --walk [SPEED] | -w [SPEED] | Walk instead of teleport with given speed (meters per second max 4.16 because of walking end on 15km/h) |
| --distance-unit [UNIT] | -du [UNIT] | Set the unit to display distance in (e.g, km for kilometers, mi for miles, ft for feet) |
| --initial-transfer | -it | Start the bot with a pokemon clean up, keeping only the higher CP of each pokemon. It respects -c as upper limit to release. |
| --ign-init-trans [LIST] | -ig [LIST] | Pass a list of pokemon to ignore during initial transfer (e.g. 017,049,001) |
| --max-steps [MAX_STEP] | -ms [MAX_STEP] | Set the steps around your initial location (DEFAULT 5 mean 25 cells around your location) |
| --combat-power [COMBAT_POWER] | -cp [COMBAT_POWER] | Transfer Pokemon that have CP less than this value (default 100)", |
| --pokemon-potential [IV] | -iv [IV] | Set the ratio for the IV values to transfer (DEFAULT 0.4 eg. 0.4 will transfer a pokemon with IV 0.3) |
| --recycle-items | -ri | Recycle unneeded items automatically |
| --exclude-plugins [LIST] | -ep [LIST] | Pass a list of plugins to exclude from the loading process (e.g, logger,web). |
| --gmapkey [KEY] | -k [KEY] | Set a google maps API key to use |
| --google-directions | -gd | Bot will use directions from google maps API to navigate |
| --debug | -d | Debug Mode |
| --test | -t | Only parse the specified location |
| --incubation-fill | -if | Fill incubators with eggs |
| --incubation-use-all | -ia | Use all incubators or only unlimited one |
| --incubation-priority | -ip | Priority of eggs to be incubated. Comma separated list of -ip="10km,5km,2km" |
| --incubation-restrict | -ir | Restrict an egg to an incubator. List of <distance=incubator_id>. E.g. -ir="10km=901,5km=902" |
Pokemon Trainer Club (PTC) account:
$ python2 pokecli.py -a ptc -u tejado -p 1234 --location "New York, Washington Square"
Google Account:
$ python2 pokecli.py -a google -u tejado -p 1234 --location "New York, Washington Square"
To load arguments for the bot from a JSON file, use the --config-json argument with the name of a file.
Any other command line arguments specified will override the parameters specified in the loaded JSON file.
Example - this will load config.json but use cp=1000 and iv=0.7 even if already defined in config.json:
$ python2 pokecli.py --config-json config.json -cp 1000 -iv 0.7
To edit the pokemon release configuration, copy the file release_config.json.example and rename it to release_config.json
Edit this file however you want, but keep in mind:
- Pokemon names should always be capitalized and are case-sensitive
- The
anyconfiguration effects every pokemon
Here's the introduction
You can use -cp 1 to protect your first stage low CP pokemon.
Use either -l "lat, long" or --location "lat, long"
Try to generate an app password and set is as
-p "<your-app-password>"
This error is mostly occurs for those who using 2 factor authentication but either way for the purpose of security would be nice to have a separate password for the bot app.
The status code "3" corresponds to "Flee" - meaning your Pokemon has ran away. {"responses": { "CATCH_POKEMON": { "status": 3 } }
Finish the tutorial on a smartphone. This will then allow everything to be visible.
Now, instead of using --mode you need to exclude plugins. If you don't want to catch pokemon, exclude the catch_pokemon plugin (-ep catch_pokemon), and if you don't want to farm pokestops just exclude the spin_pokestop plugin (-ep spin_pokestop). Alternatively, you can modify your configuration JSON file to do the same thing.
Create the following filter
./data/catch-ignore.yml
Its a yaml file with a list of names so make it look like
ignore:
- Pidgey
- Rattata
- Pidgeotto
- Spearow
- Ekans
- Zubat
The web plugin uses Flask to open a server on port 8000. Before visiting the site, you will need to set your username(s) in the userdata.js file:
- Copy
userdata.js.exampletouserdata.js - Open the
userdata.jsfile in your editor. - Edit the the username to match yours.
- Change other settings if you want.
- Browse
http://localhost:8000and enjoy!
If you are using multiple usernames, the format is like this:
var users = ["username1","username2"];
Here are the available plugins:
| Plugins |
|---|
catch_pokemon |
egg_incubator |
recycle_items |
spin_pokestop |
transfer_pokemon |
web |
- tejado for the API
- Mila432 for the login secrets
- elliottcarlson for the Google Auth PR
- AeonLucid for improved protos
- AHAAAAAAA for parts of the s2sphere stuff
- PokemonGoF and all contributors for the original bot this fork is based on