Jump to content

disabling auto login


Recommended Posts

Posted

You can override shouldActivate to verify with your script whether or not now is a good time to start a break

try {
    this.bot.getRandomExecutor().registerHook(new RandomBehaviourHook(RandomEvent.BREAK_MANAGER) {
        @Override
        public boolean shouldActivate() {
            return super.shouldActivate() && canStartBreak();
        }
    });
} catch (Exception ex) {
    //Break manager is not enabled
    log("Failed to modify break handler");
}

It's up to you to implement the canStartBreak method

Posted

You can override shouldActivate to verify with your script whether or not now is a good time to start a break

try {
    this.bot.getRandomExecutor().registerHook(new RandomBehaviourHook(RandomEvent.BREAK_MANAGER) {
        @Override
        public boolean shouldActivate() {
            return super.shouldActivate() && canStartBreak();
        }
    });
} catch (Exception ex) {
    //Break manager is not enabled
    log("Failed to modify break handler");
}

It's up to you to implement the canStartBreak method

 

I get this error if i try to do that:

The type org.osbot.rs07.event.RandomExecutor cannot be resolved. It is indirectly referenced from required .class files

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...