local frame = CreateFrame("Frame") frame:RegisterEvent("GOSSIP_SHOW") -- Note: We need instanceIDs not mapIDs. Because an instance can have multiple mapIDs! -- And whatever those IDs below are, they're wrong ... -- Keeping it in case I have to change it back. -- local allowed_zones = { -- 14032, -- Algethar Academy -- 15808, -- Windrunner Spire -- 15829, -- Magisters Terrace -- 16395, -- Maisara Caverns -- 16573, -- Nexus Point Xenas -- 4813, -- Pit of Saron -- 6988, -- Skyreach -- 8910, -- The Seat of the Triumvirate -- } local function select_first_gossip_option(self, event) if not IsInInstance() then return end local options = C_GossipInfo.GetOptions() if options and #options == 1 then C_Timer.After(0.1, function() if not IsShiftKeyDown() then C_GossipInfo.SelectOption(options[1].gossipOptionID) end end) print("NSWA - Info: Chosen the first gossip option.") end end frame:SetScript("OnEvent", select_first_gossip_option)