SubCZ 284 Posted July 20, 2020 I've reimplemented much of the API so that it uses my own mouse algorithm, but I'm having trouble doing the same with the WebWalker. I'm trying to find a way to get the location that the getWalking().walk() method would click on so that I can issue a click command using my own mouse classes. I see that the PathFinder class can be used to create an AbstractPath between two locations. I also noticed that the LocalPath class has a method to return the next tile that needs to be clicked in the path. However, I don't see a way to create a LocalPath given two locations, or any use for the AbstractPath that is generated. How would I go about using the WebWalker to get random tiles along the path much like the walk() method seems to do to walk from one location to another?
Pandemic 2842 Posted July 20, 2020 You can use AStarPathfinder#calculate(Tile start, Tile end) to calculate a path between two local tiles, then walk it however you'd like https://dreambot.org/javadocs/org/dreambot/api/methods/walking/pathfinding/impl/astar/AStarPathFinder.html#calculate-org.dreambot.api.methods.map.Tile-org.dreambot.api.methods.map.Tile- You can grab the current instance of the AStarPathfinder with Walking#getAStarPathfinder.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.