Jump to content

Drink Energy potion while webWalking


Recommended Posts

Posted
1 hour ago, Abuse said:

        if (shouldIDrinkPotion()) {
            drinkPotion();
        }
        
        final WebWalkEvent webWalkEvent = new WebWalkEvent(destination);
        webWalkEvent.setBreakCondition(new Condition() {
            @Override
            public boolean evaluate() {
                return shouldIDrinkPotion();
            }
               
        });
        execute(webWalkEvent);

 

Thanks for the snippet!

  • Like 1

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...