Jump to content

help script


Recommended Posts

Posted (edited)

does eating work while walking?

this code doesnt seem to work for me... idk why need help..


	public int onLoop() throws InterruptedException {
		if (this.gui.isStarted()) {
				if (this.myPlayer().getHealthPercent() < 80) {
					if (this.getInventory().contains("Trout")) {
						this.getInventory().getItem("Trout").interact("Eat");
						sleep(random(500, 2000));
Edited by combat_acc
Posted (edited)

Like butters said, have to make a web walking event. Try this: 

 

			final WebWalkEvent webWalkEvent = new WebWalkEvent(PLACE);
			webWalkEvent.setBreakCondition(new Condition() {
				//@Override without "//"
				public boolean evaluate() {
					return TRUE/FALSE STATEMENT OR BOOLEAN FUNCTION;
				}
			});
			execute(webWalkEvent);
Edited by Mushphang

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