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
  • Help Drawing Path to Destination


    heavywater

    Recommended Posts

    Hi guys, I'm very new and I'm writing myself some basic scripts to get my head around it.

     

    Anyways what I'm trying to do is draw a path on the mini map from the current player location to the destination tile or the path the bot is going to walk. I've tried searching the forums but haven't had much luck finding anything to do with this. I've already figured out how to have the destination tile / area show on the minimap using drawRect, but I can't really figure out how to return an array of tiles that the bot is going to walk using pathfinder or whatever.

     

    Is there any way to do this? Thanks!

    Link to comment
    Share on other sites

    Something like this should get you the tiles in your current path to the destination (Red flag on minimap)

     

    LocalPath<Tile> path = getWalking().getAStarPathFinder().calculate(getClient().getLocalPlayer().getTile(), getWalking().getDestination());
    for(Tile tile: path)
    {
                
    }
    

    Hi guys, I'm very new and I'm writing myself some basic scripts to get my head around it.

     

    Anyways what I'm trying to do is draw a path on the mini map from the current player location to the destination tile or the path the bot is going to walk. I've tried searching the forums but haven't had much luck finding anything to do with this. I've already figured out how to have the destination tile / area show on the minimap using drawRect, but I can't really figure out how to return an array of tiles that the bot is going to walk using pathfinder or whatever.

     

    Is there any way to do this? Thanks!

    Link to comment
    Share on other sites

     

    Something like this should get you the tiles in your current path to the destination (Red flag on minimap)

    LocalPath<Tile> path = getWalking().getAStarPathFinder().calculate(getClient().getLocalPlayer().getTile(), getWalking().getDestination());
    for(Tile tile: path)
    {
                
    }
    

     

    You dont want to calculate the path on paint. Bad idea.

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • 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.