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.

Script isn't withdrawing, will only withdraw if i manually open the bank for it.

Featured Replies


case BANK:

if (bank.isOpen()) {

if(inventory.contains("Bow string"))

bank.depositAll("Bow string");

if(!inventory.contains("Flax"))

bank.withdraw("Flax",28);

if(inventory.contains("Flax"))

break;

}

else

{

bank.open();

}

maybe unrelated to the issue but the case won't break on the else of the if, so then it will fall through to the next case handling block, unless of course you want this

If it only withdraws when you manually open the bank, there is an issue with opening it (bank.open()). Personally, I have never it used due to the very same reason this thread is posted.

 

However, in the meantime you'll just have to do the plain old RS2Object bankBooth = getObjects().closest("Bank booth"); or, create a filter for it to find all bank booths with the 'Bank' option to get rid of closed bank booths etc (this also applies to bank npcs and bank chests) and interact with it to open the bank.

  • Author

maybe unrelated to the issue but the case won't break on the else of the if, so then it will fall through to the next case handling block, unless of course you want this

 

Yeah I want that. It will just end up going back to that case since everything holds true, it's just now the bank window is open which allows it to execute the if statement.

If it only withdraws when you manually open the bank, there is an issue with opening it (bank.open()). Personally, I have never it used due to the very same reason this thread is posted.

 

However, in the meantime you'll just have to do the plain old RS2Object bankBooth = getObjects().closest("Bank booth"); or, create a filter for it to find all bank booths with the 'Bank' option to get rid of closed bank booths etc (this also applies to bank npcs and bank chests) and interact with it to open the bank.

 

Let me try that and see, sorry for the late reply I fell asleep.

If it only withdraws when you manually open the bank, there is an issue with opening it (bank.open()). Personally, I have never it used due to the very same reason this thread is posted.

 

However, in the meantime you'll just have to do the plain old RS2Object bankBooth = getObjects().closest("Bank booth"); or, create a filter for it to find all bank booths with the 'Bank' option to get rid of closed bank booths etc (this also applies to bank npcs and bank chests) and interact with it to open the bank.

 

Worked! thank you! But, I also added in an extra ifstatement to my BANKLEAVE case that said if(inventory.contains("Flax"), so that portion of the code won't eveen start unless I have flax in my inventory.

 

op: please note to yourself that bank.open() supports only object also i believe that only these banks work. http://prntscr.com/6ewd9l

 

I was using lumbridge upper, so im not sure if that was exactly the reason. I changed two things around which might have been causing the issue.

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.