heavywater 0 Share Posted January 5, 2018 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 More sharing options...
Scorpius 144 Share Posted January 5, 2018 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 More sharing options...
Neffarion 486 Share Posted January 5, 2018 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.