Hey all,
I recently started with Java coding and I'm fooling around now for my own learning purposes, I'm trying to make an easy Imp killer/looter but the looting part isn't working..
The imps will get killed, however when they drop a bead (either black white yellow or red) it just wont pick it up.. Why ?
I have this code in the onLoop: (Yes I know I should probably be using cases)
if(!inventory.isFull() && getGroundItems().closest("Black bead", "White bead", "Red bead", "Yellow bead") != null) {
getGroundItems().closest("Black bead").interact("Take");
getGroundItems().closest("White bead").interact("Take");
getGroundItems().closest("Red bead").interact("Take");
getGroundItems().closest("Yellow bead").interact("Take");
} else if(!inventory.isFull() && getNpcs().closest("Imp") != null && !myPlayer().isUnderAttack()) {
getNpcs().closest("Imp").interact("Attack");
sleep(random(300, 700));
}