Pug Posted June 29, 2014 Share Posted June 29, 2014 does anyone have a smooth path walking system for OSB2 that they would like to share with the community to become common use for all scripts. I had one for my rcer in osb1 but doesnt work very well in the new client. flames & abuse from people shall be reported ;) Link to comment Share on other sites More sharing options...
Pandemic Posted June 29, 2014 Share Posted June 29, 2014 (edited) Why is this so commonly asked for? It's really simple: public void walkPath(Position[] path) throws InterruptedException { for (Position p : path) { if (myPosition().distance(p) > 16 || myPosition().distance(p) < 3) continue; boolean success; do { success = walkTile(p); } while (!success); } } public boolean walkTile(Position p) throws InterruptedException { if (myPosition().distance(p) > 13) { Position pos = new Position(((p.getX() + myPosition().getX()) / 2) + random(-3, 3), ((p.getY() + myPosition().getY()) / 2) + random(-3, 3), myPosition().getZ()); walkTile(pos); } mouse.click(new MiniMapTileDestination(bot, p), false); int fail = 0; while (myPosition().distance(p) > 2 && fail < 10) { sleep(500); if (!myPlayer().isMoving()) fail++; } return fail != 10; } Edited June 29, 2014 by Pandemic 1 Link to comment Share on other sites More sharing options...
Pug Posted June 29, 2014 Author Share Posted June 29, 2014 thanks posted it here: http://osbot.org/forum/topic/55010-path-walking-osb2/?p=613279 hope you don't mind, thanks again. Link to comment Share on other sites More sharing options...