Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Question NPC chat interaction

Joined
Dec 6, 2015
Messages
3
I've had a look around and I can't find anything to help with talking to npcs, such as quest givers.

Are there any basic examples of going through an npc chat dialog? Preferably using a treebot.
 
cuppa.drink(java);
Joined
Mar 13, 2018
Messages
6,966
I've had a look around and I can't find anything to help with talking to npcs, such as quest givers.

Are there any basic examples of going through an npc chat dialog? Preferably using a treebot.
What you're looking for is the ChatDialog class.

Eg.
Code:
ChatDialog.Continue cont = ChatDialog.getContinue();
if(cont!=null){
cont.select();}

ChatDialog.Option opt1 = ChatDialog.getOption("yes I'll do the quest 4 u m8");
if(opt1!=null){
opt1.select();}

Hopefully this code is correct, I just woke up and I'm writing this post from my phone
 
ChatDialog
 
Joined
Dec 6, 2015
Messages
3
Thanks, i've just had a go with that and it works. Is there a correct way of waiting for the next chat window to appear, at the moment my bot has ADHD?
 
Joined
Jan 28, 2017
Messages
492
You can also either check the interface component IDs or the text within the ChatDialog to valid on which step you are.
 
Top