Psvxe Posted May 7, 2015 Share Posted May 7, 2015 (edited) Since I'm getting pretty tired of people making pre-set paths I'd port overflow's pathfinder to OSBot. When you have to walk a large distance you could use this code down here instead of using pre-set paths. import nl.psvxe.scripts.pathfinder.core.util.Structure; import nl.psvxe.scripts.pathfinder.core.wrapper.TilePath; import nl.psvxe.scripts.pathfinder.impl.Pathfinder; private Position[] currentPath; path = pf.findPath(Structure.TILE.getHash(ctx.myPosition().getX(), ctx.myPosition().getY(), ctx.myPosition().getZ()),Structure.TILE.getHash(x, y, z), 500, false); if(path == null){ ctx.localWalker.walk(new Position(ctx.myPosition().getX()+3, ctx.myPosition().getY()+2,0)); return; } currentPath = new Position[path.size()]; for (int i = 0; i < path.size(); i++) { currentPath[i] = getTile(path.get(i).getHash()); } ctx.localWalker.walkPath(currentPath); private Position getTile(int hash) { return new Position(Structure.TILE.getX(hash), Structure.TILE.getY(hash), Structure.TILE.getZ(hash)); } Sometimes it can get stuck if get into a new region. To fix this you've to add Dynamicsleep and return if it isn't moving. if(ctx.localWalker.walkPath(currentPath)){ new DynamicSleep(int0, int1){ @Override public boolean breakCondition() { return !ctx.myPlayer().isMoving(); } }.sleep(); }Download the jar and import it into your libary: https://www.dropbox.com/s/lskdq1s4hiykyec/Pathfinder.jar?dl=0 Thanks overflow for the code! https://github.com/Overflow-p****bot/Pathfinder Thanks Erke for helping me out with a few things To make the paths more randomized you could add this within the code too: http://osbot.org/forum/topic/71632-getrandomizedpathposition-int-getlocalpathposition-position/ Edited May 7, 2015 by Psvxe Quote Link to comment Share on other sites More sharing options...
lare96 Posted May 8, 2015 Share Posted May 8, 2015 Cool beans, thanks for this. Quote Link to comment Share on other sites More sharing options...
Flashboy Posted May 8, 2015 Share Posted May 8, 2015 will be useful for alot of people Quote Link to comment Share on other sites More sharing options...
lare96 Posted May 8, 2015 Share Posted May 8, 2015 Cool beans, thanks for this. Quote Link to comment Share on other sites More sharing options...
Psvxe Posted May 8, 2015 Author Share Posted May 8, 2015 Going to add a few add-ons. Found a few things what could make the walking even smoother. Quote Link to comment Share on other sites More sharing options...
Valkyr Posted May 8, 2015 Share Posted May 8, 2015 What is this, a fancy LocalWalker? It looks somewhat redundant with an already existing walker within the local region and webwalkers doing the rest :x Quote Link to comment Share on other sites More sharing options...
Psvxe Posted May 8, 2015 Author Share Posted May 8, 2015 What is this, a fancy LocalWalker? It looks somewhat redundant with an already existing walker within the local region and webwalkers doing the rest :x So, is there a webwalker out for public? And I don't see how you can travel from lumbridge to ardougne without the use of a pre-set path and the use of the current local walker. But if you could explain, it would be nice. Quote Link to comment Share on other sites More sharing options...
Valkyr Posted May 8, 2015 Share Posted May 8, 2015 So, is there a webwalker out for public? And I don't see how you can travel from lumbridge to ardougne without the use of a pre-set path and the use of the current local walker. But if you could explain, it would be nice. No there's not, is that what you've achieved? You can't get paths taking you outside the current loaded region without a webwalker :x Honestly, it is easier than it seems once you grasp the concept of it, hardest tasking being the pathfinding algorithm and gathering the actual data. More time-consuming than difficult tbh. Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted May 8, 2015 Share Posted May 8, 2015 (edited) hmm, I have no idea how you are going to cross 2-3 regions with a "advanced localwalker" ? Feel free to explain how this works ^^ Khaleesi Edited May 8, 2015 by Khaleesi Quote Link to comment Share on other sites More sharing options...
Psvxe Posted May 8, 2015 Author Share Posted May 8, 2015 I'll upload a video. Quote Link to comment Share on other sites More sharing options...
Thaantje Posted May 8, 2015 Share Posted May 8, 2015 sounds promising :P Not that i am that advanced yet tho XD Quote Link to comment Share on other sites More sharing options...
Psvxe Posted May 8, 2015 Author Share Posted May 8, 2015 sounds promising Not that i am that advanced yet tho XD It really isn't. If you need help just hit me up trough pm No there's not, is that what you've achieved? You can't get paths taking you outside the current loaded region without a webwalker :x Honestly, it is easier than it seems once you grasp the concept of it, hardest tasking being the pathfinding algorithm and gathering the actual data. More time-consuming than difficult tbh. I'm trying to make a webwalker. Actually, I got most of the data. Even thinking of releasing that. Perhaps something far more advanced could be created for public to use. So we don't get banned because we use 10 different kinds of walking. Anyways, https://www.youtube.com/watch?v=KUAwauxufCM Few small flaws but it corrects itself. Loads and walks trough 2 regions. Quote Link to comment Share on other sites More sharing options...
AresScripts Posted May 8, 2015 Share Posted May 8, 2015 It really isn't. If you need help just hit me up trough pm I'm trying to make a webwalker. Actually, I got most of the data. Even thinking of releasing that. Perhaps something far more advanced could be created for public to use. So we don't get banned because we use 10 different kinds of walking. Anyways, https://www.youtube.com/watch?v=KUAwauxufCM Few small flaws but it corrects itself. Loads and walks trough 2 regions. I dont think thats how bans work buddy. Quote Link to comment Share on other sites More sharing options...
Psvxe Posted May 8, 2015 Author Share Posted May 8, 2015 I dont think thats how bans work buddy. No idea, could be. But what I've they monitor the behavior of that? Quote Link to comment Share on other sites More sharing options...
Articron Posted May 8, 2015 Share Posted May 8, 2015 (edited) Not to be blunt or anything but this is not that impressive and pretty redudant Edited May 8, 2015 by Articron Quote Link to comment Share on other sites More sharing options...