Jump to content

Welcome to DreamBot!

Download for Free

Supercharge Your Bots

Run unlimited bots today using DreamBot's Covert Mode and
stay more protected.

Upgrade Now
Frequently Asked Questions
  • Are you not able to open the client? Make sure you have Java 8 installed
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox

Interested in advertising your business? Reach out today!

Download the DreamBot client today!
Sign in to follow this  
Pandemic

DreamBot v2.9.9.4

Recommended Posts

Yeah it appears I'm having an issue with Death's Door as well but I have an idea why. It seems to be that the random takes over 30 seconds to solve but the random handler resets if it's been executing for 30 seconds so it just gets stuck in a loop.

Thanks for sharing your code, @TheCloakdOne, interesting to take a look at. I'll see if I can make it work for me.

To sort of handle it right now I just have a separate TaskNode set to sleep while a RandomEvent is active. It some times works. 🤷‍♂️

public class Random extends AbstractTask {
    @Override
    public boolean accept() {
        return config.isScriptRunning() && getRandomManager().isSolving();
    }

    @Override
    public int execute() {
        config.statusText("Waiting for " + getRandomManager().getCurrentSolver().toString() + " to finish");
        while (getRandomManager().isSolving()) {
            sleep(1);
        }

        return Calculations.random(500);
    }

}

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...