Jump to content

Why does it still open the bank anywhere? (Beginner)


Recommended Posts

Posted

I am starting the journey of trying to learn java and osbot in the hopes to make some personal scripts.

 

private static final Position PLAYER_LOC = new Position(3169, 3423, 0);

@Override
public void onStart() throws InterruptedException {

}

@Override
public int onLoop() throws InterruptedException {

    if (myPlayer().getPosition().equals(PLAYER_LOC)); {
    log("You are in the right location");
    getBank().open();}

I am trying to make the bot only attempt to open the bank if its standing on that position.  But it still attempts to open the bank, regardless of what tile/location I am on.

What part is incorrect? 

 

Thanks.

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