Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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.

You are closing your if statement by putting a semicolon at the end of it. Your code should look like this.

if (myPlayer().getPosition().equals(PLAYER_LOC)) {
	getBank().open();
}

 

Haha what's with all the newbies lately.

Learn some basic Java first and then try to script. Not the other way around, it doesn't work to well regardless of the outcome.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.