My LUA Loads all normally and when you kill it it sends a chat message but it doesn't do any spells or send a message at the start of the fight. Can anyone Help?
Code:
function CryptGhoul_OnKilledTarget(Unit, Event)
Unit:SendChatMessage(12, 0, "Food!!")
end
function CryptGhoul_Oncombat(Unit, Event)
Unit:Castspell(34202)
Unit:SendChatMessage(12, 0, "Yum, Another Meal!.")
Unit:RegisterEvent("CryptGhoul_CastArmor",40000, 0)
Unit:RegisterEvent("CryptGhoul_FrostBolt",12500, 0)
Unit:RegisterEvent("CryptGhoul_Banish",35000, 0)
end
function CryptGhoul_CastArmor(Unit, Event)
Unit:CastSpell(31540)
end
function CryptGhoul_FrostBolt(Unit, Event)
Unit:FullCastSpellOnTarget(37454, GetRandomPlayer())
end
function CryptGhoul_Banish(Unit, Event)
Unit:FullCastSpellOnTarget(40199, GetRandomPlayer())
end
RegisterUnitEvent(98941, 1, "CryptGhoul_OnCombat")
RegisterUnitEvent(98941, 2, "CryptGhoul_OnLeaveCombat")
RegisterUnitEvent(98941, 3, "CryptGhoul_OnKilledTarget")
RegisterUnitEvent(98941, 4, "CryptGhoul_OnDied")
function CryptGhoul_OnLeaveCombat(Unit, Event)
Unit:RemoveEvents()
end
function CryptGhoul_OnDied(Unit, Event)
Unit:SendChatMessage(12, 0, "RAWRRRRRRRRRRRRRRRRRR...")
Unit:RemoveEvents()
end
Will +Rep