I can't get the script to eat food. Any help?
public int onLoop() throws InterruptedException {
if (myPlayer().getHealthPercent() < 35) {
eatFood();
sleep(random(500, 1000));
}
return 0;
}
public void eatFood() throws InterruptedException {
if (getInventory().contains("Shrimps")) {
getInventory().getItem("Shrimps").interact("Eat");
}
else {
goBank();
sleep(random(1000, 2000));
goMonsterLoc();
}
}