Hiya
I've a good habit of taking off my weapons in a wipe, but a bad habit of not re-equipping them (on my priest).
So given my total lack of a experience with wow addons or programming of any form, I thought I'd try and make an addon to alert me.
Basically when I enter combat, I want it to check my wand slot, and if it's empty I want it to play a soundfile,
I've borrowed quite a bit from
tentonhammer.com, however I've pretty much hit a dead end.
This is what I've got so far, are there any glaring errors anyone can spot?
Weapons.xml
<Script file="Weapons.lua"/>
<Frame name="WeaponCore">
<Scripts>
<OnLoad>WeaponLoad();</OnLoad>
<OnEvent>WeaponEvent();</OnEvent>
</Scripts>
</Frame>
Weapons.lua
function WeaponLoad()
this:RegisterEvent("PLAYER_REGEN_DISABLED");
end
function WeaponEvent()
if("HasWandEquipped")=nil then
PlaySound("Interface\\AddOns\\Weapons\\Weapons.mp3")
end
Thanks =D