Jump to content

VERY SIMPLE BREAKHANDLER


Medusa

Recommended Posts

So since I'm a retard and don't know where the fucking spoiler button is located, I'm posting code on pastebin.

 

BreakHandler code:

https://pastebin.com/raw/A6vG6u3B

 

Make a class and call it BreakManager, then drop that code in there. ezpz.

 

Then you can use it in your script like this.

https://pastebin.com/raw/9BHMK3kn

 

When you initialize the BreakManager in your onStart method, you gotta remember that it's set to hours. AKA

BreakManager bm = new BreakManager(1 hour, 1 hour);

(Don't actually write hour though)

You can change the time format yourself, but I just made it hours. Ok bye

  • Like 1
Link to comment
Share on other sites

  On 3/22/2020 at 11:27 AM, Medusa said:

So since I'm a retard and don't know where the fucking spoiler button is located, I'm posting code on pastebin.

 

BreakHandler code:

https://pastebin.com/raw/A6vG6u3B

 

Make a class and call it BreakManager, then drop that code in there. ezpz.

 

Then you can use it in your script like this.

https://pastebin.com/raw/9BHMK3kn

 

When you initialize the BreakManager in your onStart method, you gotta remember that it's set to hours. AKA

BreakManager bm = new BreakManager(1 hour, 1 hour);

(Don't actually write hour though)

You can change the time format yourself, but I just made it hours. Ok bye

Expand  
  Reveal hidden contents
Edited by Loque
Link to comment
Share on other sites

  On 3/22/2020 at 12:04 PM, Medusa said:

ngl I have no idea what that is

Expand  
private RandomSolver solver = new RandomSolver(RandomEvent.BREAK_MANAGER) {
        @Override
        public boolean shouldActivate() {
            return false;
        }

        @Override
        public int onLoop() throws InterruptedException {
            return 0;
        }
    };

Put this in onStart

 bot.getRandomExecutor().overrideOSBotRandom(solver);

 

Link to comment
Share on other sites

  On 3/22/2020 at 12:13 PM, Gunman said:
private RandomSolver solver = new RandomSolver(RandomEvent.BREAK_MANAGER) {
        @Override
        public boolean shouldActivate() {
            return false;
        }

        @Override
        public int onLoop() throws InterruptedException {
            return 0;
        }
    };

Put this in onStart

 bot.getRandomExecutor().overrideOSBotRandom(solver);

 

Expand  

200iq

Link to comment
Share on other sites

  On 3/22/2020 at 12:13 PM, Gunman said:
private RandomSolver solver = new RandomSolver(RandomEvent.BREAK_MANAGER) {
        @Override
        public boolean shouldActivate() {
            return false;
        }

        @Override
        public int onLoop() throws InterruptedException {
            return 0;
        }
    };

Put this in onStart

 bot.getRandomExecutor().overrideOSBotRandom(solver);

 

Expand  

What are the chances of that working with randoms disabled? I'm guessing 0?

Edited by Medusa
Link to comment
Share on other sites

  • 1 month later...
  On 3/22/2020 at 12:04 PM, Medusa said:

ngl I have no idea what that is

Expand  

-has no idea that you can override random solver

 

  On 3/22/2020 at 12:41 PM, Medusa said:

What are the chances of that working with randoms disabled? I'm guessing 0?

Expand  

-doesn't know how it would work if you were to override the random solver functionality, guy nicely answers him

 

  On 3/22/2020 at 12:44 PM, Medusa said:

No shit. That's why I made this thread.

Expand  

-condescending like he already knew at time of posting, when his prior statements show that he didn't know,  and he literally asked the dude

 

 

 

U ok bud? little hostile

Link to comment
Share on other sites

  On 5/2/2020 at 7:10 PM, Roboman said:

-has no idea that you can override random solver

 

-doesn't know how it would work if you were to override the random solver functionality, guy nicely answers him

 

-condescending like he already knew at time of posting, when his prior statements show that he didn't know,  and he literally asked the dude

 

 

 

U ok bud? little hostile

Expand  

No this is for if you're running CLI parameter norandoms, which disables all the solvers. He was right I was having brain malfunctions at the time because I was tired :feels:

Link to comment
Share on other sites

  On 5/2/2020 at 7:10 PM, Roboman said:

-has no idea that you can override random solver

 

-doesn't know how it would work if you were to override the random solver functionality, guy nicely answers him

 

-condescending like he already knew at time of posting, when his prior statements show that he didn't know,  and he literally asked the dude

 

 

 

U ok bud? little hostile

Expand  

Little hostile as I have to defend the work I made :) (Didn't realize I had to do that, but ok)

Edited by Medusa
  • Boge 1
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...