July 31, 201510 yr if (!myPlayer().isAnimating() && !myPlayer().isMoving()) { if (!myPlayer().isUnderAttack() && Guard.isVisible()) { Guard.interact("Attack"); sleep(random(500, 1000)); } else { camera.toEntity(Guard); } } } if (myPlayer().getHealth() <=30 && getInventory().contains("Lobster")) { inventory.getItem("Lobster").interact("Eat"); sleep(random(600, 1200)); } I get this issue when running http://gyazo.com/32407f7a8337725e1ea21a0d621e325d It would return to attack then eat a lobster when it is already full health
July 31, 201510 yr Try getSkills().getDynamic(Skill.HITPOINTS) <= 30 could try this.. if (myPlayer().getHealth() < *HPHERE*){
July 31, 201510 yr wat? was for him was quoting you because your method will also work. Edited July 31, 201510 yr by chad0ck
July 31, 201510 yr if (myPlayer().getHealth() <=30) { if (myPlayer().getHealth() < *HPHERE*){ Erm, can you explain the difference between what he already has implemented and your suggestion?
July 31, 201510 yr Erm, can you explain the difference between what he already has implemented and your suggestion? Oops, just now noticed that's what he had. Besides the less than or equal to, my apologies.
July 31, 201510 yr getHealth() returns a int when hp bar above character is visible. so use the current hp to track when to eat
July 31, 201510 yr getHealth() returns a int when hp bar above character is visible. so use the current hp to track when to eat getHealth works just fine with no hp bar, I tested this myself
July 31, 201510 yr getHealth works just fine with no hp bar, I tested this myself it will return the wrong value. fight someone, wait until the bar disable and eat some food. youll see it wont update without the bar
July 31, 201510 yr it will return the wrong value. fight someone, wait until the bar disable and eat some food. youll see it wont update without the bar I will look at this when I get home, i'm sure you are correct. Thank you for correcting me. :P
July 31, 201510 yr getSkills().getDynamic(Skill.HITPOINTS) // Works myPlayer().getHealth() // Percentage, doesn't work if you logged in with not 100% life getWidgets().get(160, 4).getMessage() // Works, only if the orbs are activated
Create an account or sign in to comment