I made a lua script, here it is:
Code:
function Hand_ShadowBoltVolley(pUnit, Event)
pUnit:FullCastSpellOnTarget(45770, pUnit:GetMainTank())
end
Code:
function Hand_Phase1(pUnit, Event)
pUnit:RegisterEvent("Hand_ShadowBoltVolley", 20000, 0)
pUnit:RegisterEvent("Hand_ShadowInfusion", 1000, 0)
end
function Hand_ShadowInfusion(pUnit, Event)
if pUnit:GetHealthPct() < 20 then
pUnit:CastSpell(45772)
end
end
function Hand_Entercombat(pUnit, Event)
pUnit:RemoveAura(30540)
pUnit:RegisterEvent("Hand_Phase1", 1000, 0)
end
function Hand_Leavecombat(pUnit, Event)
pUnit:RemoveEvents()
pUnit:CastSpell(30540)
end
function Hand_Died(pUnit, Event)
pUnit:SpawnCreature(25320, 1698.799072, 628.254517, 27.533756, 5.559829, 1771, 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999)
end
function Hand_Spawn(pUnit, Event)
pUnit:CastSpell(30540)
end
RegisterUnitEvent(25321, 1, "Hand_Entercombat")
RegisterUnitEvent(25321, 2, "Hand_Leavecombat")
RegisterUnitEvent(25321, 4, "Hand_Died")
RegisterUnitEvent(25321, 6, "Hand_Spawn")
The mob is supposed to cast Shadow Bolt Volley every 20 seconds at one part. Instead, it waits 20 seconds then it starts casting about every millisecond I believe. Can anyone tell me what I'm doing wrong?
Edit: Sorry that the post got a little messed up. The edit feature isn't working that good for some things.