Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PokemonGo-Map Synergy #1992

Merged
merged 54 commits into from
Aug 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
5c95239
Feature: Use PokemonGo-Map sqlite db to catch pokemon near you
mhdasding Jul 31, 2016
b74b8fe
added example config for move_to_map_pokemon
mhdasding Jul 31, 2016
cf5528b
Merge branch 'dev' into map_synergy
mhdasding Jul 31, 2016
e56dc28
adapted new config format
mhdasding Jul 31, 2016
9e8b470
Automatically update Map position
mhdasding Jul 31, 2016
4bb8379
remove pokemon when encountered early
mhdasding Jul 31, 2016
4feabeb
forgot to remove a log
mhdasding Jul 31, 2016
c188631
minor fix
mhdasding Jul 31, 2016
bd79c3c
Merge branch 'dev' into map_synergy
mhdasding Jul 31, 2016
86910ba
updated example config and added ignore config
mhdasding Jul 31, 2016
761ad02
change ignore config to a list
mhdasding Jul 31, 2016
5072612
teleport to pokemon if walk option is 0
mhdasding Jul 31, 2016
68e6e5b
added snipe option
mhdasding Jul 31, 2016
6620bae
Teleport back after sniped pokemon was caught
mhdasding Jul 31, 2016
2c04759
proper sniping
mhdasding Jul 31, 2016
b1489c5
mark sniped pokemon as caught
mhdasding Jul 31, 2016
29ef124
forgot to remove print
mhdasding Jul 31, 2016
f63e619
Merge branch 'dev' into map_synergy
mhdasding Jul 31, 2016
44a2561
minor bug fix
mhdasding Jul 31, 2016
aa15bf0
ignore max_distance when sniping
mhdasding Jul 31, 2016
4302f30
prioritize VIPs in a 10km radius
mhdasding Jul 31, 2016
e1e4c8f
better prioritize vips
mhdasding Jul 31, 2016
5a4eb40
syntax error fix
mhdasding Jul 31, 2016
88068ca
set base priority for vips
mhdasding Jul 31, 2016
3e06e14
move map config example to seperate file
mhdasding Jul 31, 2016
a2f443a
use web api instead of sqlite db
mhdasding Jul 31, 2016
5465861
fix datetime format
mhdasding Jul 31, 2016
97bb3fb
huge code cleanup
mhdasding Jul 31, 2016
74dd393
forgot to snipe
mhdasding Jul 31, 2016
1cd3b3e
Merge branch 'dev' into map_synergy
mhdasding Jul 31, 2016
24667a8
add vips to catch as default
mhdasding Aug 1, 2016
cd7001c
default priority for vips
mhdasding Aug 1, 2016
9cc997b
only mark pokemon as caught when it really was caught
mhdasding Aug 1, 2016
6fbe750
bugfix
mhdasding Aug 1, 2016
c480db5
bugfix #2
mhdasding Aug 1, 2016
fff50e4
i should go to bed
mhdasding Aug 1, 2016
d8fd589
add option to disable map update
mhdasding Aug 1, 2016
33c6232
Merge branch 'dev' into map_synergy
mhdasding Aug 1, 2016
98ee65d
updated example map config to match default example
mhdasding Aug 1, 2016
5cc2446
improve pylint result, fix catch recognition
mhdasding Aug 1, 2016
dd74f34
more code clean up
mhdasding Aug 1, 2016
6704798
better config example
mhdasding Aug 2, 2016
d9fac09
dump caught pokemon to json file to prevent targeting them on restart
mhdasding Aug 2, 2016
8f6c666
check if we got pokeballs to use
mhdasding Aug 2, 2016
5965070
remove print
mhdasding Aug 2, 2016
6ee5ea5
fix item_inventory_count returnin None instead of 0
mhdasding Aug 2, 2016
a790a66
if we only have ultraballs and the target is not a vip don't snipe/walk
mhdasding Aug 2, 2016
fcd8d12
remove gender symbols
mhdasding Aug 2, 2016
e32c731
fix Mr. Mime
mhdasding Aug 2, 2016
8b182d4
vip wrong order fix
mhdasding Aug 2, 2016
f9a92fa
bugfix
mhdasding Aug 2, 2016
5fdc2e5
Merge branch 'dev' into map_synergy
mhdasding Aug 2, 2016
2a3b31e
log error when JSON decoding fails
mhdasding Aug 2, 2016
89ba451
handle base64 error
mhdasding Aug 2, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ src/
web/
data/last-location*.json
data/cells-*.json
data/map-caught-*.json

# Multiple config
configs/*
Expand All @@ -109,6 +110,7 @@ configs/*
!configs/config.json.pokemons.example
!configs/config.json.pokemon.example
!configs/config.json.path.example
!configs/config.json.map.example
!configs/path.example.json
!config.json.cluster.example

Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* reddivision
* DayBr3ak
* kbinani
* mhdasding
* MFizz
* NamPNQ
* z4ppy.bbc
Expand Down
362 changes: 362 additions & 0 deletions configs/config.json.map.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,362 @@
{
"auth_service": "google",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"location": "SOME_LOCATION",
"gmapkey": "GOOGLE_MAPS_API_KEY",
"tasks": [
{
"type": "HandleSoftBan"
},
{
"type": "CollectLevelUpReward"
},
{
"type": "IncubateEggs",
"config": {
"longer_eggs_first": true
}
},
{
"type": "TransferPokemon"
},
{
"type": "EvolveAll",
"config": {
"evolve_all": "NONE",
"evolve_cp_min": 300,
"evolve_speed": 20,
"use_lucky_egg": false
}
},
{
"type": "RecycleItems",
"config": {
"item_filter": {
"Pokeball": { "keep" : 100 },
"Potion": { "keep" : 10 },
"Super Potion": { "keep" : 20 },
"Hyper Potion": { "keep" : 30 },
"Revive": { "keep" : 30 },
"Razz Berry": { "keep" : 100 }
}
}
},
{
"type": "CatchVisiblePokemon"
},
{
"type": "CatchLuredPokemon"
},
{
"type": "SpinFort"
},
{
"type": "MoveToMapPokemon",
"config": {
"address": "http://localhost:5000",
"max_distance": 500,
"min_time": 60,
"prioritize_vips": true,
"snipe": false,
"update_map": true,
"mode": "priority",
"catch": {
"==========Legendaries==========": 0,
"Aerodactyl": 1000,
"Snorlax": 1000,
"Articuno": 1000,
"Zapdos": 1000,
"Moltres": 1000,
"Dratini": 1000,
"Dragonair": 1000,
"Dragonite": 1000,
"Mewtwo": 1000,
"Mew": 1000,

"==========Region Locked==========": 0,
"Farfetch'd": 1000,
"Kangaskhan": 1000,
"Mr. Mime": 1000,
"Tauros": 1000,

"==========Very Rare==========": 0,
"Lapras": 900,
"Electabuzz": 900,
"Magmar": 900,
"Ditto": 900,

"==========Starters==========": 0,
"Bulbasaur": 400,
"Ivysaur": 600,
"Venusaur": 1000,

"Charmander": 400,
"Charmeleon": 600,
"Charizard": 1000,

"Squirtle": 400,
"Wartortle": 600,
"Blastoise": 1000,

"Pikachu": 600,
"Raichu": 1000,

"==========Semi Rare==========": 0,
"Porygon": 200,
"Scyther": 200,
"Jynx": 200,

"==========Uncommon==========": 0,

"Omanyte": 150,
"Omastar": 500,

"Seel": 300,
"Dewgong": 500,

"Grimer": 200,
"Muk": 500,

"Shellder": 200,
"Cloyster": 500,

"Gastly": 200,
"Haunter": 500,
"Gengar": 1000,

"Onix": 600,

"Drowzee": 600,

"Hypno": 600,

"Vulpix": 200,
"Ninetales": 600,

"Paras": 100,
"Parasect": 500,

"Growlithe": 200,
"Arcanine": 700,

"Tentacool": 200,
"Tentacruel": 500,

"Mankey": 150,
"Primeape": 500,

"Clefairy": 150,
"Clefable": 500,

"Jigglypuff": 150,
"Wigglytuff": 500,

"Venonat": 100,
"Venomoth": 500,

"Diglett": 200,
"Dugtrio": 500,

"Meowth": 250,
"Persian": 500,

"Psyduck": 150,
"Golduck": 500,

"Geodude": 100,
"Graveler": 500,
"Golem": 800,

"Eevee": 200,
"Vaporeon": 800,
"Jolteon": 800,
"Flareon": 800,

"Kabuto": 150,
"Kabutops": 500,

"Magikarp": 150,
"Gyarados": 800,

"Pinsir": 150,

"Ponyta": 200,
"Rapidash": 500,

"Slowpoke": 200,
"Slowbro": 500,

"Magnemite": 250,
"Magneton": 500,

"Krabby": 100,
"Kingler": 500,

"Voltorb": 200,
"Electrode": 500,

"Exeggcute": 250,
"Exeggcutor": 500,

"Cubone": 300,
"Marowak": 800,

"Hitmonlee": 400,

"Hitmonchan": 400,

"Lickitung": 500,

"Koffing": 200,
"Weezing": 500,

"Rhyhorn": 200,
"Rhydon": 500,

"Chansey": 800,

"Tangela": 300,

"Horsea": 200,
"Seadra": 600,

"Goldeen": 150,
"Seaking": 500,

"Staryu": 200,
"Starmie": 800,


"==========T1 Evolvers==========": 0,
"Caterpie": 10,
"Metapod": 10,
"Butterfree": 500,

"Weedle": 10,
"Kakuna": 10,
"Beedrill": 500,

"Pidgey": 10,
"Pidgeotto": 10,
"Pidgeot": 300,

"==========T2 Evolvers==========": 0,
"Nidoran F": 10,
"Nidorina": 10,
"Nidoqueen": 10,

"Nidoran M": 10,
"Nidorino": 10,
"Nidoking": 10,

"Oddish": 100,
"Gloom": 200,
"Vileplume": 600,

"Poliwag": 200,
"Poliwhirl": 400,
"Poliwrath": 800,

"Abra": 300,
"Kadabra": 600,
"Alakazam": 800,

"Machop": 150,
"Machoke": 400,
"Machamp": 800,

"Bellsprout": 100,
"Weepinbell": 400,
"Victreebel": 800,

"==========Trash==========": 0,

"Rattata": 10,
"Raticate": 10,

"Spearow": 10,
"Fearow": 10,

"Ekans": 10,
"Arbok": 10,

"Sandshrew": 10,
"Sandslash": 10,

"Zubat": 10,
"Golbat": 10,

"Doduo": 10,
"Dodrio": 10
}
}
},
{
"type": "MoveToFort"
},
{
"type": "FollowSpiral"
}
],
"map_object_cache_time": 5,
"max_steps": 5,
Copy link

@bigmanbearpig bigmanbearpig Aug 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

max_steps has been removed in latest dev

"forts": {
"avoid_circles": true,
"max_circle_size": 50
},
"websocket_server": false,
"walk": 4.16,
"action_wait_min": 1,
"action_wait_max": 4,
"debug": false,
"test": false,
"health_record": true,
"location_cache": true,
"distance_unit": "km",
"reconnecting_timeout": 15,
"evolve_captured": "NONE",
"catch_randomize_reticle_factor": 1.0,
"catch_randomize_spin_factor": 1.0,
"catch": {
"any": {"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"},
"// Example of always catching Rattata:": {},
"// Rattata": { "always_catch" : true }
},
"release": {
"any": {"release_below_cp": 0, "release_below_iv": 0, "logic": "or"},
"// Example of always releasing Rattata:": {},
"// Rattata": {"always_release": true},
"// Example of keeping 3 stronger (based on CP) Pidgey:": {},
"// Pidgey": {"keep_best_cp": 3},
"// Example of keeping 2 stronger (based on IV) Zubat:": {},
"// Zubat": {"keep_best_iv": 2},
"// Also, it is working with any": {},
"// any": {"keep_best_iv": 3},
"// Example of keeping the 2 strongest (based on CP) and 3 best (based on IV) Zubat:": {},
"// Zubat": {"keep_best_cp": 2, "keep_best_iv": 3}
},
"vips" : {
"Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate!": {},
"any": {"catch_above_cp": 1200, "catch_above_iv": 0.9, "logic": "or" },
"Lapras": {},
"Moltres": {},
"Zapdos": {},
"Articuno": {},

"// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
"Mewtwo": {},
"Dragonite": {},
"Snorlax": {},
"// Mew evolves to Mewtwo": {},
"Mew": {},
"Arcanine": {},
"Vaporeon": {},
"Gyarados": {},
"Exeggutor": {},
"Muk": {},
"Weezing": {},
"Flareon": {}

}
}
3 changes: 2 additions & 1 deletion pokecli.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ def init_config():
config.action_wait_max = load.get('action_wait_max', 4)
config.action_wait_min = load.get('action_wait_min', 1)
config.raw_tasks = load.get('tasks', [])
config.vips = load.get('vips',{})

config.vips = load.get('vips', {})

if config.map_object_cache_time < 0.0:
parser.error("--map_object_cache_time is out of range! (should be >= 0.0)")
Expand Down
Loading