private final String[] SEAMAN_OPTIONS = new String[]{"Can I journey on this ship?",
"Search away, I have nothing to hide."
};
void handleSeaman() throws InterruptedException {
if(dialogues.inDialogue()){
if(dialogues.isPendingContinuation()){
if(dialogues.clickContinue()){
sleep(random(200, 600));
}
}else if(dialogues.isPendingOption()){
if(dialogues.selectOption(SEAMAN_OPTIONS)){
sleep(random(200, 600));
}
}
}else{
NPC seaman = npcs.closest(new Filter<NPC>() {
@Override
public boolean match(NPC npc) {
return npc != null && npc.getName().contains("Seaman");
}
});
if(seaman != null){
if(seaman.isVisible()){
if(seaman.interact("Pay-fare")){
sleep(random(750, 900));
}
}else{
camera.toEntity(seaman);
}
}
}
}
}
Even though i'm pretty sure that's the dialog for the customs officer...