shaba123 Posted May 26, 2018 Share Posted May 26, 2018 This is what i am using to bank and withdraw my items, it works but i know its not the proper way. This is what i use : if (chestArea.contains(myPosition()) & !getBank().isOpen() & !getInventory().contains(bankItems)) { getObjects().closest("Bank chest").interact("Use"); new ConditionalSleep(5000) { // If in bank area and bank isnt open and inventory contains - public boolean condition() { // certain items, open the bank. return getBank().isOpen(); } }.sleep();} else log("Banking"); if (getBank().contains(amuletFilter)) { //If the bank contains amulet then - bank.depositAll(); // deposit everything inventItems.forEach((e) -> bank.withdraw(e, 1)); // withdraw my array of items getBank().withdraw(amuletFilter, 1); // withdraw amulet getBank().withdraw(duelRing, 1); // withdraw ring if (!getEquipment().isWearingItem(EquipmentSlot.RING, "Ring of wealth")) { // if im not wearing a ring of wealth then getBank().withdraw(ringOfWealth, 1); // withdraw a ring of wealth aswell as the other items } getBank().close(); //close the bank } else { log("Out of supplies!"); //else if any of that is not possible, stop script. stop(); } Quote Link to comment Share on other sites More sharing options...
cutiekank Posted May 26, 2018 Share Posted May 26, 2018 i worked hard on this https://gyazo.com/ffcab677c01b279d55957ee9e90c477e Quote Link to comment Share on other sites More sharing options...
Cloxygen Posted May 26, 2018 Share Posted May 26, 2018 (edited) You want to check if your the bank contains your players position in a separate if statement, so you can else it with a walk to bank function and nest the isopen() check inside that. if(bank.contains(myPlayer())){ if(bank.isopen()){ depositall(); } else openbank(); } else walktobank(); also for withdrawing items I would just type the string of the item name, unless you have a reason for it? getBank().withdraw("Ring of dueling", 1); Edited May 26, 2018 by Cloxygen Quote Link to comment Share on other sites More sharing options...