Jump to content

WebWalkEvent Break Condition


Recommended Posts

Posted

Has anyone else noticed a delay in the break condition?
For example, if I set it to drink energy pots when below a certain run energy, it will pause for like 10 seconds before doing it. 
Is there a way around this or to remove the built in sleep?

Here is my code. It won't try to drink until like 10seconds after the condition is met. 

if (getSettings().getRunEnergy()>=50 {

WebWalkEvent webWalkEvent = new WebWalkEvent(INSIDE_BANK);
webWalkEvent.setBreakCondition(new Condition() {
    @Override
    public boolean evaluate() {
        return getSettings().getRunEnergy()<50;
    }
});
execute(webWalkEvent); 

} else {

getInventory().interact("Drink","f->f.getName.contains("Energy"));

}

 

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...