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.

No more org.osbot.rs07.script.RandomBehaviourHook ?

Featured Replies

Okay so I've opened a script i wrote 3 months ago where i implemented my own break handler and i used to import this:

import org.osbot.rs07.script.RandomBehaviourHook;

And i used to put this in my onStart() : 

 

try {
   this.bot.getRandomExecutor().registerHook(new RandomBehaviourHook(RandomEvent.AUTO_LOGIN) {
       @[member='Override']
       public boolean shouldActivate() {
        if(/*blabla*/){
        //blabla
        return false;
        }else{
        return super.shouldActivate();
        }
        }
   });
} catch (Exception ex) {
   //blabla
}

 

And it used to work perfectly, but now it gives me an error when I'm trying to import that RandomBehaviourHook and it looks like it's gone from the API.

 

Is it gone? Or is there another way to make this work?

Edited by dokato

Okay so I've opened a script i wrote 3 months ago where i implemented my own break handler and i used to import this:

import org.osbot.rs07.script.RandomBehaviourHook;

And i used to put this in my onStart() : 

 

try {
   this.bot.getRandomExecutor().registerHook(new RandomBehaviourHook(RandomEvent.AUTO_LOGIN) {
       @[member='Override']
       public boolean shouldActivate() {
        if(/*blabla*/){
        //blabla
        return false;
        }else{
        return super.shouldActivate();
        }
        }
   });
} catch (Exception ex) {
   //blabla
}

 

And it used to work perfectly, but now it gives me an error when I'm trying to import that RandomBehaviourHook and it looks like it's gone from the API.

 

Is it gone? Or is there another way to make this work?

 

You can now disable randoms all together using the:

-allow norandoms

CLI flag, and then write your own custom login handler

Edited by Explv

Why do you need to register this? isn't it enabled by default

 

Alek added a -norandom flag to CLI not too long ago, look into that.

Edited by Tom

  • Author

Why do you need to register this? isn't it enabled by default

 

Alek added a -norandom flag to CLI not too long ago, look into that.

 

 

You can now disable randoms all together using the:

-allow norandoms

CLI flag, and then write your own custom break handler

 

Well Thx guys,

But you both clearly misunderstood what I'm trying to do here

 

I don't want to disable a random here, I just want to make sure that the random will only be executed whenever I like (on code level), not completely disable it using CLI.

 

In this case I only want it to log back in when the expression in the if(/*blabla*/) returns false. If I disable that random completely it won't be able to log back in. 

Edited by dokato

Well Thx guys,

But you both clearly misunderstood what I'm trying to do here

 

I don't want to disable a random here, I just want to make sure that the random will only be executed whenever I like (on code level), not completely disable it using CLI.

 

In this case I only want it to log back in when the expression in the if(/*blabla*/) returns false. If I disable that random completely it won't be able to log back in. 

 

I did not misunderstand what you are trying to do.

 

The registerHook method has been removed from the API, to achieve what you want to do, you will need to disable all randoms, and write your own login handler, like this:

 

http://osbot.org/forum/topic/109560-a-simple-login-handler/

  • Author

I did not misunderstand what you are trying to do.

 

The registerHook method has been removed from the API, to achieve what you want to do, you will need to disable all randoms, and write your own login handler, like this:

 

http://osbot.org/forum/topic/109560-a-simple-login-handler/

 

A ok Thx, I still tried to use OSBot's login thing, but now you have to make even that completely yourself, very thoughtfull of Alek or who ever changed that. 

Guess what we learn at college is really true, "change is the only constant". 

But in this case I really don't understand why.

But in this case I really don't understand why.

 

So we can properly manage farms? emote32342.png

Edited by House

Your picture triggers me emote32342.png

 

This isn't the spam section, but why :feels:?

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.