Skip 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.

Toggle Run is Broken.

Featured Replies

  • Administrator

Alrite, while we're on the topic, anyone happen to already have code that clicks the orb? I may as well just add it in if someone already has it written. It should also check for whether the user has data orbs enabled before clicking the orb (if they don't, you can either enable data orbs or do nothing and I'll integrate the old code for clicking run in the settings tab).

In the meantime, back to looking at these pesky bugs -.-

Untested but in theory it's good

 

-edit renamed interface childs to understand better

-edit edit  forgot to check if run is set or not

    private void toogleRun() throws InterruptedException {
        RS2InterfaceChild orbToogle = client.getInterface(548).getChild(141);
        RS2InterfaceChild runToogle = client.getInterface(548).getChild(98);
        if (!isRunning()) {
            if (client.getConfig(1055) == 0) {
                if (client.getInterface(548) != null) {
                    if (runToogle != null && runToogle.isVisible()) {
                        runToogle.interact("Ok");
                    }
                }
            } else {
                if (!currentTab().equals(Tab.SETTINGS)) {
                    openTab(Tab.SETTINGS);
                }

                else if (currentTab().equals(Tab.SETTINGS)) {
                    if (client.getInterface(548) != null)
                        if (orbToogle != null && orbToogle.isVisible()) {
                            orbToogle.interact("Ok");
                        }
                }
            }
        }
    }

Edited by TheScrub

 

Untested but in theory it's good

 

-edit renamed interface childs to understand better

-edit edit  forgot to check if run is set or not

    private void toogleRun() throws InterruptedException {
        RS2InterfaceChild orbToogle = client.getInterface(548).getChild(141);
        RS2InterfaceChild runToogle = client.getInterface(548).getChild(98);
        if (!isRunning()) {
            if (client.getConfig(1055) == 0) {
                if (client.getInterface(548) != null) {
                    if (runToogle != null && runToogle.isVisible()) {
                        runToogle.interact("Ok");
                    }
                }
            } else {
                if (!currentTab().equals(Tab.SETTINGS)) {
                    openTab(Tab.SETTINGS);
                }

                else if (currentTab().equals(Tab.SETTINGS)) {
                    if (client.getInterface(548) != null)
                        if (orbToogle != null && orbToogle.isVisible()) {
                            orbToogle.interact("Ok");
                        }
                }
            }
        }
    }

 

Your null checks are redundant; If interface 548 was null, the NPE would've been thrown at the first line

Otherwise nice, I had no idea you could check against config like that

 

I have just method to click interface to toggle run, but there's another problem, when bot wants to click minimap, it often clicks the orb instead of position on minimap lol :D

  • Administrator

I have just method to click interface to toggle run, but there's another problem, when bot wants to click minimap, it often clicks the orb instead of position on minimap lol biggrin.png

Could you make a separate thread for that in this section so it doesn't get buried?

  • Author

Alrite, while we're on the topic, anyone happen to already have code that clicks the orb? I may as well just add it in if someone already has it written. It should also check for whether the user has data orbs enabled before clicking the orb (if they don't, you can either enable data orbs or do nothing and I'll integrate the old code for clicking run in the settings tab).

In the meantime, back to looking at these pesky bugs -.-

 

Yea it was just funny when my player was mass clicking the orbs :D Off on off on, (i hear computers can't make up there minds :x)

 

Get to them pesky bugs m8!

 

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.