Add files via upload

This commit is contained in:
Dinkledork
2023-03-09 03:36:13 -07:00
committed by GitHub
parent 853f202792
commit eae97d262b
23 changed files with 403 additions and 23 deletions

View File

@@ -9,9 +9,21 @@ function SpectralAttendant.OnEnterCombat(event, creature, target)
creature:RegisterEvent(SpectralAttendant.Immolate, 6000, 0)
creature:RegisterEvent(SpectralAttendant.Incinerate, 12000, 0)
creature:RegisterEvent(SpectralAttendant.AOEFear, 30000, 0)
creature:RegisterEvent(SpectralAttendant.CastSpecialSpell, 1000, 0)
creature:RegisterEvent(SpectralAttendant.Teleport, math.random(12000,16000), 0)
end
function SpectralAttendant.CastSpecialSpell(eventId, delay, calls, creature)
local victim = creature:GetVictim()
if not victim then
return
end
if victim:GetEntry() == 32666 or victim:GetEntry() == 32667 or victim:GetEntry() == 31144 or victim:GetEntry() == 31146 then
creature:CastSpell(victim, 5, true)
end
end
function SpectralAttendant.Immolate(eventId, delay, calls, creature)
creature:CastSpell(creature:GetVictim(), 11668, true)
end
@@ -29,17 +41,21 @@ creature:RemoveEvents()
end
function SpectralAttendant.OnDied(event, creature, killer)
creature:RemoveCorpse()
creature:DespawnOrUnsummon(5000)
creature:RemoveEvents()
end
function SpectralAttendant.Teleport(eventId, delay, calls, creature)
local targets = creature:GetAITargets(10)
if #targets == 0 then
return
end
local target = targets[math.random(#targets)]
creature:CastSpell(target, 69904)
creature:ClearThreatList()
end
RegisterCreatureEvent(400052, 5, SpectralAttendant.OnSpawn)
RegisterCreatureEvent(400052, 1, SpectralAttendant.OnEnterCombat)
RegisterCreatureEvent(400052, 2, SpectralAttendant.OnLeaveCombat)