November 20, 20169 yr 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, 20169 yr by dokato
November 20, 20169 yr 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, 20169 yr by Explv
November 20, 20169 yr 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, 20169 yr by Tom
November 20, 20169 yr Author 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, 20169 yr by dokato
November 20, 20169 yr 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/
November 20, 20169 yr Author 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.
November 20, 20169 yr But in this case I really don't understand why. So we can properly manage farms? Edited November 20, 20169 yr by House
Create an account or sign in to comment