Jump to content

Flawless Path Walking


Divine

Recommended Posts

  • 7 months later...
Guest Apogee

Check it out and let us know

 

I've already tried this, a long with a lot of other walking methods.

Have a look at this:

	private boolean walkPath(Position[] path) {
		Position finalPos = null;
		for (Position pos : path) {
			if (canReach(pos)
					&& pos.distance(client.getMyPlayer().getPosition()) < 18) {
				finalPos = pos;
			}
		}
		if ((finalPos != null && (client.getDestination() == null || client
				.getDestination().distance(finalPos) > 3))) {
			try {
				finalPos.walkMinimap(bot);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}

		}
		if (finalPos == null) {
			return false;
		}
		return true;
	}

}

To use it, you must have an Position[] or what everyone calls "path". It looks like this:

	private Position[] TO_REDBIRD = new Position[] {
			new Position(2453, 3087, 0), new Position(2449, 3071, 0),
			new Position(2440, 3056, 0), new Position(2432, 3039, 0),
			new Position(2436, 3045, 0), new Position(2448, 3034, 0),
			new Position(2461, 3024, 0), new Position(2470, 3021, 0),
			new Position(2479, 3019, 0), new Position(2485, 3004, 0),
			new Position(2485, 2993, 0), new Position(2957, 3261, 0),
			new Position(2491, 2987, 0), new Position(2491, 2972, 0),
			new Position(2498, 2957, 0), new Position(2506, 2941, 0),
			new Position(2513, 2925, 0), new Position(2521, 2910, 0),
			new Position(2527, 2894, 0), new Position(2543, 2893, 0),
			new Position(2554, 2892, 0), new Position(2561, 2894, 0),
			new Position(2577, 2894, 0), new Position(2590, 2904, 0),
			new Position(2599, 2911, 0), new Position(2605, 2914, 0),
			new Position(2609, 2924, 0) };

After you have that, you just walk to all those positions with this:

walkPath(TO_REDBIRD);

Then you're done. It will walk to the location and stop at the final position. If i helped reply back, or just leave a like :p.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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