veeniqqa 2 Share 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 Link to comment Share on other sites More sharing options...
Zawy 936 Share Posted June 7, 2016 GetSkills().getBoostedLevels() Link to comment Share on other sites More sharing options...
veeniqqa 2 Author Share Posted June 7, 2016 GetSkills().getBoostedLevels() Instead of getCombat.getHealthPercent? Link to comment Share on other sites More sharing options...
Zawy 936 Share Posted June 7, 2016 Instead of getCombat.getHealthPercent? Yup Link to comment Share on other sites More sharing options...
veeniqqa 2 Author Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.