I'm trying to get an NPC cast a buff on it's self, i'm very new to LUA, not sure how everything works.
so here's the script.
Code:
local NPC_ID = 21750
function OrcWarlock_OnCombat(pUnit, Event)
pUnit:SendChatMessage(14, 0, "Summoning Warriors of the Horde...")
pUnit:RegisterEvent(OrcWarlock_DA, 1000, 1) -- Gul'dan Channel
end
function OrcWarlock_DA(pUnit, Event)
pUnit:CastSpell(35996)
end
Not sure what's wrong with it, if anyone can help me correct it i'll + 4 rep :] Thanks.
EDIT:
Added new script, loads but doesn't work in game.