hey!
I got a little problem with my lua code. When starting ascent-world and its about to load it itsays "failed.could not load"
Code:
function Roshan_OnCombat(Unit, Event)
Unit:SendChatMessage(12, 0, "You dare to disturb Roshan in his meditation!? You shall be crushed!")
Unit:RegisterEvent("Roshan_GroundStomp", 2000, 5)
Unit:RegisterEvent("Roshan_36836", 3000, 8)
Unit:RegisterEvent("Roshan_Immolation",1000,0)
end
function Roshan_GroundStomp(pUnit, Event)
pUnit:CastSpell(19364, pUnit:GetClosestPlayer())
end
function Roshan_36836(pUnit, Event)
pUnit:FullCastSpellOnTarget(36836, pUnit:GetMainTank())
end
function Roshan_Immolation(pUnit, Event)
pUnit:CastSpell(12744, )
end
function Roshan_Immolation(pUnit, Event)
if pUnit:GetHealthPct() < 50 then
pUnit:RemoveEvents();
pUnit:FullCastSpell(0)
end
end
function RoshanLeaveCombat_OnLeaveCombat(Unit, Event)
Unit:RemoveEvents()
Unit:SendChatMessage(12, 0, "Come back when you are a bit stronger...")
end
function RoshanDeath_OnDied(Unit, Event)
Unit:RemoveEvents()
Unit:SendChatMessage(11, 0, "Do not rejoice...Your victory is only a part of the plan...I will come back even stronger and more powerful...But until then...You...have...defeated...me.....")
end
function RoshanKillTarget_OnKilledTarget(Unit, Event)
Unit:SendChatMessage(12, 0, "One more soul goes down!")
end
RegisterUnitEvent(17898, 1, "Roshan_OnCombat")
RegisterUnitEvent(17898, 2, "RoshanLeaveCombat_OnLeaveCombat")
RegisterUnitEvent(17898, 3, "RoshanKillTarget_OnKilledTarget")
RegisterUnitEvent(17898, 4, "RoshanDeath_OnDied")
please help me some1?
BTW this is my first lua code :P