mirror of
https://github.com/araxiaonline/ScourgeInvasion.git
synced 2026-06-13 03:02:21 -04:00
Add files via upload
This commit is contained in:
69
BOSSES/Balzaphon.lua
Normal file
69
BOSSES/Balzaphon.lua
Normal file
@@ -0,0 +1,69 @@
|
||||
-- Balzaphon (Scourge Invasion Boss) made by Manmadedrummer for Araxia Online
|
||||
|
||||
local NPC_BALZAPHON = 14684
|
||||
local SPELL_CONE_OF_COLD = 10161
|
||||
local SPELL_FROSTBOLT = 16799
|
||||
local SPELL_FROSTBOLT_VOLLEY = 8398
|
||||
local SPELL_FEAR = 30584
|
||||
|
||||
local fearHasCast = false
|
||||
|
||||
local function CastConeOfCold(eventId, delay, calls, creature)
|
||||
local target = creature:GetVictim()
|
||||
if target then
|
||||
creature:CastSpell(target, SPELL_CONE_OF_COLD, false)
|
||||
end
|
||||
creature:RegisterEvent(CastConeOfCold, math.random(2500, 3000), 1)
|
||||
end
|
||||
|
||||
local function CastFrostbolt(eventId, delay, calls, creature)
|
||||
local target = creature:GetVictim()
|
||||
if target then
|
||||
creature:CastSpell(target, SPELL_FROSTBOLT, false)
|
||||
end
|
||||
creature:RegisterEvent(CastFrostbolt, 2000, 1)
|
||||
end
|
||||
|
||||
local function CastFrostboltVolley(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature, SPELL_FROSTBOLT_VOLLEY, false)
|
||||
creature:RegisterEvent(CastFrostboltVolley, math.random(10000, 15000), 1)
|
||||
end
|
||||
|
||||
local function CheckFearPhase(eventId, delay, calls, creature)
|
||||
local healthPct = creature:GetHealthPct()
|
||||
if healthPct <= 30 and healthPct >= 1 and not fearHasCast then
|
||||
local players = creature:GetPlayersInRange(35)
|
||||
if #players > 0 then
|
||||
local target = players[math.random(1, #players)]
|
||||
if target then
|
||||
creature:CastSpell(target, SPELL_FEAR, false)
|
||||
fearHasCast = true
|
||||
end
|
||||
end
|
||||
end
|
||||
if not fearHasCast then
|
||||
creature:RegisterEvent(CheckFearPhase, 1000, 1)
|
||||
end
|
||||
end
|
||||
|
||||
local function OnCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastFrostbolt, math.random(1000, 1500), 1)
|
||||
creature:RegisterEvent(CastConeOfCold, math.random(1000, 2000), 1)
|
||||
creature:RegisterEvent(CastFrostboltVolley, math.random(5000, 8000), 1)
|
||||
creature:RegisterEvent(CheckFearPhase, 1000, 1)
|
||||
fearHasCast = false
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
fearHasCast = false
|
||||
end
|
||||
|
||||
local function OnDeath(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
fearHasCast = false
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(NPC_BALZAPHON, 1, OnCombat)
|
||||
RegisterCreatureEvent(NPC_BALZAPHON, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(NPC_BALZAPHON, 4, OnDeath)
|
||||
33
BOSSES/LadyFaltheress.lua
Normal file
33
BOSSES/LadyFaltheress.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
-- Lady Falther'ess <Scourge Invasion Boss> made by Manmadedrummer for Araxia Online
|
||||
|
||||
local NPC_ID = 14686
|
||||
local SPELL_BANSHEE_CURSE = 17105
|
||||
local SPELL_BANSHEE_SHRIEK = 16838
|
||||
local SPELL_DOMINATE_MIND = 7645
|
||||
local SPELL_RIBBON_OF_SOULS = 22743
|
||||
local SPELLS = {SPELL_BANSHEE_CURSE, SPELL_BANSHEE_SHRIEK, SPELL_DOMINATE_MIND, SPELL_RIBBON_OF_SOULS}
|
||||
|
||||
local function CastRandomSpell(eventId, delay, repeats, creature)
|
||||
local target = creature:GetVictim()
|
||||
if target then
|
||||
local spell = SPELLS[math.random(1, #SPELLS)]
|
||||
creature:CastSpell(target, spell, true)
|
||||
end
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:SendUnitYell("Thank you for becoming my next victim!", 0)
|
||||
creature:RegisterEvent(CastRandomSpell, 3000, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(NPC_ID, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(NPC_ID, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(NPC_ID, 4, OnDied)
|
||||
33
BOSSES/LordBlackwood.lua
Normal file
33
BOSSES/LordBlackwood.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
-- Lord Blackwood (S)courge Invasion Boss) made by Manmadedrummer for Araxia Online
|
||||
|
||||
local NPC_BLACKWOOD = 14695
|
||||
local SPELL_MULTI_SHOT = 21390
|
||||
local SPELL_SHIELD_BASH = 11972
|
||||
local SPELL_SMOKE_BOMB = 7964
|
||||
local SPELL_SHOOT = 16496
|
||||
|
||||
local function CastRandomSpell(eventId, delay, calls, creature)
|
||||
local target = creature:GetVictim()
|
||||
if target then
|
||||
local spellList = {SPELL_MULTI_SHOT, SPELL_SHIELD_BASH, SPELL_SMOKE_BOMB, SPELL_SHOOT}
|
||||
local spellToCast = spellList[math.random(1, #spellList)]
|
||||
creature:CastSpell(target, spellToCast, false)
|
||||
end
|
||||
creature:RegisterEvent(CastRandomSpell, math.random(2000, 5000), 1)
|
||||
end
|
||||
|
||||
local function OnCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastRandomSpell, math.random(1000, 3000), 1)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDeath(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(NPC_BLACKWOOD, 1, OnCombat)
|
||||
RegisterCreatureEvent(NPC_BLACKWOOD, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(NPC_BLACKWOOD, 4, OnDeath)
|
||||
57
BOSSES/PrinceTenris.lua
Normal file
57
BOSSES/PrinceTenris.lua
Normal file
@@ -0,0 +1,57 @@
|
||||
local PRINCE_TENRIS_MIRKBLOOD = 28194 -- The id of Prince Tenris Mirkblood
|
||||
local BLOOD_MIRROR = 70838
|
||||
local SUMMON_SANGUINE_SPIRIT = 51280
|
||||
local SANGUINE_STRIKE = 51285
|
||||
local BLOOD_SWOOP = 50923
|
||||
|
||||
local function CastBloodMirror(eventId, delay, calls, creature)
|
||||
local raidMembers = creature:GetAITargets(10) -- Get up to 10 raid members
|
||||
if #raidMembers > 0 then
|
||||
local targetIndex = math.random(1, #raidMembers)
|
||||
local randomTarget = raidMembers[targetIndex]
|
||||
if randomTarget then
|
||||
creature:CastSpell(randomTarget, BLOOD_MIRROR)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function CastSanguineSpirit(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), SUMMON_SANGUINE_SPIRIT, true)
|
||||
end
|
||||
|
||||
local function CastSanguineStrike(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), SANGUINE_STRIKE)
|
||||
end
|
||||
|
||||
local function CastBloodSwoop(eventId, delay, calls, creature)
|
||||
local raidMembers = creature:GetAITargets(10) -- Get up to 10 raid members
|
||||
if #raidMembers > 0 then
|
||||
local targetIndex = math.random(1, #raidMembers)
|
||||
local randomTarget = raidMembers[targetIndex]
|
||||
if randomTarget then
|
||||
creature:CastSpell(randomTarget, BLOOD_SWOOP)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastBloodMirror, math.random(26000, 42000), 0)
|
||||
creature:RegisterEvent(CastSanguineSpirit, math.random(3000, 6000), 0)
|
||||
creature:RegisterEvent(CastSanguineStrike, math.random(11000, 19000), 0)
|
||||
creature:RegisterEvent(CastBloodSwoop, 23000, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(PRINCE_TENRIS_MIRKBLOOD, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(PRINCE_TENRIS_MIRKBLOOD, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(PRINCE_TENRIS_MIRKBLOOD, 4, OnDied)
|
||||
|
||||
|
||||
|
||||
31
BOSSES/Revanchion.lua
Normal file
31
BOSSES/Revanchion.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
-- Revanchion (Scourge Invasion Boss) made by Manmadedrummer for Araxia Online
|
||||
|
||||
local NPC_REVANCHION = 14690
|
||||
local SPELL_FROST_NOVA = 14907
|
||||
local SPELL_SHADOW_BOLT_VOLLEY = 15245
|
||||
|
||||
local function CastRandomSpell(eventId, delay, calls, creature)
|
||||
local target = creature:GetVictim()
|
||||
if target then
|
||||
local spellList = {SPELL_FROST_NOVA, SPELL_SHADOW_BOLT_VOLLEY}
|
||||
local spellToCast = spellList[math.random(1, #spellList)]
|
||||
creature:CastSpell(target, spellToCast, false)
|
||||
end
|
||||
creature:RegisterEvent(CastRandomSpell, 3000, 1)
|
||||
end
|
||||
|
||||
local function OnCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastRandomSpell, 3000, 1)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDeath(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(NPC_REVANCHION, 1, OnCombat)
|
||||
RegisterCreatureEvent(NPC_REVANCHION, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(NPC_REVANCHION, 4, OnDeath)
|
||||
76
BOSSES/Scorn.lua
Normal file
76
BOSSES/Scorn.lua
Normal file
@@ -0,0 +1,76 @@
|
||||
local Scorn = {};
|
||||
|
||||
local function LichSlap(eventId, delay, calls, creature)
|
||||
if not creature:IsCasting() then
|
||||
creature:CastSpell(creature:GetVictim(), 28873, true)
|
||||
end
|
||||
end
|
||||
|
||||
local function Enrage(eventId, delay, calls, creature)
|
||||
if not creature:IsCasting() then
|
||||
creature:CastSpell(creature, 15716, true)
|
||||
end
|
||||
end
|
||||
|
||||
local function FrostboltVolley(eventId, delay, calls, creature)
|
||||
if not creature:IsCasting() then
|
||||
creature:CastSpell(creature, 22643, true)
|
||||
end
|
||||
end
|
||||
|
||||
local function FrostNova(eventId, delay, calls, creature)
|
||||
if not creature:IsCasting() then
|
||||
creature:CastSpell(creature, 15531, true)
|
||||
end
|
||||
end
|
||||
|
||||
function MindFlay(eventId, delay, calls, creature)
|
||||
if not creature:IsCasting() then
|
||||
local targets = creature:GetAITargets(5)
|
||||
if #targets == 0 then
|
||||
return
|
||||
end
|
||||
local target = targets[math.random(#targets)]
|
||||
creature:CastSpell(target, 17318, true)
|
||||
end
|
||||
end
|
||||
|
||||
function ManaBurn(eventId, delay, calls, creature)
|
||||
if not creature:IsCasting() then
|
||||
local targets = creature:GetAITargets(5)
|
||||
if #targets == 0 then
|
||||
return
|
||||
end
|
||||
local target = targets[math.random(#targets)]
|
||||
creature:CastSpell(target, 8129, true)
|
||||
end
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(LichSlap, math.random(8000,12000), 0)
|
||||
creature:RegisterEvent(MindFlay, math.random(14000,18000), 0)
|
||||
creature:RegisterEvent(FrostboltVolley, math.random(7000,11000), 0)
|
||||
creature:RegisterEvent(FrostNova, 1000, 1)
|
||||
creature:RegisterEvent(FrostNova, math.random(6000,9000), 0)
|
||||
creature:RegisterEvent(ManaBurn, math.random(17000,24000), 0)
|
||||
end
|
||||
|
||||
local function OnHealthUpdate(event, creature, value)
|
||||
if (creature:GetHealthPct() <= 20) then
|
||||
creature:RemoveEvents()
|
||||
creature:RegisterEvent(Enrage, 100, 1)
|
||||
end
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(14693, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(14693, 9, OnHealthUpdate)
|
||||
RegisterCreatureEvent(14693, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(14693, 4, OnDied)
|
||||
35
BOSSES/Sever.lua
Normal file
35
BOSSES/Sever.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
local Sever = {}
|
||||
|
||||
function Sever.CastDiseasedSpit(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 17745, true)
|
||||
end
|
||||
|
||||
function Sever.CastIntimidatingRoar(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 16508, true)
|
||||
end
|
||||
|
||||
function Sever.OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(Sever.CastDiseasedSpit, 10000, 0)
|
||||
creature:RegisterEvent(Sever.CastIntimidatingRoar, 30000, 0)
|
||||
end
|
||||
|
||||
function Sever.OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
function Sever.OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
function Sever.OnDamageTaken(event, creature, attacker, damage)
|
||||
if (creature:HealthBelowPct(50) and not creature:HasAura(41305)) then
|
||||
creature:CastSpell(creature, 41305, true)
|
||||
creature:SendUnitYell("", 0)
|
||||
end
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(14682, 1, Sever.OnEnterCombat)
|
||||
RegisterCreatureEvent(14682, 2, Sever.OnLeaveCombat)
|
||||
RegisterCreatureEvent(14682, 4, Sever.OnDied)
|
||||
RegisterCreatureEvent(14682, 9, Sever.OnDamageTaken)
|
||||
|
||||
Reference in New Issue
Block a user