Skip to content

ideiadoluiz/PokemonGo-Bot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Slack

PokemonGo-Bot

A python script for catching pokemons and spin pokestops on PokemonGo.

Project Chat

We use Slack as a web chat. Click here to join the chat!

Table of Contents

Features

  • Search Fort (Spin Pokestop)
  • Catch Pokemon
  • Release low cp pokemon
  • Walking as you
  • Use the ball you have to catch, don't if you don't have
  • Rudimentary IV Functionality filter (Need verify)
  • Auto switch mode(Full of item then catch, no ball useable then farm)
  • Ignore certain pokemon filter

TODO List

  • Standalone Desktop APP
  • Google Map API key setup (Readme update needed)
  • Show all objects on map
  • Limit the step to farm specific area for pokestops
  • Pokemon transfer filter
  • Drop items when bag is full
  • Pokemon catch filter
  • Hatch eggs
  • Incubate eggs
  • Evolve pokemons
  • Use candy
  • Code refactor

Installation

Requirements (click each one for install guide)

Protobuf 3 installation

  • OS X: brew update && brew install --devel protobuf
  • Windows: Download protobuf 3.0: here and unzip bin/protoc.exe into a folder in your PATH.
  • Linux: apt-get install python-protobuf

Installation Linux

$ git clone -b master https://github.com/PokemonGoF/PokemonGo-Bot  
$ cd PokemonGo-Bot  
$ pip install -r requirements.txt

Installation Mac

$ git clone -b master https://github.com/PokemonGoF/PokemonGo-Bot  
$ cd PokemonGo-Bot  
$ virtualenv .  
$ source bin/activate  
$ pip install -r requirements.txt

Installation Windows

Windows Note

On Windows, you will need to install PyYaml through the installer and not through requirements.txt.

Windows 10: Go to this page and download: PyYAML-3.11-cp27-cp27m-win32.whl
(If running 64-bit python or if you get a 'not a supported wheel on this platform' error, download the 64 bit version instead: PyYAML-3.11-cp27-cp27m-win_amd64.whl )

$ cd download-directory
$ pip install PyYAML-3.11-cp27-cp27m-win32.whl
// (replace PyYAML-3.11-cp27-cp27m-win32.whl with PyYAML-3.11-cp27-cp27m-win_amd64.whl 
// if you needed to download the 64-bit version)

Develop PokemonGo-Bot

$ git clone -b dev https://github.com/PokemonGoF/PokemonGo-Bot  
$ cd PokemonGo-Bot  
$ virtualenv .  
$ source bin/activate  
$ pip install -r requirements.txt  

Google Maps API (in development)

Google Maps API: a brief guide to your own key

This project uses Google Maps. There's one map coupled with the project, but as it gets more popular we'll definitely hit the rate-limit making the map unusable. That said, here's how you can get your own and replace ours:

  1. Navigate to this page
  2. Select 'Create a project' in the dropdown menu.
  3. Wait an eternity.
  4. Click 'Create' on the next page (optionally, fill out the info)
  5. Copy the API key that appears.
  6. After the code done, will update here how to replace.

Usage

usage: pokecli.py [-h] -a AUTH_SERVICE -u USERNAME -p PASSWORD -l LOCATION [-lc] [-c] [-m] [-w] [--distance_unit] [--initial-transfer] [--maxsteps] [-iv] [-d] [-t] 

optional arguments:
  -h, --help                                    show this help message and exit
  -a AUTH_SERVICE, --auth_service AUTH_SERVICE  Auth Service ('ptc' or 'google')
  -u USERNAME, --username USERNAME              Username
  -p PASSWORD, --password PASSWORD              Password
  -l LOCATION, --location LOCATION              Location (Address or 'xx.yyyy,zz.ttttt')
  -lc, --use-location-cache                     Bot will start at last known location
  -c CP, --cp                                   Set the CP to transfer or lower (eg. 100 will transfer CP0-99)
  -m MODE, --mode MODE                          Set farming Mode for the bot ('all', 'poke', 'farm')
  -w SPEED,  --walk SPEED                       Walk instead of teleport with given speed (meters per second max 4.16 because of walking end on 15km/h)
  --distance_unit UNIT                          Set the unit to display distance in (e.g, km for kilometers, mi for miles, ft for feet)
  --initial-transfer                            Start the bot with a pokemon clean up, keeping only the higher CP of each pokemon. It respects -c as upper limit to release.
  --maxsteps MAX_STEP                           Set the steps around your initial location (DEFAULT 5 mean 25 cells around your location)
  -iv IV, --pokemon_potential                   Set the ratio for the IV values to transfer (eg. 0.8 will transfer a pokemon with IV 0.5)
  -d, --debug                                   Debug Mode
  -t, --test                                    Only parse the specified location

Command Line Example

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"

How to add/discover new API

The example is here
1. Check the type of your API request in POGOProtos For example: RECYCLE_INVENTORY_ITEM
2. Convert to the api call in pokemongo_bot/init.py, RECYCLE_INVENTORY_ITEM change to self.api.recycle_inventory_item def drop_item(self,item_id,count): self.api.recycle_inventory_item(...............) 3. Where is the param list?
You need check this Requests/Messages/RecycleInventoryItemMessage.proto 4. Then our final api call is
def drop_item(self,item_id,count): self.api.recycle_inventory_item(item_id=item_id,count=count) inventory_req = self.api.call() print(inventory_req)
5. You can now debug on the log to see if get what you need

FAQ

What's IV ?

Here's the introduction

Losing Starter Pokemon and others

You can use -c 1 to protect your first stage low CP pokemon.

Does it run automatally?

Not yet, still need a trainer to train the script param. But we are very close to.

Set GEO Location

It works, use -l "xx.yyyy,zz.ttttt" to set lat long for location. -- diordache

FLEE

The status code "3" corresponds to "Flee" - meaning your Pokemon has ran away. {"responses": { "CATCH_POKEMON": { "status": 3 } }

My pokemon are not showing up in my Pokedex?

Finish the tutorial on a smartphone. This will then allow everything to be visible.

How can I maximise my XP per hour?

Quick Tip: When using this script, use a Lucky egg to double the XP for 30 mins. You will level up much faster. A Lucky egg is obtained on level 9 and further on whilst leveling up. (from VipsForever via /r/pokemongodev)

How can I not collect certain pokemon

You don't want to collect common pokemon once you hit a certain level. It will slow down leveling but you won't fill up either.

How do I use the map??

You can either view the map via opening the html file, or by serving it with SimpleHTTPServer (runs on localhost:8000)
To use SimpleHTTPServer:
$ python -m SimpleHTTPServer [port] The default port is 8080, you can change that by giving a port number. Anything above port 1000 does not require root. You will need to set your username(s) in the userdata.js file before opening:
Copy userdata.js.example to userdata.js and edit with your favorite text editor. put your username in the quotes instead of "username" If using multiple usernames format like this:
var users = ["username1","username2"];

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

Requirements

  • Python 2
  • requests
  • protobuf
  • gpsoauth
  • geopy
  • s2sphere
  • googlemaps
  • pgoapi

To install the pgoapi use pip install -e git://github.com/tejado/pgoapi.git#egg=pgoapi

Contributors (Don't forget add yours here when you create PR:)

  • eggins -- The first pull request :)
  • crack00r
  • ethervoid
  • Bashin
  • tstumm
  • TheGoldenXY
  • Reaver01
  • rarshonsky
  • earthchie
  • haykuro
  • 05-032
  • sinistance
  • CapCap
  • mzupan
  • namlehong
  • gnekic(GeXx)
  • luizperes
  • brantje
  • VirtualSatai

Credits

tejado many thanks 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

Donation

Bitcoin Address: 1PJMCx9NNQRasQYaa4MMff9yyNFffhHgLu

About

The Pokemon Go Bot script, baking with community.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 44.9%
  • Protocol Buffer 43.2%
  • JavaScript 6.7%
  • HTML 5.0%
  • CSS 0.2%