From f43287bffff8c3096bf52d4a0b0da2e0e582083d Mon Sep 17 00:00:00 2001 From: Dinkledork <118951051+Day36512@users.noreply.github.com> Date: Wed, 22 Feb 2023 18:22:35 -0700 Subject: [PATCH] Custom MC Bosses --- CoreRager.lua | 43 +++++++++++++++++++++++ Garr.lua | 0 Gehennas.lua | 50 +++++++++++++++++++++++++++ Golemagg.lua | 49 ++++++++++++++++++++++++++ Hazzrash.lua | 59 +++++++++++++++++++++++++++++++ Lucifron.lua | 53 ++++++++++++++++++++++++++++ Magmadar.lua | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++ Magmakin.lua | 38 ++++++++++++++++++++ 8 files changed, 388 insertions(+) create mode 100644 CoreRager.lua create mode 100644 Garr.lua create mode 100644 Gehennas.lua create mode 100644 Golemagg.lua create mode 100644 Hazzrash.lua create mode 100644 Lucifron.lua create mode 100644 Magmadar.lua create mode 100644 Magmakin.lua diff --git a/CoreRager.lua b/CoreRager.lua new file mode 100644 index 0000000..2be1c43 --- /dev/null +++ b/CoreRager.lua @@ -0,0 +1,43 @@ +CoreRager = {} + +function CoreRager.CastMangle(eventId, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 19820, true) +end + +function CoreRager.OnDamageTaken(event, creature, attacker, damage) +if creature:GetHealthPct() < 50 then +creature:CastSpell(creature, 17683, true) +creature:SendUnitEmote("Core Rager refuses to die while its master is in trouble.", 0) +end +end + +function CoreRager.OnEnterCombat(event, creature, target) +creature:RegisterEvent(CoreRager.CastMangle, 7000, 0) +end + +function CoreRager.OnLeaveCombat(event, creature) +creature:RemoveEvents() +end + +function CoreRager.OnDied(event, creature, killer) +creature:RemoveEvents() +end + +function CoreRager.OnSpawn(event, creature) +creature:SetMaxHealth(200000) +end + +function CoreRager.OnGolemaggDeath(event, creature, boss) +local coreRagers = creature:GetCreaturesInRange(100, 11672) +for _, coreRager in pairs(coreRagers) do +coreRager:CastSpell(coreRager, 13520, true) +end +end + +RegisterCreatureEvent(11672, 1, CoreRager.OnEnterCombat) +RegisterCreatureEvent(11672, 2, CoreRager.OnLeaveCombat) +RegisterCreatureEvent(11672, 4, CoreRager.OnDied) +RegisterCreatureEvent(11672, 5, CoreRager.OnSpawn) +RegisterCreatureEvent(11672, 9, CoreRager.OnDamageTaken) + +RegisterCreatureEvent(11988, 4, CoreRager.OnGolemaggDeath) \ No newline at end of file diff --git a/Garr.lua b/Garr.lua new file mode 100644 index 0000000..e69de29 diff --git a/Gehennas.lua b/Gehennas.lua new file mode 100644 index 0000000..3248d8a --- /dev/null +++ b/Gehennas.lua @@ -0,0 +1,50 @@ +Gehennas = {} + +function Gehennas.CastGehennasCurse(eventId, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 19716, true) +end + +function Gehennas.CastRainOfFire(eventId, delay, calls, creature) +local targets = creature:GetAITargets(10) +local target = targets[math.random(#targets)] +creature:CastSpell(target, 19717, true) +end + +function Gehennas.CastShadowBolt(eventId, delay, calls, creature) +local random = math.random(0,1) +if random == 0 then +creature:CastSpell(creature:GetVictim(), 19729, true) +else +local targets = creature:GetAITargets(10) +local target = targets[math.random(#targets)] +creature:CastSpell(target, 19728, true) +end +end + +function Gehennas.CastShadowboltVolley(eventId, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 36275, true) +end + +function Gehennas.OnEnterCombat(event, creature, target) +creature:RegisterEvent(Gehennas.CastGehennasCurse, math.random(25000, 30000), 0) +creature:RegisterEvent(Gehennas.CastRainOfFire, 6000, 0) +creature:RegisterEvent(Gehennas.CastShadowBolt, 5000, 0) +creature:RegisterEvent(Gehennas.CastShadowboltVolley, 15000, 0) +end + +function Gehennas.OnLeaveCombat(event, creature) +creature:RemoveEvents() +end + +function Gehennas.OnDied(event, creature, killer) +creature:RemoveEvents() +end + +function Gehennas.OnSpawn(event, creature) +creature:SetMaxHealth(648000) +end + +RegisterCreatureEvent(12259, 1, Gehennas.OnEnterCombat) +RegisterCreatureEvent(12259, 2, Gehennas.OnLeaveCombat) +RegisterCreatureEvent(12259, 4, Gehennas.OnDied) +RegisterCreatureEvent(12259, 5, Gehennas.OnSpawn) \ No newline at end of file diff --git a/Golemagg.lua b/Golemagg.lua new file mode 100644 index 0000000..87d46f1 --- /dev/null +++ b/Golemagg.lua @@ -0,0 +1,49 @@ +Golemagg = {} +Golemagg.enraged = {} + +function Golemagg.CastPyroblast(eventId, delay, calls, creature) +local targets = creature:GetAITargets() +local target = targets[math.random(#targets)] +creature:CastSpell(target, 20228, true) +end + +function Golemagg.CastEarthquake(eventId, delay, calls, creature) +creature:CastSpell(creature, 19798, true) +creature:RegisterEvent(Golemagg.CastEarthquake, 17000, 0) +end + +function Golemagg.DamageTaken(event, creature, attacker, damage) +if not Golemagg.enraged[creature:GetGUID()] and creature:GetHealthPct() < 10 then +creature:CastSpell(creature, 20544, true) +creature:CastSpell(creature, 19798, true) +creature:RegisterEvent(Golemagg.CastEarthquake, 5300, 1) +Golemagg.enraged[creature:GetGUID()] = true +end +end + +function Golemagg.OnEnterCombat(event, creature, target) +creature:RegisterEvent(Golemagg.CastPyroblast, math.random(3000, 7000), 0) +creature:CastSpell(creature, 13879, true) +creature:CastSpell(creature, 20556, true) +creature:CastSpell(creature, 18943, true) +end + +function Golemagg.OnLeaveCombat(event, creature) +creature:RemoveEvents() +end + +function Golemagg.OnDied(event, creature, killer) +creature:RemoveEvents() +Golemagg.enraged[creature:GetGUID()] = nil +end + +function Golemagg.OnSpawn(event, creature) +creature:SetMaxHealth(1652176) +Golemagg.enraged[creature:GetGUID()] = false +end + +RegisterCreatureEvent(11988, 1, Golemagg.OnEnterCombat) +RegisterCreatureEvent(11988, 2, Golemagg.OnLeaveCombat) +RegisterCreatureEvent(11988, 4, Golemagg.OnDied) +RegisterCreatureEvent(11988, 5, Golemagg.OnSpawn) +RegisterCreatureEvent(11988, 9, Golemagg.DamageTaken) \ No newline at end of file diff --git a/Hazzrash.lua b/Hazzrash.lua new file mode 100644 index 0000000..a364ae8 --- /dev/null +++ b/Hazzrash.lua @@ -0,0 +1,59 @@ +Hazzrash = {} + +function Hazzrash.CastArcaneBarage(eventId, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 44425, true) +end + +function Hazzrash.CastArcaneBlast(eventId, delay, calls, creature) +local targets = creature:GetAITargets(10) +local target = targets[math.random(#targets)] +creature:CastSpell(target, 30451, true) +end + +function Hazzrash.CastChainBurn(eventId, delay, calls, creature) +local targets = creature:GetAITargets(10) +local target = targets[math.random(#targets)] +creature:CastSpell(target, 8211, true) +end + +function Hazzrash.CastCrystalFlash(eventId, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 5106, true) +end + +function Hazzrash.CastEvocation(eventId, delay, calls, creature) +creature:CastSpell(creature, 30254, true) +creature:RemoveEvents() +creature:RegisterEvent(Hazzrash.ResumeCasts, 20000, 1) +end + +function Hazzrash.ResumeCasts(eventId, delay, calls, creature) +creature:RegisterEvent(Hazzrash.CastArcaneBarage, 6000, 0) +creature:RegisterEvent(Hazzrash.CastArcaneBlast, 16000, 0) +creature:RegisterEvent(Hazzrash.CastCrystalFlash, 25000, 0) +creature:RegisterEvent(Hazzrash.CastChainBurn, 29000, 0) +end + +function Hazzrash.OnEnterCombat(event, creature, target) +creature:RegisterEvent(Hazzrash.CastArcaneBarage, 6000, 0) +creature:RegisterEvent(Hazzrash.CastArcaneBlast, 18000, 0) +creature:RegisterEvent(Hazzrash.CastCrystalFlash, 25000, 0) +creature:RegisterEvent(Hazzrash.CastChainBurn, 44000, 0) +creature:RegisterEvent(Hazzrash.CastEvocation, 90000, 1) +end + +function Hazzrash.OnLeaveCombat(event, creature) +creature:RemoveEvents() +end + +function Hazzrash.OnDied(event, creature, killer) +creature:RemoveEvents() +end + +function Hazzrash.OnSpawn(event, creature) +creature:SetMaxHealth(563000) +end + +RegisterCreatureEvent(83000, 1, Hazzrash.OnEnterCombat) +RegisterCreatureEvent(83000, 2, Hazzrash.OnLeaveCombat) +RegisterCreatureEvent(83000, 4, Hazzrash.OnDied) +RegisterCreatureEvent(83000, 5, Hazzrash.OnSpawn) \ No newline at end of file diff --git a/Lucifron.lua b/Lucifron.lua new file mode 100644 index 0000000..313f763 --- /dev/null +++ b/Lucifron.lua @@ -0,0 +1,53 @@ +local Lucifron = {} +Lucifron.enrageCasted = false + +function Lucifron.CastImpendingDoom(eventId, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 19702, true) +end + +function Lucifron.CastLucifronCurse(eventId, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 19703, true) +end + +function Lucifron.CastShadowShock(eventId, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 20603, true) +end + +function Lucifron.CastFlamestrike(eventId, delay, calls, creature) +local targets = creature:GetAITargets() +local targetCount = creature:GetAITargetsCount() +local randomTarget = targets[math.random(1, targetCount)] +creature:CastSpell(randomTarget, 10216, true) +end + +function Lucifron.OnEnterCombat(event, creature, target) +creature:RegisterEvent(Lucifron.CastImpendingDoom, math.random(6000, 11000), 0) +creature:RegisterEvent(Lucifron.CastLucifronCurse, math.random(11000, 14000), 0) +creature:RegisterEvent(Lucifron.CastShadowShock, 5000, 0) +creature:RegisterEvent(Lucifron.CastFlamestrike, 15000, 0) +end + +function Lucifron.OnLeaveCombat(event, creature) +creature:RemoveEvents() +end + +function Lucifron.OnDied(event, creature, killer) +creature:RemoveEvents() +end + +function Lucifron.OnDamageTaken(event, creature, attacker, damage) +if(not Lucifron.enrageCasted and creature:HealthBelowPct(20)) then +creature:CastSpell(creature, 38166, true) +Lucifron.enrageCasted = true +end +end + +function Lucifron.OnSpawn(event, creature) +creature:SetMaxHealth(748000) +end + +RegisterCreatureEvent(12118, 1, Lucifron.OnEnterCombat) +RegisterCreatureEvent(12118, 2, Lucifron.OnLeaveCombat) +RegisterCreatureEvent(12118, 4, Lucifron.OnDied) +RegisterCreatureEvent(12118, 9, Lucifron.OnDamageTaken) +RegisterCreatureEvent(12118, 5, Lucifron.OnSpawn) \ No newline at end of file diff --git a/Magmadar.lua b/Magmadar.lua new file mode 100644 index 0000000..362a187 --- /dev/null +++ b/Magmadar.lua @@ -0,0 +1,96 @@ +local Magmadar = {} + +local EMOTE_FRENZY = 0 + +local SPELL_FRENZY = 19451 +local SPELL_MAGMA_SPIT = 19449 +local SPELL_PANIC = 19408 +local SPELL_LAVA_BOMB = 19411 +local SPELL_LAVA_BOMB_EFFECT = 20494 +local SPELL_LAVA_BOMB_RANGED = 20474 +local SPELL_LAVA_BOMB_RANGED_EFFECT = 20495 +local SPELL_SUMMON_CORE_HOUND = 364726 + +local EVENT_FRENZY = 1 +local EVENT_PANIC = 2 +local EVENT_LAVA_BOMB = 3 +local EVENT_LAVA_BOMB_RANGED = 4 +local EVENT_SUMMON_CORE_HOUND = 5 + +local MELEE_TARGET_LOOKUP_DIST = 10.0 + +function Magmadar.OnEnterCombat(event, creature, target) +creature:RegisterEvent(Magmadar.Frenzy, 8500, 0) +creature:RegisterEvent(Magmadar.Panic, 9500, 0) +creature:RegisterEvent(Magmadar.LavaBomb, 12000, 0) +creature:RegisterEvent(Magmadar.LavaBombRanged, 15000, 0) +end + +function Magmadar.OnLeaveCombat(event, creature) +creature:RemoveEvents() +end + +function Magmadar.OnDied(event, creature, killer) +creature:RemoveEvents() +end + +function Magmadar.Frenzy(event, delay, calls, creature) +creature:CastSpell(creature, SPELL_FRENZY, true) +creature:PerformEmote(EMOTE_FRENZY) +creature:RegisterEvent(Magmadar.Frenzy, math.random(15000, 20000), 0) +end + +function Magmadar.Panic(event, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), SPELL_PANIC, true) +creature:RegisterEvent(Magmadar.Panic, math.random(31000, 38000), 0) +end + +function Magmadar.LavaBomb(event, delay, calls, creature) +local targets = creature:GetAITargets() +local targetCount = creature:GetAITargetsCount() +if targetCount > 0 then +local targetIndex = math.random(1, targetCount) +local target = targets[targetIndex] +if target:GetDistance(creature) <= MELEE_TARGET_LOOKUP_DIST then +creature:CastSpell(target, SPELL_LAVA_BOMB, true) +end +end +creature:RegisterEvent(Magmadar.LavaBomb, math.random(12000, 15000), 0) +end + +function Magmadar.LavaBombRanged(event, delay, calls, creature) +local targets = creature:GetPlayersInRange(100.0) +for _, target in pairs(targets) do +if target:GetDistance(creature) > MELEE_TARGET_LOOKUP_DIST then +creature:CastSpell(target, SPELL_LAVA_BOMB_RANGED, true) +break +end +end +creature:RegisterEvent(Magmadar.LavaBombRanged, math.random(12000, 15000), 0) +end + +function Magmadar.CastSummonCoreHound(event, delay, calls, creature) +creature:CastSpell(creature, SPELL_SUMMON_CORE_HOUND, true) +creature:RegisterEvent(Magmadar.CastSummonCoreHound, 45000, 0) +end + + +function Magmadar.OnEnterCombat(event, creature, target) +creature:RegisterEvent(Magmadar.Frenzy, math.random(15000, 20000), 0) +creature:RegisterEvent(Magmadar.Panic, math.random(31000, 38000), 0) +creature:RegisterEvent(Magmadar.LavaBomb, math.random(12000, 15000), 0) +creature:RegisterEvent(Magmadar.LavaBombRanged, math.random(12000, 15000), 0) +creature:RegisterEvent(Magmadar.CastSummonCoreHound, 45000, 0) +end + +function Magmadar.OnLeaveCombat(event, creature) +creature:RemoveEvents() +end + +function Magmadar.OnDied(event, creature, killer) +creature:RemoveEvents() +end + +RegisterCreatureEvent(11982, 1, Magmadar.OnEnterCombat) +RegisterCreatureEvent(11982, 2, Magmadar.OnLeaveCombat) +RegisterCreatureEvent(11982, 4, Magmadar.OnDied) \ No newline at end of file diff --git a/Magmakin.lua b/Magmakin.lua new file mode 100644 index 0000000..ddbb943 --- /dev/null +++ b/Magmakin.lua @@ -0,0 +1,38 @@ +Magmakin = {} + +function Magmakin.CastFlameBuffet(eventId, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 23189, true) +end + +function Magmakin.CastMagmaBlast(eventId, delay, calls, creature) +local targets = creature:GetAITargets(10) +local target = targets[math.random(#targets)] +creature:CastSpell(target, 20565, true) +end + +function Magmakin.CastLavaBurst(eventId, delay, calls, creature) +creature:CastSpell(creature:GetVictim(), 21158, true) +end + +function Magmakin.OnEnterCombat(event, creature, target) +creature:RegisterEvent(Magmakin.CastFlameBuffet, 15000, 0) +creature:RegisterEvent(Magmakin.CastMagmaBlast, 16000, 0) +creature:RegisterEvent(Magmakin.CastLavaBurst, 8000, 0) +end + +function Magmakin.OnLeaveCombat(event, creature) +creature:RemoveEvents() +end + +function Magmakin.OnDied(event, creature, killer) +creature:RemoveEvents() +end + +function Magmakin.OnSpawn(event, creature) +creature:SetMaxHealth(349000) +end + +RegisterCreatureEvent(12806, 1, Magmakin.OnEnterCombat) +RegisterCreatureEvent(12806, 2, Magmakin.OnLeaveCombat) +RegisterCreatureEvent(12806, 4, Magmakin.OnDied) +RegisterCreatureEvent(12806, 5, Magmakin.OnSpawn) \ No newline at end of file