badramen 2 Posted February 6 Bank.withdraw(String, int) - to withdraw a particular quantity of item doesn't work It simply right clicks, withdraw-X and then carries on with the next line of code For example: Bank.withdraw("Teleport to house", 100) Pretty crucial part of the API - what am I doing wrong? It is exactly as per the docs. Also to be clear - Bank.withdrawAll works, and Bank.withdraw(String) works (with quantity of 1) just not withdraw with qty specified
Hashtag 8888 Posted February 6 Step 1 is to make sure your client is up to date. Run the DBLauncher.jar to update it.
badramen 2 Author Posted February 7 Alright so withdrawing a specific quantity works now but closing the bank still doesn't work. Any tips?
badramen 2 Author Posted February 7 1 hour ago, fallacy87 said: Bank.close(); sleepUntil(()->!Bank.isOpen(),1000,1); Nope. How could something so simple and essential simply not work straight out of the box?
badramen 2 Author Posted February 7 I'm running this in the onStart script btw. Does it simply not work in that loop..?
Smokeyjay 1 Posted February 7 Quote if(Bank.isOpen()){ log("Bank is open"); if(Bank.close()){ log("Closing bank"); } } High level example. Add some log statements into your code and see what's being executed. If your log statement isn't executed, that section of code isn't being read.
fallacy87 8 Posted February 7 1 hour ago, badramen said: I'm running this in the onStart script btw. Does it simply not work in that loop..? there are 2 methods for onStart, if it is @Override public void onStart(String... params) { super.onStart(params); } then you are using the onstart with parameters and isn't firing. If you are using the one without onStart(String...params) then it is only going to fire 1 time, at the start of the script. You should read the API documentation on these to get a better understanding of what you are doing in your code. Put it in the loop and give it some conditions to detect it like Smokeyjay posted above.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now