veeniqqa 2 Posted June 7, 2016 Hey guys I'm pretty stuck I've tried loads of different ways and each time I can't seem to get my script to eat. if (getCombat().getHealthPercent() <= Calculations.random(12, 37)) { log("IT detects its low"); eat(); So it detects the above and notices it's low, but it doesn't eat private void eat(){ food = getInventory().get(item -> item != null && item.hasAction("Eat")); if (food != null && food.interact("Eat")) { log("Trying to eat"); sleep(Calculations.random(350,650)); }else{ if(getInventory().isFull()){ state = 3; }else if(getCombat().getHealthPercent() <= Calculations.random(12, 37)){ state = 3; } } } I'm not sure where i've gone wrong, any help would be great<3
veeniqqa 2 Author Posted June 7, 2016 GetSkills().getBoostedLevels() Instead of getCombat.getHealthPercent?
veeniqqa 2 Author Posted June 7, 2016 Yup Thats not the problem i'm having. Its detecting im low, its just no eating edit: it does work mb thanks alot bro
Recommended Posts
Archived
This topic is now archived and is closed to further replies.