Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

OSBot 2.3.4 - Bank API and Comparators

Featured Replies

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_CACHE
Bank.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

 

@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 by josedpay

banking is broken, guess some stuff went wrong.

  • Author

I'll go over some of the banking api tonight and try to make a release if I find the issue.

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 wub.png

Edited by josedpay

It opens the bank interface, but does not interact withdrawing or depositing. It gets stuck there.

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.