Signup Now
Results 1 to 2 of 2
  1. #1
    Free User
    Join Date
    Aug 2015
    Posts
    10
    Reputation
    10
    Rep Power
    0

    Find closest waypoint?

    I was wondering why instead of using islocation() we dont use a function to find the closest waypoint on that Z-axis?

    Is there a way to find the closest waypoint on that floor?

  2. #2
    Moderator Josh's Avatar
    Join Date
    Dec 2013
    Posts
    1,394
    Reputation
    183
    Rep Power
    24
    Your definition of closest needs to be explained a bit, it's kinda hard to say. If, by closest, you mean the one which is nearest to you, then sure, this can be calculated by examining all waypoints and checking which has the lowest combined X+Y difference between it and your current location. If, on the other hand, you want to know which one will take the least steps to walk to, you're in for an entirely different challenge. For this you'll need a pathfinding algorithm and I don't believe the bot currently provides you with this. If you are creating scripts, I'd recommend just measuring out a few "zones" and having one go to waypoint for each.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •