/** * Sets withdraw mode - true for noted items, false for un-noted * * @param which */ private void withdrawNote(boolean which) { if (!isOpen()) return; IComponent n = botEnv.interfaces.getComponent(BANK_INTERFACE_ID, BANK_BUTTON_NOTE); if (n == null) return; if (which) { // Set to withdraw-notes if (n.getTextureID() != 1433) n.doClick(); } else { if (n.getTextureID() != 1431) n.doClick(); } }
/** * @param depositType Inventory, equipment, or familiar. * @return */ private boolean depositByButton(int depositType) { if (!isOpen()) return false; IComponent depButton = botEnv.interfaces.getComponent(Bank.BANK_INTERFACE_ID, depositType); if (depButton != null && depButton.isVisible()) { if (depButton.doClick()) { sleep(300, 500); return true; } } return false; }
/** Closes the bank interface. */ public void close() { IComponent close = botEnv.interfaces.getComponent(762, BANK_BUTTON_CLOSE); if (close != null && isOpen()) { close.doClick(); } }