int firstItem = getInventory().getSlotForNameThatContains("");
Item secondItem = inventory.getItemInSlot(firstItem+1);
secondItem.interact("Use");
This would work if the second item is always in the next slot or you knew what slot it was in after
Oh I see what you mean.
I've done something similar with grabbing the second closest NPC.
You can try to filter out the first item
Something like f->f.getName.equals(NAME) && f!=firstItem
I don't have my IDE so i can't test right now but you can try that
There is no 1 day ban....
its a two day ban but after 1second of being banned it shows 1 day when really its 1 day 23 hours and 59 minutes remaining.
When it drops below 1 day it will still show one day even though it <24 hours remaining
It will misclick because you're not checking if the item is selected before clicking next...
if (!itemIsSelected) {
inventory.interact("Use","Pestle and mortar");
sleepCondition
return itemIsSelected();
} else {
inventory.interact("Use","Pestle and mortar");
sleepCondition
return inDialogue();
}
This is the proper way to do it so that you won't misclick or bugs won't occur. If you don't check and have sleeps then it will misclick