my promb is here...
this is from gatric lua guide ...
function phase_1(pUnit, Event)
if pUnit:GetHealthPct() < 70 then
pUnit:RemoveEvents();
pUnit:FullCastSpell(16033)
pUnit:RegisterEvent("phase_2",1000, 0)
end
end
function phase_2(pUnit, Event)
if pUnit:GetHealthPct() < 50 then
pUnit:RemoveEvents();
pUnit:FullCastSpell(33452)
pUnit:RegisterEvent("phase_3",1000, 0)
end
end
function phase_3(pUnit, Event)
if pUnit:GetHealthPct() < 30 then
pUnit:RemoveEvents();
pUnit:FullCastSpell(34807)
end
end
function boss_start(pUnit, Event)
pUnit:RegisterEvent("phase_1",1000, 0)
end
RegisterUnitEvent(77, 1, "boss_start")
The funny thing is after i donwload Illidans scarlet instance all lua (boss i create got nuts?)
I try to register the test lua of gastric to a mob with entry id 77 and that mob use the same spell as illidans scarlet monk...
here is its lua...
function phase_1(pUnit, Event)
if pUnit:GetHealthPct() < 70 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (11, 0, "Holy Heals will save me!")
pUnit:FullCastSpell(27136)
pUnit:RegisterEvent("phase_2",1000, 0)
end
end
function phase_2(pUnit, Event)
if pUnit:GetHealthPct() < 50 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (11, 0, "Holy Heals will save me!")
pUnit:FullCastSpell(27136)
pUnit:RegisterEvent("phase_3",1000, 0)
end
end
function phase_3(pUnit, Event)
if pUnit:GetHealthPct() < 30 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (11, 0, "Holy Heals will save me!")
pUnit:FullCastSpell(27136)
pUnit:RegisterEvent("phase_4",1000, 0)
end
end
function phase_4(pUnit, Event)
if pUnit:GetHealthPct() < 10 then
pUnit:RemoveEvents();
pUnit:SendChatMessage (11, 0, "Holy Heals will save me!")
pUnit:FullCastSpell(27136)
end
end
function boss_start(pUnit, Event)
pUnit:RegisterEvent("phase_1",1000, 0)
pUnit:SendChatMessage (11, 0, "Feel the wrath of the Scarlets Hand!")
end
RegisterUnitEvent(400000, 1, "boss_start")
And the other promb is that my mob cast all the spells of the scarlet monk at once... it didnt go even to phase 1 or 2 or3.... i really need help with that...