Files
ScourgeInvasion/BOSSES/Revanchion.lua
2025-06-12 15:45:15 -04:00

31 lines
1014 B
Lua

-- 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)