Create a class called Breaker and add this in:
import org.osbot.rs07.script.RandomEvent;
import org.osbot.rs07.script.RandomSolver;
import org.osbot.rs07.script.ScriptManifest;
public class Breaker extends RandomSolver {
public Breaker() {
super(RandomEvent.BREAK_MANAGER);
}
@Override
public boolean shouldActivate() {
//Condition for the break manager to be activated
return false;
}
@Override
public int onLoop() throws InterruptedException {
//Code which should be executed while the break manager is activated
//example
log("hi");
return 0;
}
}
Add this to your scripts onStart()
Breaker breaker = new Breaker();
breaker.exchangeContext(getBot());
bot.getRandomExecutor().overrideOSBotRandom(breaker);