greekhaima 2 Posted November 23, 2023 Is there a way to set a break from the code? I used to use sleep to break, but not that disconnects from dreambot and stops the script: 5:52:25 AM: [ERROR] There was an issue connecting to our servers
MaximusPrimo 108 Posted November 23, 2023 Dreambot has a built in break manager. You can access this from the client directly located at the bottom of the client
greekhaima 2 Author Posted November 24, 2023 @MaximusPrimothanks but that was not the question. You can't set a time to sleep at night and that break also has issues like if in combat sometimes it will keep trying to break, or the character might die because it just went on a break. Im looking to take a break from the script programically iPaq 1
red20 4 Posted December 20, 2023 🤔 I just use sleeps, did they change something so that it doesn't work anymore then?
fallacy87 10 Posted February 3, 2024 private void toggleLogin(boolean enable){ if(enable) getRandomManager().enableSolver("Login Handler"); else getRandomManager().disableSolver("Login Handler"); } then when it's break time just toggleLogin(false) when its time to resume toggleLogin(true) I know it's a little late but I just got here today, hope this helps someone.
c0d33rr0r 3 Posted June 5, 2024 sleep();// Mins, Hours, Days, will just idle until it auto logs out due to inactivity. Once released from the break. sleep();//Sleep while the login handler is logging your bot back in, before your code continues. The bot will resume itself where it left off.
iPaq 1 Posted June 15, 2024 I've tried evoking the existing getRandomManager instance from a sub-script with `ScriptManager.getScriptManager().getCurrentScript().getRandomManager().disableSolver(RandomEvent.LOGIN)` but it still manages to automatically log in while the script is sleeping itself. With that not doing the trick I'm not sure how else to tackle this.
jonnybrahh 2 Posted June 16, 2024 15 hours ago, iPaq said: I've tried evoking the existing getRandomManager instance from a sub-script with `ScriptManager.getScriptManager().getCurrentScript().getRandomManager().disableSolver(RandomEvent.LOGIN)` but it still manages to automatically log in while the script is sleeping itself. With that not doing the trick I'm not sure how else to tackle this. This works just fine for me " getRandomManager().disableSolver(RandomEvent.LOGIN) "
Veryan 1 Posted September 24, 2024 Instead of using sleep, try setting up a loop that checks the time. I’ve done something similar, where I store the start time and then keep checking until a certain amount of time has passed. This way, you can pause without getting disconnected from DreamBot. It’s worked well for me, and it gives you a bit more control without stopping the script entirely.
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