From b87cec402723d87f48906ad789294a47d834ed3f Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Tue, 8 May 2012 19:50:24 +0200 Subject: [PATCH] Automaticly pay the Darkmoon Faire teleporters --- Monomyth.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Monomyth.lua b/Monomyth.lua index 0c154c0..7717f75 100644 --- a/Monomyth.lua +++ b/Monomyth.lua @@ -80,6 +80,22 @@ Monomyth:Register('GOSSIP_SHOW', function() end end) +local darkmoonNPC = { + [57850] = true, -- Teleportologist Fozlebub + [55382] = true, -- Darkmoon Faire Mystic Mage (Horde) + [54334] = true, -- Darkmoon Faire Mystic Mage (Alliance) +} + +Monomyth:Register('GOSSIP_CONFIRM', function(index) + local GUID = UnitGUID('target') or '' + local creatureID = tonumber(string.sub(GUID, -12, -9), 16) + + if(creatureID and darkmoonNPC[creatureID]) then + SelectGossipOption(index, '', true) + StaticPopup_Hide('GOSSIP_CONFIRM') + end +end) + QuestFrame:UnregisterEvent('QUEST_DETAIL') Monomyth:Register('QUEST_DETAIL', function() if(QuestGetAutoAccept()) then -- 1.7.9.5