Jump to content

OSBot 2 Pathing Method.


Guest Apogee

Recommended Posts

Guest Apogee

What do you mean?

 

A Method to walk a Position[]

I couldn't find one in the rs07.api database and i've looked into making my own with API i'm unfamiliar with.

 

Why don't we have traverse()?

Link to comment
Share on other sites

Guest Apogee
localWalker.walk(position);

From this you can quite easily make a method to traverse a path.

 

 

 

I'm familiar with localWalker, i'm just unfamiliar of how to create a method that grabs the x and y's in the Position[] and then grabs the next two, and the next two, and the next two.

Link to comment
Share on other sites

I'm familiar with localWalker, i'm just unfamiliar of how to create a method that grabs the x and y's in the Position[] and then grabs the next two, and the next two, and the next two.

 

You don't need to grab the x,y in the position, you need to:

1. grab the position from position[]

2. check the current closest position from that array and assume it's your position (so now check the array starting from this position and find closest)

3. then walk the next position, (if it exists and if  your distance from the last position is bigger than X) 

 

All you need to do this is:

Simple Position(parameter Position[]) and void (parameter Position[]) functions.

2 Simple for loops.

map.distance(position)

map.walk(position)

 

If you really want to you can also use canReach. You should probably also make it not spam-click too much.

That's how I'd do it anyway.

 

If you still can't do it you can contact me on PM, with any scraps that you've been trying.

Edited by Nitrousek
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...