Jump to content
feggit

dialogues.completeDialogue() failed.

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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:

Oh wow, I didn't know this exists. Thanks

Link to comment
Share on other sites

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 by Slut
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...