View Single Post
03-27-24, 11:53 PM   #3
Hubb777
A Flamescale Wyrmkin
 
Hubb777's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2024
Posts: 113
Hello. Yes the error is gone. But the code doesn't work. NPC dialogue is no longer skipped.

This is the dialog ID
Lua Code:
  1. local AutoSelectGossip = {
  2.     [48598] = true,
  3.     [109275] = true,
  4. };

Or should the code be like this? Then how to insert several dialogues from different NPCs there?

Lua Code:
  1. local function EL_OnGossipShow(self, event, ...)
  2.     if ENABLE_AUTO_REPORT and UnitName("npc") == HUBB then
  3.         if GossipFrame and GossipFrame:IsShown() then
  4.             local options = C_GossipInfo.GetOptions();
  5.             if options and options[1] and options[1].gossipOptionID == 109275 then
  6.                 C_GossipInfo.SelectOption(109275);
  7.                 return
  8.             end
  9.         end
  10.     end
  11. end

Last edited by Hubb777 : 03-28-24 at 12:10 AM.
  Reply With Quote