progamerz Posted May 24, 2016 Share Posted May 24, 2016 Hello how can i make my script eat food if the HP is 50% or whatever percent i put in the code to eat? I Know how to make it eat @ an HP level but not percent can someone help me? Thanks, Progamerz Quote Link to comment Share on other sites More sharing options...
Acerd Posted May 24, 2016 Share Posted May 24, 2016 private double hpPercent; public int onLoop() throws InterruptedException { hpPercent = getSkills().getDynamic(Skill.HITPOINTS) * 100 / getSkills().getStatic(Skill.HITPOINTS); return kek; } Quote Link to comment Share on other sites More sharing options...
progamerz Posted May 24, 2016 Author Share Posted May 24, 2016 private double hpPercent; public int onLoop() throws InterruptedException { hpPercent = getSkills().getDynamic(Skill.HITPOINTS) * 100 / getSkills().getStatic(Skill.HITPOINTS); return kek; } Thanks Quote Link to comment Share on other sites More sharing options...