Okay. so I'm extremely new when i comes to writing addons. I've spent a lot of time reading up on wow api, but for the life of me i can't figure out what im doing wrong here. Can someone take a look at my code and tell me if i'm doing something wrong with my formatting?
TauntTell.xml
Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
<Script file="TauntTell.lua"/>
<Frame name="TauntTell_Frame">
<Scripts>
<!-- event handler -->
<OnLoad>TauntTell_OnLoad();</OnLoad>
<OnEvent>TauntTell_OnEvent(self, event, ...);</OnEvent>
</Scripts>
</Frame></Ui>
TauntTell.lua
Code:
function TauntTell_OnLoad()
this:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00 TauntTell Loaded");
end
function TauntTell_OnEvent(self, event, ...)
local timestamp, type, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags = select(1, ...)
if (event == "COMBAT_LOG_EVENT_UNFILTERED")
local spellId, spellName, spellSchool = select(9, ...)
if (type == "SPELL_CAST_SUCCESS") and ((spellId == 6795) or (spellId == 5209) or (spellId == 355) or (spellId == 1161) or (spellId == 694) or (spellId == 31789) or (spellId == 62124) or (spellId == 56222)) then
if (destName) then
DEFAULT_CHAT_FRAME:AddMessage(sourceName.." taunted "..destName);
else
DEFAULT_CHAT_FRAME:AddMessage(spellName.." used by ".. sourceName);
end
end
end
end
Thanks in advance for the help.