dokato Posted November 20, 2016 Share Posted November 20, 2016 (edited) Okay so I've opened a script i wrote 3 months ago where i implemented my own break handler and i used to import this: import org.osbot.rs07.script.RandomBehaviourHook; And i used to put this in my onStart() : try { this.bot.getRandomExecutor().registerHook(new RandomBehaviourHook(RandomEvent.AUTO_LOGIN) { @[member='Override'] public boolean shouldActivate() { if(/*blabla*/){ //blabla return false; }else{ return super.shouldActivate(); } } }); } catch (Exception ex) { //blabla } And it used to work perfectly, but now it gives me an error when I'm trying to import that RandomBehaviourHook and it looks like it's gone from the API. Is it gone? Or is there another way to make this work? Edited November 20, 2016 by dokato Quote Link to comment Share on other sites More sharing options...
Explv Posted November 20, 2016 Share Posted November 20, 2016 (edited) Okay so I've opened a script i wrote 3 months ago where i implemented my own break handler and i used to import this: import org.osbot.rs07.script.RandomBehaviourHook; And i used to put this in my onStart() : try { this.bot.getRandomExecutor().registerHook(new RandomBehaviourHook(RandomEvent.AUTO_LOGIN) { @[member='Override'] public boolean shouldActivate() { if(/*blabla*/){ //blabla return false; }else{ return super.shouldActivate(); } } }); } catch (Exception ex) { //blabla } And it used to work perfectly, but now it gives me an error when I'm trying to import that RandomBehaviourHook and it looks like it's gone from the API. Is it gone? Or is there another way to make this work? You can now disable randoms all together using the: -allow norandoms CLI flag, and then write your own custom login handler Edited November 20, 2016 by Explv 1 Quote Link to comment Share on other sites More sharing options...
Tom Posted November 20, 2016 Share Posted November 20, 2016 (edited) Why do you need to register this? isn't it enabled by default Alek added a -norandom flag to CLI not too long ago, look into that. Edited November 20, 2016 by Tom Quote Link to comment Share on other sites More sharing options...
dokato Posted November 20, 2016 Author Share Posted November 20, 2016 (edited) Why do you need to register this? isn't it enabled by default Alek added a -norandom flag to CLI not too long ago, look into that. You can now disable randoms all together using the: -allow norandoms CLI flag, and then write your own custom break handler Well Thx guys, But you both clearly misunderstood what I'm trying to do here I don't want to disable a random here, I just want to make sure that the random will only be executed whenever I like (on code level), not completely disable it using CLI. In this case I only want it to log back in when the expression in the if(/*blabla*/) returns false. If I disable that random completely it won't be able to log back in. Edited November 20, 2016 by dokato Quote Link to comment Share on other sites More sharing options...
Explv Posted November 20, 2016 Share Posted November 20, 2016 Well Thx guys, But you both clearly misunderstood what I'm trying to do here I don't want to disable a random here, I just want to make sure that the random will only be executed whenever I like (on code level), not completely disable it using CLI. In this case I only want it to log back in when the expression in the if(/*blabla*/) returns false. If I disable that random completely it won't be able to log back in. I did not misunderstand what you are trying to do. The registerHook method has been removed from the API, to achieve what you want to do, you will need to disable all randoms, and write your own login handler, like this: http://osbot.org/forum/topic/109560-a-simple-login-handler/ 1 Quote Link to comment Share on other sites More sharing options...
dokato Posted November 20, 2016 Author Share Posted November 20, 2016 I did not misunderstand what you are trying to do. The registerHook method has been removed from the API, to achieve what you want to do, you will need to disable all randoms, and write your own login handler, like this: http://osbot.org/forum/topic/109560-a-simple-login-handler/ A ok Thx, I still tried to use OSBot's login thing, but now you have to make even that completely yourself, very thoughtfull of Alek or who ever changed that. Guess what we learn at college is really true, "change is the only constant". But in this case I really don't understand why. Quote Link to comment Share on other sites More sharing options...
House Posted November 20, 2016 Share Posted November 20, 2016 (edited) But in this case I really don't understand why. So we can properly manage farms? Edited November 20, 2016 by House 1 Quote Link to comment Share on other sites More sharing options...
PlagueDoctor Posted November 21, 2016 Share Posted November 21, 2016 So we can properly manage farms? Your picture triggers me Quote Link to comment Share on other sites More sharing options...
dokato Posted November 21, 2016 Author Share Posted November 21, 2016 So we can properly manage farms? Quote Link to comment Share on other sites More sharing options...
House Posted November 21, 2016 Share Posted November 21, 2016 Your picture triggers me This isn't the spam section, but why ? Quote Link to comment Share on other sites More sharing options...
PlagueDoctor Posted November 21, 2016 Share Posted November 21, 2016 This isn't the spam section, but why ? Spam? Quote Link to comment Share on other sites More sharing options...