Hi,
been trying for sometime to make dialogue work in tutorial island, currently trying to make it work like below. I decompiled some questing script and found that it handles dialogues like this. But somehow it doesnt select "I am an experienced player". First time writing something to handle dialogues so hope you can help
Entity cook = npcs.closest("Gielinor guide");
sleep(1000);
cook.interact();
sleep(1000);
if (cook != null) {
if (!getDialogues().inDialogue()) {
log("Not talking to guide. Starting conversation.");
cook.interact(); //this is not working somehow, so added interaction event in beginning
log("Sleeping until conversation starts!");
new ConditionalSleep(5000,1000) {
@Override
public boolean condition() throws InterruptedException {
return getDialogues().inDialogue();
}
}.sleep();
}
String[] options = new String[]{"Click here to continue",
"I am an experienced player."};
if (getDialogues().completeDialogue(options)) {
log("Dialogue complete successfully!");
} else {
log("Dialogue failed!");
}
log("Just spoke with the guide!");
}
break;