View Single Post
09-09-12, 10:11 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
This will check for Moonkin Form when you enter combat, and display a warning message in the Raid Warning Frame if you're not in it.

Code:
local name, _, icon = GetSpellInfo(24858)
local message = format("Missing |T%s:20:20:-5|t %s!", icon, name)
local color = { r = 1, g = 1, b = 0 }

local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_REGEN_DISABLED")
f:SetScript("OnEvent", function(self, event)
	if GetSpecialization() == 1 and GetShapeshiftForm() ~= 5 then
		RaidNotice_AddMessage(RaidWarningFrame, message, color)
	end
end)
Use http://addon.ziuo.net/ to turn that into an addon if you're not sure how.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote