tehp / OpenPoGoBot

A PokemonGo Python bot - NO LONGER MAINTAINED
MIT License
123 stars 53 forks source link

Does Max_Step work? #281

Open ch333 opened 8 years ago

ch333 commented 8 years ago

Expected Behavior

Setting max step to 0 or 1 has the bot stay in the same general location. Setting to 100 allows it to roam large distances.

Actual Behavior

The bot roams about the same distance regardless of max step value.

Steps to Reproduce

Run bot

Other Information

OS: OS X Git Commit: 5c681f0

Also, is waypoint and campsite currently not supported? I can't get either to work. When I try campsite, I use "-n campsite" and sometimes I add "-camp lat,long". Both ways gives me errors:

Traceback (most recent call last): File "pokecli.py", line 380, in main() File "pokecli.py", line 373, in main bot.run() File "/Users/username/Desktop/POGO/OpenPoGoBot/pokemongo_bot/init.py", line 108, in run for destination in self.navigator.navigate(map_cells): AttributeError: 'NoneType' object has no attribute 'navigate'

xasdf commented 8 years ago

Try -n camper. I think documentation is wrong. waypoint works just fine. It has a minor bug that got introduced in #254 (it doesn't walk all the way to waypoint).

wchill commented 8 years ago

Actually, seems like max_steps parameter is no longer used.

ch333 commented 8 years ago

@KristsKrilovs, can you give me an example of the waypoint input? -l <start_lat,start_long> -wp <dest_lat,dest_long>

And is it possible to use multiple waypoints with this? -wp or --waypoint [NAVIGATOR_WAYPOINT [NAVIGATOR_WAYPOINT ...]]

xasdf commented 8 years ago

@ch333 not sure about command line option but if you use config file, waypoints syntax is: "navigator": "waypoint", "navigator_waypoints": [ [lat1,lng1,alt1], [lat2,lng2,alt2], ... [latN,lngN,altN] ] Altitudes are optional - if you don't specify altitude, bot will set it to 0. With current codebase altitude is meaningless anyway because pgoapi always overwrites it with 8.

ch333 commented 8 years ago

@KristsKrilovs Thanks!

ch333 commented 8 years ago

It looks like when you pass in coordinates via command line, it gets assigned to 'navigator_waypoint': ['[[lat1,lng1],[[lat2,lng2]'],, which is separate from u'navigator_waypoints': [[lat1,lng1],[[lat2,lng2]], (from the config.json file). These variables appear to not be linked.

meyer9 commented 8 years ago

Reopen if still an issue.

andythorne commented 8 years ago

332 introduced the concept of a max distance, which replaces max_steps in a way.

Setting mapping.cell_radius will directly impact what you can 'see' and thus where you can travel using the fort navigator.

However, due to the way that navigators work, once the full navigation has completed, it will start again.

For example:

We could modify the fort navigator to return to the original position, or implement geofencing as in #178 (preferred).