June 24, 20169 yr Is there a way to disable the auto login? I want my script to perform breaks on its own, because the bot doesnt break well with combat scripts. If the bot logins automatically right after logout it wont work. Any way of overriding or changing something?
June 24, 20169 yr 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
June 24, 20169 yr Author 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
June 24, 20169 yr 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 Acquire a better IDE #EclipseSux
June 24, 20169 yr 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 Clean your project, remove osbot from buildpath and re add it, restart eclipse.
June 24, 20169 yr Author Clean your project, remove osbot from buildpath and re add it, restart eclipse. Acquire a better IDE #EclipseSux Okay thx, and should I implement it in onStart() or onLoop() ? Knowing that onStart() only gets executed after login.
June 24, 20169 yr Okay thx, and should I implement it in onStart() or onLoop() ? Knowing that onStart() only gets executed after login. onStart since it only needs to be set once.
June 26, 20169 yr Author @FrostBug @LoudPacks Ok thanks guys, I've managed to override the auto login, now I've got my own break system that works. Edited June 26, 20169 yr by dokato
Create an account or sign in to comment