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.

Custom Random managers break login

Featured Replies

Hi guise,

import org.osbot.script.rs2.randoms.RandomBehaviourHook;
import org.osbot.script.rs2.randoms.RandomManager;

public class CombatRandom extends RandomBehaviourHook {
   
   public CombatRandom() {
      super(RandomManager.RUN_AWAY_FROM_COMBAT);
   }
   
   public boolean shouldActivate() {
      return false;
   }
   
}
So, I use this because I handle combat randoms in my own way.  This breaks the startup script on v 1.7.38+

 

It doesn't like it.

[ERROR][09/14/13 10:25:56 AM]: Error on executing random worker!
java.lang.NullPointerException
        at org.osbot.LPt2.shouldActivate(gh:25)
        at org.osbot.script.rs2.randoms.RandomManager.scan(pe:192)
        at org.osbot.lpT7.run(co:7)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
[ERROR][09/14/13 10:25:56 AM]: Error on executing random worker!
java.lang.NullPointerException
        at org.osbot.LPt2.shouldActivate(gh:25)
        at org.osbot.script.rs2.randoms.RandomManager.scan(pe:192)
        at org.osbot.lpT7.run(co:7)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
[ERROR][09/14/13 10:25:57 AM]: Error on executing random worker!
java.lang.NullPointerException
        at org.osbot.LPt2.shouldActivate(gh:25)
        at org.osbot.script.rs2.randoms.RandomManager.scan(pe:192)
        at org.osbot.lpT7.run(co:7)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
[ERROR][09/14/13 10:25:57 AM]: Error on executing random worker!
java.lang.NullPointerException
        at org.osbot.LPt2.shouldActivate(gh:25)
        at org.osbot.script.rs2.randoms.RandomManager.scan(pe:192)
        at org.osbot.lpT7.run(co:7)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
[ERROR][09/14/13 10:25:57 AM]: Error on executing random worker!
java.lang.NullPointerException
        at org.osbot.LPt2.shouldActivate(gh:25)
        at org.osbot.script.rs2.randoms.RandomManager.scan(pe:192)
        at org.osbot.lpT7.run(co:7)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
This happens in .38, .39 and .40

Edited by dreamliner

  • Author

I have isolated the problem down to using 

this.randomManager.unregisterHook(RandomManager.RUN_AWAY_FROM_COMBAT);
this.randomManager.registerHook(new CombatRandom()); 

in onStart()

 

If I initialize it in my onLoop(), the scripts starts normally.  There any many scripts which are broken due to this issue.

I still got this issue.

It is annoying to loing before starting the script.

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.