mirror of
https://github.com/araxiaonline/RandomScriptsforAzerothCore.git
synced 2026-06-13 02:22:19 -04:00
Add files via upload
This commit is contained in:
78
ArcherusDK.lua
Normal file
78
ArcherusDK.lua
Normal file
@@ -0,0 +1,78 @@
|
||||
local ArcherusDK = {};
|
||||
local hasCastIceboundFortitude = false;
|
||||
|
||||
local function CastIcyTouch(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 49896, true)
|
||||
end
|
||||
|
||||
local function CastPlagueStrike(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 49917, true)
|
||||
end
|
||||
|
||||
local function CastBloodBoil(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 48721, true)
|
||||
end
|
||||
|
||||
local function CastDnD(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 43265, true)
|
||||
end
|
||||
|
||||
local function CastDeathstrike(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 49999, true)
|
||||
end
|
||||
|
||||
|
||||
local function CastDeathGrip(eventId, delay, calls, creature)
|
||||
local targets = creature:GetAITargets(10)
|
||||
local target = targets[math.random(#targets)]
|
||||
creature:CastSpell(target, 49576, true)
|
||||
end
|
||||
|
||||
local function CastAntiMagicShield(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature, 24021, true)
|
||||
end
|
||||
|
||||
local function CastAntiMagicZone(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature, 51052, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastIcyTouch, 5000, 0)
|
||||
creature:RegisterEvent(CastPlagueStrike, 6000, 0)
|
||||
creature:RegisterEvent(CastDeathstrike, 25000, 0)
|
||||
creature:RegisterEvent(CastDeathGrip, 20000, 0)
|
||||
creature:RegisterEvent(CastBloodBoil, math.random(12000, 18000), 0)
|
||||
creature:RegisterEvent(CastDnD, 100, 1)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
creature:RegisterEvent(CastAntiMagicShield, 18000, 0)
|
||||
creature:RegisterEvent(CastAntiMagicZone, 18000, 0)
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnSpawn(event, creature)
|
||||
creature:RegisterEvent(CastAntiMagicShield, 18000, 0)
|
||||
creature:RegisterEvent(CastAntiMagicZone, 36000, 0)
|
||||
end
|
||||
|
||||
local function CastBloodBoil(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 48721, true)
|
||||
end
|
||||
|
||||
local function OnHealthCheck(event, creature, victim, health)
|
||||
if (creature:GetHealthPct() <= 20 and not hasCastIceboundFortitude) then
|
||||
creature:CastSpell(creature, 48792, true)
|
||||
hasCastIceboundFortitude = true
|
||||
end
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400046, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(400046, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(400046, 4, OnDied)
|
||||
RegisterCreatureEvent(400046, 5, OnSpawn)
|
||||
RegisterCreatureEvent(400046, 9, OnHealthCheck)
|
||||
35
BlightedZombie.lua
Normal file
35
BlightedZombie.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
local BlightedZombie = {}
|
||||
|
||||
function BlightedZombie.OnSpawn(event, creature)
|
||||
creature:SetMaxHealth(17720)
|
||||
creature:CastSpell(creature:GetVictim(), 17683, true)
|
||||
end
|
||||
|
||||
function BlightedZombie.OnCombat(event, creature, target)
|
||||
creature:RegisterEvent(BlightedZombie.Ability1, 7000, 0)
|
||||
creature:RegisterEvent(BlightedZombie.Ability2, 14000, 0)
|
||||
end
|
||||
|
||||
function BlightedZombie.Ability1(event, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 52476, true)
|
||||
end
|
||||
|
||||
function BlightedZombie.Ability2(event, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 37597, true)
|
||||
end
|
||||
|
||||
function BlightedZombie.OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
function BlightedZombie.OnDeath(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400051, 1, BlightedZombie.OnCombat)
|
||||
RegisterCreatureEvent(400051, 2, BlightedZombie.OnLeaveCombat)
|
||||
RegisterCreatureEvent(400051, 4, BlightedZombie.OnDeath)
|
||||
RegisterCreatureEvent(400051, 5, BlightedZombie.OnSpawn)
|
||||
|
||||
|
||||
|
||||
59
DarkValk.lua
Normal file
59
DarkValk.lua
Normal file
@@ -0,0 +1,59 @@
|
||||
local DarkValk = {};
|
||||
DarkValk.npcId = 400049
|
||||
|
||||
local function CastShadowBolt(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 21077, true)
|
||||
end
|
||||
|
||||
local function CastShadowBoltVolley(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 33841, true)
|
||||
end
|
||||
|
||||
local function CastRainOfFire(eventId, delay, calls, creature)
|
||||
local targets = creature:GetAITargets(10)
|
||||
local target = targets[math.random(#targets)]
|
||||
creature:CastSpell(target, 24669, true)
|
||||
end
|
||||
|
||||
local function CastCurseOfPain(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 38048, true)
|
||||
end
|
||||
|
||||
local function CastShadowMend(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature, 33325, true)
|
||||
end
|
||||
|
||||
local function CastShadowStrike(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 50581, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastShadowBolt, math.random(5000, 8000), 0)
|
||||
creature:RegisterEvent(CastShadowBoltVolley, math.random(11000, 18000), 0)
|
||||
creature:RegisterEvent(CastRainOfFire, math.random(22000, 31000), 0)
|
||||
creature:RegisterEvent(CastCurseOfPain, math.random(13000, 18000), 0)
|
||||
creature:RegisterEvent(CastShadowMend, math.random(11000, 20000), 0)
|
||||
creature:RegisterEvent(CastShadowStrike, math.random(2000, 5000), 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnSpawn(event, creature)
|
||||
creature:SendUnitYell("You will submit to the power of the Lich King.", 0)
|
||||
creature:SetMaxHealth(812760)
|
||||
creature:CastSpell(creature, 17683, true)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(DarkValk.npcId, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(DarkValk.npcId, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(DarkValk.npcId, 4, OnDied)
|
||||
RegisterCreatureEvent(DarkValk.npcId, 5, OnSpawn)
|
||||
|
||||
|
||||
|
||||
50
DecayingColossus.lua
Normal file
50
DecayingColossus.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
local DecayingColossus = {};
|
||||
DecayingColossus.npcId = 400048
|
||||
|
||||
local function CastMightyBlow(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 14099, true)
|
||||
end
|
||||
|
||||
local function CastDisarm(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 6713, true)
|
||||
end
|
||||
|
||||
local function CastStomp(eventId, delay, calls, creature)
|
||||
local targets = creature:GetAITargets(10)
|
||||
local target = targets[math.random(#targets)]
|
||||
creature:CastSpell(target, 55196, true)
|
||||
end
|
||||
|
||||
local function CastThunderclap(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 55635, true)
|
||||
end
|
||||
|
||||
local function CastEnrage(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature, 8599, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastMightyBlow, math.random(4000, 7000), 0)
|
||||
creature:RegisterEvent(CastDisarm, math.random(15000, 19000), 0)
|
||||
creature:RegisterEvent(CastStomp, math.random(12000, 25000), 0)
|
||||
creature:RegisterEvent(CastThunderclap, math.random(13000, 18000), 0)
|
||||
creature:RegisterEvent(CastEnrage, math.random(45000, 60000), 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnSpawn(event, creature)
|
||||
creature:SetMaxHealth(517720)
|
||||
creature:CastSpell(creature, 17683, true)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(DecayingColossus.npcId, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(DecayingColossus.npcId, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(DecayingColossus.npcId, 4, OnDied)
|
||||
RegisterCreatureEvent(DecayingColossus.npcId, 5, OnSpawn)
|
||||
@@ -22,6 +22,8 @@ local npcIds1 = {
|
||||
16423,
|
||||
16422,
|
||||
400036,
|
||||
400056,
|
||||
400049
|
||||
}
|
||||
|
||||
-- Table to store NPC IDs for group 2
|
||||
|
||||
8
FrostbroodWhelp.lua
Normal file
8
FrostbroodWhelp.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
local frostbroodWhelps = {};
|
||||
|
||||
function frostbroodWhelps.OnSpawn(event, creature)
|
||||
creature:CanFly(true)
|
||||
creature:SetDisableGravity(true)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400057, 5, frostbroodWhelps.OnSpawn)
|
||||
32
Ghoul.lua
Normal file
32
Ghoul.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
local Ghoul = {};
|
||||
|
||||
local function CastLeap(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 47482, true)
|
||||
end
|
||||
|
||||
local function CastPlague(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 52230, true)
|
||||
end
|
||||
|
||||
local function CastExplode(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature, 47496, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastLeap, 100, 1)
|
||||
creature:RegisterEvent(CastPlague, 100, 1)
|
||||
creature:RegisterEvent(CastPlague, 20000, 0)
|
||||
creature:RegisterEvent(CastExplode, 23000, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400047, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(400047, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(400047, 4, OnDied)
|
||||
24
HordeShout.lua
Normal file
24
HordeShout.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
local WolfRider = {};
|
||||
|
||||
local dialogues = {
|
||||
"For the Horde!",
|
||||
"Victory for the Horde!",
|
||||
"Our enemies will tremble before the might of the Horde!",
|
||||
"Lok'tar ogar!",
|
||||
"Let the winds of war carry us to glory!",
|
||||
"The Horde will claim what is rightfully ours!",
|
||||
"We will show the Lich King the power of the Horde!",
|
||||
"For the glory of the Warchief!",
|
||||
"None shall stand against the Horde!",
|
||||
"Our enemies will rue the day they crossed the Horde!",
|
||||
"With the strength of the Horde, we will triumph!",
|
||||
"Let us show the Scourge the might of the Horde!",
|
||||
"We will prove the might of the Horde!",
|
||||
}
|
||||
|
||||
local function OnSpawn(event, creature)
|
||||
local randomDialogue = dialogues[math.random(26)] -- Selects a random dialogue from the "dialogues" table
|
||||
creature:SendUnitYell(randomDialogue,0) -- Makes the creature yell the selected dialogue
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400045, 5, OnSpawn) -- Registers the "OnSpawn" function as a spawn event for the creature with ID 400014
|
||||
28
Necrofiend.lua
Normal file
28
Necrofiend.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
local Necrofiend = {}
|
||||
|
||||
function Necrofiend.OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(Necrofiend.WebSpray, 15000, 0)
|
||||
creature:RegisterEvent(CastBanefulPoison, 7000, 0)
|
||||
end
|
||||
|
||||
function Necrofiend.WebSpray(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 55508, true)
|
||||
end
|
||||
|
||||
local function CastBanefulPoison(eventId, delay, calls, creature)
|
||||
local targets = creature:GetAITargets(10)
|
||||
local target = targets[math.random(#targets)]
|
||||
creature:CastSpell(target, 15475, true)
|
||||
end
|
||||
|
||||
function Necrofiend.OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
function Necrofiend.OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400055, 1, Necrofiend.OnEnterCombat)
|
||||
RegisterCreatureEvent(400055, 2, Necrofiend.OnLeaveCombat)
|
||||
RegisterCreatureEvent(400055, 4, Necrofiend.OnDied)
|
||||
@@ -14,7 +14,7 @@ end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastShoot, 750, 0)
|
||||
creature:RegisterEvent(CastShoot, 15000, 0)
|
||||
creature:RegisterEvent(CastSerpentSting, 15000, 0)
|
||||
creature:RegisterEvent(CastMultiShot, 5000, 0)
|
||||
end
|
||||
|
||||
|
||||
@@ -1,87 +1,66 @@
|
||||
local Patchqwerk = {}
|
||||
local Patchqwerk = {};
|
||||
|
||||
-- This function is called when Patchqwerk is spawned.
|
||||
function Patchqwerk.OnSpawn(event, creature)
|
||||
-- Sends a yell message ("Patchqwerk make Lich King proud! You die now!")
|
||||
creature:SendUnitYell("Patchqwerk make Lich King proud! You die now!",0)
|
||||
-- Casts spell 46587 on itself
|
||||
creature:CastSpell(creature, 46587, true)
|
||||
end
|
||||
|
||||
-- This function is called repeatedly every 7 seconds when Patchqwerk is in combat.
|
||||
function Patchqwerk.PoisonBoltVolley(eventId, delay, calls, creature)
|
||||
-- Casts spell 40095 on its current target
|
||||
creature:CastSpell(creature:GetVictim(), 40095, true)
|
||||
end
|
||||
|
||||
-- This function is called repeatedly every 15 seconds when Patchqwerk is in combat.
|
||||
function Patchqwerk.SummonOozeling(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature, 12250, true)
|
||||
end
|
||||
|
||||
function Patchqwerk.CastHatefulStrike(eventId, delay, calls, creature)
|
||||
-- Casts spell 28308 on its current target
|
||||
creature:CastSpell(creature:GetVictim(), 28308, true)
|
||||
end
|
||||
|
||||
-- This function is called repeatedly every 20 seconds when Patchqwerk is in combat.
|
||||
function Patchqwerk.CastGore(eventId, delay, calls, creature)
|
||||
-- Casts spell 48130 on its current target
|
||||
creature:CastSpell(creature:GetVictim(), 48130, true)
|
||||
end
|
||||
|
||||
-- This function is called when Patchqwerk enters combat.
|
||||
function Patchqwerk.OnEnterCombat(event, creature, target)
|
||||
-- Array of yell options
|
||||
if (math.random(1, 100) <= 25) then
|
||||
local yellOptions = { "Patchqwerk huuuuungry!", "Time for a snack!", "You're mine now!", "You look delicious. Patchqwerk eat you now!", "I not eat in days, time to feast!", "Me smash and eat you now!", "Me so hungry, me eat anything... even you!" }
|
||||
-- Selects a random yell option
|
||||
local randomIndex = math.random(1, 7)
|
||||
local selectedYell = yellOptions[randomIndex]
|
||||
-- Sends the selected yell message
|
||||
creature:SendUnitYell(selectedYell, 0)
|
||||
-- Registers the PoisonBoltVolley, CastHatefulStrike, and CastGore functions to be called repeatedly
|
||||
end
|
||||
creature:RegisterEvent(Patchqwerk.PoisonBoltVolley, 7000, 0)
|
||||
creature:RegisterEvent(Patchqwerk.CastHatefulStrike, 15000, 0)
|
||||
creature:RegisterEvent(Patchqwerk.CastGore, 20000, 0)
|
||||
creature:RegisterEvent(Patchqwerk.SummonOozeling, 10000, 0)
|
||||
end
|
||||
|
||||
-- This function is called when Patchqwerk leaves combat.
|
||||
function Patchqwerk.OnLeaveCombat(event, creature)
|
||||
-- Array of yell options
|
||||
if (math.random(1, 100) <= 25) then
|
||||
local yellOptions = { "You not so tasty afterall...", "I be back for seconds!", "No more play? Too bad...", "Maybe next time you taste better!","Me still hungry, come back later!","You not enough food, me go find more!", "Aww...You no stay for dinner? You make Patchqwerk sad." }
|
||||
-- Selects a random yell option
|
||||
local randomIndex = math.random(1, 7)
|
||||
local selectedYell = yellOptions[randomIndex]
|
||||
-- Sends the selected yell message
|
||||
creature:SendUnitYell(selectedYell, 0)
|
||||
-- Removes any registered events
|
||||
end
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
-- This function is called when Patchqwerk dies.
|
||||
function Patchqwerk.OnDied(event, creature, killer)
|
||||
-- Sends a yell message ("Patchqwerk forget to chew...")
|
||||
creature:SendUnitYell("Patchqwerk forget to chew...", 0)
|
||||
-- Sends a broadcast message to the player who killed Patchqwerk
|
||||
if(killer:GetObjectType() == "Player") then
|
||||
killer:SendBroadcastMessage("You killed " ..creature:GetName().."!")
|
||||
end
|
||||
-- Removes any registered events
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
-- This function is called repeatedly when Patchqwerk's health changes.
|
||||
function Patchqwerk.CheckHealth(event, creature)
|
||||
-- If its health drops below 20%,
|
||||
if (creature:HealthBelowPct(20)) then
|
||||
-- Sends a yell message ("Patchqwerk go berserk!")
|
||||
creature:SendUnitYell("Patchqwerk go berserk!", 0)
|
||||
-- Casts spell 41305
|
||||
creature:CastSpell(creature, 41305, true)
|
||||
-- If its health rises above 95%,
|
||||
elseif (creature:HealthAbovePct(95)) then
|
||||
-- Casts spell 46587
|
||||
creature:CastSpell(creature, 46587, true)
|
||||
end
|
||||
end
|
||||
|
||||
-- Registers the functions to be called for various events
|
||||
RegisterCreatureEvent(400012, 1, Patchqwerk.OnEnterCombat)
|
||||
RegisterCreatureEvent(400012, 2, Patchqwerk.OnLeaveCombat)
|
||||
RegisterCreatureEvent(400012, 4, Patchqwerk.OnDied)
|
||||
|
||||
29
PatchwerkHorror.lua
Normal file
29
PatchwerkHorror.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
local PatchWorkHorror = {};
|
||||
|
||||
local function AcidSpit(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 61597, true)
|
||||
end
|
||||
|
||||
function CastPoisonCloud(eventId, delay, calls, creature)
|
||||
local targets = creature:GetAITargets(10)
|
||||
local target = targets[math.random(#targets)]
|
||||
creature:CastSpell(target, 12766, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(AcidSpit, 5000, 0)
|
||||
creature:RegisterEvent(CastPoisonCloud, 7000, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400050, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(400050, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(400050, 4, OnDied)
|
||||
|
||||
@@ -48,7 +48,7 @@ local sayings = {
|
||||
}
|
||||
local index = math.random(1, #sayings)
|
||||
creature:SendUnitSay(sayings[index], 0)
|
||||
creature:RegisterEvent(CastFD, 1, 1)
|
||||
creature:RegisterEvent(CastFD, 100, 1)
|
||||
creature:RegisterEvent(CastRoot, 10300, 0)
|
||||
creature:RegisterEvent(CastDisengage, 10400, 0)
|
||||
creature:RegisterEvent(CastRapidShot, 11000, 0)
|
||||
|
||||
@@ -1,43 +1,70 @@
|
||||
local undeadDragon = {}
|
||||
|
||||
function undeadDragon.OnSpawn(event, creature)
|
||||
creature:SetMaxHealth(4554119)
|
||||
creature:CanFly(true)
|
||||
creature:SetDisableGravity(true)
|
||||
creature:SetReactState(0)
|
||||
creature:IsRegeneratingHealth(false)
|
||||
creature:SetRegeneratingHealth(false)
|
||||
creature:SendUnitYell("Your warm flesh will freeze under the shadow of my wings!", 0)
|
||||
creature:PlayDirectSound(20429)
|
||||
creature:CastSpell(creature, 100151, true)
|
||||
creature:CastSpell(creature, 17683, true)
|
||||
|
||||
|
||||
creature:RegisterEvent(undeadDragon.CastSpell, 60000, 0)
|
||||
creature:RegisterEvent(undeadDragon.CastSpell2, 20000, 0)
|
||||
creature:RegisterEvent(undeadDragon.CastSpell3, 25000, 0)
|
||||
creature:RegisterEvent(undeadDragon.CastSpell4, 30000, 0)
|
||||
creature:RegisterEvent(undeadDragon.CastSpell5, 35000, 0)
|
||||
creature:RegisterEvent(undeadDragon.CastSpell3, 3500, 0)
|
||||
creature:RegisterEvent(undeadDragon.CastSpell4, 10000, 0)
|
||||
creature:RegisterEvent(undeadDragon.CastSpell5, 23000, 0)
|
||||
creature:RegisterEvent(undeadDragon.CastSpell6, 45000, 0)
|
||||
creature:RegisterEvent(undeadDragon.CastBlizzard, 4000, 0)
|
||||
end
|
||||
|
||||
function undeadDragon.OnLeaveCombat(event, creature)
|
||||
creature:IsRegeneratingHealth(false)
|
||||
end
|
||||
|
||||
function undeadDragon.CastSpell(event, delay, pCall, creature)
|
||||
creature:CastSpell(creature, 100156, true)
|
||||
creature:SetRegeneratingHealth(false)
|
||||
end
|
||||
|
||||
function undeadDragon.CastSpell2(event, delay, pCall, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 200002, true)
|
||||
creature:CastSpell(creature:GetVictim(), 36741, true) --Frostbolt Volley
|
||||
end
|
||||
|
||||
function undeadDragon.CastSpell3(event, delay, pCall, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 200003, true)
|
||||
creature:CastSpell(creature:GetVictim(), 44614, true) --Frostfire. Make Custom
|
||||
end
|
||||
|
||||
function undeadDragon.CastSpell4(event, delay, pCall, creature)
|
||||
creature:CastSpell(creature:GetRandomUnit(10), 200004, true)
|
||||
local targets = creature:GetAITargets()
|
||||
local targetCount = #targets
|
||||
for i = 1, math.min(2, targetCount) do
|
||||
local target = targets[i]
|
||||
creature:CastSpell(target, 71285, true) --Frozen Orb
|
||||
end
|
||||
end
|
||||
|
||||
function undeadDragon.CastSpell5(event, delay, pCall, creature)
|
||||
creature:CastSpell(creature, 200005, true)
|
||||
local targets = creature:GetAITargets()
|
||||
local targetCount = #targets
|
||||
for i = 1, math.min(3, targetCount) do
|
||||
local target = targets[i]
|
||||
creature:CastSpell(target, 50635, true) --Freeze
|
||||
end
|
||||
end
|
||||
|
||||
function undeadDragon.CastSpell6(event, delay, pCall, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 364730, true) --Whelps
|
||||
end
|
||||
|
||||
function undeadDragon.CastBlizzard(event, delay, pCall, creature)
|
||||
-- Get all creatures with NPC ID 400058 within 100 yards of the undead dragon
|
||||
local targets = creature:GetCreaturesInRange(100, 400058)
|
||||
if targets ~= nil then
|
||||
-- Pick 3 random targets from the list of creatures
|
||||
for i = 1, math.min(3, #targets) do
|
||||
local target = targets[math.random(1, #targets)]
|
||||
-- Cast Blizzard on the random target
|
||||
creature:CastSpell(target, 33634, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function undeadDragon.OnDeath(event, creature, killer)
|
||||
|
||||
43
SkeletalWarlord.lua
Normal file
43
SkeletalWarlord.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
local SkeletalWarlord = {}
|
||||
SkeletalWarlord.minChargeRange = 10
|
||||
|
||||
function SkeletalWarlord.OnSpawn(event, creature)
|
||||
creature:SetMaxHealth(54353)
|
||||
creature:CastSpell(creature, 17683, true)
|
||||
end
|
||||
|
||||
function SkeletalWarlord.OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(SkeletalWarlord.Whirlwind, 15000, 0)
|
||||
creature:RegisterEvent(SkeletalWarlord.MortalStrike, 7000, 0)
|
||||
creature:RegisterEvent(SkeletalWarlord.Charge, 10000, 0)
|
||||
end
|
||||
|
||||
function SkeletalWarlord.Whirlwind(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 36982, true)
|
||||
end
|
||||
|
||||
function SkeletalWarlord.MortalStrike(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 21553, true)
|
||||
end
|
||||
|
||||
function SkeletalWarlord.OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
function SkeletalWarlord.OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
function SkeletalWarlord.Charge(eventId, delay, calls, creature)
|
||||
local targets = creature:GetAITargets(SkeletalWarlord.minChargeRange)
|
||||
local target = targets[math.random(#targets)]
|
||||
creature:CastSpell(target, 19471, true)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(400056, 5, SkeletalWarlord.OnSpawn)
|
||||
RegisterCreatureEvent(400056, 1, SkeletalWarlord.OnEnterCombat)
|
||||
RegisterCreatureEvent(400056, 2, SkeletalWarlord.OnLeaveCombat)
|
||||
RegisterCreatureEvent(400056, 4, SkeletalWarlord.OnDied)
|
||||
|
||||
|
||||
|
||||
45
SpectralAttendant.lua
Normal file
45
SpectralAttendant.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
local SpectralAttendant = {}
|
||||
|
||||
function SpectralAttendant.OnSpawn(event, creature)
|
||||
creature:SetMaxHealth(43240)
|
||||
creature:CastSpell(creature, 17683, true)
|
||||
end
|
||||
|
||||
function SpectralAttendant.OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(SpectralAttendant.Immolate, 6000, 0)
|
||||
creature:RegisterEvent(SpectralAttendant.Incinerate, 12000, 0)
|
||||
creature:RegisterEvent(SpectralAttendant.AOEFear, 30000, 0)
|
||||
reature:RegisterEvent(SpectralAttendant.Teleport, math.random(12000,16000), 0)
|
||||
end
|
||||
|
||||
function SpectralAttendant.Immolate(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 11668, true)
|
||||
end
|
||||
|
||||
function SpectralAttendant.Incinerate(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 29722, true)
|
||||
end
|
||||
|
||||
function SpectralAttendant.AOEFear(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature, 8122)
|
||||
end
|
||||
|
||||
function SpectralAttendant.OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
function SpectralAttendant.OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
function SpectralAttendant.Teleport(eventId, delay, calls, creature)
|
||||
local targets = creature:GetAITargets(10)
|
||||
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)
|
||||
RegisterCreatureEvent(400052, 4, SpectralAttendant.OnDied)
|
||||
Reference in New Issue
Block a user