String food = "trout";
NPC rockCrab;
@Override
public int onLoop() {
if (atBank()) {
doBank();
} else if (atRockCrabs()) {
doRockCrabs();
}
return 250;
}
private void doBank() {
if (stockedUpOnFood()) {
if (goodHealth()) {
goToRockCrabs();
} else {
eat();
}
} else if (bankHasFood()) {
withdrawFood();
} else {
stopScript();
}
}
private void doRockCrabs() {
if (goodHealth()) {
if (findRockCrab()) {
attackRockCrab();
}
} else i