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.

Detecting an open widget over the game screen.

Featured Replies

How would I be able to detect if there's any open widget on the game screen? I can't seem to do it by checking for changes in other widgets when a widget opens up. I found clicking the run button closes all interfaces, but I need to still be able to check if there is a widget that should be closed. Thanks!

  • Author

widgets.getWidgets() ?

 

I've really gotta explore the API more, I rewrote half the methods in the widgets class... thanks lol

 

 

Edit: widgets.closeOpenInterface(); doesn't close The collect, Sets, or GE History widgets however.

Edited by apa

I've really gotta explore the API more, I rewrote half the methods in the widgets class... thanks lol

 

 

Edit: widgets.closeOpenInterface(); doesn't close The collect, Sets, or GE History widgets however.

http://osbot.org/forum/topic/69297-close-ge-collection-box-notice-board/?hl=collection%20box

 

 

 

In case your bank interaction misclicks ^^

//close collectionbox (by Botre)

RS2Widget collectionBox = getWidgets().get(402, 2, 11);

if (collectionBox != null && collectionBox.isVisible()) {

collectionBox.interact("Close");

}

And this one by @Novak

//close noticeboard (by Novak)

RS2Widget noticeBoard = script.getWidgets().get(220, 16);

if(noticeBoard != null && noticeBoard.isVisible()) {

noticeBoard.interact("Close");

}

 

  • Author

 

Thanks, I just rewrote mine to check if any wrong interface is open using the sprite of the close button, because it can also misclick the GE in my bot and I didn't want to make a bunch of cases as the Sets and History widgets have different children IDs:

if (!isGEOpen() && !isBankOpen() && widgets.containingSprite(535).size() > 0) {
    if (containsSelection(548, 94, "Toggle Run", true)) {
        interactInterface(548, 94, "Toggle Run");
    }
}

Edited by apa

Create an account or sign in to comment

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.