Code:
function Spirit_of_Melgen_OnCombat(pUnit, Event)
pUnit: SendChatMessage(13, 0, "Your pathetic souls , lifes , even essences will soon belong to me...")
pUnit: RegisterEvent("Phase_1", 1000, 0)
end
function Spirit_of_Melgen_Phase_1(pUnit, Event)
if pUnit: GetHealthPct() < 99 then
pUnit: RemoveEvents();
pUnit: FullCastSpellOnTarget(39329, pUnit: GetRandomPlayer(0))
pUnit: SendChatMessage(13, 0, "Do you really think you can whistand the power of nethermancer Melgen?!")
pUnit: RegisterEvent("Phase_2", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_2(pUnit, Event)
if pUnit: GetHealthPct() < 98 then
pUnit: RemoveEvents();
pUnit: CastSpell(42023)
pUnit: SendChatMessage(13, 0, "Arrgghahahaha! Fools!")
pUnit: RegisterEvent("Phase_3", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_3(pUnit, Event)
if pUnit: GetHealthPct() < 97 then
pUnit: RemoveEvents();
pUnit: FullCastSpellOnTarget(39329, pUnit: GetRandomPlayer(0))
pUnit: FullCastSpellOntarget(46161, pUnit: GetRandomPlayer(0))
pUnit: SendChatMessage(13, 0, "Be eaten by the void itself!")
pUnit: RegisterEvent("Phase_4", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_4(pUnit, Event)
if pUnit: GetHealthPct() < 95 then
pUnit: RemoveEvents();
pUnit: SendChatMessage(13, 0, "This was a just a boring test , the real game begins here! Arrgghahahaha!!!")
pUnit: SetModel (525)
pUnit: SetScale (3)
pUnit: CastSpell (43426)
pUnit: FullCastSpellOnTarget (37138, pUnit: GetMainTank())
pUnit: RegisterEvent("Phase_5", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_5(pUnit, Event)
if pUnit: GetHealthPct() < 93 then
pUnit: RemoveEvents();
pUnit: SendChatMessage(13, 0, "Ice heed my call!!!")
pUnit: CastSpell (37730)
pUnit: CastSpell (33239)
pUnit: RegisterEvent("Phase_6", 1000, 0)
end
end
end
function Spirit_of_Melgen_Phase_6(pUnit, Event)
if pUnit: GetHealthPct() < 92 then
pUnit: RemoveEvents();
pUnit: SendChatMessage(13, 0, "Face your doom!!!")
pUnit: CastSpell (37730)
pUnit: CastSpell (33239)
pUnit: CastSpell (43426)
pUnit: FullCastSpellOnTarget (37138, pUnit: GetMainTank())
pUnit: RegisterEvent("Phase_7", 1000, 0)
end
end
fuction Spirit_of_Melgen_Phase_7(pUnit, Event)
if pUnit: GetHealthPct() < 90 then
pUnit: RemoveEvents();
pUnit: SendChatMessage(13, 0, "From water to poison , from evil to pure evil. I'm gonna show you what fear truly is and the true form of Poison. Arrrgghahahaha!!!")
pUnit: SetModel (11172)
pUnit: SetScale (4)
pUnit: CastSpell (54098)
pUnit: CastSpell (54122)
pUnit: RegisterEvent("Phase_8", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_8(pUnit, Event)
if pUnit: GetHealthPct() < 88 then
pUnit: RemoveEvents();
pUnit: SendChatMessage(13, 0, "Fools! Now you will feel the terrible wrath of Melgen!!!")
pUnit: FullCastSpellOnTarget (43364, pUnit: GetMainTank())
pUnit: CastSpell (38219)
pUnit: RegisterEvent("Phase_9", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_9(pUnit, Event)
if pUnit: GetHealthPct() < 87 then
pUnit: RemoveEvents();
pUnit: SendChatMessage(13, 0, "Poison , consume them!!!!!")
pUnit: CastSpell (54098)
pUnit: CastSpell (54122)
pUnit: FullCastSpellOnTarget (43364, pUnit: GetMainTank())
pUnit: CastSpell (38219)
pUnit: RegisterEvent("Phase_10", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_10(pUnit, Event)
if pUnit: GetHealthPct() < 85 then
pUnit: RemoveEvents ();
pUnit: SetModel (17045)
pUnit: SetScale (5)
pUnit: SendChatMessage(13, 0, "Blood is my friend and it shall be your undoing mongrels!")
pUnit: FullCastSpellOnTarget (41238, pUnit: GetMainTank())
pUnit: CastSpell (41068)
pUnit: RegisterEvent("Phase_11", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_11(pUnit, Event)
if pUnit: GetHealthPct() < 84 then
pUnit: RemoveEvents ();
pUnit: SendChatMessage(13, 0, "I will rip the flesh out of you!")
pUnit: FullCastSpellOnTarget (41072, pUnit: GetRandomPlayer(0))
pUnit: CastSpell (3264)
pUnit: RegisterEvent("Phase_12", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_12(pUnit, Event)
if pUnit: GetHealthPct() < 83 then
pUnit: RemoveEvents ();
pUnit: SendChatMessage(13, 0, "Now is the time for your heart to explode!")
pUnit: FullCastSpellOnTarget (41072, pUnit: GetRandomPlayer(0))
pUnit: CastSpell (3264)
pUnit: FullCastSpellOnTarget (41238, pUnit: GetMainTank())
pUnit: CastSpell (41068)
pUnit: RegisterEvent("Phase_13", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_13(pUnit, Event)
if pUnit: GetHealthPct() < 80 then
pUnit: RemoveEvents ();
pUnit: SetModel (1204)
pUnit: SetScale (2)
pUnit: SendChatMessage(13, 0, "Die in my fiery hands!")
pUnit: FullCastSpellOnTarget (38010, pUnit: GetRandomPlayer(0))
pUnit: CastSpell (59469)
pUnit: RegisterEvent("Phase_14", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_14(pUnit, Event)
if pUnit: GetHealthPct() < 78 then
pUnit: RemoveEvents ();
pUnit: SetScale (3)
pUnit: SendChatMessage(13, 0, "Give up!")
pUnit: FullCastSpellOnTarget (41596, pUnit: GetRandomPlayer(0))
pUnit: CastSpell (36876)
pUnit: RegisterEvent("Phase_15", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_15(pUnit, Event)
if pUnit: GetHealthPct() < 77 then
pUnit: RemoveEvents ();
pUnit: SetScale (4)
pUnit: SendChatMessage(13, 0, "Flame , cut them in half!")
pUnit: FullCastSpellOnTarget (38010, pUnit: GetRandomPlayer(0))
pUnit: CastSpell (59469)
pUnit: FullCastSpellOnTarget (41596, pUnit: GetMainTank())
pUnit: CastSpell (36876)
pUnit: RegisterEvent("Phase_16", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_16(pUnit, Event)
if pUnit: GetHealthPct() < 75 then
pUnit: RemoveEvents ();
pUnit: SetModel (20431)
pUnit: SetScale (2)
pUnit: SendChatMessage(13, 0, "Behold the fel flame!")
pUnit: FullCastSpellOnTarget (38742, pUnit: GetRandomPlayer(0))
pUnit: CastSpell (40631)
pUnit: RegisterEvent("Phase_17", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_17(pUnit, Event)
if pUnit: GetHealthPct() < 73 then
pUnit: RemoveEvents ();
pUnit: SetScale (3)
pUnit: SendChatMessage(13, 0, "Soon my hands of death will engulf you all!")
pUnit: FullCastSpellOnTarget (46101, pUnit: GetMainTank(0))
pUnit: CastSpell (38813)
pUnit: RegisterEvent("Phase_18", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_18(pUnit, Event)
if pUnit: GetHealthPct() < 72 then
pUnit: RemoveEvents ();
pUnit: SetScale (4)
pUnit: SendChatMessage(13, 0, "Fel , empower me with your strengh to destroy!")
pUnit: FullCastSpellOnTarget (38742, pUnit: GetRandomPlayer(0))
pUnit: CastSpell (40631)
pUnit: FullCastSpellOnTarget (46101, pUnit: GetMainTank())
pUnit: CastSpell (38813)
pUnit: RegisterEvent("Phase_19", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_19(pUnit, Event)
if pUnit: GetHealthPct() < 70 then
pUnit: RemoveEvents ();
pUnit: SetScale (5)
pUnit: SetModel (453)
pUnit: SendChatMessage(13, 0, "Beware, I'm the earth itself!")
pUnit: CastSpell (64650)
pUnit: CastSpell (54193)
pUnit: CastSpell (63547)
pUnit: CastSpell (39050)
pUnit: RegisterEvent("Phase_20", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_20(pUnit, Event)
if pUnit: GetHealthPct() < 60 then
pUnit: RemoveEvents ();
pUnit: SetScale (5)
pUnit: SetModel (21130)
pUnit: SendChatMessage(13, 0, "Wind will mean you doom!")
pUnit: CastSpell (39261)
pUnit: CastSpell (43620)
pUnit: FullCastSpellOnTarget (46568 pUnit: GetRandomPlayer(0))
pUnit: CastSpell (6982)
pUnit: CastSpell (10092)
pUnit: RegisterEvent("Phase_21", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_21(pUnit, Event)
if pUnit: GetHealthPct() < 45 then
pUnit: RemoveEvents ();
pUnit: SetScale (5)
pUnit: SetModel (5494)
pUnit: SendChatMessage(13, 0, "Storm heed my call!")
pUnit: CastSpell (38145)
pUnit: FullCastSpellOnTarget (63673 pUnit: GetMainTank())
pUnit: FullCastSpellOnTarget (28299 pUnit: GetRandomPlayer(0))
pUnit: FullCastSpellOnTarget (56694 pUnit: GetRandomPlayer(0))
pUnit: CastSpell (43983)
pUnit: RegisterEvent("Phase_22", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_22(pUnit, Event)
if pUnit: GetHealthPct() < 20 then
pUnit: RemoveEvents ();
pUnit: SetScale (5)
pUnit: SetModel (16216)
pUnit: SendChatMessage(13, 0, "Now for some extra arcane fun! Arrrgghahahaha!!!!!")
pUnit: CastSpell (34172)
pUnit: FullCastSpellOnTarget (40940 pUnit: GetMainTank())
pUnit: FullCastSpellOnTarget (37271 pUnit: GetRandomPlayer(0))
pUnit: Castspell (21147)
pUnit: CastSpell (38539)
pUnit: RegisterEvent("Phase_23", 1000, 0)
end
end
function Spirit_of_Melgen_Phase_23(pUnit, Event)
if pUnit: GetHealthPct() < 10 then
pUnit: RemoveEvents ();
pUnit: SetScale (10)
pUnit: SetModel (23428)
pUnit: SendChatMessage(13, 0, "Now you made me angry. You wanted my true form you got it! Now bow before the god of void!!!")
pUnit: CastSpell (38627)
pUnit: FullCastSpellOnTarget (46161 pUnit: GetMainTank())
pUnit: FullCastSpellOnTarget (33047 pUnit: GetRandomPlayer(0))
pUnit: FullCastSpellOnTarget (46289 pUnit: GetRandomPlayer(0))
pUnit: CastSpell (38524)
pUnit: RegisterEvent("Phase_24", 1000, 0)
end
end
function Spirit_of_Melgen_Start(pUnit, Event)
pUnit:RegisterEvent("phase_1",1000, 0)
end
function Spirit_of_Melgen_OnKill(pUnit,Event)
pUnit:SendChatMessage(13, 0, "Pathetic Soul...")
end
RegisterUnitEvent(32001, 1, "Spirit_of_Melgen_Start")
RegisterUnitEvent(32001, 3, "Spirit_of_Melgen_OnKill")
RegisterUnitEvent(32001, 1, "Spirit_of_Melgen_OnCombat")
You had a DOT instead of a COMMA on row 29. Should be fixed now.