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.

setRunning(boolean) has problems

Featured Replies

So I make my script turn run on once energy hits past 30, so it clicks on the settings tab, and turns run on and switches to inventory just fine.

But, sometimes (1/50 times (random guess)), it accidently turns the Mouse from 2 buttons into 1, so whenever it clicks, a rightclick menu pops up, which the script isn't set for. So this caused me to die. I think this should be looked into, also got this error, not sure if it's related to the problem:

 

[ERROR][07/30/13 03:41:54 PM]: Error on executing script worker!
java.lang.NullPointerException
at org.osbot.script.MethodProvider.openTab(vl:1163)
at org.osbot.script.MethodProvider.setRunning(vl:2011)
at blablabla
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
 
Edit: Also randomly adjusts brightness, volume, etc.

Edited by DatArianaGrande

+1.

 

Tries to enable running, but fails to click on the right position. Causing a lot of useless selections of the option menu

Never happens with me i also do it in the same situation..

 

Could just make your own methods

public boolean setRun(boolean trueFalse)
{
   //Store current tab that is opened here...
   //if tab not open
     //open tab
   //Make interface variable here...
   //if not null
     //if visible
       //click or interact() or interact(String)
       //sleep
     //else
       //return false
   //return false
   //if(currentTab not open)
     //openTab(currentTab);
   return this.client.getConfig(173) == 1;  (That is the config value jagex uses to store wether or not run is on... 0 = off, 1 = on (obviously..)
}

Edited by Anon

+1 for this problem. I noticed this problem too, but I forgot to make a post about it.

 

This is my fix:

if(!isRunning()) {
    openTab(Tab.SETTINGS);
    RS2InterfaceChild run = client.getInterface(261).getChild(0);
    if(run != null) {
        RectangleDestination runDest = new RectangleDestination(run.getRectangle());
        client.moveMouse(runDest, false);
        sleep(random(200, 300));
        run.interact();
    }
}

Notice the "sleep" method in there. I put it there because OSBot tends to click too early. Even when the mouse is still moving.

Edited by SXForce

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.