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.

Why is my widget interaction kinda retarded?

Featured Replies

I have the widget for setting up a buy offer in box 1, but when the script tries to setup the offer, it misses the widget and just goes next to it like so:

https://gyazo.com/6cc01719e0e86e4463bcc1c6ceeafb4c

It happens like 75% of the time

pic of code:

https://gyazo.com/51813b05a9759085fda3a6a5d6cc3414

pic of widget info:

https://gyazo.com/d9aea51792eb398416a28151c8d25307

 

ur widget:
9yDtM1GCRxKQrYXIOfmo1w.png

 

vs the right widget:
YBzlKaG-Szu1QeErbl3ijA.png

also @Dab in a Lab jus for the record, because it's the widgets default option, you can just use widget.interact(), doesn't need the actual action, this will just left click on the widget for you.

  • Author
6 minutes ago, Slut said:

also @Dab in a Lab jus for the record, because it's the widgets default option, you can just use widget.interact(), doesn't need the actual action, this will just left click on the widget for you.

Sweet, thats good to know. Thanks for the help

2 hours ago, Dab in a Lab said:

I have the widget for setting up a buy offer in box 1, but when the script tries to setup the offer, it misses the widget and just goes next to it like so:

https://gyazo.com/6cc01719e0e86e4463bcc1c6ceeafb4c

It happens like 75% of the time

pic of code:

https://gyazo.com/51813b05a9759085fda3a6a5d6cc3414

pic of widget info:

https://gyazo.com/d9aea51792eb398416a28151c8d25307

 

just do 

getContext().getGrandExchange().buyItems(GrandExchange.Box.BOX_1);

 

and if you need any empty box

private GrandExchange.Box getUnusedBox(){
    for (GrandExchange.Box box : GrandExchange.Box.values()) {
        if (getContext().getGrandExchange().getStatus(box) == GrandExchange.Status.EMPTY)
            return box;
    }
    return GrandExchange.Box.BOX_1;
}

As Chris suggested, it's totally worth making use of the API features to do this for you rather than manually interacting with widgets!

  • Author
49 minutes ago, Chris said:

just do 


getContext().getGrandExchange().buyItems(GrandExchange.Box.BOX_1);

 

and if you need any empty box


private GrandExchange.Box getUnusedBox(){
    for (GrandExchange.Box box : GrandExchange.Box.values()) {
        if (getContext().getGrandExchange().getStatus(box) == GrandExchange.Status.EMPTY)
            return box;
    }
    return GrandExchange.Box.BOX_1;
}

Idk if its the getContext() but when I tried doing the getGE().buyItems(...) it didn't seem to do anything. The bot just read over that part of the script and continued onto the next part of the loop. I'll have to try mess around with a bit more

 

Edit: Just added it back to my script and now its working pretty well. Idk what was up with it earlier. Thank you

Edited by Dab in a Lab

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.