Skip to content

Commit cb9837c

Browse files
authored
Merge pull request #6054 from PokemonGoF/dev
Merge Dev to Master
2 parents 1f2b1cf + 98ac9d6 commit cb9837c

26 files changed

+709
-182
lines changed

configs/auth.json.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
"hashkey" : "YOUR_PURCHASED_HASH_KEY",
1414
"encrypt_location": "",
1515
"telegram_token": "",
16-
"discord_token": ""
16+
"discord_token": "",
17+
"2captcha_token": ""
1718
}

configs/config.json.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"heartbeat_threshold": 10,
44
"enable_social": false,
55
"check_niantic_api": false,
6+
"solve_captcha": false,
67
"live_config_update": {
78
"enabled": false,
89
"tasks_only": false
@@ -453,7 +454,8 @@
453454
"enabled": true,
454455
"spin_wait_min": 3,
455456
"spin_wait_max": 5,
456-
"daily_spin_limit": 1900
457+
"daily_spin_limit": 1900,
458+
"use_lure": false
457459
}
458460
},
459461
{

data/items.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"2": "Greatball",
55
"3": "Ultraball",
66
"4": "Masterball",
7+
"5": "Premier Ball",
78
"101": "Potion",
89
"102": "Super Potion",
910
"103": "Hyper Potion",
@@ -24,6 +25,9 @@
2425
"703": "Nanab Berry",
2526
"704": "Wepar Berry",
2627
"705": "Pinap Berry",
28+
"706": "Golden Razz Berry",
29+
"707": "Golden Nanab Berry",
30+
"708": "Golden Pinap Berry",
2731
"801": "Special Camera",
2832
"901": "Incubator Basic Unlimited",
2933
"902": "Incubator Basic",
@@ -33,5 +37,11 @@
3337
"1102": "Kings Rock",
3438
"1103": "Metal Coat",
3539
"1104": "Dragon Scale",
36-
"1105": "Upgrade"
37-
}
40+
"1105": "Upgrade",
41+
"1201": "Reroll Fast Attack",
42+
"1202": "Reroll Special Attack",
43+
"1301": "Rare Candy",
44+
"1401": "Free Raid Ticket",
45+
"1402": "Paid Raid Ticket",
46+
"1403": "Legendart Raid Ticket"
47+
}

docs/configuration_files.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Document the configuration options of PokemonGo-Bot.
8282
| Parameter | Default | Description |
8383
|------------------|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
8484
| `tasks` | [] | The behaviors you want the bot to do. Read [how to configure tasks](#configuring-tasks).
85+
| `solve_captcha` | False | True: Allow bot to solve captcha when enabled. Either using automatic (2Captcha service, token to be specify in auth.json) or manual solving [more information](https://github.com/PokemonGoF/PokemonGo-Bot/pull/6050)
8586
| `max_steps` | 5 | The steps around your initial location (DEFAULT 5 mean 25 cells around your location) that will be explored
8687
| `forts.avoid_circles` | False | Set whether the bot should avoid circles |
8788
| `forts.max_circle_size` | 10 | How many forts to keep in ignore list |
@@ -276,6 +277,7 @@ The behaviors of the bot are configured via the `tasks` key in the `config.json`
276277
* `enabled`: Default true | Enable for disable this task
277278
* `spin_wait_min`: Defaut 3 | Minimum wait after spinning a fort
278279
* `spin_wait_max`: Default 5 | Maximum wait after spinning a fort
280+
* `use_lure`: Default `False` | Enable to depoly lure (if available) at fort
279281
* TransferPokemon
280282
* `enable`: Disable or enable this task.
281283
* `min_free_slot`: Default `5` | Once the pokebag has less empty slots than this amount, the transfer process is triggered. | Big values (i.e 9999) will trigger the transfer process after each catch.
@@ -1406,13 +1408,23 @@ Hunts down nearby Pokemon. Searches for Pokemon to complete the Pokedex, or if a
14061408
[[back to top](#table-of-contents)]
14071409

14081410
* `max_distance`: `Default: 2000`. Maxium of meters for the "nearby" part.
1411+
* `enable_cooldown`: `Default: true`. After a hunt (succesful or not) have a cool down (stops hunting for a bit)
14091412
* `hunt_all`: `Default: false`. Should we hunt for ALL nearby Pokemon?
14101413
* `hunt_vip`: `Default: true`. Should we hunt for VIP Pokemon?
14111414
* `hunt_pokedex`: `Default: true`. Should we hunt for Pokemon we need to complete the Pokedex (make family complete)
14121415
* `lock_on_target`: `Default: false`. Should we ignore all other Pokemon while hunting?
14131416
* `lock_vip_only`: `Default: true`. Is the above only used for real VIPs? (Not to complete the Pokedex)
14141417
* `disabled_while_camping`: `Default: true`. Should we stop hunting for nearby Pokemon while sitting at lures?
1418+
* `hunt_closest_first`: `Default: false`. Prioritize by distance instead of number of candy?
14151419
* `treat_unseen_as_vip`: `Default: true`. Should we treat unseen Pokemons as VIPs?
1420+
* `target_family_of_vip`: `Default: true`. Should we treat family of a VIP as a valid target?
1421+
* `treat_family_of_vip_as_vip`: `Default: false`. Should we see family of an VIP as a VIP (locking onto it if enabled)
1422+
* `hunt_for_trash_to_fill_bag`: `Default: false`. Should we try to fill the bag with trash if a set amount of slots is left?
1423+
* `trash_hunt_open_slots`: `Default: 25`. The amount of slots for the previous setting
1424+
1425+
### Hunting for trash
1426+
If enabled the hunter will start hunting down Pidgeys, Weedles and Caterpies when a set amount of slots (defaults to 25) are left in the bag to fill. The idea is simple; we are about to start evolving Pokemon. So the priority of the hunter shiftes. BUT when a VIP Pokemon is nearby, the Hunter will always start chasing that VIP first.
1427+
Also hunting for trash does NOT lock the target, catching all Pokemon it find on the way to the target.
14161428

14171429
### Sample configuration
14181430
[[back to top](#table-of-contents)]
@@ -1421,14 +1433,18 @@ Hunts down nearby Pokemon. Searches for Pokemon to complete the Pokedex, or if a
14211433
"type": "PokemonHunter",
14221434
"config": {
14231435
"enabled": true,
1436+
"enable_cooldown": false,
14241437
"max_distance": 1500,
14251438
"hunt_all": false,
14261439
"hunt_vip": true,
14271440
"hunt_pokedex": true,
14281441
"lock_on_target": false,
14291442
"lock_vip_only": true,
14301443
"disabled_while_camping": true,
1431-
"treat_unseen_as_vip": true
1444+
"hunt_closest_first": true,
1445+
"treat_unseen_as_vip": true,
1446+
"hunt_for_trash_to_fill_bag": true,
1447+
"trash_hunt_open_slots": 30
14321448
}
14331449
}
14341450
```

docs/faq.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1-
### Do I need hashing key ?
2-
Without hashing key, the bot will use API in version 0.45, which is not used in legit game any longer. Learn more about - [hashing key here](http://hashing.pogodev.org).
1+
### Do I need hashing key?
2+
The bot will not run without a vaild hashing key. Learn more about - [hashing key here](http://hashing.pogodev.org).
3+
4+
### Does the bot support 2Captcha service?
5+
Yes. Please include your 2Captcha token in auth.json
6+
```
7+
"2captcha_token": "YOUR_KEY_HERE"
8+
```
9+
10+
### Does the bot support manual Captcha solving?
11+
Yes. Please download chrome driver for your os plaform and place it into the root directory of the bot.
12+
More information on [chrome driver here](https://sites.google.com/a/chromium.org/chromedriver/).
313

414
### How do I start the application?
515
After [installing] (https://github.com/PokemonGoF/PokemonGo-Bot/blob/dev/docs/installation.md), in the root folder run the following command:

pokecli.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,17 @@ def report_summary(bot):
328328
return # Bot didn't actually start, no metrics to show.
329329

330330
metrics = bot.metrics
331-
metrics.capture_stats()
331+
try:
332+
metrics.capture_stats()
333+
except NotLoggedInException:
334+
bot.event_manager.emit(
335+
'api_error',
336+
sender=bot,
337+
level='info',
338+
formatted='Not logged in, reconnecting in {:d} seconds'.format(5)
339+
)
340+
time.sleep(5)
341+
return
332342
logger.info('')
333343
logger.info('Ran for {}'.format(metrics.runtime()))
334344
logger.info('Total XP Earned: {} Average: {:.2f}/h'.format(metrics.xp_earned(), metrics.xp_per_hour()))
@@ -415,6 +425,15 @@ def _json_loader(filename):
415425
type=bool,
416426
default=True
417427
)
428+
add_config(
429+
parser,
430+
load,
431+
short_flag="-sc",
432+
long_flag="--solve_captcha",
433+
help="Enable manual or automatic captcha solving",
434+
type=bool,
435+
default=False
436+
)
418437
add_config(
419438
parser,
420439
load,
@@ -739,6 +758,7 @@ def _json_loader(filename):
739758
config.encrypt_location = load.get('encrypt_location', '')
740759
config.telegram_token = load.get('telegram_token', '')
741760
config.discord_token = load.get('discord_token', '')
761+
config.twocaptcha_token = load.get('2captcha_token', '')
742762
config.catch = load.get('catch', {})
743763
config.release = load.get('release', {})
744764
config.plugins = load.get('plugins', [])

0 commit comments

Comments
 (0)