It loaded but it doesn't work on the boss i made, it doesn't even do non of these stuff I put on here,
My script:
Code:
function Boss_Spell1(pUnit)
unit:CastSpell(16785)
unit:SendChatMessage(12, 0, "Feel the FLAMES!")
end
function Boss_Spell2(pUnit)
unit:CastSpell(37675)
unit:SendChatMessage(12, 0, "Curse you . . .")
end
function Boss_Spell3(pUnit)
local plr = unit:GetClosestPlayer()
if (plr ~= nil) then
unit:CastSpellOnTarget(41596, plr)
end
end
function Boss_Spell4(pUnit)
local plr = unit:GetClosestPlayer()
if (plr ~= nil) then
unit:FullCastSpellOnTarget(37675, plr)
end
end
function Boss_OnEnterCombat(pUnit)
unit:SendChatMessage(12, 0, "Never mess with the legend's general . . .")
unit:RegisterEvent("Boss_Spell1",6000, 0)
unit:RegisterEvent("Boss_Spell2",10000, 0)
unit:RegisterEvent("Boss_Spell3",12000, 0)
unit:RegisterEvent("Boss_Spell4",10000, 0)
end
function Boss_OnLeaveCombat(pUnit)
unit:RemoveEvents()
end
function Boss_KilledTarget(pUnit)
unit:SendChatMessage(12, 0, "Hahaha, Fools . . .")
unit:RemoveEvents()
end
function Boss_OnDied(pUnit)
unit:SendChatMessage(12, 0, "Uh . . . the Legend . . . you will never . . . defeat . . .")
unit:RemoveEvents()
end
RegisterUnitEvent(1410001, 1, "Boss_OnEnterCombat")
RegisterUnitEvent(1410001, 2, "Boss_OnLeaveCombat")
RegisterUnitEvent(1410001, 3, "Boss_OnKilledTarget")
RegisterUnitEvent(1410001, 4, "Boss_onDied")