Jump to content

.isOnMiniMap() not taking plane in to consideration?


Recommended Posts

Posted

Am I just using .isOnMiniMap() wrong or does it not take plane in to consideration at all? I have three positions that are in the same area but in different planes/floors and it'll say that it can see positions that are on a different plane than the player's current plane.

 private void miniMapTest() {
        if(new Position(3206, 3209, 1).isOnMiniMap(script.getBot()))
            script.log("(3206, 3209, 1) is on the minimap.");
        else if(new Position(3206, 3209, 2).isOnMiniMap(script.getBot()))
            script.log("(3206, 3209, 2) is on the minimap.");
}

That code will always say that it's found the plane 1 position, even if we're on plane 0 or plane 2. I solved it by just using map.getPlane() but I'd like to know if I'm using .isOnMiniMap() wrong or something.

Posted

Am I just using .isOnMiniMap() wrong or does it not take plane in to consideration at all? I have three positions that are in the same area but in different planes/floors and it'll say that it can see positions that are on a different plane than the player's current plane.

 private void miniMapTest() {
        if(new Position(3206, 3209, 1).isOnMiniMap(script.getBot()))
            script.log("(3206, 3209, 1) is on the minimap.");
        else if(new Position(3206, 3209, 2).isOnMiniMap(script.getBot()))
            script.log("(3206, 3209, 2) is on the minimap.");
}

That code will always say that it's found the plane 1 position, even if we're on plane 0 or plane 2. I solved it by just using map.getPlane() but I'd like to know if I'm using .isOnMiniMap() wrong or something.

 

pretty sure it doesn't take the plane in count, only the X and Y, just add a quick plane check to it to solve it :D

 

Khaleesi

  • Like 1

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...