feggit Posted May 4, 2018 Posted May 4, 2018 I have been using dialogues.completeDialogueU() to talk to NPC's. For instance, for Rune Mysteries when talking to the Head Wizard I have this line: sedridor.interact("Talk-to"); dialogues.completeDialogue("I'm looking for the head wizard.", "Ok, here you are.", "Yes, certainly."); After the line finishes, it walks all the way to Varrock to Aubury. However, before the dialogue is completed, the script alright goes to the next line, which is walking to Aubury. This should not happen, right?
Chris Posted May 4, 2018 Posted May 4, 2018 25 minutes ago, feggit said: I have been using dialogues.completeDialogueU() to talk to NPC's. For instance, for Rune Mysteries when talking to the Head Wizard I have this line: sedridor.interact("Talk-to"); dialogues.completeDialogue("I'm looking for the head wizard.", "Ok, here you are.", "Yes, certainly."); After the line finishes, it walks all the way to Varrock to Aubury. However, before the dialogue is completed, the script alright goes to the next line, which is walking to Aubury. This should not happen, right? http://osbot.org/api read the docs on the method. I believe it returns true when it selects the option.
Super Posted May 4, 2018 Posted May 4, 2018 Try reading through this it might help https://github.com/superuserOSBot/OSBot/blob/master/SuperAIOF2PRunecrafter/tasks/RuneMysteries.java
feggit Posted May 4, 2018 Author Posted May 4, 2018 16 minutes ago, Chris said: http://osbot.org/api read the docs on the method. I believe it returns true when it selects the option. I did read it. By saying it returns true, are you suggesting me to use an if-statement or anything? 9 minutes ago, superuser said: Try reading through this it might help https://github.com/superuserOSBot/OSBot/blob/master/SuperAIOF2PRunecrafter/tasks/RuneMysteries.java Oh wow, I didn't know this exists. Thanks
Hel Posted May 4, 2018 Posted May 4, 2018 (edited) 1 hour ago, feggit said: I have been using dialogues.completeDialogueU() to talk to NPC's. For instance, for Rune Mysteries when talking to the Head Wizard I have this line: sedridor.interact("Talk-to"); dialogues.completeDialogue("I'm looking for the head wizard.", "Ok, here you are.", "Yes, certainly."); After the line finishes, it walks all the way to Varrock to Aubury. However, before the dialogue is completed, the script alright goes to the next line, which is walking to Aubury. This should not happen, right? my guess would be that it's interacting with sedridor, before the dialogue actually loads it tries to complete it, notices no dialogue is complete so the completeDialogue returns true try adding a conditional sleep between there & see if it fixes it. EDIT: "WARNING - This method loops until either the player is not in a dialogue", definitely seems to be your problem, next time try looking through the javadocs, might help you! Edited May 4, 2018 by Slut 1