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

Snipe using Pokemongo-Map not working #5523

Closed
Gobberwart opened this issue Sep 18, 2016 · 7 comments
Closed

Snipe using Pokemongo-Map not working #5523

Gobberwart opened this issue Sep 18, 2016 · 7 comments

Comments

@Gobberwart
Copy link
Contributor

Expected Behavior

If a snipeable pokemon exists in Pokemongo-Map data, teleport and snipe.

Actual Behavior

Two issues:

  1. Snipeable pokemon sometimes being reported as not-existing (even though still a long time to go before disappear)
  2. If it does manage to find the pokemon, it does nothing after teleporting back.

First issue seems to be in this code:

                if nearby_pokemon_id == pokemon['pokemon_id']:
                    exists = True

                    # Also, if the IDs arent valid, update them!
                    if not pokemon['encounter_id'] or not pokemon['spawnpoint_id']:
                        pokemon['encounter_id'] = nearby_pokemon['encounter_id']
                        pokemon['spawn_point_id'] = nearby_pokemon['spawn_point_id']
                        pokemon['disappear_time'] = nearby_pokemon['last_modified_timestamp_ms'] if is_wild else nearby_pokemon['expiration_timestamp_ms']
                    break

"pokemon" is {u'disappear_time': 1474172861, u'dist': 28654.516924508378, u'name': u'Rattata', u'pokemon_id': 19, u'spawnpoint_id': u'6ad63aea37d', u'longitude': 145.29003085906515, u'iv': 0, u'priority': 10, u'pokemon_rarity': u'Common', u'pokemon_types': [{u'color': u'#8a8a59', u'type': u'Normal'}], u'is_vip': False, u'pokemon_name': u'Rattata', u'latitude': -37.8142364646841, u'spawn_point_id': u'6ad63aea37d', u'encounter_id': u'MzgxNzg3NTgwMDIxNzU5NzEzMw=='}

"nearby_pokemon" is {'last_modified_timestamp_ms': 1474173240168L, 'longitude': 145.29339957978198, 'pokemon_data': {'pokemon_id': 19}, 'latitude': -37.81053711254291, 'spawn_point_id': u'6ad63abfc1b', 'encounter_id': 14315303638581835213L, 'time_till_hidden_ms': 469092}
nearby_pokemon does not include 'expiration_timestamp_ms' if sniping so no match given

Second issue is unknown at this stage. I've spent a bit of time on this to identify issue, but have to attend to family stuff now, so if anyone wants to run with this, go ahead. Otherwise, I'll get back to it tomorrow.

Your FULL config.json

Not worth it. It is definitely correct and both myself and @crvfts have reproduced this.

Output when issue occurred

[2016-09-18 14:23:49] [MoveToMapPokemon] [INFO] How many pokemon in list: 1
[2016-09-18 14:23:49] [MoveToMapPokemon] [INFO] Teleporting to Pidgey. (28.92km)
[2016-09-18 14:23:54] [MoveToMapPokemon] [INFO] Encountered Pokemon: Pidgey
[2016-09-18 14:23:56] [MoveToMapPokemon] [INFO] Teleporting back to previous location (-37.8072762017, 144.963920735)...
[2016-09-18 14:23:58] [MoveToFort] [INFO] Moving towards pokestop RMIT Plaque - 0.10km

Steps to Reproduce

Requires PokemonGo-Map installed and running
Disable social in config.json
Enable MoveToMapPokemon and set "address" to "http://localhost:5000/raw_data"

Other Information

OS: Win 10
Branch: Latest dev
Python Version: 2.7.12

@xty
Copy link
Contributor

xty commented Sep 18, 2016

Second issue is unknown at this stage.

The second issue here is a known issue.

If it does manage to find the pokemon, it does nothing after teleporting back.

It was reported two weeks ago as #5128.

@YvesHenri YvesHenri mentioned this issue Sep 18, 2016
@YvesHenri
Copy link
Contributor

I'm closing this issue since its been fixed in the above PR.

@Gobberwart
Copy link
Contributor Author

Ah, nice that means I can stop worrying about it. I'll just switch over to Sniper then :) Thanks

@Gobberwart
Copy link
Contributor Author

@xiatianyu Known issue yes, unknown cause. Doesn't matter anyway, seems MoveToMapPokemon is destined to be deprecated.

@Gobberwart
Copy link
Contributor Author

Gobberwart commented Sep 19, 2016

Reopening pending successful implementation of #5522 and confirmation that issue is fixed in MoveToMapPokemon. Please do not close.

@YvesHenri
Copy link
Contributor

Please be advised that even if "tells you it has enough time left", the coords can be wrong (fake report), for example. What tells if it really exists is the call to get nearby stuff and compare the IDs.

YvesHenri added a commit to YvesHenri/PokemonGo-Bot that referenced this issue Sep 19, 2016
…pPokemon task). NOTE: Please note that there are many reasons a pokemon will "not exist" and they are: it could be already caught by you, expired, too far from the given coords and/or wrong coords/infos at all. Also, when using social and MoveToMapPokemon, the reason it skips the catch after it teleports back is due to the "spawnpoint_id" key, which doesnt exist in the social JSON data and the correct key value is "spawn_point_id" (its been fixed).

Minor text refactors on the new Sniper task.
@Gobberwart
Copy link
Contributor Author

Should be fixed now anyway with #5542

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

No branches or pull requests

3 participants