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

it just keeps opening bank

Featured Replies

it seems it doesnt know the depositbox is open, it just closes the bank again and tries to bank againd without depositing.

thanks guys in advance 

case "BANKING":
            final Area BANKING_AREA = new Area (3044,3233,3050,3236);
            
            
                if(BANKING_AREA.contains(myPosition())){
                    Entity depobox = objects.closest("Bank deposit box");
                    if (depobox != null) {
                        sleep(random(757,2345));
                        if (depobox.interact("Deposit")) {
                            if (depositBox.isOpen()) {                                                                                                  
                                log("Try opening bank");
                                    depositBox.depositAllExcept("Bronze pickaxe");
                                
                            }
                        }
                    }
                }
            
        break;

You should separate out the is-open and is-not-open logic so that when onLoop runs again your script can take appropriate action.

if (depobox.isOpen()) {
   depobox.depositAllExcept("Bronze pickaxe");
} else {
   depobox.interact("Deposit");
}

 

Edited by agentcallooh

  • Author
2 minutes ago, agentcallooh said:

You should separate out the is-open and is-not-open logic so that when onLoop runs again your script can take appropriate action.


if (depositBox.isOpen()) {
   depositBox.depositAllExcept("Bronze pickaxe");
} else {
   depobox.interact("Deposit");
}

 

legend

@mousbros Why not use the depsoitBox API method open to open the depositbox?

Also to expand off what Agentcallooh said

	if (getDepositBox().isOpen()) {
            if (getDepositBox().depositAllExcept("Bronze pickaxe")) {
                //sleep
            }
        } else if (getDepositBox().open()) {
            //sleep till open
        } else {
            //walk to deposit box area
        }

I would do it like this^ If the box is open it will go to the next if and only if that boolean returns true will it sleep. So it doesn't sleep for  10 seconds or whatever if the action failed. Continue to the else if statement, the API method will look and see if there is a deposit box nearby to attempt to open it. If it does it will then continue to the sleep or whatever you wanna do after. Else walk to the box.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.