Jump to content

Walking to a tile


Recommended Posts

Posted
	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?

Posted (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 by steve498
  • Like 3
Posted

 

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...