dokato Posted June 24, 2016 Share Posted June 24, 2016 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? Quote Link to comment Share on other sites More sharing options...
Fruity Posted June 24, 2016 Share Posted June 24, 2016 dont select an acc when you load the client and start script logged in 1 Quote Link to comment Share on other sites More sharing options...
Harry Posted June 24, 2016 Share Posted June 24, 2016 dont select an acc when you load the client and start script logged in Quote Link to comment Share on other sites More sharing options...
FrostBug Posted June 24, 2016 Share Posted June 24, 2016 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 Quote Link to comment Share on other sites More sharing options...
dokato Posted June 24, 2016 Author Share Posted June 24, 2016 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 Quote Link to comment Share on other sites More sharing options...
FrostBug Posted June 24, 2016 Share Posted June 24, 2016 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 2 Quote Link to comment Share on other sites More sharing options...
LoudPacks Posted June 24, 2016 Share Posted June 24, 2016 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. 1 Quote Link to comment Share on other sites More sharing options...
dokato Posted June 24, 2016 Author Share Posted June 24, 2016 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. Quote Link to comment Share on other sites More sharing options...
LoudPacks Posted June 24, 2016 Share Posted June 24, 2016 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. 1 Quote Link to comment Share on other sites More sharing options...
dokato Posted June 26, 2016 Author Share Posted June 26, 2016 (edited) @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, 2016 by dokato Quote Link to comment Share on other sites More sharing options...