Jump to content

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


Twin

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...