lisabe96 Posted January 10, 2016 Posted January 10, 2016 private static void walkToTile(Script script, Position position) { WalkingEvent walkingPath = new WalkingEvent(position); walkingPath.setMiniMapDistanceThreshold(0); walkingPath.setMinDistanceThreshold(0); script.execute(walkingPath); } Doesn't work, when I'm already nearby the tile it wont move to it. Is this something that is broken or am I doing something wrong?
steve498 Posted January 10, 2016 Posted January 10, 2016 (edited) I have had the same problem as you and I believe it's part of OSBot's antiban. If you are 1-2 tiles away from your chosen position then it will still deem it as acceptable regardless of you setting the threshold to 0. If you want to walk to an exact tile then you could do the following... (Untested!) MainScreenTileDestination destination = new MainScreenTileDestination(getBot(), PositionNameHere); getMouse().click(destination); Or using the minimap, MiniMapTileDestination destination = new MiniMapTileDestination(getBot(), PositionNameHere); getMouse().click(destination); Edited January 10, 2016 by steve498 3
lisabe96 Posted January 10, 2016 Author Posted January 10, 2016 I have had the same problem as you and I believe it's part of OSBot's antiban. If you are 1-2 tiles away from your chosen position then it will still deem it as acceptable regardless of you setting the threshold to 0. If you want to walk to an exact tile then you could do the following... (Untested!) MainScreenTileDestination destination = new MainScreenTileDestination(getBot(), PositionNameHere); getMouse().click(destination); Or using the minimap, MiniMapTileDestination destination = new MiniMapTileDestination(getBot(), PositionNameHere); getMouse().click(destination); But could that ^ not get you into unwanted situations? Like if there's a ground item at that tile or an npc you might be clicking that
steve498 Posted January 10, 2016 Posted January 10, 2016 But could that ^ not get you into unwanted situations? Like if there's a ground item at that tile or an npc you might be clicking that I suppose that's a possibility. I guess you could do something like: destination.interact(bot, "Walk here") Untested though but you get the idea.
lisabe96 Posted January 10, 2016 Author Posted January 10, 2016 I suppose that's a possibility. I guess you could do something like: destination.interact(bot, "Walk here") Untested though but you get the idea. Nvm, it does click the minimap and not an actual ground tile so you can't interact with anything. The solution given works thanks! 1