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...

![[WTH?] Funny bug about lua... yet i need help to fix it](https://www.ownedcore.com/forums/./ocpbanners/1/0/6/3/8/1/6/1e102dbc1865060efdd7bf3ae1edf5cc.jpg)
![TradeSafe Middleman [WTH?] Funny bug about lua... yet i need help to fix it](https://www.ownedcore.com/assets/mm/images/wits.png)
![CoreCoins [WTH?] Funny bug about lua... yet i need help to fix it](https://www.ownedcore.com/forums/images/styles/OwnedCoreFX/addimg/wicc.png)



Reply With Quote![[WTH?] Funny bug about lua... yet i need help to fix it](https://www.ownedcore.com/images/ba/g/b2.gif)
