progamerz Posted May 24, 2016 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
Acerd Posted May 24, 2016 Posted May 24, 2016 private double hpPercent; public int onLoop() throws InterruptedException { hpPercent = getSkills().getDynamic(Skill.HITPOINTS) * 100 / getSkills().getStatic(Skill.HITPOINTS); return kek; }
progamerz Posted May 24, 2016 Author 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