Created
June 18, 2012 13:09
-
-
Save phl0w/2948287 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private class Banking extends Strategy implements Task { | |
| @Override | |
| public boolean validate() { | |
| return (Inventory.getCount(primary) == 0 || Inventory | |
| .getCount(secondary) == 0) | |
| && guiInitialized | |
| && !Bank.isOpen(); | |
| } | |
| @Override | |
| public void run() { | |
| Bank.open(); | |
| Mouse.hop( | |
| Widgets.get(Bank.WIDGET_BANK, | |
| Bank.WIDGET_BUTTON_DEPOSIT_INVENTORY) | |
| .getAbsoluteX(), | |
| Widgets.get(Bank.WIDGET_BANK, | |
| Bank.WIDGET_BUTTON_DEPOSIT_INVENTORY) | |
| .getAbsoluteY()); | |
| Mouse.click(true); | |
| if (primary == 15309 && secondary == 15313) { // Overloads | |
| Bank.withdraw(primary, 4); | |
| Bank.withdraw(secondary, 4); | |
| Bank.withdraw(15317, 4); | |
| Bank.withdraw(15321, 4); | |
| Bank.withdraw(15325, 4); | |
| Bank.withdraw(269, 4); | |
| } | |
| Bank.withdraw(primary, primary == 169 ? 0 : 14); | |
| if (secondary != 12539) { | |
| Bank.withdraw(secondary, 14); | |
| } | |
| Time.sleep(800, 1000); | |
| Mouse.hop( | |
| Widgets.get(Bank.WIDGET_BANK, Bank.WIDGET_BUTTON_CLOSE_BANK) | |
| .getAbsoluteX(), | |
| Widgets.get(Bank.WIDGET_BANK, Bank.WIDGET_BUTTON_CLOSE_BANK) | |
| .getAbsoluteY()); | |
| Mouse.click(true); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment