Jump to content

help script


combat_acc
 Share

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
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.

 Share

  • Recently Browsing   0 members

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