Intro ::
This is just a quick template on how to make a lua boss script which
uses spells of your own choice in a certain time. Does not have phases
This guide is just for lazy people who does not wish to read Text of walls from
LuA guides.
___________________________________________________________________________
function Boss_ChaosBlast(pUnit, Event) Ex. Bossname_spellname no name!
pUnit:FullCastSpellOnTarget(37675, target) The number is the spell id, you put in
pUnit:SendChatMessage(12, 0, "Feel the Chaos!") What the boss says when he casts the spell.
end function Boss_ShadowBurst(pUnit, Event)
pUnit:CastSpell(34436)
pUnit:SendChatMessage(12, 0, "Hmm, I can feel the power!") <same as above
end
function Boss_Flamebreak(pUnit, Event)
pUnit:CastSpell(16785)
pUnit:SendChatMessage(12, 0, "Don't run away from me!") <same as above
end
function Boss_DarkBarrage(pUnit, Event)
local plr = pUnit:GetMainTank()
if (plr ~= nil) then
pUnit:CastSpellOnTarget(40585, plr) <same as above
end
end
function Boss_VileBeam(pUnit, Event)
local plr = pUnit:GetMainTank()
if (plr ~= nil) then
pUnit:FullCastSpellOnTarget(40860, plr) <same as above
end
end
function Engar_OnEnterCombat(pUnit, Event) <-enter boss name in red.
pUnit:SendChatMessage(12, 0, "I am Legend's Top Offcier, you think you will have a chance?")
pUnit:RegisterEvent("Boss_ChaosBlast",22000, 0)
pUnit:RegisterEvent("Boss_VileBeam",20000, 0)
pUnit:RegisterEvent("Boss_ShadowBurst",10000, 0)
pUnit:RegisterEvent("Boss_Flamebreak",15000, 0)
pUnit:RegisterEvent("Boss_DarkBarrage",19000, 0) <the 19000 etc is when does he cast it, ex. 1000 = 1 sec
end
function Engar_OnLeaveCombat(pUnit, Event)
pUnit:RemoveEvents()
end
functionEngar_KilledTarget(pUnit, Event)
pUnit:SendChatMessage(12, 0, "Hahaha, fools, Engar loses to no one!") <-what he say when he kill player
pUnit:RemoveEvents()
end
function Engar_OnDied(pUnit, Event)
pUnit:SendChatMessage(12, 0, "Legend . . . will . . . not be . . . defeated . . .") <-what he say when dead.
pUnit:RemoveEvents()
end
RegisterUnitEvent(444010, 1, "Engar_OnEnterCombat")
RegisterUnitEvent(444010, 2, "Engar_OnLeaveCombat")
RegisterUnitEvent(444010, 3, "Engar_OnKilledTarget")
RegisterUnitEvent(444010, 4, "Engar_onDied")
__________________________________________________________________________
yellow = just example and what each function do. so dont put them in the script.
afterwards, save it in notepad, save it as BOSS_name.lua
and put it in your scripts folder in your ascent folder.
I kinda rushed through this teaching one of my friend.
Engar is just a example boss.