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.

Turn run on snippet

Featured Replies

	public boolean enableRun(boolean on)	{
		if (!script.settings.isDataOrbsActive())
			return script.settings.setRunning(on);
		else{
			if (script.interfaces.getChild(548, 93) != null)
				return script.interfaces.getChild(548, 93).interact();
			else
				return false;
		}		
	}

Its nothing much to it, support both the orbs or using settings.

 

edit: i updated op to support enabling method

Edited by josedpay

  • Author

I actually plan on updating the run method soon.

That's nice to know biggrin.png,  i was just organizing my dependencies folder, i saw this method, decide why not release it. Also i have a question for you, ill pm it to you now

Edited by josedpay


public boolean turnRunOn() {

        return !script.settings.isDataOrbsActive() && (script.interfaces.getChild(548, 93) != null ? script.interfaces.getChild(548, 93).interact(): script.settings.setRunning(true));

    }

Edited by Pseudo

  • Author
public boolean turnRunOn() {
        return !script.settings.isDataOrbsActive() && (script.interfaces.getChild(548, 93) != null ? script.interfaces.getChild(548, 93).interact(): script.settings.setRunning(true));
    }

pointless post 

  • Author

How is posting code improvements 'pointless'?

wtf, the only thing you changed was making it into one line -.-, I want my code to be readable. For those new scripters. 

 

Also, your code will never return true if someone has the data orbs on because of 

return !script.settings.isDataOrbsActive() && (blah);

so if this is improving code, i dont know what java is facep.gif

It's kinda redundant adding a null check for the 548 widget, since it's what makes up the main game screen. Have it take a boolean for enable/disable run and rename it to enableRun or something to make the method more versatile.

 

 

public boolean turnRunOn() {
        return !script.settings.isDataOrbsActive() && (script.interfaces.getChild(548, 93) != null ? script.interfaces.getChild(548, 93).interact(): script.settings.setRunning(true));
    }

8da4667e20a6fbf865fb191e74c48a07.png

 

Should be:

public boolean turnRunOn() {
    return script.configs.get(RUN_CONFIG) > 0 || (!script.settings.isDataOrbsActive() && script.settings.setRunning(true)) || script.interfaces.getChild(548, 93).interact();
}

Edited by Swizzbeat

  • Author

 

It's kinda redundant adding a null check for the 548 widget, since it's what makes up the main game screen. Have it take a boolean for enable/disable run and rename it to enableRun or something to make the method more versatile.

 

 

i was checking the widgets child to see if it contains the the orb to interact with it. Since the api doesnt contain a method.

 

Also i only supplying the basic, the get run energy and stuff they could add it in there self. 

 

edit op too

i was checking the widgets child to see if it contains the the orb to interact with it. Since the api doesnt contain a method.

 

Also i only supplying the basic, the get run energy and stuff they could add it in there self. 

 

edit op too

I'm 99% sure the widget child is always there, despite whether orbs are enabled or not. Just a suggestion :p

 

It's kinda redundant adding a null check for the 548 widget, since it's what makes up the main game screen. Have it take a boolean for enable/disable run and rename it to enableRun or something to make the method more versatile.

 

 

8da4667e20a6fbf865fb191e74c48a07.png

 

Should be:

public boolean turnRunOn() {
    return script.configs.get(RUN_CONFIG) > 0 || (!script.settings.isDataOrbsActive() && script.settings.setRunning(true)) || script.interfaces.getChild(548, 93).interact();
}

I don't even Osbot, xHE001C.png. Just posting dat ternary.

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.