Dexter Bots 11 Share Posted February 11 Hello community, I have a problem, here it is. I've been trying for a while now to identify the set breaks in the client. However, without success. The script should recognize when the next break should occur, based on entering a safe zone (combat), so that the break can be executed. I have already tried various methods with BreakSolver/RandomSolver, etc., but it never recognizes it, except when I program it manually. However, I prefer it if the user can determine how long and when they want breaks themselves. Link to comment Share on other sites More sharing options...
fallacy87 8 Share Posted February 11 9 hours ago, Dexter Bots said: Hello community, I have a problem, here it is. I've been trying for a while now to identify the set breaks in the client. However, without success. The script should recognize when the next break should occur, based on entering a safe zone (combat), so that the break can be executed. I have already tried various methods with BreakSolver/RandomSolver, etc., but it never recognizes it, except when I program it manually. However, I prefer it if the user can determine how long and when they want breaks themselves. So what you want to do is create a custom break handler and add it to the RandomManager. In the "onLoop()" method you can set a code to go to a safe spot or logout or do whatever. public class CustomBreakSolver extends BreakSolver { @Override public String getEventString() { return "MY CUSTOM BREAK HANDLER"; } @Override public int onLoop() { Tile closestBank = BankLocation.getNearest().getTile(); Walking.walk(closestBank); if(closestBank.getArea(4).contains(Players.getLocal())) return super.onLoop(); else return 100; } } @Override public void onStart() { super.onStart(); BreakSolver breakSolver = new CustomBreakSolver(); getRandomManager().registerSolver(breakSolver); log("CUSTOM BREAK SOLVER? "+getRandomManager().isUsingCustomBreakSolver()); } Dexter Bots 1 Link to comment Share on other sites More sharing options...
Dexter Bots 11 Author Share Posted February 11 Thank you i try it. now i was make a special loop what was randomly afk and going in safe zones but it wasn that what i would befour ur response are here greez Link to comment Share on other sites More sharing options...
fallacy87 8 Share Posted February 11 2 minutes ago, Dexter Bots said: Thank you i try it. now i was make a special loop what was randomly afk and going in safe zones but it wasn that what i would befour ur response are here greez When i tested it, it worked (forced a break from the client) but returning super.onLoop() stopped the loop. So just remember to do some logic and return an actual value on the loop to keep the loop going until you hit your desired conditions, then return super.onLoop() Dexter Bots 1 Link to comment Share on other sites More sharing options...
Dexter Bots 11 Author Share Posted February 11 Thank you very much, it works so far. I'm really happy about the information. I have another small issue where you might be able to help me - the upload to the SDN. Unfortunately, the guide is outdated, and I have the new version of IntelliJ IDEA. It also doesn't work; the script would be a clean script, including a humane antiban, just like how I've been playing RS for 15 years, etc. Link to comment Share on other sites More sharing options...
fallacy87 8 Share Posted February 11 Unfortunately, I have not uploaded a script to the SDN yet. I just came over from another bot about a week ago and have been too busy transferring my scripts over. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now