Jump to content

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


Recommended Posts

Posted

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.

Posted

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

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