Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • Get Tiles Along Path - WebWalker


    SubCZ
     Share

    Recommended Posts

    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?

    Link to comment
    Share on other sites

    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.

    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.