Jump to content

disabling auto login


dokato

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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