ArcEmu keeps freezing whenever I add a custom lua script;
when i'm attacking the npc that uses that script.
It freezes and closes.
+ 4 rep to anyone who can help
Luas;
Code:
function Orcshaman_OnCombat(pUnit, event)
pUnit:SendChatMessage(12, 0, "I call upon the spirits of the elements! Let me use your great power to vanquish this foe!")
pUnit:RegisterEvent("Orcshaman_Lightning", 2000, 100)
pUnit:RegisterEvent("Orcshaman_Heal", 3000, 0)
end
function Orcshaman_Lightning(pUnit, event)
pUnit:StopMovement(2100)
pUnit:FullCastSpellOnTarget(37273, pUnit:GetRandomPlayer(1))
end
function Orcshaman_Heal(pUnit, event)
if pUnit:GetHealthPct() < 50 then
pUnit:FullCastSpell(38330)
end
end
function Orcshaman_OnDied(pUnit, event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(12, 0, "Damn...")
end
RegisterUnitEvent(17936, 1, "Orcshaman_OnCombat")
RegisterUnitEvent(17936, 4, "Orcshaman_OnDied")