hi, tryed to script my lich king mob today using ac-web repack 8.0 but it just wont work, why? (yes i know the script suck atm, but i just wanted to test it, but it dident work,)
Code:
function arthas_OnCombat(Unit, Event)
Unit:SendChatMessage(11, 0, "TEST")
Unit:RegisterEvent("arthas_Spell1", 6000, 80)
Unit:RegisterEvent("arthas_Spell2", 6000, 40)
Unit:RegisterEvent("arthas_Phase1", 5000, 1)
end
function arthas_Phase1(Unit, Event)
if Unit:GetHealthPct() <= 50 then
Unit:SetScale(2)
end
end
function arthas_Spell1(Unit, Event)
Unit:FullCastSpellOnTarget(5, Unit:GetMainTank())
end
function arthas_Spell2(Unit, Event)
Unit:FullCastSpellOnTarget(5, Unit:GetMainTank())
end
function arthas_OnLeaveCombat(Unit, Event)
Unit:RemoveEvents()
end
function arthas_OnKilledTarget(Unit, Event)
end
function arthas_OnDied(Unit, Event)
Unit:RemoveEvents()
end
RegisterUnitEvent(666666, 1, "arthas_OnCombat")
RegisterUnitEvent(666666, 2, "arthas_OnLeaveCombat")
RegisterUnitEvent(666666, 3, "arthas_OnKilledTarget")
RegisterUnitEvent(666666, 4, "arthas_OnDied")