Alek Posted December 19, 2014 Share Posted December 19, 2014 The Bank API is now the second class to undergo the interface value cache transformation talked about in previous releases. Please note that the withdraw and rearrange modes are deprecated and WILL NOT be updated when they break. Please ensure your scripts are using the new dynamic methods. This is a pretty large update to banking. If you have any issues please let me know immediately! Bank API Changes: -Deprecated: Bank.WithdrawAsMode Bank.RearrangeMode Bank.setRearrangeMode Bank.setWithdrawAsMode Bank.INTERFACE_ID Bank.INTERFACE_CHILD_ID Bank.SCROLL_CONTAINER -Added: Bank.MAIN_INTERFACE_ID_CACHE Bank.CHILD_INTERFACE_ID_CACHE Bank.REARRANGE_SWAP_CACHE Bank.REARRANGE_INSERT_CACHE Bank.WITHDRAW_NOTE_CACHEBank.WITHDRAW_ITEM_CACHE Bank.BankMode Bank.getInsertMode() Bank.getWithdrawMode() Bank.enableMode(BankMode) -Retrieves values dynamically: -Bank main interface id -Bank child id -Bank swap modes -Bank deposit modes -Bank deposit inventory/equipment In other news: Preset collection comparators have been added; the first one being InterfaceComparator. Comparators are useful for sorting varying objects which in our case can be NPCs, Game objects, Interfaces, and other components we typically find while scripting. Specifically in this case, the Bank API retrieves interface ids for the various buttons dependent on their location within the window (specifically their getX() value). For instance: List<RS2InterfaceChild> children = new ArrayList<>(); Collections.sort(children, InterfaceComparator.yComparator); In this case, all the RS2InterfaceChilds are arranged within the list from least to greatest in getY() value. In the future I plan to apply similar comparators to NPCs with sorting by values such as height, polygon count, position, etc. Also for the new Bank API usage: bank.enableMode(Bank.BankMode.REARRANGE_INSERT) API Docs have been updated, clear your browser file cache if they haven't updated. Sincerely, -The OSBot Staff 2 Link to comment
Joseph Posted December 19, 2014 Share Posted December 19, 2014 good shit alek, you should get on the chat i want to ask you something. Link to comment
Joseph Posted December 19, 2014 Share Posted December 19, 2014 (edited) @Alek since Banks is a class that has static polygonsArea. Can you make a static method that returns all the polygons in banks. So it will be easier for the scripters to cycle through the different banks with out manually creating an array of polygonsArea like i had to do. Unless you want to add in my method. i dont mind. Edited December 19, 2014 by josedpay Link to comment
Fantabulous Posted December 19, 2014 Share Posted December 19, 2014 Thanks, you're the man @Alek Link to comment
BotRS123 Posted December 19, 2014 Share Posted December 19, 2014 (edited) Keep it up with all the refractoring you are doing. Edited December 19, 2014 by BotRS123 1 Link to comment
mailinator Posted December 20, 2014 Share Posted December 20, 2014 bank.close() doesn't do anything now. Link to comment
lodsl Posted December 20, 2014 Share Posted December 20, 2014 banking is broken, guess some stuff went wrong. Link to comment
Joseph Posted December 21, 2014 Share Posted December 21, 2014 The better explaination Alek gets. the faster he could fix these problem. Link to comment
Alek Posted December 21, 2014 Author Share Posted December 21, 2014 I'll go over some of the banking api tonight and try to make a release if I find the issue. 1 Link to comment
Joseph Posted December 21, 2014 Share Posted December 21, 2014 (edited) I'll go over some of the banking api tonight and try to make a release if I find the issue. thanks you for your hard work Edited December 21, 2014 by josedpay Link to comment
lodsl Posted December 21, 2014 Share Posted December 21, 2014 It opens the bank interface, but does not interact withdrawing or depositing. It gets stuck there. Link to comment