Jump to content

dialogues.completeDialogue() failed.


Recommended Posts

Posted

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?

Posted
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.

Posted
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

Posted (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 by Slut
  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...