I added commented hastags for where you might want to change, and minuses for code to remove, I haven't tested but this should work. Just be sure to add code from Explv's(this man is a god btw, I'd be lost without his tuts) Sleep class.
You might want to add nullchecks and additional checks here and there, like to make sure your bank actually contains the items, else you might start getting nullpointer exceptions.
Once you get a few more scripts under your belt, look into some tuts on either enums, or task based scripting, as it gives you a lot of flow control for your scripts. And always read the api, once you know how to read what it's saying, it's extremely helpful.
Good luck, please let us know how it goes!