PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

When "snipe_high_prio_threshold" and "snipe" are enabled they aren't affected by "max_distance" and "min_time"

Open adamvc21 opened this issue 10 years ago • 2 comments

Expected Behavior

Bot shouldn't pursue Pokemon that are further away than or disappear in minimum time. Declared in "max_distance" and "min_time" with "snipe" and "snipe_high_prio_threshold" enabled.

Actual Behavior

Bot will progress towards every Pokemon below the "snipe_high_prio_threshold" when "snipe" is set to true regardless of max distance and minimum time.

My config.json MoveToMapPokemon

"type": "MoveToMapPokemon",
        "config": {
            "address": "http://localhost:5000",
            "max_distance": 150,
            "min_time": 120,
            "min_ball": 50,
            "prioritize_vips": true,
            "snipe": true,
            "snipe_high_prio_only": true,
            "snipe_high_prio_threshold": 100,
            "update_map": false,
            "mode": "priority",
            "map_path": "raw_data",

Steps to Reproduce

Running bot with "snipe_high_prio_threshold" used in unison with "max_distance" and "min_time" defined in the config.json

Other Information

OS: Windows 10 Git Commit: 5c9cdb53e69b5069cee6fe100d39e3cf5d63539c Python Version: Python 2.7.12

adamvc21 avatar Aug 14 '16 04:08 adamvc21

This is probably a sloppy way to fix this but I added

"custom": false,

to the config so now it looks like

        "type": "MoveToMapPokemon",
        "config": {
            "address": "http://localhost:5000",
            "max_distance": 1500,
            "min_time": 280,
            "min_ball": 50,
            "prioritize_vips": true,
            "snipe": true,
            "snipe_high_prio_only": true,
            "snipe_high_prio_threshold": 100,
            "update_map": false,
            "mode": "priority",
            "custom": false,
            "map_path": "raw_data",

and I changed line 142 in \PokemonGo-Bot\pokemongo_bot\cell_workers\move_to_map_pokemon.py to

 if pokemon['dist'] > self.config['max_distance'] and not self.config['custom']:

It works perfectly for me but honestly I don't know anything about what I'm doing I just try my best to make it work, cheers!

adamvc21 avatar Aug 15 '16 08:08 adamvc21

MovetoMap has had some rework, and also newer features are being worked on. The work being done supersedes this request so I'm going to close it. Please check the other movetomap feature requests and let me know if it's not covered

k4n30 avatar Aug 19 '16 12:08 k4n30