Thread Tools Display Modes
09/01/23, 10:15 AM   #1
schorse
Join Date: Aug 2023
Posts: 4
How to navigate long NPC interactions?

Hi all,

I'm trying to navigate the interaction with the undaunted daily pledge NPCs. The EVENT_CHATTER_BEGIN event will trigger a function which includes the following code:

Code:
elseif GetChatterOption(1) == "What's the pledge today?" then
	SelectChatterOption(1)
	SelectChatterOption(1)
	SelectChatterOption(1)
end
If I talk to the NPC it selects the option 1 but only 1 time. The thing is that the chatteroptions stay the same even though I'm already in the next "layer" of the conversation. GetChatterOption(1) should be "And if I can handle more?" but it's still "What's the pledge today?".

Does anyone know how to navigate in those conversations?

Thanks!
  Reply With Quote
09/01/23, 11:35 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Try to search vanilla code files to see how they do it, eg. the keybinds if you press 1, 2 or 3 to select the chatter options.
https://github.com/search?q=repo%3Ae...tion&type=code

They call:

Code:
INTERACT_WINDOW:SelectChatterOptionByIndex(1)
https://github.com/esoui/esoui/blob/...ings.xml#L1051

This should then update the interact window texts etc. properly (hopefully)

I'm no sure if you can queue 3x INTERACT_WINDOW:SelectChatterOptionByIndex(1) or need to wait after first call to it, so the chatter updates, e.g. raises a new event EVENT_CONVERSATION_UPDATED and you need to react on this then?

Maybe check Dolgubons lazy Writ carfter addon as it does the pretty same while talking to the crafting writ NPC -> skip the "accept quests" dialogs.

Oh and remember you are not only playing in English but might also have to support other languages, so checking for "What's the pledge today?" is not the same if you play in de, fr, ru, es, zh :-)

Last edited by Baertram : 09/01/23 at 11:37 AM.
  Reply With Quote
09/01/23, 03:22 PM   #3
schorse
Join Date: Aug 2023
Posts: 4
Thanks for the Answer! I found an addon that implements this (thanks iFedix):
https://www.esoui.com/downloads/info...Utilities.html

Although you can do it without events (disadvantages?):
Code:
elseif options[1] == "What's the pledge today?" then
	SelectChatterOption(1)
	AcceptOfferedQuest()
	AcceptOfferedQuest()
	SCENE_MANAGER:Show("hud")
Oh and remember you are not only playing in English but might also have to support other languages, so checking for "What's the pledge today?" is not the same if you play in de, fr, ru, es, zh :-)
I'm implementing some little helper just for me in one small addon so it's not a problem.

EDIT: Don't use the code above. Worked yesterday but not today. Idk why. The method by iFedix works though.

Last edited by schorse : 09/02/23 at 02:28 AM.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » How to navigate long NPC interactions?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off