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

Introducing HealPokemon #6086

Merged
merged 1 commit into from
Jul 17, 2017
Merged

Conversation

davidakachaos
Copy link
Contributor

HealPokemon will try to use the potions and revives to heal and revive your Pokemon
This does so without any filtering. Usefull when you get home from a raid and dont want
to heal/rivive all the Pokemon yourself. This will try to do so as effectently as possible.

HealPokemon will try to use the potions and revives to heal and revive your Pokemon
This does so without any filtering. Usefull when you get home from a raid and dont want
to heal/rivive all the Pokemon yourself. This will try to do so as effectently as possible
@goedzo
Copy link
Contributor

goedzo commented Jul 17, 2017

Did you make a typo in the config sample?

+### Sample configuration
+[back to top]
+```json
+{

  • "type": "BadPokemon",
  • "config": {
  •    "enabled": true,
    
  •    "heal": true,
    
  •    "revive": true
    
  • }
    +}

Shouldn't it say, HealPokemon?

Copy link
Contributor

@goedzo goedzo left a comment

Choose a reason for hiding this comment

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

Sample configuration shows BadPokemen Instead of HealPokemon

@davidakachaos
Copy link
Contributor Author

davidakachaos commented Jul 17, 2017 via email

@Jcolomar Jcolomar merged commit 12282cc into PokemonGoF:dev Jul 17, 2017
@goedzo
Copy link
Contributor

goedzo commented Jul 17, 2017

This code crashes when reviving:
Traceback (most recent call last):
File "pokecli.py", line 885, in
main()
File "pokecli.py", line 206, in main
bot.tick()
File "/usr/src/app/pokemongo_bot/init.py", line 830, in tick
if worker.work() == WorkerResult.RUNNING:
File "/usr/src/app/pokemongo_bot/cell_workers/heal_pokemon.py", line 66, in work
self._revive_pokemon(pokemon)
File "/usr/src/app/pokemongo_bot/cell_workers/heal_pokemon.py", line 101, in _revive_pokemon
'name': pokemon.name
File "/usr/src/app/pokemongo_bot/base_task.py", line 43, in emit_event
data=data
File "/usr/src/app/pokemongo_bot/event_manager.py", line 56, in emit
raise EventNotRegisteredException("Event %s not registered..." % event)
pokemongo_bot.event_manager.EventNotRegisteredException: Event revived_pokemon not registered...

@goedzo
Copy link
Contributor

goedzo commented Jul 17, 2017

Note: fixed all issues in: #6090

@MerlionRock
Copy link
Contributor

@goedzo thanks.

@MerlionRock
Copy link
Contributor

@goedzo You fixed the issue, but you didn't touch the documentation right?
@davidakachaos Should also add the new config into config.json.example

@MerlionRock
Copy link
Contributor

Also, after I healed with one potion, it failed to use a second one. It gives somethings like:

[2017-07-18 11:16:47] [MainThread] [HealPokemon] [INFO] Healing 4 pokemon
[2017-07-18 11:16:59] [MainThread] [HealPokemon] [INFO] Healing with a HYper potion we have 26 left.
[2017-07-18 11:17:01] [MainThread] [HealPokemon] [INFO] Healing Dragonite (57 -> 257/114).
[2017-07-18 11:17:05] [MainThread] [HealPokemon] [INFO] Healing with a HYper potion we have 25 left.
[2017-07-18 11:17:07] [MainThread] [HealPokemon] [INFO] Can't use this to heal the Dragonite
[2017-07-18 11:17:07] [MainThread] [HealPokemon] [INFO] Failed with potion 103. Trying next.
[2017-07-18 11:17:17] [MainThread] [HealPokemon] [INFO] Healing with a HYper potion we have 25 left.
[2017-07-18 11:17:19] [MainThread] [HealPokemon] [INFO] Healing Blissey (179 -> 379/358).
[2017-07-18 11:17:21] [MainThread] [HealPokemon] [INFO] Healing with a HYper potion we have 24 left.
[2017-07-18 11:17:24] [MainThread] [HealPokemon] [INFO] Can't use this to heal the Blissey
[2017-07-18 11:17:24] [MainThread] [HealPokemon] [INFO] Failed with potion 103. Trying next.
[2017-07-18 11:17:32] [MainThread] [HealPokemon] [INFO] Healing with a HYper potion we have 24 left.
[2017-07-18 11:17:34] [MainThread] [HealPokemon] [INFO] Healing Lapras (87 -> 287/174).
[2017-07-18 11:17:38] [MainThread] [HealPokemon] [INFO] Healing with a HYper potion we have 23 left.
[2017-07-18 11:17:40] [MainThread] [HealPokemon] [INFO] Can't use this to heal the Lapras
[2017-07-18 11:17:40] [MainThread] [HealPokemon] [INFO] Failed with potion 103. Trying next.
[2017-07-18 11:17:49] [MainThread] [HealPokemon] [INFO] Healing with a HYper potion we have 23 left.
[2017-07-18 11:17:51] [MainThread] [HealPokemon] [INFO] Healing Lapras (83 -> 283/167).
[2017-07-18 11:17:55] [MainThread] [HealPokemon] [INFO] Healing with a HYper potion we have 22 left.
[2017-07-18 11:17:57] [MainThread] [HealPokemon] [INFO] Can't use this to heal the Lapras
[2017-07-18 11:17:57] [MainThread] [HealPokemon] [INFO] Failed with potion 103. Trying next.
[2017-07-18 11:17:57] [MainThread] [HealPokemon] [INFO] Done healing/reviving pokemon

I see your coding, there's a sleep(2). I'll let you know if I get better result if set it to sleep longer.

@davidakachaos davidakachaos deleted the heal_pokemon branch August 23, 2017 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants