Kramnik Posted January 7, 2020 Share Posted January 7, 2020 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; Quote Link to comment Share on other sites More sharing options...
Gunman Posted January 7, 2020 Share Posted January 7, 2020 @KramnikYou can't use that much of the dialogue API on tutorial island because if you use getDialogue.inDialogue() the bot will think you're always in dialogue when you're not. You gotta make you're own dialogue detection and handler. I think it's because the dialogue detection looks for blue text or something. I don't remember why it breaks on tut but it does. If you want you can look at how Explv handled dialogue https://osbot.org/forum/topic/84213-explvs-tutorial-island-free-random-characters/ 1 Quote Link to comment Share on other sites More sharing options...
Kramnik Posted January 7, 2020 Author Share Posted January 7, 2020 12 minutes ago, Gunman said: @KramnikYou can't use that much of the dialogue API on tutorial island because if you use getDialogue.inDialogue() the bot will think you're always in dialogue when you're not. You gotta make you're own dialogue detection and handler. I think it's because the dialogue detection looks for blue text or something. I don't remember why it breaks on tut but it does. If you want you can look at how Explv handled dialogue https://osbot.org/forum/topic/84213-explvs-tutorial-island-free-random-characters/ Hmm, I thought that this is probably because you always see something in chatbox. Explvs stuff is very complicated to read because of different files and etc, but will give it a second look, thanks Quote Link to comment Share on other sites More sharing options...
Gunman Posted January 7, 2020 Share Posted January 7, 2020 21 minutes ago, Kramnik said: Hmm, I thought that this is probably because you always see something in chatbox. Explvs stuff is very complicated to read because of different files and etc, but will give it a second look, thanks https://github.com/Explv/Tutorial-Island/blob/master/src/sections/TutorialSection.java#L55 It's how he did it. Quote Link to comment Share on other sites More sharing options...