diff --git a/Lua Script/AlAkir(700808).lua b/Lua Script/AlAkir(700808).lua new file mode 100644 index 0000000..751b988 --- /dev/null +++ b/Lua Script/AlAkir(700808).lua @@ -0,0 +1,107 @@ +-- Al'Akir Script for AzerothCore Araxia Online by Manmadedrummer + +local BOSS_AL_AKIR = 700808 +local SPELL_WIND_BURST = 63557 +local SPELL_SQUALL_LINE = 500076 +local SPELL_ICE_STORM = 71118 +local SPELL_LIGHTNING_STRIKE = 52944 +local SPELL_ELECTROCUTE = 71934 +local SPELL_SUMMON_STORMLING = 33689 +local SPELL_FEEDBACK = 44335 +local SPELL_EYE_OF_THE_STORM = 52970 +local STAGE_TWO_HEALTH = 80 +local STAGE_THREE_HEALTH = 25 +local phase = 1 + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local function CastWindBurst(eventId, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), SPELL_WIND_BURST, true) +end + +local function CastSquallLine(eventId, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), SPELL_SQUALL_LINE, true) +end + +local function CastIceStorm(eventId, delay, calls, creature) + local targets = creature:GetAITargets(10) + for _, target in ipairs(targets) do + creature:CastSpell(target, SPELL_ICE_STORM, true) + end +end + +local function CastLightningStrike(eventId, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), SPELL_LIGHTNING_STRIKE, true) +end + +local function SummonStormling(eventId, delay, calls, creature) + creature:CastSpell(creature, SPELL_SUMMON_STORMLING, true) +end + +local function ApplyFeedback(eventId, delay, calls, creature) + creature:CastSpell(creature, SPELL_FEEDBACK, true) +end + +local function StartPhaseOne(creature) + creature:RegisterEvent(CastWindBurst, 20000, 0) + creature:RegisterEvent(CastSquallLine, 30000, 0) + creature:RegisterEvent(CastIceStorm, 15000, 0) + creature:RegisterEvent(CastLightningStrike, 12000, 0) +end + +local function StartPhaseTwo(creature) + creature:RemoveEvents() + creature:SendUnitYell("The storm intensifies!", 0) + creature:RegisterEvent(SummonStormling, 20000, 0) + creature:RegisterEvent(ApplyFeedback, 20000, 0) +end + +local function StartPhaseThree(creature) + creature:RemoveEvents() + creature:SendUnitYell("The eye of the storm approaches!", 0) + creature:CastSpell(creature, SPELL_EYE_OF_THE_STORM, true) + creature:RegisterEvent(CastWindBurst, 20000, 0) + creature:RegisterEvent(CastLightningStrike, 12000, 0) +end + +local function CheckHealth(eventId, delay, calls, creature) + local healthPct = creature:GetHealthPct() + if phase == 1 and healthPct <= STAGE_TWO_HEALTH then + phase = 2 + StartPhaseTwo(creature) + elseif phase == 2 and healthPct <= STAGE_THREE_HEALTH then + phase = 3 + StartPhaseThree(creature) + end +end + +local function OnEnterCombat(event, creature, target) + phase = 1 + creature:SendUnitYell("You will be swept away by the storm!", 0) + StartPhaseOne(creature) + creature:RegisterEvent(CheckHealth, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) -- Immediately despawn the boss upon leaving combat +end + +local function OnSpawn(event, creature) + creature:SetMaxHealth(1952720) + creature:SetHealth(1952720) +end + +local function OnDied(event, creature, killer) + creature:RemoveEvents() + creature:SendUnitYell("My storm... has been silenced...", 0) + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, 2204.453125, -4794.402344, 64.998360, 1.033404) + end +end + +RegisterCreatureEvent(BOSS_AL_AKIR, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_AL_AKIR, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_AL_AKIR, 4, OnDied) +RegisterCreatureEvent(BOSS_AL_AKIR, 5, OnSpawn) diff --git a/Lua Script/Argaloth(700813).lua b/Lua Script/Argaloth(700813).lua new file mode 100644 index 0000000..6abd021 --- /dev/null +++ b/Lua Script/Argaloth(700813).lua @@ -0,0 +1,100 @@ +-- Argaloth made for Azerothcore Araxia Online by Manmadedrummer + +local BOSS_ARGALOTH = 700813 +local HEALTH_PHASE_2 = 66 +local HEALTH_PHASE_3 = 33 +local BERSERK_TIMER = 300000 +local SPELL_METEOR_SLASH = 45150 +local SPELL_CONSUMING_DARKNESS = 68089 +local SPELL_FEL_FIRESTORM = 500095 +local SPELL_BERSERK = 68378 +local METEOR_SLASH_TIMER = 15000 +local CONSUMING_DARKNESS_TIMER = 20000 +local FEL_FIRESTORM_TIMER = 60000 +local phase = 1 + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local function CastMeteorSlash(eventId, delay, calls, creature) + local targets = creature:GetAITargets(65) + for _, target in ipairs(targets) do + creature:CastSpell(target, SPELL_METEOR_SLASH, true) + end +end + +local function CastConsumingDarkness(eventId, delay, calls, creature) + local target = creature:GetAITarget(0) + if target then + creature:CastSpell(target, SPELL_CONSUMING_DARKNESS, true) + end +end + +local function CastFelFirestorm(creature) + creature:SendUnitYell("The flames of destruction will consume you!", 0) + creature:CastSpell(creature, SPELL_FEL_FIRESTORM, true) +end + +local function CastBerserk(eventId, delay, calls, creature) + creature:CastSpell(creature, SPELL_BERSERK, true) + creature:SendUnitYell("Your time has run out!", 0) +end + +local function Phase1(creature) + creature:RegisterEvent(CastMeteorSlash, METEOR_SLASH_TIMER, 0) + creature:RegisterEvent(CastConsumingDarkness, CONSUMING_DARKNESS_TIMER, 0) +end + +local function Phase2(event, delay, calls, creature) + creature:RemoveEvents() + CastFelFirestorm(creature) + Phase1(creature) +end + +local function Phase3(event, delay, calls, creature) + creature:RemoveEvents() + CastFelFirestorm(creature) + Phase1(creature) +end + +local function CheckHealth(eventId, delay, calls, creature) + local healthPct = creature:GetHealthPct() + if phase == 1 and healthPct <= HEALTH_PHASE_2 then + phase = 2 + Phase2(eventId, delay, calls, creature) + elseif phase == 2 and healthPct <= HEALTH_PHASE_3 then + phase = 3 + Phase3(eventId, delay, calls, creature) + end +end + +local function OnEnterCombat(event, creature, target) + phase = 1 + creature:SetMaxHealth(871750) + creature:SetHealth(871750) + Phase1(creature) + creature:RegisterEvent(CheckHealth, 1000, 0) + creature:RegisterEvent(CastBerserk, BERSERK_TIMER, 1) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + creature:RemoveEvents() + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +local function OnSpawn(event, creature) + creature:SetMaxHealth(871750) + creature:SetHealth(871750) +end + +RegisterCreatureEvent(BOSS_ARGALOTH, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_ARGALOTH, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_ARGALOTH, 4, OnDeath) +RegisterCreatureEvent(BOSS_ARGALOTH, 5, OnSpawn) diff --git a/Lua Script/Arian(700800).lua b/Lua Script/Arian(700800).lua new file mode 100644 index 0000000..716a057 --- /dev/null +++ b/Lua Script/Arian(700800).lua @@ -0,0 +1,86 @@ +-- Original Script made By Torgash! of ac-web/mmopro.net/mmorush.com +-- Converted by Manmadedrummer for Araxia on Azerothcore https://github.com/araxiaonline + +local ENEMY_ID = 700800 +local SPELL_BLAST_WAVE = 38536 +local SPELL_FIRE_BLAST = 20679 +local SPELL_CONE_OF_FIRE = 36876 +local SPELL_FIREBALL_VOLLEY = 15243 +local SPELL_FIRE_BLOSSOM = 19636 +local SPELL_RAIN_OF_FIRE = 39363 + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +-- Core Functions +local function CastBlastWave(eventId, delay, repeats, creature) + creature:CastSpell(creature:GetVictim(), SPELL_BLAST_WAVE, true) +end + +local function CastFireBlast(eventId, delay, repeats, creature) + local target = creature:GetAITarget(0) + if target then + creature:CastSpell(target, SPELL_FIRE_BLAST, true) + end +end + +local function CastConeOfFire(eventId, delay, repeats, creature) + creature:CastSpell(creature, SPELL_CONE_OF_FIRE, true) +end + +local function CastFireballVolley(eventId, delay, repeats, creature) + local tank = creature:GetAITarget(1) + if tank then + creature:CastSpell(tank, SPELL_FIREBALL_VOLLEY, true) + end +end + +local function CastFireBlossom(eventId, delay, repeats, creature) + local target = creature:GetAITarget(0) + if target then + creature:CastSpell(target, SPELL_FIRE_BLOSSOM, true) + end +end + +local function CastRainOfFire(eventId, delay, repeats, creature) + creature:CastSpell(creature, SPELL_RAIN_OF_FIRE, true) +end + +local function Phase1(creature) + creature:RegisterEvent(CastBlastWave, 10000, 0) + creature:RegisterEvent(CastFireBlast, 12000, 0) + creature:RegisterEvent(CastConeOfFire, 15000, 0) + creature:RegisterEvent(CastFireballVolley, 20000, 0) + creature:RegisterEvent(CastFireBlossom, 25000, 0) + creature:RegisterEvent(CastRainOfFire, 30000, 0) +end + +-- Combat Events +local function OnCombat(event, creature, target) + creature:SendUnitYell("Another step towards destruction!", 0) + Phase1(creature) +end + +local function OnLeaveCombat(event, creature) + creature:SendUnitYell("I have waited long enough!", 0) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnKilledTarget(event, creature, victim) + creature:SendUnitYell("Fail me and suffer for eternity!", 0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell("All my plans have led to this!", 0) + creature:RemoveEvents() + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +-- Registration of Events +RegisterCreatureEvent(ENEMY_ID, 1, OnCombat) +RegisterCreatureEvent(ENEMY_ID, 2, OnLeaveCombat) +RegisterCreatureEvent(ENEMY_ID, 3, OnKilledTarget) +RegisterCreatureEvent(ENEMY_ID, 4, OnDeath) diff --git a/Lua Script/Blackhand(700824).lua b/Lua Script/Blackhand(700824).lua new file mode 100644 index 0000000..d088cf8 --- /dev/null +++ b/Lua Script/Blackhand(700824).lua @@ -0,0 +1,116 @@ +-- Blackhand Arena boss made by Manmadedrummer for Araxia Online + +local BOSS_BLACKHAND = 700824 +local MAX_HEALTH = 1713499 + +local SPELL_MOLTEN_SLAG = 67637 +local SPELL_DEMOLITION = 36099 +local SPELL_MARKED_FOR_DEATH = 67882 +local SPELL_IMPALING_THROW = 39837 +local SPELL_THROW_SLAG_BOMBS = 19411 +local SPELL_SHATTERED_SMASH = 69627 + +local NPC_SIEGEBREAKER = 17461 +local SPELL_BLACKIRON_PLATING = 41196 +local SPELL_MORTAR = 39695 +local SPELL_OVERDRIVE = 18546 +local SPELL_BATTERING_RAM = 62376 +local SPELL_EXPLOSIVE_ROUND = 71126 + +local SPELL_SLAG_ERUPTION = 40117 +local SPELL_MASSIVE_SHATTERING_SMASH = 67662 + +local PHASE_ONE_END = 70 +local PHASE_TWO_END = 30 + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 +local TELEPORT_MAP_ID = 1 + +local QUOTE_PHASE_ONE = "A small victory, but now you will perish in the flame that burns at the heart of Blackrock!" +local QUOTE_PHASE_TWO = "Bring in the siegemaker." +local QUOTE_PHASE_THREE = "Burn - you will all BURN!" +local QUOTE_SHATTERING_SMASH = "I'll bring this whole place down around your heads!" +local QUOTE_SUMMON_SIEGE = "Open the flumes! Flood the room with molten slag." +local DEATH_QUOTE = "This crucible is your molten grave!" + +local currentPhase = 1 + +local function PhaseOneSpells(eventId, delay, pCall, creature) + local phase1Spells = {SPELL_MOLTEN_SLAG, SPELL_DEMOLITION, SPELL_MARKED_FOR_DEATH, SPELL_THROW_SLAG_BOMBS, SPELL_SHATTERED_SMASH} + creature:CastSpell(creature:GetVictim(), phase1Spells[math.random(#phase1Spells)], true) +end + +local function PhaseTwoSpells(eventId, delay, pCall, creature) + local phase2Spells = {SPELL_MORTAR, SPELL_BATTERING_RAM, SPELL_EXPLOSIVE_ROUND, SPELL_OVERDRIVE, SPELL_MARKED_FOR_DEATH, SPELL_THROW_SLAG_BOMBS, SPELL_SHATTERED_SMASH} + creature:CastSpell(creature:GetVictim(), phase2Spells[math.random(#phase2Spells)], true) +end + +local function PhaseThreeSpells(eventId, delay, pCall, creature) + local phase3Spells = {SPELL_SLAG_ERUPTION, SPELL_MASSIVE_SHATTERING_SMASH, SPELL_MARKED_FOR_DEATH, SPELL_THROW_SLAG_BOMBS, SPELL_SHATTERED_SMASH} + creature:CastSpell(creature:GetVictim(), phase3Spells[math.random(#phase3Spells)], true) +end + +local function SummonSiegebreakers(creature) + local x, y, z = creature:GetLocation() + for i = 1, 2 do + creature:SpawnCreature(NPC_SIEGEBREAKER, x + math.random(-5, 5), y + math.random(-5, 5), z, 0, 3, 60000) + end + creature:SendUnitYell(QUOTE_SUMMON_SIEGE, 0) +end + +local function PhaseTwo(creature) + creature:SendUnitYell(QUOTE_PHASE_TWO, 0) + creature:RemoveEvents() + SummonSiegebreakers(creature) + creature:RegisterEvent(PhaseTwoSpells, 7000, 0) +end + +local function PhaseThree(creature) + creature:SendUnitYell(QUOTE_PHASE_THREE, 0) + creature:RemoveEvents() + creature:RegisterEvent(PhaseThreeSpells, 5000, 0) +end + +local function CheckHealth(eventId, delay, pCall, creature) + if not creature or creature:GetHealthPct() <= 0 then return end + + local healthPct = creature:GetHealthPct() + + if healthPct <= PHASE_ONE_END and currentPhase == 1 then + currentPhase = 2 + PhaseTwo(creature) + elseif healthPct <= PHASE_TWO_END and currentPhase == 2 then + currentPhase = 3 + PhaseThree(creature) + end +end + +local function OnEnterCombat(event, creature, target) + currentPhase = 1 + creature:SetMaxHealth(MAX_HEALTH) + creature:SetHealth(MAX_HEALTH) + + creature:SendUnitYell(QUOTE_PHASE_ONE, 0) + + creature:RegisterEvent(PhaseOneSpells, 5000, 0) + creature:RegisterEvent(CheckHealth, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell(DEATH_QUOTE, 0) + creature:RemoveEvents() + + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(TELEPORT_MAP_ID, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +RegisterCreatureEvent(BOSS_BLACKHAND, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_BLACKHAND, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_BLACKHAND, 4, OnDeath) diff --git a/Lua Script/Bladefist(700825).lua b/Lua Script/Bladefist(700825).lua new file mode 100644 index 0000000..889cd57 --- /dev/null +++ b/Lua Script/Bladefist(700825).lua @@ -0,0 +1,108 @@ +-- Kargath Bladefist Arena Boss made by Manmadedrummer for Araxia Online + +local BOSS_KARGATH = 700825 +local MAX_HEALTH = 3047017 +local SPELL_IMPALE = 67479 +local SPELL_BLADE_DANCE = 30739 +local SPELL_BERSERKER_RUSH = 56107 +local SPELL_CHAIN_HURL = 55240 +local SPELL_IMPALING_THROW = 30932 +local NPC_IRON_BOMBER = 33695 +local NPC_BILESLINGER = 17461 +local NPC_IRON_GRUNT = 22973 +local SPELL_IRON_BOMB = 43754 +local SPELL_VILE_BREATH = 24818 +local SPELL_FIRE_PILLAR = 67760 +local SPELL_FLAME_JET = 64988 +local PHASE_ONE_END = 70 +local PHASE_TWO_END = 30 +local QUOTE_PHASE_ONE = "Enough! I will show these weaklings what a true champion is capable of." +local QUOTE_PHASE_TWO = "The pleasure is mine. The crowd deserves a superior gladiator, seeing as the last one fell so easily." +local QUOTE_PHASE_THREE = "You owe me a fight, cowards." +local DEATH_QUOTE = "And that's... one hundred." +local currentPhase = 1 + +local function PhaseOneSpells(eventId, delay, pCall, creature) + local phase1Spells = {SPELL_IMPALE, SPELL_BLADE_DANCE, SPELL_BERSERKER_RUSH, SPELL_CHAIN_HURL} + creature:CastSpell(creature:GetVictim(), phase1Spells[math.random(#phase1Spells)], true) +end + +local function SummonIronBombers(creature) + local x, y, z = creature:GetLocation() + for i = 1, 3 do + creature:SpawnCreature(NPC_IRON_BOMBER, x + math.random(-5, 5), y + math.random(-5, 5), z, 0, 3, 60000) + end +end + +local function SummonBileslingers(creature) + local x, y, z = creature:GetLocation() + for i = 1, 2 do + creature:SpawnCreature(NPC_BILESLINGER, x + math.random(-5, 5), y + math.random(-5, 5), z, 0, 3, 60000) + end +end + +local function SummonIronGrunts(creature) + local x, y, z = creature:GetLocation() + for i = 1, 4 do + creature:SpawnCreature(NPC_IRON_GRUNT, x + math.random(-5, 5), y + math.random(-5, 5), z, 0, 3, 60000) + end +end + +local function PhaseTwoSpells(eventId, delay, pCall, creature) + local phase2Spells = {SPELL_IRON_BOMB, SPELL_VILE_BREATH, SPELL_BERSERKER_RUSH, SPELL_CHAIN_HURL, SPELL_IMPALING_THROW} + creature:CastSpell(creature:GetVictim(), phase2Spells[math.random(#phase2Spells)], true) +end + +local function SummonPhaseTwoCreatures(creature) + SummonIronBombers(creature) + SummonBileslingers(creature) + SummonIronGrunts(creature) +end + +local function PhaseThreeSpells(eventId, delay, pCall, creature) + local phase3Spells = {SPELL_FIRE_PILLAR, SPELL_FLAME_JET, SPELL_BERSERKER_RUSH, SPELL_CHAIN_HURL, SPELL_IMPALING_THROW} + creature:CastSpell(creature:GetVictim(), phase3Spells[math.random(#phase3Spells)], true) +end + +local function CheckHealth(eventId, delay, pCall, creature) + if not creature or creature:GetHealthPct() <= 0 then return end + local healthPct = creature:GetHealthPct() + if healthPct <= PHASE_ONE_END and currentPhase == 1 then + currentPhase = 2 + creature:SendUnitYell(QUOTE_PHASE_TWO, 0) + creature:RemoveEvents() + SummonPhaseTwoCreatures(creature) + creature:RegisterEvent(PhaseTwoSpells, 6000, 0) + elseif healthPct <= PHASE_TWO_END and currentPhase == 2 then + currentPhase = 3 + creature:SendUnitYell(QUOTE_PHASE_THREE, 0) + creature:RemoveEvents() + creature:RegisterEvent(PhaseThreeSpells, 5000, 0) + end +end + +local function OnEnterCombat(event, creature, target) + currentPhase = 1 + creature:SetMaxHealth(MAX_HEALTH) + creature:SetHealth(MAX_HEALTH) + creature:SendUnitYell(QUOTE_PHASE_ONE, 0) + creature:RegisterEvent(PhaseOneSpells, 5000, 0) + creature:RegisterEvent(CheckHealth, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() +end + +local function OnDeath(event, creature, killer) + creature:SendUnitSay(DEATH_QUOTE, 0) + creature:RemoveEvents() + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, 2204.453125, -4794.402344, 64.998360, 1.033404) + end +end + +RegisterCreatureEvent(BOSS_KARGATH, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_KARGATH, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_KARGATH, 4, OnDeath) diff --git a/Lua Script/Bogdan(700804).lua b/Lua Script/Bogdan(700804).lua new file mode 100644 index 0000000..ee8c083 --- /dev/null +++ b/Lua Script/Bogdan(700804).lua @@ -0,0 +1,65 @@ +-- Original Bogdan script made by Bogdan https://www.mmopro.org/archive/index.php/t-2200.html +-- Converted to Azerothcore Araxia Online by Manmadedrummer + +local BOSS_BOGDAN = 700804 +local SPELL_SHADOW_BOLT_VOLLEY = 17228 +local SPELL_DARK_MENDING = 379 +local SPELL_SOUL_DRAIN = 72963 +local SPELL_DARK_BLAST = 37668 + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local function CastShadowBoltVolley(eventId, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), SPELL_SHADOW_BOLT_VOLLEY, true) +end + +local function CastDarkMending(eventId, delay, calls, creature) + creature:CastSpell(creature, SPELL_DARK_MENDING, true) +end + +local function CastSoulDrain(eventId, delay, calls, creature) + local target = creature:GetAITarget(0) + if target then + creature:CastSpell(target, SPELL_SOUL_DRAIN, true) + end +end + +local function CastDarkBlast(eventId, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), SPELL_DARK_BLAST, true) +end + +local function Phase1(creature) + creature:RegisterEvent(CastShadowBoltVolley, 10000, 0) + creature:RegisterEvent(CastDarkMending, 15000, 0) + creature:RegisterEvent(CastSoulDrain, 20000, 0) + creature:RegisterEvent(CastDarkBlast, 25000, 0) +end + +local function OnCombat(event, creature, target) + creature:SendUnitYell("The shadows will consume you!", 0) + Phase1(creature) +end + +local function OnLeaveCombat(event, creature) + creature:SendUnitYell("You cannot escape the darkness...", 0) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnKilledTarget(event, creature, victim) + creature:SendUnitYell("You will join the shadows!", 0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell("The darkness... fades...", 0) + creature:RemoveEvents() + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +RegisterCreatureEvent(BOSS_BOGDAN, 1, OnCombat) +RegisterCreatureEvent(BOSS_BOGDAN, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_BOGDAN, 3, OnKilledTarget) +RegisterCreatureEvent(BOSS_BOGDAN, 4, OnDeath) diff --git a/Lua Script/Brakenspore(700828).lua b/Lua Script/Brakenspore(700828).lua new file mode 100644 index 0000000..6f80a24 --- /dev/null +++ b/Lua Script/Brakenspore(700828).lua @@ -0,0 +1,110 @@ +-- Brackenspore Arena Boss by Manmadedrummer for Araxia Online + +local BOSS_BRAKENSPORE = 700828 +local MAX_HEALTH = 1198099 +local SPELL_CREEPING_MOSS = 18289 +local SPELL_ROT = 72966 +local SPELL_NECROTIC_BREATH = 24818 +local SPELL_INFESTING_SPORES1 = 59419 +local SPELL_INFESTING_SPORES2 = 35394 +local SPELL_CALL_OF_THE_TIDES = 67649 +local SPELL_EXPLODING_FUNGUS = 8138 +local SPELL_ENRAGE = 500098 +local SPELL_AURA_OF_ROT = 25818 +local NPC_FUNGAL_OOZE = 5235 +local NPC_UNSTABLE_SHROOM = 20479 +local currentPhase = 1 +local thresholds = {75, 50, 30} +local oozeCooldown = {false, false, false} +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local function CastRandomSpell(eventId, delay, repeats, creature) + if not creature or creature:HealthBelowPct(0) then return end + local target = creature:GetAITarget(0) + if not target then return end + local spellList = {SPELL_CREEPING_MOSS, SPELL_ROT, SPELL_NECROTIC_BREATH, SPELL_INFESTING_SPORES1, SPELL_INFESTING_SPORES2, SPELL_CALL_OF_THE_TIDES, SPELL_EXPLODING_FUNGUS} + local spell = spellList[math.random(1, #spellList)] + creature:CastSpell(target, spell, true) +end + +local function SummonFungalOozes(creature) + local x, y, z = creature:GetLocation() + for i = 1, 3 do + creature:SpawnCreature(NPC_FUNGAL_OOZE, x + math.random(-5, 5), y + math.random(-5, 5), z, 0, 3, 60000) + end +end + +local function SummonUnstableShrooms(eventId, delay, repeats, creature) + local target = creature:GetAITarget(0) + if not target then return end + local x, y, z = target:GetLocation() + creature:SpawnCreature(NPC_UNSTABLE_SHROOM, x + math.random(-10, 10), y + math.random(-10, 10), z, 0, 1, 5000) +end + +local function Phase1(creature) + creature:RegisterEvent(CastRandomSpell, 3000, 0) +end + +local function Phase2(creature) + creature:SendUnitYell("UWAGH!!!", 0) + creature:RemoveEvents() + creature:RegisterEvent(CastRandomSpell, 1000, 0) + creature:CastSpell(creature, SPELL_ENRAGE, true) + creature:CastSpell(creature, SPELL_AURA_OF_ROT, true) + creature:RegisterEvent(SummonUnstableShrooms, 5000, 0) +end + +local function CheckHealth(eventId, delay, repeats, creature) + if not creature or creature:HealthBelowPct(0) then return end + + for i, threshold in ipairs(thresholds) do + if creature:HealthBelowPct(threshold) and not oozeCooldown[i] then + SummonFungalOozes(creature) + oozeCooldown[i] = true + end + end + + if creature:HealthBelowPct(30) and currentPhase < 2 then + currentPhase = 2 + Phase2(creature) + end +end + +local function OnSpawn(event, creature) + creature:SetMaxHealth(MAX_HEALTH) + creature:SetHealth(MAX_HEALTH) +end + +local function OnEnterCombat(event, creature, target) + currentPhase = 1 + oozeCooldown = {false, false, false} + Phase1(creature) + creature:RegisterEvent(CheckHealth, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell("urghh...urgh", 0) + local oozes = creature:GetCreaturesInRange(50, NPC_FUNGAL_OOZE) + for _, ooze in ipairs(oozes) do + ooze:DespawnOrUnsummon() + end + local shrooms = creature:GetCreaturesInRange(50, NPC_UNSTABLE_SHROOM) + for _, shroom in ipairs(shrooms) do + shroom:DespawnOrUnsummon() + end + local players = creature:GetPlayersInRange(50) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end + creature:RemoveEvents() +end + +RegisterCreatureEvent(BOSS_BRAKENSPORE, 5, OnSpawn) +RegisterCreatureEvent(BOSS_BRAKENSPORE, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_BRAKENSPORE, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_BRAKENSPORE, 4, OnDeath) diff --git a/Lua Script/Butcher(700827).lua b/Lua Script/Butcher(700827).lua new file mode 100644 index 0000000..47bd525 --- /dev/null +++ b/Lua Script/Butcher(700827).lua @@ -0,0 +1,92 @@ +-- Butcher Arena Boss made by Manmadedrummer for Araxia Online + +local BOSS_BUTCHER = 700827 +local MAX_HEALTH = 2958269 +local SPELL_HEAVY_HANDED = 19818 +local SPELL_THE_CLEAVER = 72494 +local SPELL_THE_TENDERIZER = 37596 +local SPELL_MEAT_HOOK = 29158 +local SPELL_CLEAVE = 58131 +local SPELL_BOUNDING_CLEAVE = 35473 +local SPELL_GUSHING_WOUNDS = 39215 +local SPELL_FRENZY = 500098 +local NPC_EXPLODING_CADAVER = 37934 + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local function CastRandomSpell(eventId, delay, repeats, creature) + if not creature or creature:GetHealthPct() <= 0 then return end + local target = creature:GetAITarget(0) + if not target then return end + local spellList = {SPELL_HEAVY_HANDED, SPELL_THE_CLEAVER, SPELL_THE_TENDERIZER, SPELL_MEAT_HOOK, SPELL_CLEAVE, SPELL_BOUNDING_CLEAVE, SPELL_GUSHING_WOUNDS} + local spell = spellList[math.random(1, #spellList)] + creature:CastSpell(target, spell, true) + if spell == SPELL_BOUNDING_CLEAVE then + creature:SendUnitYell("Get the blood flowing!", 0) + elseif spell == SPELL_FRENZY then + creature:SendUnitYell("Time for the meat grinder!", 0) + elseif spell == SPELL_CLEAVE then + creature:SendUnitYell("Just a slice off the top.", 0) + end +end + +local function SummonExplodingCadavers(eventId, delay, repeats, creature) + local x, y, z = creature:GetLocation() + creature:SpawnCreature(NPC_EXPLODING_CADAVER, x + math.random(-5, 5), y + math.random(-5, 5), z, 0, 1, 60000) +end + +local function Phase1(creature) + creature:RegisterEvent(CastRandomSpell, 3000, 0) +end + +local function Phase2(creature) + creature:SendUnitYell("Time for the meat grinder!", 0) + creature:RemoveEvents() + creature:RegisterEvent(CastRandomSpell, 1000, 0) + creature:CastSpell(creature, SPELL_FRENZY, true) + creature:RegisterEvent(SummonExplodingCadavers, 5000, 0) +end + +local function CheckHealth(eventId, delay, repeats, creature) + if not creature or creature:GetHealthPct() <= 0 then return end + local healthPct = creature:GetHealthPct() + if healthPct <= 30 and currentPhase < 2 then + currentPhase = 2 + Phase2(creature) + end +end + +local function OnSpawn(event, creature) + creature:SetMaxHealth(MAX_HEALTH) + creature:SetHealth(MAX_HEALTH) +end + +local function OnEnterCombat(event, creature, target) + currentPhase = 1 + creature:SendUnitYell("Come and get it!", 0) + Phase1(creature) + creature:RegisterEvent(CheckHealth, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell("Gonna make a Pale stew.", 0) + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end + local cadavers = creature:GetCreaturesInRange(50, NPC_EXPLODING_CADAVER) + for _, cadaver in ipairs(cadavers) do + cadaver:DespawnOrUnsummon() + end + creature:RemoveEvents() +end + +RegisterCreatureEvent(BOSS_BUTCHER, 5, OnSpawn) +RegisterCreatureEvent(BOSS_BUTCHER, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_BUTCHER, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_BUTCHER, 4, OnDeath) diff --git a/Lua Script/Chogall(700810).lua b/Lua Script/Chogall(700810).lua new file mode 100644 index 0000000..8e334e9 --- /dev/null +++ b/Lua Script/Chogall(700810).lua @@ -0,0 +1,125 @@ +-- Cho'gall Script for AzerothCore Araxia Online by Manmadedrummer + +local BOSS_CHOGALL = 700810 +local NPC_CORRUPTING_ADHERENT = 38394 +local NPC_DARKENED_CREATION = 15802 +local SPELL_TWISTED_DEVOTION = 58845 +local SPELL_FURY_OF_CHOGALL = 50078 +local SPELL_FLAME_ORDERS = 58936 +local SPELL_SHADOW_ORDERS = 71106 +local SPELL_CORRUPTION_OLD_GOD = 72319 +local CONVERSION_TIMER = 30000 +local FURY_TIMER = 15000 +local FLAME_ORDERS_TIMER = 45000 +local SHADOW_ORDERS_TIMER = 45000 +local ADHERENT_TIMER = 40000 +local RANDOM_QUOTE_TIMER = 45000 +local STAGE_TWO_HEALTH = 25 +local phase = 1 +local spawnedCreatures = {} + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local function CastTwistedDevotion(eventId, delay, calls, creature) + local target = creature:GetAITarget(1) + if target then + creature:CastSpell(target, SPELL_TWISTED_DEVOTION, true) + end +end + +local function CastFuryOfChogall(eventId, delay, calls, creature) + local target = creature:GetVictim() + if target then + creature:CastSpell(target, SPELL_FURY_OF_CHOGALL, true) + end +end + +local function CastFlameOrders(eventId, delay, calls, creature) + local target = creature:GetVictim() + if target then + creature:CastSpell(target, SPELL_FLAME_ORDERS, true) + end +end + +local function CastShadowOrders(eventId, delay, calls, creature) + local target = creature:GetVictim() + if target then + creature:CastSpell(target, SPELL_SHADOW_ORDERS, true) + end +end + +local function SummonCorruptingAdherent(eventId, delay, calls, creature) + local x, y, z, o = creature:GetLocation() + local adherent = creature:SpawnCreature(NPC_CORRUPTING_ADHERENT, x + math.random(-5, 5), y + math.random(-5, 5), z, o, 3, 60000) + if adherent then + table.insert(spawnedCreatures, adherent) + end +end + +local function SummonDarkenedCreation(eventId, delay, calls, creature) + creature:SendUnitYell("Feel The Power of the Nexus!", 0) + local x, y, z, o = creature:GetLocation() + local tentacle = creature:SpawnCreature(NPC_DARKENED_CREATION, x + math.random(-5, 5), y + math.random(-5, 5), z, o, 3, 60000) + if tentacle then + table.insert(spawnedCreatures, tentacle) + end +end + +local function CastCorruptionOldGod(eventId, delay, calls, creature) + creature:CastSpell(creature, SPELL_CORRUPTION_OLD_GOD, true) +end + +local function PlayRandomVoiceLine(eventId, delay, calls, creature) + local soundId = SOUND_RANDOM_QUOTES[math.random(#SOUND_RANDOM_QUOTES)] + creature:SendUnitYell(soundId, 0) +end + +local function StartPhaseOne(creature) + creature:RegisterEvent(CastTwistedDevotion, CONVERSION_TIMER, 0) + creature:RegisterEvent(CastFuryOfChogall, FURY_TIMER, 0) + creature:RegisterEvent(CastFlameOrders, FLAME_ORDERS_TIMER, 0) + creature:RegisterEvent(CastShadowOrders, SHADOW_ORDERS_TIMER, 0) + creature:RegisterEvent(SummonCorruptingAdherent, ADHERENT_TIMER, 0) + creature:RegisterEvent(PlayRandomVoiceLine, RANDOM_QUOTE_TIMER, 0) +end + +local function CheckHealth(eventId, delay, calls, creature) + if creature:GetHealthPct() <= STAGE_TWO_HEALTH and phase == 1 then + phase = 2 + creature:RemoveEvents() + creature:RegisterEvent(CastFuryOfChogall, FURY_TIMER, 0) + creature:RegisterEvent(CastCorruptionOldGod, 2000, 0) + creature:RegisterEvent(SummonDarkenedCreation, 15000, 0) + end +end + +local function OnEnterCombat(event, creature, target) + phase = 1 + creature:SetMaxHealth(1087944) + creature:SetHealth(1087944) + StartPhaseOne(creature) + creature:RegisterEvent(CheckHealth, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDied(event, creature, killer) + creature:RemoveEvents() + for _, spawnedCreature in ipairs(spawnedCreatures) do + if spawnedCreature and spawnedCreature:IsAlive() then + spawnedCreature:DespawnOrUnsummon() + end + end + spawnedCreatures = {} + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +RegisterCreatureEvent(BOSS_CHOGALL, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_CHOGALL, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_CHOGALL, 4, OnDied) diff --git a/Lua Script/CowLord(700805).lua b/Lua Script/CowLord(700805).lua new file mode 100644 index 0000000..0438f0b --- /dev/null +++ b/Lua Script/CowLord(700805).lua @@ -0,0 +1,67 @@ +--Original Cow Lord script by Murlock https://www.ownedcore.com/forums/world-of-warcraft/world-of-warcraft-emulator-servers/107481-release-cow-lord-custom-scripted-raid-boss.html +--Converted to Azerothcore Araxia Online by Manmadedrummer +local BOSS_ID = 700805 +local STOMP_SPELL = 34716 +local PHASE_2_SPELL = 33061 +local PHASE_3_SPELL_1 = 29947 +local PHASE_3_SPELL_2 = 41447 +local RANDOM_TARGET_SPELL = 40370 + +local function CowLord_Phase3(event, delay, calls, creature) + if creature:GetHealthPct() < 20 then + creature:RemoveEvents() + creature:SendUnitYell("YOU HAVE ANGERED ME!!.. MOO!!!", 0) + creature:CastSpell(creature, PHASE_3_SPELL_1, true) + creature:CastSpell(creature, PHASE_3_SPELL_2, true) + creature:RegisterEvent(CowLord_Stomp, 10000, 0) + end +end + +local function CowLord_Phase2(event, delay, calls, creature) + if creature:GetHealthPct() < 50 then + creature:RemoveEvents() + creature:SendUnitYell("You think you can win... Moo!?!", 0) + local target = creature:GetAITarget(0) + if target then + creature:CastSpell(target, PHASE_2_SPELL, true) + end + creature:RegisterEvent(CowLord_Stomp, 15000, 0) + creature:RegisterEvent(CowLord_Phase3, 1000, 0) + end +end + +local function CowLord_Stomp(event, delay, calls, creature) + local target = creature:GetAITarget(0) + if target then + creature:CastSpell(target, STOMP_SPELL, true) + end +end + +local function CowLord_OnCombat(event, creature, target) + creature:SendUnitYell("You will die... Moo!!", 0) + local initialTarget = creature:GetAITarget(0) + if initialTarget then + creature:CastSpell(initialTarget, RANDOM_TARGET_SPELL, true) + end + creature:RegisterEvent(CowLord_Stomp, 20000, 0) + creature:RegisterEvent(CowLord_Phase2, 1000, 0) +end + +local function CowLord_OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function CowLord_OnKilledTarget(event, creature, victim) + creature:SendUnitYell("I am victorious... Moo!!", 0) +end + +local function CowLord_OnDied(event, creature, killer) + creature:SendUnitYell("I have failed... Moo..", 0) + creature:RemoveEvents() +end + +RegisterCreatureEvent(BOSS_ID, 1, CowLord_OnCombat) +RegisterCreatureEvent(BOSS_ID, 2, CowLord_OnLeaveCombat) +RegisterCreatureEvent(BOSS_ID, 3, CowLord_OnKilledTarget) +RegisterCreatureEvent(BOSS_ID, 4, CowLord_OnDied) diff --git a/Lua Script/Diablo(700806).lua b/Lua Script/Diablo(700806).lua new file mode 100644 index 0000000..78c0198 --- /dev/null +++ b/Lua Script/Diablo(700806).lua @@ -0,0 +1,114 @@ +-- Lord of Terror (Diablo Inspired) for AzerothCore by Manmadedrummer + +local ENEMY_ID = 700806 +local SPELL_SHADOW_FLAME = 22993 +local SPELL_TERROR_ROAR = 39048 +local SPELL_GROUND_STOMP = 7139 +local SPELL_SUMMON_IMP = 12922 +local SPELL_FIRE_WALL = 43114 +local SPELL_LIGHTNING_BREATH = 59963 +local SPELL_ENRAGE = 72148 +local SPELL_APOCALYPSE = 53210 + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local function CastShadowFlame(eventId, delay, repeats, creature) + creature:CastSpell(creature:GetVictim(), SPELL_SHADOW_FLAME, true) +end + +local function CastTerrorRoar(eventId, delay, repeats, creature) + local target = creature:GetAITarget(0) + if target then + creature:CastSpell(target, SPELL_TERROR_ROAR, true) + end +end + +local function CastGroundStomp(eventId, delay, repeats, creature) + creature:CastSpell(creature, SPELL_GROUND_STOMP, true) +end + +local function SummonImps(creature) + for i = 1, 3 do + local x, y, z = creature:GetLocation() + creature:SpawnCreature(SPELL_SUMMON_IMP, x + math.random(-5, 5), y + math.random(-5, 5), z, 0, 3, 60000) + end +end + +local function CastFireWall(eventId, delay, repeats, creature) + local target = creature:GetVictim() + if target then + creature:CastSpell(target, SPELL_FIRE_WALL, true) + end +end + +local function CastLightningBreath(eventId, delay, repeats, creature) + local target = creature:GetAITarget(0) + if target then + creature:CastSpell(target, SPELL_LIGHTNING_BREATH, true) + end +end + +local function CastApocalypse(eventId, delay, repeats, creature) + creature:CastSpell(creature, SPELL_APOCALYPSE, true) +end + +local function Phase1(creature) + creature:RegisterEvent(CastShadowFlame, 8000, 0) + creature:RegisterEvent(CastTerrorRoar, 15000, 0) + creature:RegisterEvent(CastGroundStomp, 20000, 0) +end + +local function Phase2(creature) + creature:RemoveEvents() + creature:SendUnitYell("You cannot escape the flames of Hell!", 0) + SummonImps(creature) + creature:RegisterEvent(CastFireWall, 10000, 0) + creature:RegisterEvent(CastLightningBreath, 12000, 0) + creature:RegisterEvent(CastGroundStomp, 20000, 0) + Phase1(creature) +end + +local function Phase3(creature) + creature:RemoveEvents() + creature:SendUnitYell("Feel my wrath! The end is near!", 0) + creature:CastSpell(creature, SPELL_ENRAGE, true) + creature:RegisterEvent(CastApocalypse, 15000, 0) + creature:RegisterEvent(CastFireWall, 10000, 0) + creature:RegisterEvent(CastLightningBreath, 12000, 0) + Phase1(creature) +end + +local function OnCombat(event, creature, target) + creature:SendUnitYell("I am the Lord of Terror! You dare challenge me?", 0) + Phase1(creature) + creature:RegisterEvent(function(eventId, delay, repeats, creature) + if creature:GetHealthPct() < 50 then + Phase2(creature) + elseif creature:GetHealthPct() < 20 then + Phase3(creature) + end + end, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnKilledTarget(event, creature, victim) + creature:SendUnitYell("Another soul claimed by the Lord of Terror!", 0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell("No! This is not... the end...", 0) + creature:RemoveEvents() + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +RegisterCreatureEvent(ENEMY_ID, 1, OnCombat) +RegisterCreatureEvent(ENEMY_ID, 2, OnLeaveCombat) +RegisterCreatureEvent(ENEMY_ID, 3, OnKilledTarget) +RegisterCreatureEvent(ENEMY_ID, 4, OnDeath) diff --git a/Lua Script/Elegon(700816).lua b/Lua Script/Elegon(700816).lua new file mode 100644 index 0000000..debc2c1 --- /dev/null +++ b/Lua Script/Elegon(700816).lua @@ -0,0 +1,84 @@ +-- Elegon boss made for Azerothcore Araxia Online by Manmadedrummer + +local BOSS_ELEGON = 700816 +local NPC_COSMIC_SPARK = 17283 +local SPELL_CELESTIAL_BREATH = 61079 +local SPELL_DESTABILIZING_ENERGIES = 57058 +local SPELL_GRASPING_ENERGY_TENDRILS = 57604 +local SPELL_RADIATING_ENERGIES = 72039 +local SPELL_ENERGY_CASCADE = 58531 +local SUMMON_SPARK_5_TIMER = 30000 +local SUMMON_SPARK_3_TIMER = 45000 +local PHASE_2_HEALTH = 50 +local spawnedCreatures = {} + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local SPELLS = { + SPELL_CELESTIAL_BREATH, + SPELL_DESTABILIZING_ENERGIES, + SPELL_GRASPING_ENERGY_TENDRILS, + SPELL_RADIATING_ENERGIES, + SPELL_ENERGY_CASCADE +} + +local function CastRandomSpell(creature) + local randomSpell = SPELLS[math.random(1, #SPELLS)] + local target = creature:GetAITarget(0) + if target then + creature:CastSpell(target, randomSpell, true) + end +end + +local function RandomSpellCasting(eventId, delay, calls, creature) + CastRandomSpell(creature) + creature:RegisterEvent(RandomSpellCasting, math.random(5000, 15000), 1) +end + +local function Summon5CosmicSparks(eventId, delay, calls, creature) + for i = 1, 5 do + local x, y, z, o = creature:GetLocation() + creature:SpawnCreature(NPC_COSMIC_SPARK, x + math.random(-5, 5), y + math.random(-5, 5), z, o, 3, 60000) + end +end + +local function Summon3CosmicSparks(eventId, delay, calls, creature) + for i = 1, 3 do + local x, y, z, o = creature:GetLocation() + creature:SpawnCreature(NPC_COSMIC_SPARK, x + math.random(-5, 5), y + math.random(-5, 5), z, o, 3, 60000) + end +end + +local function CheckHealth(eventId, delay, calls, creature) + local healthPct = creature:GetHealthPct() + if healthPct <= PHASE_2_HEALTH then + creature:RemoveEventById(eventId) + creature:RegisterEvent(Summon5CosmicSparks, SUMMON_SPARK_5_TIMER, 0) + creature:RegisterEvent(Summon3CosmicSparks, SUMMON_SPARK_3_TIMER, 0) + end +end + +local function OnEnterCombat(event, creature, target) + creature:SetMaxHealth(876581) + creature:SetHealth(876581) + creature:RegisterEvent(RandomSpellCasting, math.random(5000, 15000), 0) + creature:RegisterEvent(CheckHealth, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell("Existence ends... I become nothing...", 0) + creature:RemoveEvents() + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +RegisterCreatureEvent(BOSS_ELEGON, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_ELEGON, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_ELEGON, 4, OnDeath) diff --git a/Lua Script/FighterGuildClient.lua b/Lua Script/FighterGuildClient.lua new file mode 100644 index 0000000..2918067 --- /dev/null +++ b/Lua Script/FighterGuildClient.lua @@ -0,0 +1,322 @@ +local AIO = AIO or require("AIO") + +-- Arena coordinates (player and boss spawn locations) +local mapId = 1 -- Arena map ID + +-- Player spawn location (where the player is teleported) +local playerSpawnX, playerSpawnY, playerSpawnZ, playerOrientation = 2172.05, -4789.88, 55, 1.32696 + +-- Boss spawn location (where the boss is spawned) +local bossSpawnX, bossSpawnY, bossSpawnZ, bossOrientation = 2176, -4766, 55, 1.3 + +-- Reward coordinates (after the match) +local rewardX, rewardY, rewardZ, rewardOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 -- Adjust orientation for post-fight + +-- Check if this is the client-side addon +if AIO.AddAddon() then + return +end + +local FighterGuildHandler = AIO.AddHandlers("FighterGuildClient", {}) + +local selectedBoss = nil +local selectedButton = nil +local previousBossTexture = nil +local fighterGuildFrame = nil +local bossFrame = nil -- Frame to contain boss buttons + +local currentPage = 1 -- Keep track of the current page +local bossesPerPage = 9 -- Number of bosses to show per page +local selectedCategory = "Custom" -- Track the selected category + +-- Define boss categories +local bossCategories = { + Custom = { + {id = 700800, name = "Arian - The Demon", image = "Interface\\Buttons\\ArianTheDemon.blp", description = "Arian the Demon, a nightmarish entity born from the depths of the Twisting Nether, towers over the battlefield with his crimson, spiked armor that crackles with dark energy.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 700801, name = "Lord Cyran", image = "Interface\\Buttons\\LordCyran.blp", description = "Lord Cyran, a master of frost magic, controls the elements with icy precision, freezing foes in their tracks.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 700802, name = "Tiger Boss", image = "Interface\\Buttons\\TigerBoss.blp", description = "Tiger Boss, swift and deadly, strikes fear into his enemies with unmatched speed and agility.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 700803, name = "Spellmaster", image = "Interface\\Buttons\\Spellmaster.blp", description = "Spellmaster wields arcane powers with precision, casting destructive spells from afar.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 700804, name = "Bogdan - The Shadow Lord", image = "Interface\\Buttons\\Bogdan.blp", description = "Bogdan, the master of shadow magic, controls darkness itself to decimate his foes. Beware of his dark powers.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 700805, name = "Cow Lord", image = "Interface\\Buttons\\CowLord.blp", description = "Cow Lord, An enraged bovine, stomps through battle with crushing force.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 700806, name = "Diablo - Lord of Terror", image = "Interface\\Buttons\\Diablo.blp", description = "Diablo's greatest power lies within utilizing his enemies' fears.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 700807, name = "Naroxius Death Guard", image = "Interface\\Buttons\\Naroxius.blp", description = "Naroxius Death Guard is a relentless juggernaut.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 700817, name = "Gioran the Corrupted Paladin", image = "Interface\\Buttons\\Gioran.blp", description = "Gioran, a fallen holy warrior, now wielding both divine and unholy powers to crush his enemies.", difficulty = "Challenging", color = {1, 1, 0}}, + }, + Vanilla = { + {id = 11519, name = "Bazzalan", image = "Interface\\Buttons\\Bazzalan.blp", description = "A cunning satyr and leader of the Searing Blade cultists in Ragefire Chasm, Bazzalan is a swift and powerful foe who swings fast and hits hard.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 3654, name = "Mutanus the Devourer", image = "Interface\\Buttons\\Mutanus.blp", description = "A monstrous murloc driven to madness by the Nightmare, Mutanus emerges from the depths of the Wailing Caverns with devastating force.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 12201, name = "Princess Theradras", image = "Interface\\Buttons\\Theradras.blp", description = "Princess Theradras, an ancient elemental and the corruptor of Maraudon.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 15990, name = "Kel'Thuzad", image = "Interface\\Buttons\\Kel.blp", description = "The Lich King's most loyal servant, Kel'Thuzad commands the necropolis Naxxramas, unleashing devastating frost and shadow magic to decimate all who challenge his master's reign.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 16028, name = "Patchwerk", image = "Interface\\Buttons\\Patchwerk.blp", description = "The most powerful abomination guarding the construct quarter in Naxxramas, Patchwerk is a towering juggernaut of sewn flesh, whose brute strength and relentless attacks make him a fearsome adversary.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 15299, name = "Viscidus", image = "Interface\\Buttons\\Viscidus.blp", description = "A menacing gelatinous horror in the Temple of Ahn'Qiraj, Viscidus is a towering slime creature that bombards adventurers with lethal poison bolts.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 16060, name = "Gothik the Harvester", image = "Interface\\Buttons\\Gothik.blp", description = "Gothik the Harvester, master necromancer of Naxxramas.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 12264, name = "Shazzrah", image = "Interface\\Buttons\\Shazzrah.blp", description = "Shazzrah is a powerful arcane elemental boss in Molten Core.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 12056, name = "Baron Geddon", image = "Interface\\Buttons\\BaronGeddon.blp", description = "Baron Geddon, lieutenant of Ragnaros.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 12017, name = "Broodlord Lashlayer", image = "Interface\\Buttons\\Broodlord.blp", description = "Broodlord Lashlayer, a black dragon from Blackwing Lair.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 12018, name = "Majordomo Executus", image = "Interface\\Buttons\\Majordomo.blp", description = "Majordomo Executus, servant of Ragnaros.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 11501, name = "King Gordok", image = "Interface\\Buttons\\Gordok.blp", description = "Gordok's mind is plagued with whispers from the Emerald Nightmare that are urging him to madness and slaughter.", difficulty = "Challenging", color = {1, 1, 0}}, + }, + BC = { + {id = 21215, name = "Leotheras the Blind", image = "Interface\\Buttons\\Leotheras.blp", description = "Leotheras, a former night elf who succumbed to demonic corruption, now a formidable demon hunter in Serpentshrine Cavern.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 24723, name = "Selin Fireheart", image = "Interface\\Buttons\\SelinFireheart.blp", description = "Selin Fireheart, a blood elf driven mad by his addiction to fel magic, fights within Magisters' Terrace.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 17308, name = "Omor the Unscarred", image = "Interface\\Buttons\\Omor.blp", description = "Omor the Unscarred, a powerful pit lord serving the Burning Legion, resides in Hellfire Ramparts.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 17797, name = "Hydromancer Thespia", image = "Interface\\Buttons\\Thespia.blp", description = "Hydromancer Thespia, a naga sorceress controlling water elementals, defends the Steamvault in Coilfang Reservoir.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 16809, name = "Warbringer O'mrogg", image = "Interface\\Buttons\\Omrogg.blp", description = "Warbringer O'mrogg, a brutal two-headed ogre serving the Fel Horde in the Shattered Halls.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 16807, name = "Grand Warlock Nethekurse", image = "Interface\\Buttons\\Nethekurse.blp", description = "Grand Warlock Nethekurse, a twisted orc warlock and former Shadow Council member, now commands the Fel Horde in the Shattered Halls.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 17977, name = "Warp Splinter", image = "Interface\\Buttons\\WarpSplinter.blp", description = "Warp Splinter, an ancient protector twisted by arcane energy, guards the Botanica in Tempest Keep.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 24239, name = "Hex Lord Malacrass", image = "Interface\\Buttons\\Malacrass.blp", description = "Hex Lord Malacrass, a cunning troll witch doctor, leads the Amani's forces in Zul'Aman.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 18805, name = "High Astromancer Solarian", image = "Interface\\Buttons\\Solarian.blp", description = "High Astromancer Solarian, a powerful blood elf adept in arcane magic, resides in The Eye of Tempest Keep.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 22871, name = "Teron Gorefiend", image = "Interface\\Buttons\\Gorefiend.blp", description = "Teron Gorefiend, the first death knight created by Gul'dan, serves Illidan in the Black Temple.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 17888, name = "Kaz'rogal", image = "Interface\\Buttons\\Kazrogal.blp", description = "Kaz'rogal, a mighty Doomguard commander of the Burning Legion, appears in the Battle for Mount Hyjal.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 31395, name = "Illidan Stormrage", image = "Interface\\Buttons\\Illidan.blp", description = "Illidan Stormrage, the infamous Betrayer, rules the Black Temple and commands the forces of Outland.", difficulty = "Hard", color = {1, 0, 0}}, + }, + WOTLK = { + {id = 27447, name = "Varos Cloudstrider", image = "Interface\\Buttons\\Cloudstrider.blp", description = "Varos Cloudstrider, a storm drake rider in The Oculus.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 36497, name = "Bronjahm", image = "Interface\\Buttons\\Bronjahm.blp", description = "Bronjahm, the soul-trader who guards the Forge of Souls.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 29309, name = "Elder Nadox", image = "Interface\\Buttons\\ElderNadox.blp", description = "Elder Nadox, an ancient nerubian lord who guards Ahn'kahet.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 26630, name = "Trollgore", image = "Interface\\Buttons\\Trollgore.blp", description = "Trollgore, a monstrous Drakkari troll in Drak'Tharon Keep.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 29310, name = "Jedoga Shadowseeker", image = "Interface\\Buttons\\Jedoga.blp", description = "Jedoga Shadowseeker, a Twilight's Hammer cultist in Ahn'kahet.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 26529, name = "Meathook", image = "Interface\\Buttons\\Meathook.blp", description = "Meathook, a brutal undead monstrosity in the Culling of Stratholme.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 32845, name = "Hodir", image = "Interface\\Buttons\\Hodir.blp", description = "Hodir, the frost giant guardian in Ulduar, master of ice and snow.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 32906, name = "Freya", image = "Interface\\Buttons\\Freya.blp", description = "Freya, the Keeper of Life and guardian of Ulduar's Conservatory.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 29304, name = "Slad'ran", image = "Interface\\Buttons\\Sladran.blp", description = "Slad'ran, a Drakkari troll in Gundrak who controls venomous serpents.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 29305, name = "Moorabi", image = "Interface\\Buttons\\Moorabi.blp", description = "Moorabi, a Drakkari troll in Gundrak who seeks to transform into a mammoth god.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 38433, name = "Toravon the Ice Watcher", image = "Interface\\Buttons\\Toravon.blp", description = "Toravon the Ice Watcher, a frost giant defending Wintergrasp Fortress.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 700809, name = "The Lich King", image = "Interface\\Buttons\\LichKing.blp", description = "The Lich King, the ultimate master of death and necromancy, and ruler of Icecrown Citadel.", difficulty = "Hard", color = {1, 0, 0}}, + }, + CATA = { + {id = 700808, name = "Al'Akir", image = "Interface\\Buttons\\Alaqir.blp", description = "Al'Akir, gifted with great intelligence and cunning, Al'Akir the Windlord once served as the foremost tactician in the Old Gods' horrific armies.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 700810, name = "Cho'gall", image = "Interface\\Buttons\\Chogall.blp", description = "Cho'gall, the twisted ogre infused with the power of the Old Gods.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 700811, name = "Forgemaster Throngus", image = "Interface\\Buttons\\Throngus.blp", description = "Forgemaster Throngus, a giant overseeing the forging of powerful weapons and armor in Grim Batol.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 700812, name = "Ozruk", image = "Interface\\Buttons\\Ozruk.blp", description = "Ozruk, the stone giant guardian of the World's Heart and a fearsome foe in the Stonecore.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 700813, name = "Argaloth", image = "Interface\\Buttons\\Argaloth.blp", description = "Argaloth, a pit lord of the Burning Legion, is a fearsome boss imprisoned within Baradin Hold.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 700814, name = "Setesh", image = "Interface\\Buttons\\Setesh.blp", description = "Setesh, the Master of Chaos, summons void creatures and unleashes destructive energy to dominate the arena.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 700815, name = "Therazane", image = "Interface\\Buttons\\Therazane.blp", description = "Therazane, the Stonemother, commands the very earth to crush her enemies and reshape the arena with her unyielding power.", difficulty = "Challenging", color = {1, 1, 0}}, + }, + MOP = { + {id = 700816, name = "Elegon", image = "Interface\\Buttons\\Elegon.blp", description = "Elegon, the celestial guardian of the Engine of Nalak'sha.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 700818, name = "Amber-Shaper Un'sok", image = "Interface\\Buttons\\Unsok.blp", description = "A master alchemist and manipulator, Amber-Shaper Un'sok experiments with volatile amber magic, transforming enemies into monstrous creations.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 700819, name = "Imperial Vizier Zor'lok", image = "Interface\\Buttons\\Zorlok.blp", description = "As the voice of the Empress, Zor'lok commands unmatched authority, using his resonating power to control and influence the battlefield.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 700820, name = "Garrosh Hellscream", image = "Interface\\Buttons\\Hellscream.blp", description = "A former Warchief of the Horde chosen by Thrall to replace him in the wake of the Cataclysm.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 700821, name = "Thok the Bloodthirsty", image = "Interface\\Buttons\\Thok.blp", description = "This titanic devilsaur is a native of the Isle of Giants which Garrosh Hellscream wishes to subjugate to his will, but the dinosaur refuses to submit.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 700822, name = "General Pa'valak", image = "Interface\\Buttons\\Pavalak.blp", description = "The pragmatic General Pa'valak does not fear the pandaren or their allies, and he does not differentiate between using his own might and that of his mantid armies to defeat his enemies.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 700823, name = "Gekkan", image = "Interface\\Buttons\\Gekkan.blp", description = "Gekkan is a saurok and the second boss found in the Vault of Kings Past of the Mogu'shan Palace.", difficulty = "Easy", color = {0, 1, 0}}, + }, + WoD = { + {id = 700824, name = "Blackhand", image = "Interface\\Buttons\\Blackhand.blp", description = "A ruthless tyrant and fierce warrior, Blackhand is Warlord of the Blackrock clan, second only to Grommash in stature within the Iron Horde.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 700825, name = "Kargath Bladefist", image = "Interface\\Buttons\\Bladefist.blp", description = "Kargath Bladefist was the Warchief of the Fel Horde and Chieftain of the Shattered Hand clan.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 700826, name = "High Sage Viryx", image = "Interface\\Buttons\\Viryx.blp", description = "A Arakkoa leader of the Adherents of Rukhmar after betraying her former clutch-brother Iskar.", difficulty = "Easy", color = {0, 1, 0}}, + {id = 700827, name = "The Butcher", image = "Interface\\Buttons\\Butcher.blp", description = "Born in the fetid Underbelly of Highmaul, this ogre may have once had a proper name, but it is long forgotten.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 700828, name = "Brackenspore", image = "Interface\\Buttons\\Brackenspore.blp", description = "This aquatic giant spreads fungal growth and moss in its wake, and is driven by primal instinct to eradicate any traces of civilization on Draenor.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 700829, name = "Mannoroth", image = "Interface\\Buttons\\Mannoroth.blp", description = "A Pit Lord lieutenant in the Burning Legion and the original architect, along with Kil'Jaeden, of the Orcs corruption on Draenor.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 700830, name = "Lady Temptessa", image = "Interface\\Buttons\\Temptessa.blp", description = "A tall 6-armed female Shivarra, devout and exceedingly charismatic, this priestess lives only to evangelize the power of Sargeras dread vision.", difficulty = "Easy", color = {0, 1, 0}}, + }, + Legion = { + {id = 700831, name = "Kil'Jaeden", image = "Interface\\Buttons\\Kiljaeden.blp", description = "A powerful eredar demon lord and the second in rank of the Burning Legion. 13,000 years ago, he was a leader of the benevolent eredar people of Argus.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 700832, name = "Gul'dan", image = "Interface\\Buttons\\Guldan.blp", description = "The first orcish warlock as well as the de facto founder of the Horde. He betrayed both his people and his mentor Ner'zhul to the demon lord Kil'jaeden for personal gain and power.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 700833, name = "Tichondrius", image = "Interface\\Buttons\\Tichondrius.blp", description = "The leader of the nathrezim of the Burning Legion, under the command of Kil'jaeden and Archimonde. A powerful and cunning Dreadlord.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 700834, name = "Xavius", image = "Interface\\Buttons\\Xavius.blp", description = "One of the Highborne's most powerful sorcerers and the high councilor to Queen Azshara during the time of the War of the Ancients.", difficulty = "Hard", color = {1, 0, 0}}, + {id = 700835, name = "Varimathras", image = "Interface\\Buttons\\Varimathras.blp", description = "He was tortured by the Coven of Shivarra, stripping away both flesh and sanity, leaving only a singular desire to inflict suffering upon the mortals who cost him everything.", difficulty = "Challenging", color = {1, 1, 0}}, + {id = 700836, name = "Imonar the Soulhunter", image = "Interface\\Buttons\\Imonar.blp", description = "Serves as the Legions bloodhound, capable of tracking prey across the cosmos. With a vast array of gadgets and traps at his disposal, Imonar has yet to lose a bounty.", difficulty = "Challenging", color = {1, 1, 0}}, + }, +} + +-- Function to create the boss selection frame +local function CreateBossSelectionFrame() + -- Create the main frame (scaled background image to 800x600) + fighterGuildFrame = CreateFrame("Frame", "FighterGuildFrame", UIParent) + fighterGuildFrame:SetSize(800, 700) + fighterGuildFrame:SetPoint("CENTER") + + -- Adding the custom background and scaling it down + local background = fighterGuildFrame:CreateTexture(nil, "BACKGROUND") + background:SetTexture("Interface\\Buttons\\ArenaBG.blp") + background:SetAllPoints(fighterGuildFrame) + + -- Crop the texture to fit the frame using SetTexCoord + background:SetTexCoord(0, 0.78, 0, 0.78) + + -- Frame border + fighterGuildFrame:SetBackdrop({ + edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", + tile = true, edgeSize = 32, + insets = {left = 11, right = 12, top = 12, bottom = 11} + }) + fighterGuildFrame:SetBackdropColor(0, 0, 0, 1) + fighterGuildFrame:SetMovable(true) + fighterGuildFrame:EnableMouse(true) + fighterGuildFrame:RegisterForDrag("LeftButton") + fighterGuildFrame:SetScript("OnDragStart", fighterGuildFrame.StartMoving) + fighterGuildFrame:SetScript("OnDragStop", fighterGuildFrame.StopMovingOrSizing) + + local closeButton = CreateFrame("Button", nil, fighterGuildFrame, "UIPanelCloseButton") + closeButton:SetPoint("TOPRIGHT", fighterGuildFrame, "TOPRIGHT") + + local title = fighterGuildFrame:CreateFontString(nil, "OVERLAY", "GameFontHighlightLarge") + title:SetPoint("TOP", fighterGuildFrame, "TOP", 0, -10) + title:SetText("Select Your Boss") + + -- Create category buttons (size 128x64 for categories) + local categories = { + {name = "Custom", bgColor = {0, 0.4, 1}}, -- Blue + {name = "Vanilla", bgColor = {0.54, 0.27, 0.07}}, -- Brown + {name = "BC", bgColor = {0, 1, 0}}, -- Green + {name = "WOTLK", bgColor = {0, 0, 1}}, -- Blue + {name = "CATA", bgColor = {0.54, 0.27, 0.07}}, -- Brown + {name = "MOP", bgColor = {1, 0.4, 0}}, -- Orange + {name = "WoD", bgColor = {1, 0.4, 0}}, -- Orange + {name = "Legion", bgColor = {1, 0.4, 0}}, -- Orange + } + + for i, category in ipairs(categories) do + local button = CreateFrame("Button", "CategoryButton" .. i, fighterGuildFrame, "UIPanelButtonTemplate") + button:SetSize(128, 64) + button:SetPoint("TOPLEFT", fighterGuildFrame, "TOPLEFT", 10, -50 - (i - 1) * 70) + button:SetText(category.name) + button:SetBackdropColor(unpack(category.bgColor)) -- Set button background color + button:GetFontString():SetTextColor(1, 1, 0) -- Set text color to yellow + button:SetScript("OnClick", function() + currentPage = 1 -- Reset page when switching category + selectedCategory = category.name -- Track the selected category + DisplayBosses(selectedCategory) + -- Highlight the selected category button + if selectedButton then + selectedButton:SetBackdrop(nil) + end + selectedButton = button + button:SetBackdrop({ + edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", + tile = true, edgeSize = 16, + insets = {left = -6, right = -6, top = -6, bottom = -6} + }) + button:SetBackdropBorderColor(1, 0.5, 0) -- Gold color to indicate selection + end) + end + + -- Frame to contain the boss buttons + bossFrame = CreateFrame("Frame", "BossFrame", fighterGuildFrame) + bossFrame:SetSize(500, 500) + bossFrame:SetPoint("TOPRIGHT", fighterGuildFrame, "TOPRIGHT", -10, -50) + + -- Page controls: Next and Previous buttons + local nextButton = CreateFrame("Button", nil, fighterGuildFrame, "UIPanelButtonTemplate") + nextButton:SetSize(80, 50) + nextButton:SetPoint("BOTTOMRIGHT", fighterGuildFrame, "BOTTOMRIGHT", -10, 10) + nextButton:SetText("Next") + nextButton:SetScript("OnClick", function() + currentPage = currentPage + 1 + DisplayBosses(selectedCategory) + end) + + local prevButton = CreateFrame("Button", nil, fighterGuildFrame, "UIPanelButtonTemplate") + prevButton:SetSize(80, 50) + prevButton:SetPoint("BOTTOMLEFT", fighterGuildFrame, "BOTTOMLEFT", 10, 10) + prevButton:SetText("Previous") + prevButton:SetScript("OnClick", function() + currentPage = currentPage - 1 + DisplayBosses(selectedCategory) + end) + + DisplayBosses("Custom") -- Load the first category by default +end + +-- Function to display bosses based on the selected category and current page +function DisplayBosses(category) + if not bossCategories[category] then return end -- Safety check + + -- Clear previous buttons + if bossFrame then + for i, child in ipairs({bossFrame:GetChildren()}) do + child:Hide() + end + end + + local bosses = bossCategories[category] + local numColumns = 3 + local spacing = 30 + local bossSize = 128 + local totalBosses = #bosses + + -- Calculate how many pages are needed + local totalPages = math.ceil(totalBosses / bossesPerPage) + + -- Ensure we don't go out of bounds for page numbers + if currentPage > totalPages then + currentPage = totalPages + elseif currentPage < 1 then + currentPage = 1 + end + + -- Determine which bosses to show on the current page + local startIndex = (currentPage - 1) * bossesPerPage + 1 + local endIndex = math.min(startIndex + bossesPerPage - 1, totalBosses) + + -- Create new boss buttons for the current page + for i = startIndex, endIndex do + local boss = bosses[i] + local row = math.floor((i - startIndex) / numColumns) + local col = (i - startIndex) % numColumns + + local bossButton = CreateFrame("Button", "BossImageButton" .. i, bossFrame) + bossButton:SetSize(128, 64) + bossButton:SetPoint("TOPLEFT", bossFrame, "TOPLEFT", col * (bossSize + spacing), -row * (bossSize + spacing)) + bossButton.boss = boss + + local texture = bossButton:CreateTexture(nil, "BACKGROUND") + texture:SetAllPoints(bossButton) + texture:SetTexture(boss.image) + + -- Tooltip + bossButton:SetScript("OnEnter", function(self) + GameTooltip:SetOwner(self, "ANCHOR_RIGHT") + GameTooltip:SetMinimumWidth(200) + GameTooltip:AddLine(boss.name, unpack(boss.color)) + GameTooltip:AddLine(boss.difficulty, unpack(boss.color)) + GameTooltip:AddLine(boss.description, 1, 1, 1, true) + GameTooltip:Show() + end) + + bossButton:SetScript("OnLeave", function() + GameTooltip:Hide() + end) + + -- Select boss + bossButton:SetScript("OnClick", function(self) + if selectedButton then + selectedButton:SetBackdrop(nil) + -- Remove desaturation from the previously selected boss + if previousBossTexture then + previousBossTexture:SetDesaturated(false) + end + end + selectedBoss = self.boss + selectedButton = self + previousBossTexture = texture -- Save the current texture + + -- Gray out the selected boss + texture:SetDesaturated(true) + end) + end + + -- Queue button + local queueButton = CreateFrame("Button", "QueueButton", fighterGuildFrame, "UIPanelButtonTemplate") + queueButton:SetSize(140, 50) + queueButton:SetPoint("BOTTOM", fighterGuildFrame, "BOTTOM", 0, 10) + queueButton:SetText("Queue for Fight") + + queueButton:SetScript("OnClick", function() + if selectedBoss then + AIO.Handle("FighterGuildServer", "StartFight", selectedBoss.id) + if fighterGuildFrame then + fighterGuildFrame:Hide() + end + else + print("No boss selected!") + end + end) +end + +-- Show the boss selection frame +function FighterGuildHandler.ShowBossSelectionFrame() + CreateBossSelectionFrame() +end diff --git a/Lua Script/FighterGuildServer.lua b/Lua Script/FighterGuildServer.lua new file mode 100644 index 0000000..edb0b42 --- /dev/null +++ b/Lua Script/FighterGuildServer.lua @@ -0,0 +1,204 @@ +local AIO = AIO or require("AIO") + +local FighterGuildHandlers = AIO.AddHandlers("FighterGuildServer", {}) + +-- Define bosses directly (with difficulty levels, points, and spawn info) +local bosses = { + -- Custom Bosses + {id = 700800, name = "Arian - The Demon", level = 80, points = 25, difficulty = "Easy"}, + {id = 700801, name = "Lord Cyran", level = 80, points = 75, difficulty = "Challenging"}, + {id = 700802, name = "Tiger Boss", level = 80, points = 25, difficulty = "Easy"}, + {id = 700803, name = "Spellmaster", level = 80, points = 75, difficulty = "Challenging"}, + {id = 700804, name = "Bogdan - The Shadow Lord", level = 80, points = 75, difficulty = "Challenging"}, + {id = 700805, name = "Cow Lord", level = 80, points = 25, difficulty = "Easy"}, + {id = 700806, name = "Diablo", level = 80, points = 250, difficulty = "Hard"}, + {id = 700807, name = "Naroxius Death Guard", level = 80, points = 75, difficulty = "Challenging"}, + {id = 700817, name = "Gioran the Corrupted Paladin", level = 80, points = 75, difficulty = "Challenging"}, + + -- Vanilla Bosses + {id = 11519, name = "Bazzalan", level = 80, points = 25, difficulty = "Easy"}, + {id = 3654, name = "Mutanus the Devourer", level = 80, points = 25, difficulty = "Easy"}, + {id = 12201, name = "Princess Theradras", level = 80, points = 25, difficulty = "Easy"}, + {id = 15990, name = "Kel'Thuzad", level = 83, points = 250, difficulty = "Hard"}, + {id = 16028, name = "Patchwerk", level = 83, points = 250, difficulty = "Hard"}, + {id = 15299, name = "Viscidus", level = 80, points = 75, difficulty = "Challenging"}, + {id = 16060, name = "Gothik the Harvester", level = 83, points = 75, difficulty = "Challenging"}, + {id = 12264, name = "Shazzrah", level = 80, points = 250, difficulty = "Hard"}, + {id = 12056, name = "Baron Geddon", level = 80, points = 75, difficulty = "Challenging"}, + {id = 12017, name = "Broodlord Lashlayer", level = 80, points = 75, difficulty = "Challenging"}, + {id = 12018, name = "Majordomo Executus", level = 80, points = 75, difficulty = "Challenging"}, + {id = 11501, name = "King Gordok", level = 80, points = 250, difficulty = "Challenging"}, + + -- BC Bosses + {id = 21215, name = "Leotheras the Blind", level = 80, points = 250, difficulty = "Hard"}, + {id = 24723, name = "Selin Fireheart", level = 80, points = 25, difficulty = "Easy"}, + {id = 17308, name = "Omor the Unscarred", level = 80, points = 25, difficulty = "Easy"}, + {id = 17797, name = "Hydromancer Thespia", level = 80, points = 25, difficulty = "Easy"}, + {id = 16809, name = "Warbringer O'mrogg", level = 80, points = 25, difficulty = "Easy"}, + {id = 16807, name = "Grand Warlock Nethekurse", level = 80, points = 75, difficulty = "Challenging"}, + {id = 17977, name = "Warp Splinter", level = 80, points = 75, difficulty = "Challenging"}, + {id = 24239, name = "Hex Lord Malacrass", level = 80, points = 75, difficulty = "Challenging"}, + {id = 18805, name = "High Astromancer Solarian", level = 80, points = 75, difficulty = "Challenging"}, + {id = 22871, name = "Teron Gorefiend", level = 80, points = 250, difficulty = "Hard"}, + {id = 17888, name = "Kaz'rogal", level = 80, points = 250, difficulty = "Hard"}, + {id = 31395, name = "Illidan Stormrage", level = 80, points = 250, difficulty = "Hard"}, + + -- WOTLK Bosses + {id = 27447, name = "Varos Cloudstrider", level = 81, points = 75, difficulty = "Challenging"}, + {id = 36497, name = "Bronjahm", level = 82, points = 75, difficulty = "Challenging"}, + {id = 29309, name = "Elder Nadox", level = 80, points = 25, difficulty = "Easy"}, + {id = 26630, name = "Trollgore", level = 82, points = 75, difficulty = "Challenging"}, + {id = 29310, name = "Jedoga Shadowseeker", level = 82, points = 75, difficulty = "Challenging"}, + {id = 26529, name = "Meathook", level = 82, points = 75, difficulty = "Challenging"}, + {id = 32845, name = "Hodir", level = 83, points = 250, difficulty = "Hard"}, + {id = 32906, name = "Freya", level = 83, points = 250, difficulty = "Hard"}, + {id = 29304, name = "Slad'ran", level = 80, points = 25, difficulty = "Easy"}, + {id = 29305, name = "Moorabi", level = 80, points = 25, difficulty = "Easy"}, + {id = 38433, name = "Toravon the Ice Watcher", level = 83, points = 250, difficulty = "Hard"}, + {id = 700809, name = "The Lich King", level = 83, points = 250, difficulty = "Hard"}, + + -- CATA Bosses + {id = 700808, name = "Al'Akir", level = 84, points = 250, difficulty = "Hard"}, + {id = 700810, name = "Cho'gall", level = 80, points = 250, difficulty = "Hard"}, + {id = 700811, name = "Forgemaster Throngus", level = 82, points = 25, difficulty = "Easy"}, + {id = 700812, name = "Ozruk", level = 80, points = 75, difficulty = "Challenging"}, + {id = 700813, name = "Argaloth", level = 80, points = 250, difficulty = "Hard"}, + {id = 700814, name = "Setesh", level = 80, points = 25, difficulty = "Easy"}, + {id = 700815, name = "Therazane", level = 80, points = 75, difficulty = "Challenging"}, + + --MOP BOSSES + {id = 700816, name = "Elegon", level = 80, points = 250, difficulty = "Hard"}, + {id = 700818, name = "Amber-Shaper Un'Sok", level = 83, points = 250, difficulty = "Hard"}, + {id = 700819, name = "Imperial Vizier Zor'lok", level = 82, points = 250, difficulty = "Hard"}, + {id = 700820, name = "Garrosh Hellscream", level = 85, points = 250, difficulty = "Hard"}, + {id = 700821, name = "Thok the Bloodthirsty", level = 83, points = 75, difficulty = "Challenging"}, + {id = 700822, name = "General Pa'valak", level = 82, points = 75, difficulty = "Easy"}, + {id = 700823, name = "Gekkan", level = 84, points = 75, difficulty = "Easy"}, + + -- WoD Bosses + {id = 700824, name = "Blackhand", level = 85, points = 75, difficulty = "Challenging"}, + {id = 700825, name = "Kargath Bladefist", level = 85, points = 250, difficulty = "Hard"}, + {id = 700826, name = "High Sage Viryx", level = 83, points = 75, difficulty = "Easy"}, + {id = 700827, name = "The Butcher", level = 85, points = 75, difficulty = "Challenging"}, + {id = 700828, name = "Brackenspore", level = 83, points = 250, difficulty = "Hard"}, + {id = 700829, name = "Mannoroth", level = 85, points = 250, difficulty = "Hard"}, + {id = 700830, name = "Lady Temptessa", level = 85, points = 75, difficulty = "Easy"}, + + -- Legion Bosses + {id = 700831, name = "Kil'Jaeden", level = 85, points = 250, difficulty = "Hard"}, + {id = 700832, name = "Gul'dan", level = 85, points = 250, difficulty = "Hard"}, + {id = 700833, name = "Tichondrius", level = 85, points = 250, difficulty = "Hard"}, + {id = 700834, name = "Xavius", level = 85, points = 250, difficulty = "Hard"}, + {id = 700835, name = "Varimathras", level = 85, points = 75, difficulty = "Challenging"}, + {id = 700836, name = "Imonar the Soulhunter", level = 85, points = 75, difficulty = "Challenging"}, +} + +-- Arena coordinates +local mapId = 1 +local playerSpawnX, playerSpawnY, playerSpawnZ, playerOrientation = 2172.05, -4789.88, 55, 1.32696 +local bossSpawnX, bossSpawnY, bossSpawnZ, bossOrientation = 2176, -4766, 55, 1.3 +local rewardX, rewardY, rewardZ, rewardOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +-- Queue and arena state variables +local arenaOccupied = false +local queue = {} + +-- Function to add player to the queue +local function AddToQueue(player, bossId) + table.insert(queue, {player = player, bossId = bossId}) + local position = #queue + player:SendBroadcastMessage("Arena is currently occupied. You are #" .. position .. " in the queue for boss ID: " .. bossId) +end + +-- Function to start the next player in the queue +local function StartNextInQueue() + if #queue > 0 then + local nextInQueue = table.remove(queue, 1) + FighterGuildHandlers.StartFight(nextInQueue.player, nextInQueue.bossId) + end +end + +-- Modified StartFight function to check for arena status +function FighterGuildHandlers.StartFight(player, bossId) + if arenaOccupied then + -- Arena is occupied, add player to the queue + AddToQueue(player, bossId) + return + end + + -- Arena is free, start fight immediately + player:Teleport(mapId, playerSpawnX, playerSpawnY, playerSpawnZ, playerOrientation) + arenaOccupied = true + + local bossInfo + for _, boss in ipairs(bosses) do + if boss.id == bossId then + bossInfo = boss + break + end + end + + -- Spawn the boss at the designated location + if bossInfo then + local spawnedBoss = player:SpawnCreature(bossInfo.id, bossSpawnX, bossSpawnY, bossSpawnZ, bossOrientation, 6, 10000) + if spawnedBoss then + spawnedBoss:SetLevel(bossInfo.level or 80) + player:SendBroadcastMessage("Boss spawned successfully: " .. bossInfo.name) + else + player:SendBroadcastMessage("Failed to spawn boss. NPC ID: " .. bossInfo.id) + end + else + player:SendBroadcastMessage("Invalid boss selected.") + end +end + +-- Function to handle boss defeat and reward arena points +local function OnBossDefeated(event, creature, killer) + if killer:IsPlayer() then + local player = killer + local bossName = creature:GetName() + + -- Find the boss info by its name + local bossInfo + for _, boss in ipairs(bosses) do + if boss.name == bossName then + bossInfo = boss + break + end + end + + -- Teleport the player back to the reward location + if bossInfo then + player:Teleport(mapId, rewardX, rewardY, rewardZ, rewardOrientation) + player:SendBroadcastMessage("Teleporting to reward location...") + + -- Announce the winner + creature:SendUnitYell("And our winner is " .. player:GetName() .. "! They have beaten " .. bossName .. ". Look at all that carnage!", 0) + + -- Award arena points + local points = bossInfo.points or 0 + player:ModifyArenaPoints(points) + player:SendBroadcastMessage("You earned " .. points .. " Arena Points for defeating " .. bossName .. "!") + else + player:SendBroadcastMessage("Could not find boss information after defeat.") + end + + -- Free the arena and advance the queue after delay + arenaOccupied = false + CreateLuaEvent(StartNextInQueue, 15000, 1) -- 15-second delay before the next player + end +end + +-- Register the death event for all bosses +for _, boss in ipairs(bosses) do + RegisterCreatureEvent(boss.id, 4, OnBossDefeated) +end + +-- NPC Interaction Logic: Show the AIO Boss Selection Frame +local function ArenaMaster_OnGossipHello(event, player, creature) + AIO.Handle(player, "FighterGuildClient", "ShowBossSelectionFrame") + player:GossipComplete() +end + +-- Register the NPC gossip event (NPC ID: 18268) +RegisterCreatureGossipEvent(18268, 1, ArenaMaster_OnGossipHello) \ No newline at end of file diff --git a/Lua Script/ForgemasterThrongus(700811).lua b/Lua Script/ForgemasterThrongus(700811).lua new file mode 100644 index 0000000..8bcacd8 --- /dev/null +++ b/Lua Script/ForgemasterThrongus(700811).lua @@ -0,0 +1,108 @@ +local BOSS_THRONGUS = 700811 + +local rewardX, rewardY, rewardZ, rewardOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local SPELL_MOLTEN_POOL = 39429 +local SPELL_BLISTERING_HEAT = 67475 +local SPELL_MOLTEN_FLURRY = 62531 +local SPELL_MOLTEN_SPARK = 55362 +local SPELL_FIERY_CLEAVE = 72493 +local SPELL_ENRAGE = 23128 + +local FORGE_WEAPON_TIMER = 30000 +local CLEAVE_TIMER = 15000 +local FLURRY_TIMER = 45000 +local SPARK_TIMER = 20000 +local ENRAGE_TIMER = 60000 + +local QUOTE_AGGRO = "NO! Throngus get whipped again if he no finish!" +local QUOTE_MACE = "Oh, this is gonna HURT!" +local QUOTE_KILL = "You break easy! Throngus use your corpse on body. Somewhere..." +local QUOTE_DEATH = "Death... Good choice. Not best choice maybe, but better than fail and live." + +local function CastMoltenPool(eventId, delay, calls, creature) + if creature and creature:IsAlive() then + local target = creature:GetVictim() + if target then + creature:CastSpell(target, SPELL_MOLTEN_POOL, true) + end + end +end + +local function CastFieryCleave(eventId, delay, calls, creature) + if creature and creature:IsAlive() then + local target = creature:GetVictim() + if target then + creature:CastSpell(target, SPELL_FIERY_CLEAVE, true) + end + end +end + +local function CastMoltenFlurry(eventId, delay, calls, creature) + if creature and creature:IsAlive() then + local target = creature:GetVictim() + if target then + creature:CastSpell(target, SPELL_MOLTEN_FLURRY, true) + end + end +end + +local function CastMoltenSpark(eventId, delay, calls, creature) + if creature and creature:IsAlive() then + local target = creature:GetAITarget(1) + if target then + creature:CastSpell(target, SPELL_MOLTEN_SPARK, true) + end + end +end + +local function StartForgingWeapon(eventId, delay, calls, creature) + if creature and creature:IsAlive() then + creature:CastSpell(creature, SPELL_BLISTERING_HEAT, true) + creature:SendUnitYell(QUOTE_MACE, 0) + end +end + +local function CastEnrage(eventId, delay, calls, creature) + if creature and creature:IsAlive() then + creature:CastSpell(creature, SPELL_ENRAGE, true) + end +end + +-- On Combat Start +local function OnEnterCombat(event, creature, target) + creature:SetMaxHealth(877964) + creature:SetHealth(877964) + creature:SendUnitYell(QUOTE_AGGRO, 0) + creature:RegisterEvent(CastFieryCleave, CLEAVE_TIMER, 0) + creature:RegisterEvent(CastMoltenFlurry, FLURRY_TIMER, 0) + creature:RegisterEvent(CastMoltenSpark, SPARK_TIMER, 0) + creature:RegisterEvent(StartForgingWeapon, FORGE_WEAPON_TIMER, 0) + creature:RegisterEvent(CastEnrage, ENRAGE_TIMER, 0) +end + +local function OnDied(event, creature, killer) + creature:SendUnitYell(QUOTE_DEATH, 0) + creature:RemoveEvents() + + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + if player:IsPlayer() then + player:Teleport(1, rewardX, rewardY, rewardZ, rewardOrientation) + end + end +end + +local function OnKillPlayer(event, creature, victim) + creature:SendUnitYell(QUOTE_KILL, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +RegisterCreatureEvent(BOSS_THRONGUS, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_THRONGUS, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_THRONGUS, 3, OnKillPlayer) +RegisterCreatureEvent(BOSS_THRONGUS, 4, OnDied) diff --git a/Lua Script/Gekkan(700823).lua b/Lua Script/Gekkan(700823).lua new file mode 100644 index 0000000..a8e7678 --- /dev/null +++ b/Lua Script/Gekkan(700823).lua @@ -0,0 +1,72 @@ +-- Gekkan boss script made by Manmadedrummer for Araxia Online + +local BOSS_GEKKAN = 700823 +local MAX_HEALTH = 1151695 +local SPELL_INSPIRING_CRY = 64062 +local SPELL_IRON_PROTECTOR = 41431 +local SPELL_SHANK = 15617 +local SPELL_CLEANSING_FLAME = 18432 +local SPELL_FIRE_BOLT = 71130 +local SPELL_HEX = 67534 +local SPELL_DARK_BOLT = 72504 +local SPELL_ENRAGE = 72148 +local SPELL_CAST_INTERVAL = 3000 + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local function CastRandomSpell(creature) + local spells = { + SPELL_IRON_PROTECTOR, + SPELL_SHANK, + SPELL_CLEANSING_FLAME, + SPELL_FIRE_BOLT, + SPELL_HEX, + SPELL_DARK_BOLT + } + local randomSpell = spells[math.random(1, #spells)] + local target = creature:GetAITarget(0) + if target then + creature:CastSpell(target, randomSpell, true) + end +end + +local function RandomSpellCasting(eventId, delay, calls, creature) + CastRandomSpell(creature) +end + +local function CheckHealthForEnrage(eventId, delay, calls, creature) + if creature:GetHealthPct() <= 10 then + creature:RemoveEvents() + creature:CastSpell(creature, SPELL_ENRAGE, true) + end +end + +local function OnEnterCombat(event, creature, target) + creature:SendUnitYell("Slay them!", 0) + creature:RegisterEvent(RandomSpellCasting, SPELL_CAST_INTERVAL, 0) + creature:RegisterEvent(CheckHealthForEnrage, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + creature:RemoveEvents() + creature:SendUnitYell("Such a waste...", 0) + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +local function OnSpawn(event, creature) + creature:SetMaxHealth(MAX_HEALTH) + creature:SetHealth(MAX_HEALTH) +end + +RegisterCreatureEvent(BOSS_GEKKAN, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_GEKKAN, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_GEKKAN, 4, OnDeath) +RegisterCreatureEvent(BOSS_GEKKAN, 5, OnSpawn) diff --git a/Lua Script/Gioran(700817).lua b/Lua Script/Gioran(700817).lua new file mode 100644 index 0000000..20f6d3e --- /dev/null +++ b/Lua Script/Gioran(700817).lua @@ -0,0 +1,144 @@ +-- Gioran The Corrupted Paladin original script by k1ng01 https://www.mmopro.org/archive/index.php/t-3568.html +-- Converted to Azerothcore Araxia Online by Manmadedrummer + +local BOSS_GIORAN = 700817 +local NPC_SERVANT = 22965 +local SPELL_DEATH_AND_DECAY = 60953 +local SPELL_EMPOWERED_SHADOW_BOLT = 70281 +local SPELL_CATACLYSMIC_BOLT = 38441 +local SPELL_DEATHCHILL_BOLT = 72489 +local SPELL_HOLY_BOLT = 57465 +local SPELL_CURSE_OF_AGONY = 68138 +local SPELL_LIFE_SIPHON = 73784 +local SPELL_REPENTANCE = 29511 +local SPELL_DEATH_PLAGUE = 72865 +local SPELL_HOLY_BLAST = 59700 +local SPELL_SHOCK_OF_SORROW = 59726 +local SPELL_DIVINE_SWARM = 53385 +local PHASE_1_HEALTH = 90 +local PHASE_2_HEALTH = 75 +local PHASE_3_HEALTH = 50 +local PHASE_4_HEALTH = 25 +local spawnedServants = {} + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local function CastRandomSpell(creature) + local spells = { + SPELL_DEATH_AND_DECAY, + SPELL_EMPOWERED_SHADOW_BOLT, + SPELL_CATACLYSMIC_BOLT, + SPELL_DEATHCHILL_BOLT, + SPELL_HOLY_BOLT, + SPELL_CURSE_OF_AGONY, + SPELL_LIFE_SIPHON, + SPELL_REPENTANCE, + SPELL_DEATH_PLAGUE, + SPELL_HOLY_BLAST, + SPELL_SHOCK_OF_SORROW, + SPELL_DIVINE_SWARM + } + local randomSpell = spells[math.random(1, #spells)] + local target = creature:GetAITarget(0) + if target then + creature:CastSpell(target, randomSpell, true) + end +end + +local function CastSpellsPhase1(eventId, delay, calls, creature) + CastRandomSpell(creature) + creature:RegisterEvent(CastSpellsPhase1, math.random(10000, 20000), 1) +end + +local function CastSpellsPhase2(eventId, delay, calls, creature) + CastRandomSpell(creature) + creature:RegisterEvent(CastSpellsPhase2, math.random(10000, 15000), 1) +end + +local function CastSpellsPhase3(eventId, delay, calls, creature) + CastRandomSpell(creature) + creature:RegisterEvent(CastSpellsPhase3, math.random(10000, 12000), 1) +end + +local function CastSpellsPhase4(eventId, delay, calls, creature) + CastRandomSpell(creature) + creature:RegisterEvent(CastSpellsPhase4, math.random(5000, 8000), 1) +end + +local function SummonServants(creature) + for i = 1, 2 do + local x, y, z, o = creature:GetLocation() + local servant = creature:SpawnCreature(NPC_SERVANT, x + math.random(-5, 5), y + math.random(-5, 5), z, o, 3, 60000) + if servant then + table.insert(spawnedServants, servant) + end + end +end + +local function Phase1(creature) + creature:SendUnitYell("So you mortals have chosen your own fate? Let us see about that!", 0) + creature:RegisterEvent(CastSpellsPhase1, math.random(10000, 20000), 1) +end + +local function Phase2(creature) + creature:RemoveEvents() + creature:SendUnitYell("The world will fall upon you mortals!", 0) + SummonServants(creature) + creature:RegisterEvent(CastSpellsPhase2, math.random(10000, 15000), 1) +end + +local function Phase3(creature) + creature:RemoveEvents() + creature:SendUnitYell("Your souls will be consumed by unholy power!", 0) + SummonServants(creature) + creature:RegisterEvent(CastSpellsPhase3, math.random(10000, 12000), 1) +end + +local function Phase4(creature) + creature:RemoveEvents() + creature:SendUnitYell("Witness the true power of the void!", 0) + creature:RegisterEvent(CastSpellsPhase4, math.random(5000, 8000), 1) +end + +local function OnEnterCombat(event, creature, target) + Phase1(creature) + creature:RegisterEvent(function(eventId, delay, calls, creature) + local healthPct = creature:GetHealthPct() + if healthPct <= PHASE_2_HEALTH and healthPct > PHASE_3_HEALTH then + Phase2(creature) + elseif healthPct <= PHASE_3_HEALTH and healthPct > PHASE_4_HEALTH then + Phase3(creature) + elseif healthPct <= PHASE_4_HEALTH then + Phase4(creature) + end + end, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnKilledTarget(event, creature, victim) + creature:SendUnitYell("You have failed foolish one", 0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell("Wait... this cannot be, it's not supposed to end this way!", 0) + creature:RemoveEvents() + for _, servant in ipairs(spawnedServants) do + if servant then + servant:DespawnOrUnsummon() + end + end + spawnedServants = {} + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +RegisterCreatureEvent(BOSS_GIORAN, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_GIORAN, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_GIORAN, 3, OnKilledTarget) +RegisterCreatureEvent(BOSS_GIORAN, 4, OnDeath) diff --git a/Lua Script/Guldan(700832).lua b/Lua Script/Guldan(700832).lua new file mode 100644 index 0000000..c159101 --- /dev/null +++ b/Lua Script/Guldan(700832).lua @@ -0,0 +1,91 @@ +-- Gul'dan Arena Boss Script by Manmadedrummer for Araxia Online + +local Guldan = 700832 +local Lord = 1848 +local Inquisitor = 25720 + +local PHASE_ONE = 1 +local PHASE_TWO = 2 +local PHASE_THREE = 3 + +local currentPhase = PHASE_ONE + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local spells = { + 28884, -- Hand of Gul'dan + 64675, -- Shatter Essence + 75954, -- Dark Blast + 7121, -- Scattering Field + 500095, -- Liquid Hellfire + 39132, -- Fel Efflux + 22745, -- Bonds of Fel + 40876, -- Eye of Gul'dan + 52461, -- Unstoppable Rage + 72006, -- Shadow Cleave + 60010, -- Storm of the Destroyer + 32862, -- Well of Souls + 9373, -- Soul Siphon + 25805, -- Soul Corrosion + 70388, -- Black Harvest + 19698, -- Flames of Sargeras + 67876, -- Desolate Ground + 48193 -- Fury of The Fel +} + +local function CastRandomSpell(eventId, delay, calls, creature) + local spellId = spells[math.random(#spells)] + creature:CastSpell(creature:GetVictim(), spellId, true) +end + +local function OnEnterCombat(event, creature, target) + creature:SendUnitYell("Prepare yourself, our enemies' suffering shall soon commence.", 0) + creature:RegisterEvent(CastRandomSpell, 8000, 0) +end + +local function CheckHealth(event, creature) + local healthPct = creature:GetHealthPct() + if healthPct <= 85 and currentPhase == PHASE_ONE then + currentPhase = PHASE_TWO + creature:RemoveEvents() + creature:RegisterEvent(CastRandomSpell, 5000, 0) + local lordSpawn = creature:SpawnCreature(Lord, creature:GetX(), creature:GetY(), creature:GetZ(), creature:GetO(), 2, 60000) + local inquisitorSpawn = creature:SpawnCreature(Inquisitor, creature:GetX(), creature:GetY(), creature:GetZ(), creature:GetO(), 2, 60000) + if lordSpawn then + lordSpawn:SetFaction(16) -- Set Lord's faction to hostile + end + if inquisitorSpawn then + inquisitorSpawn:SetFaction(16) -- Set Inquisitor's faction to hostile + end + elseif healthPct <= 55 and currentPhase == PHASE_TWO then + currentPhase = PHASE_THREE + creature:RemoveEvents() + creature:RegisterEvent(CastRandomSpell, 3000, 0) + end +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDied(event, creature, killer) + creature:SendUnitYell("Do not concern yourself, my fate is beyond your feeble grasp.", 0) + creature:RemoveEvents() + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +local function OnSpawn(event, creature) + currentPhase = PHASE_ONE + creature:SetMaxHealth(3486231) + creature:SetHealth(3486231) +end + +RegisterCreatureEvent(Guldan, 1, OnEnterCombat) +RegisterCreatureEvent(Guldan, 9, CheckHealth) +RegisterCreatureEvent(Guldan, 2, OnLeaveCombat) +RegisterCreatureEvent(Guldan, 4, OnDied) +RegisterCreatureEvent(Guldan, 5, OnSpawn) diff --git a/Lua Script/Hellscream(700820).lua b/Lua Script/Hellscream(700820).lua new file mode 100644 index 0000000..3e58899 --- /dev/null +++ b/Lua Script/Hellscream(700820).lua @@ -0,0 +1,132 @@ +--Hellscream Arena Boss script by Manmadedrummer for Araxia Online + + +local BOSS_HELLSCREAM = 700820 +local SUMMON_NPC_1 = 23235 +local SUMMON_NPC_2 = 16877 +local MAX_HEALTH = 1032152 + +local DESECRATE = 36473 +local ENRAGE = 72148 +local WHIRLING_CORRUPTION = 59824 +local TOUCH_OF_YSHAARJ = 37727 +local SHADOW_SHOCK = 54889 +local GRIPPING_DESPAIR = 72428 +local SHADOW_NOVA = 71106 +local AURAL_SHOCK = 14538 +local UNHOLY_AURA = 17467 +local CORRUPT_DEVOTION_AURA = 38603 + +local deathQuotes = { + "No... It cannot end... like this... What I... What I have seen...", + "No... NO... This world... Is my destiny... My destiny..." +} + +local phaseTwoQuote = "Your strength is impressive... but it will not be enough!" +local phaseThreeQuote = "Enough games... Now, you will see my true power!" +local combatStartQuote = "For the Horde! Your time ends here!" + +local PHASE_ONE = 1 +local PHASE_TWO = 2 +local PHASE_THREE = 3 +local currentPhase = PHASE_ONE + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 +local MAP_ID = 1 + +local function SetBossHealth(creature) + creature:SetMaxHealth(MAX_HEALTH) + creature:SetHealth(MAX_HEALTH) +end + +local function SummonNPCsOnce(creature) + if not creature then return end + + local x, y, z = creature:GetLocation() + creature:SpawnCreature(SUMMON_NPC_1, x + math.random(-5, 5), y + math.random(-5, 5), z, 0, 2, 60000) + creature:SendUnitYell("For the True Horde!", 0) + + creature:SpawnCreature(SUMMON_NPC_2, x + math.random(-5, 5), y + math.random(-5, 5), z, 0, 2, 60000) + creature:SendUnitYell("Blood and Thunder!", 0) +end + +local function CastRandomPhaseSpell(eventId, delay, calls, creature) + if not creature then return end + + local target = creature:GetAITarget(0) + if not target then return end + + local spellList = {} + if currentPhase >= PHASE_ONE then + table.insert(spellList, DESECRATE) + table.insert(spellList, ENRAGE) + end + if currentPhase >= PHASE_TWO then + table.insert(spellList, WHIRLING_CORRUPTION) + table.insert(spellList, TOUCH_OF_YSHAARJ) + table.insert(spellList, SHADOW_SHOCK) + table.insert(spellList, GRIPPING_DESPAIR) + end + if currentPhase >= PHASE_THREE then + table.insert(spellList, SHADOW_NOVA) + table.insert(spellList, AURAL_SHOCK) + table.insert(spellList, UNHOLY_AURA) + table.insert(spellList, CORRUPT_DEVOTION_AURA) + end + + local spell = spellList[math.random(1, #spellList)] + if spell == ENRAGE then + creature:CastSpell(creature, ENRAGE, true) + else + creature:CastSpell(target, spell, true) + end +end + +local function CheckPhaseChange(eventId, delay, calls, creature) + if not creature then return end + + local healthPct = creature:GetHealthPct() + if healthPct <= 70 and currentPhase < PHASE_TWO then + currentPhase = PHASE_TWO + creature:SendUnitYell(phaseTwoQuote, 0) + creature:RemoveEvents() + creature:RegisterEvent(CastRandomPhaseSpell, 4000, 0) + elseif healthPct <= 10 and currentPhase < PHASE_THREE then + currentPhase = PHASE_THREE + creature:SendUnitYell(phaseThreeQuote, 0) + creature:RegisterEvent(CastRandomPhaseSpell, 2000, 0) + end +end + +local function OnEnterCombat(event, creature, target) + currentPhase = PHASE_ONE + SetBossHealth(creature) + creature:SendUnitYell(combatStartQuote, 0) + + SummonNPCsOnce(creature) + creature:RegisterEvent(CastRandomPhaseSpell, 3000, 0) + creature:RegisterEvent(CheckPhaseChange, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + local quote = deathQuotes[math.random(1, #deathQuotes)] + creature:SendUnitYell(quote, 0) + + local players = creature:GetPlayersInRange(10) + if players then + for _, player in ipairs(players) do + player:Teleport(MAP_ID, teleportX, teleportY, teleportZ, teleportOrientation) + end + end + + creature:RemoveEvents() +end + +RegisterCreatureEvent(BOSS_HELLSCREAM, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_HELLSCREAM, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_HELLSCREAM, 4, OnDeath) diff --git a/Lua Script/Imonar(700836).lua b/Lua Script/Imonar(700836).lua new file mode 100644 index 0000000..33b392b --- /dev/null +++ b/Lua Script/Imonar(700836).lua @@ -0,0 +1,107 @@ +-- Imonar Arena Boss Script by Manmadedrummer for Araxia Online + +local IMONAR_NPC_ID = 700836 + +local PHASE_ONE = 1 +local PHASE_TWO = 2 +local PHASE_THREE = 3 + +local SPELL_INTERVAL_PHASE_1_2 = 3000 +local SPELL_INTERVAL_PHASE_3 = 2000 +local HEALTH_ON_SPAWN = 2032543 +local PHASE_THREE_HEALTH_THRESHOLD = 33 + +local SPELL_SHOCK_LANCE = 49840 +local SPELL_ELECTRIFY = 43730 +local SPELL_SLUMBER_GAS = 9256 +local SPELL_PULSE_GRENADE = 62645 +local SPELL_INFERNAL_ROCKETS = 66542 +local SPELL_SEVER = 72261 +local SPELL_CHARGED_BLAST = 65279 +local SPELL_SHRAPNEL_BLAST = 38753 +local SPELL_SEARED_SKIN = 23461 +local SPELL_STASIS_TRAP = 36527 +local SPELL_BLASTWIRE = 43444 +local SPELL_GATHERING_POWER = 42381 + +local currentPhase = PHASE_ONE + +local function CastRandomSpellInPhase(eventId, delay, repeats, creature) + local spellTable = {} + if currentPhase == PHASE_ONE then + spellTable = { SPELL_SHOCK_LANCE, SPELL_ELECTRIFY, SPELL_SLUMBER_GAS, SPELL_PULSE_GRENADE, SPELL_INFERNAL_ROCKETS } + elseif currentPhase == PHASE_TWO then + spellTable = { SPELL_SEVER, SPELL_CHARGED_BLAST, SPELL_SHRAPNEL_BLAST, SPELL_INFERNAL_ROCKETS } + elseif currentPhase == PHASE_THREE then + spellTable = { SPELL_SHOCK_LANCE, SPELL_ELECTRIFY, SPELL_PULSE_GRENADE, SPELL_SHRAPNEL_BLAST, SPELL_SLUMBER_GAS, SPELL_INFERNAL_ROCKETS, SPELL_SEARED_SKIN, SPELL_STASIS_TRAP, SPELL_BLASTWIRE, SPELL_GATHERING_POWER } + end + local spellToCast = spellTable[math.random(1, #spellTable)] + creature:CastSpell(creature:GetVictim(), spellToCast, false) +end + +local function Phase1(creature) + creature:RemoveEvents() + creature:RegisterEvent(CastRandomSpellInPhase, SPELL_INTERVAL_PHASE_1_2, 0) +end + +local function Phase2(creature) + creature:RemoveEvents() + creature:SendUnitYell("Keep up, if you can.", 0) + creature:RegisterEvent(CastRandomSpellInPhase, SPELL_INTERVAL_PHASE_1_2, 0) +end + +local function Phase3(creature) + creature:RemoveEvents() + creature:SendUnitYell("My victory is absolute. The power of Nightmare grows!", 0) + creature:RegisterEvent(CastRandomSpellInPhase, SPELL_INTERVAL_PHASE_3, 0) +end + +local function OnEnterCombat(event, creature, target) + creature:SendUnitYell("You'll go no further, mortal scum. There's a bounty on your heads, and I mean to collect.", 0) + currentPhase = PHASE_ONE + Phase1(creature) +end + +local function OnHealthChange(event, creature, healthPct) + healthPct = creature:GetHealthPct() + if currentPhase ~= PHASE_THREE and healthPct <= PHASE_THREE_HEALTH_THRESHOLD then + currentPhase = PHASE_THREE + Phase3(creature) + elseif currentPhase == PHASE_ONE and healthPct <= 66 then + currentPhase = PHASE_TWO + Phase2(creature) + elseif currentPhase == PHASE_TWO and healthPct <= 33 then + currentPhase = PHASE_ONE + Phase1(creature) + end +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell("I regret... taking... this job...", 0) + creature:RemoveEvents() + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, 2204.453125, -4794.402344, 64.998360, 1.033404) + end +end + +local function OnKillPlayer(event, creature, victim) + creature:SendUnitYell("I get paid double if you scream.", 0) +end + +local function OnSpawn(event, creature) + creature:SetMaxHealth(HEALTH_ON_SPAWN) + creature:SetHealth(HEALTH_ON_SPAWN) +end + +RegisterCreatureEvent(IMONAR_NPC_ID, 5, OnSpawn) +RegisterCreatureEvent(IMONAR_NPC_ID, 1, OnEnterCombat) +RegisterCreatureEvent(IMONAR_NPC_ID, 2, OnLeaveCombat) +RegisterCreatureEvent(IMONAR_NPC_ID, 4, OnDeath) +RegisterCreatureEvent(IMONAR_NPC_ID, 3, OnKillPlayer) +RegisterCreatureEvent(IMONAR_NPC_ID, 9, OnHealthChange) -- OnHealthChange event might be defined as 9 in your version of Eluna diff --git a/Lua Script/Kiljaeden(700831).lua b/Lua Script/Kiljaeden(700831).lua new file mode 100644 index 0000000..46e6cd7 --- /dev/null +++ b/Lua Script/Kiljaeden(700831).lua @@ -0,0 +1,99 @@ +-- Kil'Jaeden Arena Boss script by Manmadedrummer for Araxia Online + +local KILJAEDEN_NPC_ID = 700831 +local PHASE_ONE = 1 +local PHASE_TWO = 2 +local PHASE_THREE = 3 +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 +local currentPhase = PHASE_ONE + +local function CastRandomSpell(event, delay, repeats, creature) + local target = creature:GetAITarget(0) + if not target then return end + local spellList = { + 58461, 27579, -- Felclaws + 30533, -- Rupturing Singularity + 45915, -- Armageddon + 39048, 71106, -- Sorrowful Wail + 29964, -- Bursting Dreadflame + 64698, -- Focused Dreadflame + 75362, -- Focused Dreadburst + 61463, -- Soul Anguish + 70184, -- Darkness Of A Thousand Souls + 37798 -- Demonic Obelisk + } + local spell = spellList[math.random(#spellList)] + creature:CastSpell(target, spell, true) +end + +local function CastDemonicObelisk(event, delay, repeats, creature) + local target = creature:GetAITarget(0) + if not target then return end + creature:CastSpell(target, 37798, true) +end + +local function Kiljaeden_Say(event, delay, repeats, creature) + local quotes = { + "A meaningless struggle! Azeroth shall fall to the Burning Legion!", + "A vessel for my fury!", + "An inevitable fate!", + "Confront your own darkness!", + "Consume them all!", + "Fall before your master!", + "Give in to your fears! Your desires!", + "Still you resist! Then let me repay your arrogance!", + "This battle shall be your last!", + "Your souls will soon know oblivion!", + } + local randomQuote = quotes[math.random(#quotes)] + creature:SendUnitYell(randomQuote, 0) +end + +local function OnEnterCombat(event, creature, target) + currentPhase = PHASE_ONE + creature:RegisterEvent(Kiljaeden_Say, 15000, 0) + creature:RegisterEvent(CastRandomSpell, 8000, 0) +end + +local function CheckHealth(event, creature) + local healthPct = creature:GetHealthPct() + if healthPct <= 80 and currentPhase == PHASE_ONE then + currentPhase = PHASE_TWO + creature:RemoveEvents() + creature:RegisterEvent(Kiljaeden_Say, 15000, 0) + creature:RegisterEvent(CastRandomSpell, 5000, 0) + creature:SendUnitYell("You cannot resist your own nature!", 0) + elseif healthPct <= 40 and currentPhase == PHASE_TWO then + currentPhase = PHASE_THREE + creature:RemoveEvents() + creature:RegisterEvent(Kiljaeden_Say, 15000, 0) + creature:RegisterEvent(CastDemonicObelisk, 1000, 1) + creature:RegisterEvent(CastRandomSpell, 2000, 0) + creature:SendUnitYell("Your souls will soon know oblivion!", 0) + end +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDied(event, creature, killer) + creature:RemoveEvents() + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +local function OnSpawn(event, creature) + currentPhase = PHASE_ONE + creature:SetMaxHealth(3563541) + creature:SetHealth(3563541) +end + +RegisterCreatureEvent(KILJAEDEN_NPC_ID, 1, OnEnterCombat) +RegisterCreatureEvent(KILJAEDEN_NPC_ID, 2, OnLeaveCombat) +RegisterCreatureEvent(KILJAEDEN_NPC_ID, 4, OnDied) +RegisterCreatureEvent(KILJAEDEN_NPC_ID, 5, OnSpawn) +RegisterCreatureEvent(KILJAEDEN_NPC_ID, 7, CheckHealth) diff --git a/Lua Script/LadyTemptessa(700830).lua b/Lua Script/LadyTemptessa(700830).lua new file mode 100644 index 0000000..5eedbae --- /dev/null +++ b/Lua Script/LadyTemptessa(700830).lua @@ -0,0 +1,72 @@ +-- Lady Temtessa Arena Boss script made by Manmadedrummer for Araxia Online + +local BOSS_LADY_TEMPTESSA = 700830 +local MAX_HEALTH = 115030 +local SPELL_CRIMSON_SLASH = 71154 +local SPELL_SCYTHING_WHIRL = 62376 +local SPELL_SHADOW_SLASH = 69181 +local SPELL_SPECTRAL_SLASH = 72688 +local SPELL_TEMPEST_OF_BLADES = 63808 +local SPELL_PUNCTURE_STRIKE = 70279 +local SPELL_CRUSADER_STRIKE = 71549 +local SPELL_ENRAGE = 72148 +local currentPhase = 1 +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local QUOTE_START = "Mow them down." +local QUOTE_DEATH = "They will... overrun... you..." + +local function CastRandomSpell(eventId, delay, repeats, creature) + if not creature or creature:HealthBelowPct(1) then return end + local target = creature:GetAITarget(0) + if not target then return end + local spellList = { + SPELL_CRIMSON_SLASH, SPELL_SCYTHING_WHIRL, SPELL_SHADOW_SLASH, + SPELL_SPECTRAL_SLASH, SPELL_TEMPEST_OF_BLADES, SPELL_PUNCTURE_STRIKE, SPELL_CRUSADER_STRIKE + } + local spell = spellList[math.random(1, #spellList)] + creature:CastSpell(target, spell, true) +end + +local function Phase1(creature) + creature:SendUnitYell(QUOTE_START, 0) + creature:RegisterEvent(CastRandomSpell, 3000, 0) +end + +local function CheckHealth(eventId, delay, repeats, creature) + if not creature or creature:HealthBelowPct(1) then return end + if creature:HealthBelowPct(30) and currentPhase < 2 then + currentPhase = 2 + creature:CastSpell(creature, SPELL_ENRAGE, true) + end +end + +local function OnSpawn(event, creature) + creature:SetMaxHealth(MAX_HEALTH) + creature:SetHealth(MAX_HEALTH) +end + +local function OnEnterCombat(event, creature, target) + currentPhase = 1 + Phase1(creature) + creature:RegisterEvent(CheckHealth, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell(QUOTE_DEATH, 0) + creature:RemoveEvents() + local players = creature:GetPlayersInRange(50) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +RegisterCreatureEvent(BOSS_LADY_TEMPTESSA, 5, OnSpawn) +RegisterCreatureEvent(BOSS_LADY_TEMPTESSA, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_LADY_TEMPTESSA, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_LADY_TEMPTESSA, 4, OnDeath) diff --git a/Lua Script/LichKing(700809).lua b/Lua Script/LichKing(700809).lua new file mode 100644 index 0000000..e212e8c --- /dev/null +++ b/Lua Script/LichKing(700809).lua @@ -0,0 +1,63 @@ +-- Lich King Custom Script for AzerothCore Araxia Online by Manmadedrummer +local BOSS_LICH_KING = 700809 + +local SPELL_SHOCKWAVE = 75418 +local SPELL_REMORSELESS_WINTER = 68983 +local SPELL_PAIN_AND_SUFFERING = 74117 +local SPELL_LIFE_SIPHON = 73784 +local SPELL_VILE_SPIRITS = 70498 +local SPELL_HARVEST_SOUL = 74327 +local SPELL_FURY_OF_FROSTMOURNE = 72350 +local SPELL_MELEE_STRIKE = 73708 + +local SPELL_CAST_INTERVAL = math.random(5000, 10000) + +local function CastRandomSpell(creature) + local spells = { + SPELL_SHOCKWAVE, + SPELL_REMORSELESS_WINTER, + SPELL_PAIN_AND_SUFFERING, + SPELL_LIFE_SIPHON, + SPELL_VILE_SPIRITS, + SPELL_HARVEST_SOUL, + SPELL_FURY_OF_FROSTMOURNE, + SPELL_MELEE_STRIKE + } + + local randomSpell = spells[math.random(1, #spells)] + local target = creature:GetAITarget(0) + + if target then + creature:CastSpell(target, randomSpell, true) + end +end + +local function RandomSpellCasting(eventId, delay, calls, creature) + CastRandomSpell(creature) +end + +local function OnEnterCombat(event, creature, target) + creature:SendUnitYell("You dare challenge the might of the Lich King!", 0) + + creature:RegisterEvent(RandomSpellCasting, SPELL_CAST_INTERVAL, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:SendUnitYell("You cannot escape... I will return!", 0) + creature:DespawnOrUnsummon(0) +end + +local function OnKilledTarget(event, creature, victim) + creature:SendUnitYell("Another soul claimed by the Lich King!", 0) +end + +local function OnDeath(event, creature, killer) + creature:RemoveEvents() + creature:SendUnitYell("No... this cannot be!", 0) +end + +RegisterCreatureEvent(BOSS_LICH_KING, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_LICH_KING, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_LICH_KING, 3, OnKilledTarget) +RegisterCreatureEvent(BOSS_LICH_KING, 4, OnDeath) diff --git a/Lua Script/LordCyran(700801).lua b/Lua Script/LordCyran(700801).lua new file mode 100644 index 0000000..ae9a867 --- /dev/null +++ b/Lua Script/LordCyran(700801).lua @@ -0,0 +1,136 @@ +-- Original Script by Kreegoth at mmopro.org +-- Converted for Araxia Online on Azerothcore by Manmadedrummer https://github.com/araxiaonline + +local ENEMY_ID = 700801 +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local SPELL_ARCANE_EXPLOSION = 27082 +local SPELL_MORTAL_STRIKE = 24573 +local SPELL_SUNDER_ARMOR = 7386 +local SPELL_SUMMON_INFERNAL = 1122 +local SPELL_HATEFUL_STRIKE = 28308 +local SPELL_DEMORALIZING_SHOUT = 69565 +local SPELL_IMPALE = 19781 +local SPELL_IMPENDING_DOOM = 39046 +local SPELL_FEAR = 5782 +local SPELL_VOID_SHIELD = 58813 + +local MAX_HEALTH = 877964 + +local function CastArcaneExplosion(eventId, delay, repeats, creature) + creature:CastSpell(creature, SPELL_ARCANE_EXPLOSION, true) +end + +local function CastMortalStrike(eventId, delay, repeats, creature) + local tank = creature:GetAITarget(1) + if tank then + creature:CastSpell(tank, SPELL_MORTAL_STRIKE, true) + end +end + +local function CastSunderArmor(eventId, delay, repeats, creature) + local tank = creature:GetAITarget(1) + if tank then + creature:CastSpell(tank, SPELL_SUNDER_ARMOR, true) + end +end + +local function SummonInfernalOnce(creature) + creature:CastSpell(creature, SPELL_SUMMON_INFERNAL, true) +end + +local function CastHatefulStrike(eventId, delay, repeats, creature) + local tank = creature:GetAITarget(1) + if tank then + creature:CastSpell(tank, SPELL_HATEFUL_STRIKE, true) + end +end + +local function CastDemoralizingShout(eventId, delay, repeats, creature) + creature:CastSpell(creature, SPELL_DEMORALIZING_SHOUT, true) +end + +local function CastImpale(eventId, delay, repeats, creature) + local tank = creature:GetAITarget(1) + if tank then + creature:CastSpell(tank, SPELL_IMPALE, true) + end +end + +local function CastImpendingDoom(eventId, delay, repeats, creature) + local target = creature:GetAITarget(0) + if target then + creature:CastSpell(target, SPELL_IMPENDING_DOOM, true) + end +end + +local function CastFear(eventId, delay, repeats, creature) + local target = creature:GetAITarget(0) + if target then + creature:CastSpell(target, SPELL_FEAR, true) + end +end + +local function CastVoidShield(eventId, delay, repeats, creature) + creature:CastSpell(creature, SPELL_VOID_SHIELD, true) +end + +local function Phase1(creature) + creature:RegisterEvent(CastArcaneExplosion, 8000, 0) + creature:RegisterEvent(CastMortalStrike, 12000, 0) + creature:RegisterEvent(CastSunderArmor, 15000, 0) +end + +local function Phase2(creature) + creature:RemoveEvents() + creature:SendUnitSay("You will crumble beneath my power!", 0) + SummonInfernalOnce(creature) + CastVoidShield(nil, nil, nil, creature) + creature:RegisterEvent(CastHatefulStrike, 12000, 0) + creature:RegisterEvent(CastImpale, 18000, 0) + creature:RegisterEvent(CastDemoralizingShout, 20000, 0) + creature:RegisterEvent(CastImpendingDoom, 25000, 0) + creature:RegisterEvent(CastFear, 30000, 0) + Phase1(creature) +end + +local function OnSpawn(event, creature) + creature:SetMaxHealth(MAX_HEALTH) + creature:SetHealth(MAX_HEALTH) +end + +local function OnCombat(event, creature, target) + Phase1(creature) + creature:RegisterEvent(function(eventId, delay, repeats, creature) + if creature:GetHealthPct() < 50 then + Phase2(creature) + end + end, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:SendUnitSay("I've waited long enough!", 0) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnKilledTarget(event, creature, victim) + creature:SendUnitSay("Fail me and suffer for eternity!", 0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitSay("Pity you cannot understand the reality of your situation....", 0) + creature:RemoveEvents() + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + if player:IsPlayer() then + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end + end +end + +RegisterCreatureEvent(ENEMY_ID, 1, OnCombat) +RegisterCreatureEvent(ENEMY_ID, 2, OnLeaveCombat) +RegisterCreatureEvent(ENEMY_ID, 3, OnKilledTarget) +RegisterCreatureEvent(ENEMY_ID, 4, OnDeath) +RegisterCreatureEvent(ENEMY_ID, 5, OnSpawn) diff --git a/Lua Script/Mannoroth(700829).lua b/Lua Script/Mannoroth(700829).lua new file mode 100644 index 0000000..18d62bf --- /dev/null +++ b/Lua Script/Mannoroth(700829).lua @@ -0,0 +1,112 @@ +-- Mannoroth Arena Boss script by Manmadedrummer For Araxia Online + +local BOSS_MANNOROTH = 700829 +local MAX_HEALTH = 2194018 +local SPELL_MARK_OF_DOOM = 71124 +local SPELL_SHADOW_BOLT_VOLLEY = 56065 +local SPELL_GLAIVE_THRUST = 67448 +local SPELL_MASSIVE_BLAST = 71106 +local SPELL_PUNCTURE_WOUND = 70279 +local SPELL_FEL_HELLSTORM = 66965 +local SPELL_FELSEEKER = 67047 +local SPELL_WRATH_OF_GULDAN = 7068 +local SPELL_GRIPPING_SHADOWS = 36986 +local NPC_DOOM_LORD = 101104 +local NPC_FEL_IMP = 21135 +local currentPhase = 1 +local summonCooldown = {false, false} +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local QUOTE_START = "The Legion will burn this world, as it has countless others!" +local QUOTE_PHASE2 = "These mortals cannot be this strong. Gul'dan, do something!" +local QUOTE_DEATH = "Wha- What is this? Gul'dan what have you done? I am... So weak..." +local QUOTE_SPAWN = "Die, mongrels." + +local function PhaseOneSpells(eventId, delay, repeats, creature) + if not creature or creature:HealthBelowPct(1) then return end + local target = creature:GetAITarget(0) + if not target then return end + local spellList = {SPELL_MARK_OF_DOOM, SPELL_SHADOW_BOLT_VOLLEY, SPELL_GLAIVE_THRUST, SPELL_PUNCTURE_WOUND, SPELL_MASSIVE_BLAST, SPELL_FEL_HELLSTORM, SPELL_FELSEEKER} + local spell = spellList[math.random(1, #spellList)] + creature:CastSpell(target, spell, true) +end + +local function PhaseTwoSpells(eventId, delay, repeats, creature) + if not creature or creature:HealthBelowPct(1) then return end + local target = creature:GetAITarget(0) + if not target then return end + local spellList = { + SPELL_MARK_OF_DOOM, SPELL_SHADOW_BOLT_VOLLEY, SPELL_GLAIVE_THRUST, SPELL_PUNCTURE_WOUND, + SPELL_MASSIVE_BLAST, SPELL_FEL_HELLSTORM, SPELL_FELSEEKER, SPELL_WRATH_OF_GULDAN, SPELL_GRIPPING_SHADOWS + } + local spell = spellList[math.random(1, #spellList)] + creature:CastSpell(target, spell, true) +end + +local function SummonDoomLords(creature) + local x, y, z = creature:GetLocation() + for i = 1, 3 do + creature:SpawnCreature(NPC_DOOM_LORD, x + math.random(-5, 5), y + math.random(-5, 5), z, 0, 3, 60000) + end +end + +local function SummonFelImps(eventId, delay, repeats, creature) + local target = creature:GetAITarget(0) + if not target then return end + local x, y, z = target:GetLocation() + for i = 1, 3 do + creature:SpawnCreature(NPC_FEL_IMP, x + math.random(-10, 10), y + math.random(-10, 10), z, 0, 1, 5000) + end +end + +local function Phase1(creature) + creature:SendUnitYell(QUOTE_SPAWN, 0) + creature:RegisterEvent(PhaseOneSpells, 3000, 0) + SummonDoomLords(creature) + creature:RegisterEvent(SummonFelImps, 10000, 0) +end + +local function Phase2(creature) + creature:SendUnitYell(QUOTE_PHASE2, 0) + creature:RemoveEvents() + creature:RegisterEvent(PhaseTwoSpells, 1000, 0) +end + +local function CheckHealth(eventId, delay, repeats, creature) + if not creature or creature:HealthBelowPct(1) then return end + if creature:HealthBelowPct(65) and currentPhase < 2 then + currentPhase = 2 + Phase2(creature) + end +end + +local function OnSpawn(event, creature) + creature:SetMaxHealth(MAX_HEALTH) + creature:SetHealth(MAX_HEALTH) +end + +local function OnEnterCombat(event, creature, target) + currentPhase = 1 + creature:SendUnitYell(QUOTE_START, 0) + Phase1(creature) + creature:RegisterEvent(CheckHealth, 500, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell(QUOTE_DEATH, 0) + creature:RemoveEvents() + local players = creature:GetPlayersInRange(50) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +RegisterCreatureEvent(BOSS_MANNOROTH, 5, OnSpawn) +RegisterCreatureEvent(BOSS_MANNOROTH, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_MANNOROTH, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_MANNOROTH, 4, OnDeath) \ No newline at end of file diff --git a/Lua Script/Naroxius(700807).lua b/Lua Script/Naroxius(700807).lua new file mode 100644 index 0000000..75e9b95 --- /dev/null +++ b/Lua Script/Naroxius(700807).lua @@ -0,0 +1,138 @@ +-- Original script of Naroxius Death Guard by Kreegoth https://www.mmopro.org/archive/index.php/t-586.html +-- Coverted by Manmadedrummer for Azerothcore Araxia Online +local ENEMY_ID = 700807 + +local SPELL_DEATHSTRIKE = 71489 +local SPELL_ASUNDER = 28733 +local SPELL_DIRENOVA = 38739 +local SPELL_DOOMSLICE = 40481 +local SPELL_HARBINGER = 36836 +local SPELL_DEFENSIVE = 33479 +local SPELL_BLAST = 32907 +local SPELL_DISORIENT = 19369 +local SPELL_SHELTER = 36481 +local SPELL_FRAILTY = 19372 +local SPELL_FINAL_PHASE = 33130 + +local function CastDeathstrike(eventId, delay, repeats, creature) + local target = creature:GetVictim() + if target then + creature:CastSpell(target, SPELL_DEATHSTRIKE, true) + end +end + +local function CastAsunder(eventId, delay, repeats, creature) + creature:CastSpell(creature, SPELL_ASUNDER, true) +end + +local function CastDirenova(eventId, delay, repeats, creature) + local target = creature:GetVictim() + if target then + creature:CastSpell(target, SPELL_DIRENOVA, true) + end +end + +local function CastDoomslice(eventId, delay, repeats, creature) + local target = creature:GetVictim() + if target then + creature:CastSpell(target, SPELL_DOOMSLICE, true) + end +end + +local function CastHarbinger(eventId, delay, repeats, creature) + local target = creature:GetVictim() + if target then + creature:CastSpell(target, SPELL_HARBINGER, true) + end +end + +local function CastDefensive(eventId, delay, repeats, creature) + creature:CastSpell(creature, SPELL_DEFENSIVE, true) +end + +local function CastBlast(eventId, delay, repeats, creature) + creature:CastSpell(creature, SPELL_BLAST, true) +end + +local function CastDisorient(eventId, delay, repeats, creature) + local target = creature:GetAITarget(0) + if target then + creature:CastSpell(target, SPELL_DISORIENT, true) + end +end + +local function CastShelter(eventId, delay, repeats, creature) + creature:CastSpell(creature, SPELL_SHELTER, true) +end + +local function CastFrailty(eventId, delay, repeats, creature) + local target = creature:GetAITarget(0) + if target then + creature:CastSpell(target, SPELL_FRAILTY, true) + end +end + +local function Phase1(creature) + creature:RegisterEvent(CastDeathstrike, 8000, 0) + creature:RegisterEvent(CastAsunder, 15000, 0) + creature:RegisterEvent(CastDirenova, 20000, 0) +end + +local function Phase2(creature) + creature:RemoveEvents() + creature:SendUnitYell("Your corpses will be a feast for those that hunger!", 0) + creature:RegisterEvent(CastDoomslice, 5000, 0) + creature:RegisterEvent(CastHarbinger, 15000, 0) + creature:RegisterEvent(CastDefensive, 17000, 0) + Phase1(creature) +end + +local function Phase3(creature) + creature:RemoveEvents() + creature:SendUnitYell("Feel my wrath! The end is near!", 0) + creature:RegisterEvent(CastBlast, 20000, 0) + creature:RegisterEvent(CastDisorient, 15000, 0) + creature:RegisterEvent(CastShelter, 50000, 0) + creature:RegisterEvent(CastFrailty, 35000, 0) + Phase1(creature) +end + +local function Phase4(creature) + creature:RemoveEvents() + creature:SendUnitYell("Fools! Your defeat is inevitable!", 0) + creature:CastSpell(creature, SPELL_FINAL_PHASE, true) + Phase1(creature) +end + +local function OnCombat(event, creature, target) + creature:SendUnitYell("The blood of men who have failed in this task, it stains the earth here...", 0) + Phase1(creature) + creature:RegisterEvent(function(eventId, delay, repeats, creature) + if creature:GetHealthPct() < 76 then + Phase2(creature) + elseif creature:GetHealthPct() < 49 then + Phase3(creature) + elseif creature:GetHealthPct() < 20 then + Phase4(creature) + end + end, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnKilledTarget(event, creature, victim) + creature:SendUnitYell("Another soul claimed by Naroxius Death Guard!", 0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell("You have defeated me... For now... we shall meet again", 0) + creature:RemoveEvents() +end + +RegisterCreatureEvent(ENEMY_ID, 1, OnCombat) +RegisterCreatureEvent(ENEMY_ID, 2, OnLeaveCombat) +RegisterCreatureEvent(ENEMY_ID, 3, OnKilledTarget) +RegisterCreatureEvent(ENEMY_ID, 4, OnDeath) diff --git a/Lua Script/Ozruk(700812).lua b/Lua Script/Ozruk(700812).lua new file mode 100644 index 0000000..880b51d --- /dev/null +++ b/Lua Script/Ozruk(700812).lua @@ -0,0 +1,93 @@ +--Ozruk boss made for Azerothcore Araxia Online Manmadedrummer +local BOSS_OZRUK = 700812 -- Ozruk's NPC ID +local STAGE_TWO_HEALTH = 25 -- Transition to Phase 2 at 25% health +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 -- Teleport location for players + +local SPELL_GROUND_SLAM = 62625 +local SPELL_RUPTURE = 15583 +local SPELL_ELEMENTIUM_BULWARK = 3651 +local SPELL_SPIKE_SHIELD = 70435 +local SPELL_SHATTER = 62388 +local SPELL_PARALYZE = 48278 + +local QUOTE_AGGRO = "None may pass into the World's Heart!" +local QUOTE_SPIKE_SHIELD = "Break yourselves upon my body. Feel the strength of the earth!" +local QUOTE_KILL = "The cycle is complete." +local QUOTE_DEATH = "A protector has fallen. The World's Heart lies exposed!" + +local function CastGroundSlam(eventId, delay, repeats, creature) + creature:CastSpell(creature:GetVictim(), SPELL_GROUND_SLAM, true) +end + +local function CastRupture(eventId, delay, repeats, creature) + creature:CastSpell(creature:GetVictim(), SPELL_RUPTURE, true) +end + +local function CastElementiumBulwark(eventId, delay, repeats, creature) + creature:CastSpell(creature, SPELL_ELEMENTIUM_BULWARK, true) + creature:SendUnitYell(QUOTE_SPIKE_SHIELD, 0) +end + +local function CastSpikeShield(eventId, delay, repeats, creature) + creature:CastSpell(creature, SPELL_SPIKE_SHIELD, true) +end + +local function CastShatter(eventId, delay, repeats, creature) + creature:CastSpell(creature, SPELL_SHATTER, true) +end + +local function CastParalyze(eventId, delay, repeats, creature) + creature:CastSpell(creature, SPELL_PARALYZE, true) +end + +local function Phase1(creature) + creature:RegisterEvent(CastGroundSlam, 10000, 0) + creature:RegisterEvent(CastRupture, 20000, 0) + creature:RegisterEvent(CastElementiumBulwark, 25000, 0) +end + +local function Phase2(creature) + creature:RemoveEvents() + creature:SendUnitYell("I will not be broken!", 0) + creature:RegisterEvent(CastShatter, 12000, 0) + creature:RegisterEvent(CastSpikeShield, 15000, 0) + creature:RegisterEvent(CastParalyze, 30000, 0) +end + +local function OnCombat(event, creature, target) + creature:SetMaxHealth(766800) + creature:SetHealth(766800) + creature:SendUnitYell(QUOTE_AGGRO, 0) + Phase1(creature) + creature:RegisterEvent(function(eventId, delay, repeats, creature) + if creature:GetHealthPct() < STAGE_TWO_HEALTH then + Phase2(creature) + end + end, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnKilledTarget(event, creature, victim) + creature:SendUnitYell(QUOTE_KILL, 0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell(QUOTE_DEATH, 0) + creature:RemoveEvents() + + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + if player:IsPlayer() then + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end + end +end + +RegisterCreatureEvent(BOSS_OZRUK, 1, OnCombat) +RegisterCreatureEvent(BOSS_OZRUK, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_OZRUK, 3, OnKilledTarget) +RegisterCreatureEvent(BOSS_OZRUK, 4, OnDeath) diff --git a/Lua Script/Pavalak(700822).lua b/Lua Script/Pavalak(700822).lua new file mode 100644 index 0000000..84c425e --- /dev/null +++ b/Lua Script/Pavalak(700822).lua @@ -0,0 +1,100 @@ +--General Pavalak script made by Manmadedrummer for Araxia Online + +local NPC_ID = 700822 +local REINFORCEMENT_ID = 29128 + +local MAX_HEALTH = 1850000 + +local SPELL_BLADE_RUSH = 75125 +local SPELL_TEMPEST = 63557 +local SPELL_BULWARK = 29382 +local SPELL_SIEGE_EXPLOSIVE = 72802 +local SPELL_THROW_EXPLOSIVE = 355057 + +local BULWARK_PHASES = {65, 35} +local CAST_TIME_REDUCTION_THRESHOLD = 35 + +local SPELL_CAST_MIN_DELAY = 2000 +local SPELL_CAST_MAX_DELAY = 6000 +local HALF_CAST_MIN_DELAY = SPELL_CAST_MIN_DELAY / 2 +local HALF_CAST_MAX_DELAY = SPELL_CAST_MAX_DELAY / 2 + +local REINFORCEMENT_COUNT = 3 + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local bossState = { + bulwarkUsed = { [65] = false, [35] = false } +} + +local function CastRandomSpell(eventId, delay, calls, creature) + if creature:GetHealthPct() <= 0 then return end + + local spells = {SPELL_BLADE_RUSH, SPELL_TEMPEST, SPELL_SIEGE_EXPLOSIVE, SPELL_THROW_EXPLOSIVE} + local spell = spells[math.random(1, #spells)] + local target = creature:GetAITarget(0, true) + if target then + creature:CastSpell(target, spell, false) + end +end + +local function SummonReinforcements(creature) + for i = 1, REINFORCEMENT_COUNT do + local x, y, z = creature:GetX() + math.random(-5, 5), creature:GetY() + math.random(-5, 5), creature:GetZ() + creature:SpawnCreature(REINFORCEMENT_ID, x, y, z, 0, 3, 60000) + end +end + +local function AdjustCastSpeed(creature) + creature:RemoveEvents() + creature:RegisterEvent(CastRandomSpell, math.random(HALF_CAST_MIN_DELAY, HALF_CAST_MAX_DELAY), 0) +end + +local function OnHealthCheck(eventId, delay, calls, creature) + local healthPct = creature:GetHealthPct() + + for _, threshold in ipairs(BULWARK_PHASES) do + if healthPct <= threshold and not bossState.bulwarkUsed[threshold] then + creature:CastSpell(creature, SPELL_BULWARK, true) + SummonReinforcements(creature) + bossState.bulwarkUsed[threshold] = true + + if threshold == CAST_TIME_REDUCTION_THRESHOLD then + AdjustCastSpeed(creature) + end + + break + end + end +end + +local function TeleportNearbyPlayers(creature) + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(creature:GetMapId(), teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +local function OnCombat(event, creature, target) + bossState.bulwarkUsed = { [65] = false, [35] = false } + + creature:SetMaxHealth(MAX_HEALTH) + creature:SetHealth(MAX_HEALTH) + + creature:RegisterEvent(CastRandomSpell, math.random(SPELL_CAST_MIN_DELAY, SPELL_CAST_MAX_DELAY), 0) + creature:RegisterEvent(OnHealthCheck, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDied(event, creature, killer) + TeleportNearbyPlayers(creature) + creature:RemoveEvents() +end + +RegisterCreatureEvent(NPC_ID, 1, OnCombat) +RegisterCreatureEvent(NPC_ID, 2, OnLeaveCombat) +RegisterCreatureEvent(NPC_ID, 4, OnDied) diff --git a/Lua Script/Setesh(700814).lua b/Lua Script/Setesh(700814).lua new file mode 100644 index 0000000..677d59e --- /dev/null +++ b/Lua Script/Setesh(700814).lua @@ -0,0 +1,81 @@ +-- Setesh boss made for Azerothcore Araxia Online by Manmadedrummer + +local BOSS_SETESH = 700814 +local NPC_VOID_CALLER = 18368 +local NPC_VOID_SENTINEL = 18870 +local SPELL_CHAOS_BOLT = 71108 +local SPELL_CHAOS_BLAST = 37675 +local SPELL_SEED_OF_CHAOS = 70388 +local SPELL_SHADOW_NOVA = 71106 +local CHAOS_BOLT_TIMER = 15000 +local CHAOS_BLAST_TIMER = 20000 +local SEED_OF_CHAOS_TIMER = 25000 +local VOID_CALLER_SPAWN_TIMER = 45000 +local VOID_SENTINEL_SPAWN_TIMER = 55000 +local SETESH_HEALTH = 151695 + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local function SummonVoidCaller(eventId, delay, calls, creature) + local x, y, z, o = creature:GetLocation() + creature:SpawnCreature(NPC_VOID_CALLER, x + math.random(-5, 5), y + math.random(-5, 5), z, o, 3, 60000) +end + +local function SummonVoidSentinel(eventId, delay, calls, creature) + local x, y, z, o = creature:GetLocation() + creature:SpawnCreature(NPC_VOID_SENTINEL, x + math.random(-5, 5), y + math.random(-5, 5), z, o, 3, 60000) +end + +local function CastChaosBolt(eventId, delay, calls, creature) + local target = creature:GetAITarget(0, true) + if target then + creature:CastSpell(target, SPELL_CHAOS_BOLT, true) + end +end + +local function CastChaosBlast(eventId, delay, calls, creature) + local target = creature:GetAITarget(0, true) + if target then + creature:CastSpell(target, SPELL_CHAOS_BLAST, true) + end +end + +local function CastSeedOfChaos(eventId, delay, calls, creature) + local target = creature:GetAITarget(0, true) + if target then + creature:CastSpell(target, SPELL_SEED_OF_CHAOS, true) + end +end + +local function CastShadowNova(eventId, delay, calls, creature) + creature:CastSpell(creature, SPELL_SHADOW_NOVA, true) +end + +local function OnEnterCombat(event, creature, target) + creature:SendUnitYell("The chaos will consume you all!", 0) + creature:SetMaxHealth(SETESH_HEALTH) + creature:SetHealth(SETESH_HEALTH) + creature:RegisterEvent(CastChaosBolt, CHAOS_BOLT_TIMER, 0) + creature:RegisterEvent(CastChaosBlast, CHAOS_BLAST_TIMER, 0) + creature:RegisterEvent(CastSeedOfChaos, SEED_OF_CHAOS_TIMER, 0) + creature:RegisterEvent(CastShadowNova, 30000, 0) + creature:RegisterEvent(SummonVoidCaller, VOID_CALLER_SPAWN_TIMER, 0) + creature:RegisterEvent(SummonVoidSentinel, VOID_SENTINEL_SPAWN_TIMER, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + creature:RemoveEvents() + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +RegisterCreatureEvent(BOSS_SETESH, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_SETESH, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_SETESH, 4, OnDeath) diff --git a/Lua Script/Spellmaster(700803).lua b/Lua Script/Spellmaster(700803).lua new file mode 100644 index 0000000..01992f3 --- /dev/null +++ b/Lua Script/Spellmaster(700803).lua @@ -0,0 +1,92 @@ +--Spellmaster by Milation +--Converted to Azerothcore Araxia Online by Manmadedrummer +local BOSS_ID = 700803 +local MIN_INTERVAL = 4000 +local MAX_INTERVAL = 12000 + +local function RandomInterval(min, max) + return math.random(min, max) +end + +local PHASE_2_HEALTH = 40 +local PHASE_3_HEALTH = 10 + +local function CastFireball(event, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), 42833, true) + creature:SendUnitYell("Feel the heat of my Fireball!", 0) + creature:RegisterEvent(CastFireball, RandomInterval(8000, 12000), 1) +end + +local function CastBlastWave(event, delay, calls, creature) + creature:CastSpell(creature, 36278, true) + creature:SendUnitYell("You cannot escape the blast!", 0) + creature:RegisterEvent(CastBlastWave, RandomInterval(10000, 15000), 1) +end + +local function CastDivinePlea(event, delay, calls, creature) + creature:CastSpell(creature, 54428, true) + creature:SendUnitYell("I shall heal myself!", 0) + creature:RegisterEvent(CastDivinePlea, RandomInterval(15000, 20000), 1) +end + +local function CastArcaneExplosion(event, delay, calls, creature) + creature:CastSpell(creature, 28450, true) + creature:SendUnitYell("Witness the power of arcane destruction!", 0) + creature:RegisterEvent(CastArcaneExplosion, RandomInterval(10000, 15000), 1) +end + +local function CastArcaneBarrage(event, delay, calls, creature) + local target = creature:GetAITarget(math.random(1, 5)) + creature:CastSpell(target, 59248, true) + creature:SendUnitYell("You cannot avoid my arcane wrath!", 0) + creature:RegisterEvent(CastArcaneBarrage, RandomInterval(7000, 10000), 1) +end + +local function StartPhase1(creature) + creature:RegisterEvent(CastFireball, RandomInterval(8000, 12000), 1) + creature:RegisterEvent(CastBlastWave, RandomInterval(10000, 15000), 1) + creature:RegisterEvent(CastDivinePlea, RandomInterval(15000, 20000), 1) +end + +local function StartPhase2(event, delay, calls, creature) + creature:RemoveEvents() + creature:RegisterEvent(CastArcaneExplosion, RandomInterval(10000, 15000), 1) + creature:RegisterEvent(CastDivinePlea, RandomInterval(15000, 20000), 1) + creature:SendUnitYell("Now you shall feel the true power of the arcane!", 0) +end + +local function StartPhase3(event, delay, calls, creature) + creature:RemoveEvents() + creature:RegisterEvent(CastArcaneBarrage, RandomInterval(7000, 10000), 1) + creature:RegisterEvent(CastDivinePlea, RandomInterval(15000, 20000), 1) + creature:SendUnitYell("This is my final stand. You shall not survive!", 0) +end + +local function CheckHealth(event, delay, calls, creature) + local healthPct = creature:GetHealthPct() + if healthPct <= PHASE_2_HEALTH and healthPct > PHASE_3_HEALTH then + StartPhase2(event, delay, calls, creature) + elseif healthPct <= PHASE_3_HEALTH then + StartPhase3(event, delay, calls, creature) + end +end + +local function OnCombatStart(event, creature, target) + creature:SendUnitYell("You dare challenge me? Prepare to meet your end!", 0) + StartPhase1(creature) + creature:RegisterEvent(CheckHealth, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell("No... I can't be defeated...!", 0) + creature:RemoveEvents() +end + +RegisterCreatureEvent(BOSS_ID, 1, OnCombatStart) +RegisterCreatureEvent(BOSS_ID, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_ID, 4, OnDeath) diff --git a/Lua Script/Therazane(700815).lua b/Lua Script/Therazane(700815).lua new file mode 100644 index 0000000..619e487 --- /dev/null +++ b/Lua Script/Therazane(700815).lua @@ -0,0 +1,67 @@ +-- Therazane for AzerothCore Araxia Online by Manmadedrummer + +local BOSS_THERAZANE = 700815 +local SPELL_GROUND_SLAM = 62625 +local SPELL_UNSTABLE_EARTH_NOVA = 68902 +local SPELL_EARTHQUAKE = 64697 +local SPELL_ROCK_SHOWER = 60923 +local SPELL_STOMP = 71115 +local SPELL_GROUND_SPIKE = 59750 +local SPELL_ROCK_RUMBLE = 38777 +local SPELL_ROCK_SHARDS = 60884 +local SPELL_CAST_INTERVAL = math.random(5000, 10000) + +local function CastRandomSpell(creature) + local spells = { + SPELL_GROUND_SLAM, + SPELL_UNSTABLE_EARTH_NOVA, + SPELL_EARTHQUAKE, + SPELL_ROCK_SHOWER, + SPELL_STOMP, + SPELL_GROUND_SPIKE, + SPELL_ROCK_RUMBLE, + SPELL_ROCK_SHARDS + } + local randomSpell = spells[math.random(1, #spells)] + local target = creature:GetAITarget(0) + if target then + creature:CastSpell(target, randomSpell, true) + end +end + +local function RandomSpellCasting(eventId, delay, calls, creature) + CastRandomSpell(creature) +end + +local function OnEnterCombat(event, creature, target) + creature:SetMaxHealth(630000) + creature:SetHealth(630000) + creature:SendUnitYell("You will crumble beneath me!", 0) + creature:RegisterEvent(RandomSpellCasting, SPELL_CAST_INTERVAL, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:SendUnitYell("You cannot escape my wrath!", 0) + creature:DespawnOrUnsummon(0) +end + +local function OnKilledTarget(event, creature, victim) + creature:SendUnitYell("Another victim crushed!", 0) +end + +local function OnDeath(event, creature, killer) + creature:RemoveEvents() + creature:SendUnitYell("Defeated... but never destroyed...", 0) + creature:DespawnOrUnsummon(0) + + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, 2204.453125, -4794.402344, 64.998360, 1.033404) + end +end + +RegisterCreatureEvent(BOSS_THERAZANE, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_THERAZANE, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_THERAZANE, 3, OnKilledTarget) +RegisterCreatureEvent(BOSS_THERAZANE, 4, OnDeath) diff --git a/Lua Script/Thok(700821).lua b/Lua Script/Thok(700821).lua new file mode 100644 index 0000000..1b786cc --- /dev/null +++ b/Lua Script/Thok(700821).lua @@ -0,0 +1,102 @@ +-- Thok the Bloodthirsty made by Manmadedrummer for Araxia Online + +local BOSS_THOK = 700821 +local MAX_HEALTH = 2460681 + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local SPELL_FEARsome_ROAR = 59422 +local SPELL_DEAFENING_SCREECH = 3589 +local SPELL_TAIL_LASH = 74531 +local SPELL_SHOCK_BLAST = 63631 +local SPELL_BLOOD_FRENZY = 29859 + +local SPELL_FIXATE = 41294 +local SPELL_ACID_BREATH = 67577 +local SPELL_CORROSIVE_BLOOD = 46293 + +local SPELL_FREEZING_BREATH = 64649 +local SPELL_ICY_BLOOD = 72090 +local SPELL_FIRE_BREATH = 59197 +local SPELL_BURNING_BLOOD = 58579 + +local function CastRandomSpell(eventId, delay, repeats, creature) + if not creature or creature:GetHealthPct() <= 0 then return end + + local target = creature:GetAITarget(0) + if not target then return end + + local spellList = { + SPELL_FEARsome_ROAR, SPELL_DEAFENING_SCREECH, SPELL_TAIL_LASH, + SPELL_SHOCK_BLAST, SPELL_BLOOD_FRENZY, SPELL_FIXATE, + SPELL_ACID_BREATH, SPELL_CORROSIVE_BLOOD, SPELL_FREEZING_BREATH, + SPELL_ICY_BLOOD, SPELL_FIRE_BREATH, SPELL_BURNING_BLOOD + } + + local spell = spellList[math.random(1, #spellList)] + if spell == SPELL_BLOOD_FRENZY then + creature:CastSpell(creature, spell, true) + else + creature:CastSpell(target, spell, true) + end +end + +local function Phase1(creature) + creature:RegisterEvent(CastRandomSpell, 5000, 0) +end + +local function Phase2(creature) + creature:SendUnitYell("Your blood will fuel my fury!", 0) + creature:RemoveEvents() + creature:RegisterEvent(CastRandomSpell, 3000, 0) +end + +local function Phase3(creature) + creature:SendUnitYell("Feel the searing flames and freezing cold!", 0) + creature:RemoveEvents() + creature:RegisterEvent(CastRandomSpell, 2000, 0) +end + +local function CheckHealth(eventId, delay, repeats, creature) + if not creature or creature:GetHealthPct() <= 0 then return end + + local healthPct = creature:GetHealthPct() + + if healthPct <= 55 and currentPhase < 2 then + currentPhase = 2 + Phase2(creature) + elseif healthPct <= 30 and currentPhase < 3 then + currentPhase = 3 + Phase3(creature) + end +end + +local function OnEnterCombat(event, creature, target) + currentPhase = 1 + creature:SetMaxHealth(MAX_HEALTH) + creature:SetHealth(MAX_HEALTH) + + creature:SendUnitYell("You cannot escape the jaws of death!", 0) + + Phase1(creature) + creature:RegisterEvent(CheckHealth, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell("I... will return...", 0) + creature:RemoveEvents() + + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +RegisterCreatureEvent(BOSS_THOK, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_THOK, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_THOK, 4, OnDeath) \ No newline at end of file diff --git a/Lua Script/Tichondrius(700833).lua b/Lua Script/Tichondrius(700833).lua new file mode 100644 index 0000000..3f4b4b5 --- /dev/null +++ b/Lua Script/Tichondrius(700833).lua @@ -0,0 +1,90 @@ +-- Tichonddrius Arena Boss script by Manmadedrummer for Araxia Online + +local Tichondrius = 700833 +local SightlessEye = 21346 +local Banshee = 29646 + +local PHASE_ONE = 1 +local PHASE_TWO = 2 +local currentPhase = PHASE_ONE + +local healthOnSpawn = 1293469 + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local spellsPhaseOne = { + 65810, -- Carrion Plague + 67943, -- Seeker Swarm + 71124, -- Brand of Argus + 67760, -- Flames of Argus + 20810, -- Vampiric Aura + 48266, -- Feast of Blood + 19644, -- Tainted Blood + 39048 -- Echoes of the Void +} + +local spellsPhaseTwo = { + 500078, -- Illusionary Night + 48319, -- Carrion Nightmare + 50452 -- Phantasmal Bloodfang +} + +local function CastRandomSpellPhaseOne(event, delay, calls, creature) + local spellId = spellsPhaseOne[math.random(#spellsPhaseOne)] + creature:CastSpell(creature:GetVictim(), spellId, true) +end + +local function CastRandomSpellPhaseTwo(event, delay, calls, creature) + local spellId = spellsPhaseTwo[math.random(#spellsPhaseTwo)] + creature:CastSpell(creature:GetVictim(), spellId, true) +end + +local function PhaseTransition(event, delay, calls, creature) + if currentPhase == PHASE_ONE then + creature:RemoveEvents() + creature:RegisterEvent(CastRandomSpellPhaseTwo, 3000, 0) + creature:SendUnitYell("This nightmare is just beginning for you!", 0) + creature:SpawnCreature(SightlessEye, creature:GetX() + 2, creature:GetY(), creature:GetZ(), creature:GetO(), 2, 60000) + creature:SpawnCreature(SightlessEye, creature:GetX() - 2, creature:GetY(), creature:GetZ(), creature:GetO(), 2, 60000) + currentPhase = PHASE_TWO + creature:RegisterEvent(PhaseTransition, 30000, 1) + elseif currentPhase == PHASE_TWO then + creature:RemoveEvents() + creature:RegisterEvent(CastRandomSpellPhaseOne, 5000, 0) + creature:SpawnCreature(Banshee, creature:GetX(), creature:GetY(), creature:GetZ(), creature:GetO(), 2, 60000) + creature:SendUnitYell("Never trust a mortal to do a demon's work!", 0) + currentPhase = PHASE_ONE + creature:RegisterEvent(PhaseTransition, 90000, 1) + end +end + +local function OnEnterCombat(event, creature, target) + creature:SendUnitYell("Witness your end!", 0) + currentPhase = PHASE_ONE + creature:RegisterEvent(CastRandomSpellPhaseOne, 5000, 0) + creature:RegisterEvent(PhaseTransition, 90000, 1) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDied(event, creature, killer) + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end + creature:RemoveEvents() +end + +local function OnSpawn(event, creature) + currentPhase = PHASE_ONE + creature:SetMaxHealth(healthOnSpawn) + creature:SetHealth(healthOnSpawn) +end + +RegisterCreatureEvent(Tichondrius, 1, OnEnterCombat) +RegisterCreatureEvent(Tichondrius, 2, OnLeaveCombat) +RegisterCreatureEvent(Tichondrius, 4, OnDied) +RegisterCreatureEvent(Tichondrius, 5, OnSpawn) diff --git a/Lua Script/TigerBoss(700802).lua b/Lua Script/TigerBoss(700802).lua new file mode 100644 index 0000000..7fff1cb --- /dev/null +++ b/Lua Script/TigerBoss(700802).lua @@ -0,0 +1,77 @@ +local BOSS_ID = 700802 +local RAVAGE = 24213 +local LYNX_RUSH = 43153 +local LYNX_FURRY = 43290 +local PHASE_1 = 85 +local PHASE_2 = 60 +local PHASE_3 = 45 +local PHASE_4 = 10 + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local function CastRavage(eventId, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), RAVAGE, true) +end + +local function CastLynxRush(eventId, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), LYNX_RUSH, true) +end + +local function CastLynxFurry(eventId, delay, calls, creature) + creature:CastSpell(creature:GetVictim(), LYNX_FURRY, true) +end + +local function Phase4(event, delay, repeats, creature) + if creature:GetHealthPct() <= PHASE_4 then + creature:SendUnitYell("I WILL NOT DIE!", 0) + creature:RegisterEvent(CastLynxFurry, 7000, 0) + creature:RemoveEventById(event) + end +end + +local function Phase3(event, delay, repeats, creature) + if creature:GetHealthPct() <= PHASE_3 then + creature:SendUnitYell("RAHH!", 0) + creature:RegisterEvent(CastLynxFurry, 10000, 0) + creature:RemoveEventById(event) + creature:RegisterEvent(Phase4, 1000, 0) + end +end + +local function Phase2(event, delay, repeats, creature) + if creature:GetHealthPct() <= PHASE_2 then + creature:SendUnitYell("Feel My Claws!", 0) + creature:RegisterEvent(CastLynxRush, 8000, 0) + creature:RemoveEventById(event) + creature:RegisterEvent(Phase3, 1000, 0) + end +end + +local function OnCombatStart(event, creature, target) + creature:SendUnitYell("You are unwise to enter my lair!", 0) + creature:RegisterEvent(CastRavage, 6000, 0) + creature:RegisterEvent(Phase2, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + creature:RemoveEvents() + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +local function OnSpawn(event, creature) + creature:SetMaxHealth(877964) + creature:SetHealth(877964) +end + +RegisterCreatureEvent(BOSS_ID, 1, OnCombatStart) +RegisterCreatureEvent(BOSS_ID, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_ID, 4, OnDeath) +RegisterCreatureEvent(BOSS_ID, 5, OnSpawn) diff --git a/Lua Script/UnSok(700818).lua b/Lua Script/UnSok(700818).lua new file mode 100644 index 0000000..86af517 --- /dev/null +++ b/Lua Script/UnSok(700818).lua @@ -0,0 +1,153 @@ +local BOSS_NPC_ID = 700818 +local NPC_LIVING_AMBER = 1031 +local NPC_AMBER_MONSTROSITY = 1033 + +local SPELL_AMBER_SCALPEL = 55362 +local SPELL_PARASITIC_GROWTH = 32863 +local SPELL_AMBER_STRIKE = 56730 +local SPELL_CONCENTRATED_MUTATION = 54427 +local SPELL_VOLATILE_AMBER = 70671 +local SPELL_AMBER_EXPLOSION = 20476 +local SPELL_MASSIVE_STOMP = 60925 +local SPELL_FLING = 43665 +local SPELL_AMBER_CARAPACE = 49222 + +local STAGE_2_HEALTH = 70 +local STAGE_3_HEALTH = 30 +local ENRAGE_HEALTH_THRESHOLD = 50000 + +local MAX_HP = 1635000 + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 + +local summonedCreatures = {} + +local function CastRandomSpell(creature) + local spells = { + SPELL_AMBER_SCALPEL, + SPELL_PARASITIC_GROWTH, + SPELL_AMBER_STRIKE, + SPELL_VOLATILE_AMBER + } + local randomSpell = spells[math.random(1, #spells)] + local target = creature:GetAITarget(0) + + if target then + creature:CastSpell(target, randomSpell, true) + end +end + +local function CastAmberExplosion(eventId, delay, calls, monstrosity) + monstrosity:CastSpell(monstrosity, SPELL_AMBER_EXPLOSION, true) +end + +local function CastMassiveStomp(eventId, delay, calls, monstrosity) + monstrosity:CastSpell(monstrosity, SPELL_MASSIVE_STOMP, true) +end + +local function CastFling(eventId, delay, calls, monstrosity) + local target = monstrosity:GetAITarget(0) + if target then + monstrosity:CastSpell(target, SPELL_FLING, true) + end +end + +local function SummonAmberMonstrosity(eventId, delay, calls, creature) + local x, y, z, o = creature:GetLocation() + local monstrosity = creature:SpawnCreature(NPC_AMBER_MONSTROSITY, x + math.random(-5, 5), y + math.random(-5, 5), z, o, 3, 60000) + if monstrosity then + table.insert(summonedCreatures, monstrosity) + monstrosity:RegisterEvent(CastAmberExplosion, 15000, 0) + monstrosity:RegisterEvent(CastMassiveStomp, 20000, 0) + monstrosity:RegisterEvent(CastFling, 25000, 0) + end +end + +local function CastPhase1Spells(eventId, delay, calls, creature) + CastRandomSpell(creature) + creature:RegisterEvent(CastPhase1Spells, math.random(5000, 10000), 1) +end + +local function SummonLivingAmber(eventId, delay, calls, creature) + for i = 1, 3 do + local x, y, z, o = creature:GetLocation() + local amber = creature:SpawnCreature(NPC_LIVING_AMBER, x + math.random(-5, 5), y + math.random(-5, 5), z, o, 3, 60000) + if amber then + table.insert(summonedCreatures, amber) + end + end +end + +local function CastPhase2Spells(eventId, delay, calls, creature) + CastRandomSpell(creature) + creature:RegisterEvent(CastPhase2Spells, math.random(4000, 8000), 1) +end + +local function Phase2(creature) + creature:RemoveEvents() + creature:SendUnitYell("You must be powerful, to have come this far. Yes, yes... you will make worthy test subjects.", 0) + creature:CastSpell(creature, SPELL_AMBER_CARAPACE, true) + creature:RegisterEvent(SummonAmberMonstrosity, 15000, 1) + creature:RegisterEvent(SummonLivingAmber, 15000, 1) + creature:RegisterEvent(CastPhase2Spells, math.random(4000, 8000), 1) +end + +local function CastPhase3Spells(eventId, delay, calls, creature) + CastRandomSpell(creature) + creature:RegisterEvent(CastPhase3Spells, math.random(3000, 6000), 1) +end + +local function Phase3(creature) + creature:RemoveEvents() + creature:SendUnitYell("Feel the power of true corruption!", 0) + creature:RemoveAura(SPELL_AMBER_CARAPACE) + creature:CastSpell(creature, SPELL_CONCENTRATED_MUTATION, true) + creature:RegisterEvent(CastPhase3Spells, math.random(3000, 6000), 1) +end + +local function CheckEnrage(creature) + if creature:GetHealth() <= ENRAGE_HEALTH_THRESHOLD then + if not creature:HasAura(SPELL_CONCENTRATED_MUTATION) then + creature:SendUnitYell("This isn't over yet! Witness my true power!", 0) + creature:CastSpell(creature, SPELL_CONCENTRATED_MUTATION, true) + end + end +end + +local function CheckHealthPhase(eventId, delay, calls, creature) + local healthPct = creature:GetHealthPct() + if healthPct <= STAGE_2_HEALTH and healthPct > STAGE_3_HEALTH then + Phase2(creature) + elseif healthPct <= STAGE_3_HEALTH then + Phase3(creature) + end + + CheckEnrage(creature) +end + +local function OnEnterCombat(event, creature, target) + creature:SetMaxHealth(MAX_HP) + creature:SetHealth(MAX_HP) + + creature:SendUnitYell("Ah, I see you have found a few of my experiments. Step closer, and you may witness the full glory of my work here.", 0) + creature:RegisterEvent(CastPhase1Spells, math.random(5000, 10000), 1) + creature:RegisterEvent(CheckHealthPhase, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell("Forgive me, Empress....", 0) + creature:RemoveEvents() + + if killer:IsPlayer() then + killer:Teleport(1, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +RegisterCreatureEvent(BOSS_NPC_ID, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_NPC_ID, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_NPC_ID, 4, OnDeath) diff --git a/Lua Script/Varimathras(700835).lua b/Lua Script/Varimathras(700835).lua new file mode 100644 index 0000000..c8bae0f --- /dev/null +++ b/Lua Script/Varimathras(700835).lua @@ -0,0 +1,100 @@ +-- Varimathras Arena Boss script by Manmadedrummer for Araxia Online + +local VARIMATHRAS_NPC_ID = 700835 + +local PHASE_ONE = 1 +local SPELL_INTERVAL_PHASE_1 = 2000 -- 2 seconds +local AURA_CHANGE_INTERVAL = 20000 -- 20 seconds +local HEALTH_ON_SPAWN = 984400 + +-- NPC and Spell IDs +local SPELL_MISERY = 59856 +local SPELL_ALONE_IN_THE_DARKNESS = 71106 +local SPELL_SHADOW_STRIKE = 40685 +local SPELL_DARK_FISSURE = 59127 +local SPELL_MARKED_PREY = 67882 +local SPELL_NECROTIC_EMBRACE = 72492 +local SPELL_ECHOES_OF_DOOM = 71124 + +-- Aura IDs +local AURA_FLAMES = 22436 +local AURA_FROST = 71052 +local AURA_FEL = 75887 +local AURA_SHADOWS = 69491 +local AURA_NECROTIC = 55593 + +local auraCycle = {AURA_FLAMES, AURA_FROST, AURA_FEL, AURA_SHADOWS, AURA_NECROTIC} +local currentAuraIndex = 1 + +local function CastRandomSpell(event, delay, calls, creature) + local spellTable = { + SPELL_MISERY, + SPELL_ALONE_IN_THE_DARKNESS, + SPELL_SHADOW_STRIKE, + SPELL_DARK_FISSURE, + SPELL_MARKED_PREY, + SPELL_NECROTIC_EMBRACE, + SPELL_ECHOES_OF_DOOM, + } + local spellToCast = spellTable[math.random(1, #spellTable)] + creature:CastSpell(creature:GetVictim(), spellToCast, false) +end + +local function ChangeAura(event, delay, calls, creature) + if currentAuraIndex > #auraCycle then + currentAuraIndex = 1 + -- Shuffle the aura cycle + for i = #auraCycle, 2, -1 do + local j = math.random(1, i) + auraCycle[i], auraCycle[j] = auraCycle[j], auraCycle[i] + end + end + local auraToApply = auraCycle[currentAuraIndex] + currentAuraIndex = currentAuraIndex + 1 + + creature:RemoveAllAuras() + creature:AddAura(auraToApply, creature) + + -- Different quotes for different auras + local auraQuotes = { + [AURA_FLAMES] = "Time to die!", + [AURA_FROST] = "You think you can match the might of a dreadlord?!", + [AURA_FEL] = "None can oppose me.", + [AURA_SHADOWS] = "Don't waste my time.", + [AURA_NECROTIC] = "I'm always on the winning side." + } + if auraQuotes[auraToApply] then + creature:SendUnitYell(auraQuotes[auraToApply], 0) + end +end + +local function OnEnterCombat(event, creature, target) + creature:SendUnitYell("Vanquish the weak!", 0) + creature:RegisterEvent(CastRandomSpell, SPELL_INTERVAL_PHASE_1, 0) + creature:RegisterEvent(ChangeAura, AURA_CHANGE_INTERVAL, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell("For Sylvanas!", 0) + creature:RemoveEvents() + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(1, 2204.453125, -4794.402344, 64.998360, 1.033404) + end +end + +local function OnSpawn(event, creature) + creature:SetMaxHealth(HEALTH_ON_SPAWN) + creature:SetHealth(HEALTH_ON_SPAWN) +end + +RegisterCreatureEvent(VARIMATHRAS_NPC_ID, 5, OnSpawn) +RegisterCreatureEvent(VARIMATHRAS_NPC_ID, 1, OnEnterCombat) +RegisterCreatureEvent(VARIMATHRAS_NPC_ID, 2, OnLeaveCombat) +RegisterCreatureEvent(VARIMATHRAS_NPC_ID, 4, OnDeath) + diff --git a/Lua Script/Viryx(700826).lua b/Lua Script/Viryx(700826).lua new file mode 100644 index 0000000..322b635 --- /dev/null +++ b/Lua Script/Viryx(700826).lua @@ -0,0 +1,99 @@ +-- High Sage Viryx Arena Boss made by Manmadedrummer for Araxia Online + +local BOSS_VIRYX = 700826 +local MAX_HEALTH = 390775 +local SPELL_CAST_DOWN = 29522 +local NPC_SOLAR_ZEALOT = 32228 +local SPELL_LENS_FLARE = 29522 +local SPELL_SOLAR_BURST = 67330 +local SPELL_FIRE_SHIELD = 18968 +local SPELL_DIVINE_SHIELD = 41367 +local HEALTH_THRESHOLD_PHASE2 = 30 +local HEALTH_SHIELD_75 = 75 +local HEALTH_SHIELD_50 = 50 +local HEALTH_SHIELD_25 = 25 +local QUOTE_START = "Behold the might of the Arakkoa!" +local QUOTE_SUMMON = "Servants, protect your master!" +local QUOTE_LOW_HEALTH = "We will always... soar...." +local DEATH_QUOTE = "As long as we rule the skies you will always be beneath us!" +local currentPhase = 1 +local shieldCasted75 = false +local shieldCasted50 = false +local shieldCasted25 = false + +local function CastRandomSpell(eventId, delay, pCall, creature) + if not creature or creature:GetHealthPct() <= 0 then return end + local target = creature:GetAITarget(0) + if not target then return end + local spellList = {SPELL_LENS_FLARE, SPELL_SOLAR_BURST} + local randomSpell = spellList[math.random(#spellList)] + creature:CastSpell(target, randomSpell, true) +end + +local function SummonSolarZealots(creature) + local x, y, z = creature:GetLocation() + for i = 1, 3 do + creature:SpawnCreature(NPC_SOLAR_ZEALOT, x + math.random(-5, 5), y + math.random(-5, 5), z, 0, 3, 60000) + end + creature:SendUnitYell(QUOTE_SUMMON, 0) +end + +local function CastShields(creature) + creature:CastSpell(creature, SPELL_FIRE_SHIELD, true) + creature:CastSpell(creature, SPELL_DIVINE_SHIELD, true) + SummonSolarZealots(creature) +end + +local function CheckHealth(eventId, delay, pCall, creature) + if not creature or creature:GetHealthPct() <= 0 then return end + local healthPct = creature:GetHealthPct() + if healthPct <= HEALTH_SHIELD_75 and not shieldCasted75 then + shieldCasted75 = true + CastShields(creature) + end + if healthPct <= HEALTH_SHIELD_50 and not shieldCasted50 then + shieldCasted50 = true + CastShields(creature) + end + if healthPct <= HEALTH_SHIELD_25 and not shieldCasted25 then + shieldCasted25 = true + CastShields(creature) + end + if healthPct <= HEALTH_THRESHOLD_PHASE2 and currentPhase == 1 then + currentPhase = 2 + creature:SendUnitYell(QUOTE_LOW_HEALTH, 0) + creature:RemoveEvents() + creature:RegisterEvent(CastRandomSpell, 1000, 0) + end +end + +local function OnEnterCombat(event, creature, target) + currentPhase = 1 + shieldCasted75 = false + shieldCasted50 = false + shieldCasted25 = false + creature:SetMaxHealth(MAX_HEALTH) + creature:SetHealth(MAX_HEALTH) + creature:SendUnitYell(QUOTE_START, 0) + SummonSolarZealots(creature) + creature:RegisterEvent(CastRandomSpell, 3000, 0) + creature:RegisterEvent(CheckHealth, 1000, 0) +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell(DEATH_QUOTE, 0) + local zealots = creature:GetCreaturesInRange(50, NPC_SOLAR_ZEALOT) + for _, zealot in ipairs(zealots) do + zealot:DespawnOrUnsummon() + end + creature:RemoveEvents() +end + +RegisterCreatureEvent(BOSS_VIRYX, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_VIRYX, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_VIRYX, 4, OnDeath) diff --git a/Lua Script/Xavius(700834).lua b/Lua Script/Xavius(700834).lua new file mode 100644 index 0000000..22f86d0 --- /dev/null +++ b/Lua Script/Xavius(700834).lua @@ -0,0 +1,129 @@ +-- Xavius Arena Boss script by Manmadedrummer for Araxia Online + +local XAVIUS_NPC_ID = 700834 +local PHASE_ONE = 1 +local PHASE_TWO = 2 +local PHASE_THREE = 3 +local HEALTH_ON_SPAWN = 1193755 +local PHASE_TWO_HEALTH = 65 +local PHASE_THREE_HEALTH = 30 + +local SPELL_DARKENING_SOUL = 68156 +local SPELL_NIGHTMARE_BLADES = 500075 +local SPELL_CORRUPTING_NOVA = 40737 +local SPELL_TORMENTING_SWIPE = 45150 +local SPELL_BLACKENED_SOUL = 31293 +local SPELL_BLACKENED_TAINTING = 68090 +local SPELL_CORRUPTION_METEOR = 57467 +local SPELL_BONDS_OF_TERROR = 65857 +local SPELL_NIGHTMARE_INFUSION = 72448 +local SPELL_DARK_RUINATION = 41445 +local SPELL_TAINTED_DISCHARGE = 67876 +local SPELL_NIGHTMARE_BOLT = 75384 + +local NPC_HARBINGER_OF_HORROR = 32278 +local NPC_LURKING_TERROR = 18770 +local NPC_PROTEAN_NIGHTMARE = 20864 +local NPC_NIGHTMARE_TENTACLE = 16235 + +local currentPhase = PHASE_ONE +local npcSummonedInPhase = false + +local function CastRandomSpellInPhase(eventId, delay, repeats, creature) + local spellTable = {} + if currentPhase == PHASE_ONE then + spellTable = {SPELL_DARKENING_SOUL, SPELL_NIGHTMARE_BLADES, SPELL_CORRUPTING_NOVA, SPELL_TORMENTING_SWIPE} + elseif currentPhase == PHASE_TWO then + spellTable = {SPELL_BLACKENED_SOUL, SPELL_BLACKENED_TAINTING, SPELL_CORRUPTION_METEOR, SPELL_BONDS_OF_TERROR, SPELL_NIGHTMARE_INFUSION, SPELL_DARK_RUINATION, SPELL_TAINTED_DISCHARGE} + elseif currentPhase == PHASE_THREE then + spellTable = {SPELL_BLACKENED_SOUL, SPELL_NIGHTMARE_BLADES, SPELL_NIGHTMARE_INFUSION, SPELL_CORRUPTION_METEOR, SPELL_NIGHTMARE_BOLT} + end + local spellToCast = spellTable[math.random(1, #spellTable)] + creature:CastSpell(creature:GetVictim(), spellToCast, false) +end + +local function Phase1(creature) + creature:RegisterEvent(CastRandomSpellInPhase, 6000, 0) + creature:RegisterEvent(function(eventId, delay, repeats, creature) + creature:SpawnCreature(NPC_LURKING_TERROR, creature:GetX(), creature:GetY(), creature:GetZ(), creature:GetO(), 2, 60000) + end, 15000, 1) + creature:RegisterEvent(function(eventId, delay, repeats, creature) + creature:SpawnCreature(NPC_HARBINGER_OF_HORROR, creature:GetX(), creature:GetY(), creature:GetZ(), creature:GetO(), 2, 60000) + end, 20000, 1) +end + +local function Phase2(creature) + creature:RemoveEvents() + creature:SendUnitYell("You will crumble beneath my power!", 0) + for i = 1, 2 do + creature:SpawnCreature(NPC_PROTEAN_NIGHTMARE, creature:GetX(), creature:GetY(), creature:GetZ(), creature:GetO(), 2, 60000) + end + creature:RegisterEvent(CastRandomSpellInPhase, 4000, 0) +end + +local function Phase3(creature) + creature:RemoveEvents() + creature:SendUnitYell("My victory is absolute. The power of Nightmare grows!", 0) + creature:SpawnCreature(NPC_NIGHTMARE_TENTACLE, creature:GetX(), creature:GetY(), creature:GetZ(), creature:GetO(), 2, 60000) + creature:RegisterEvent(CastRandomSpellInPhase, 2000, 0) +end + +local function OnSpawn(event, creature) + creature:SetMaxHealth(HEALTH_ON_SPAWN) + creature:SetHealth(HEALTH_ON_SPAWN) +end + +local function OnEnterCombat(event, creature) + creature:SendUnitYell("Feel the devastation of the Nightmare!", 0) + Phase1(creature) +end + +local function OnHealthChange(event, creature, damage) + local currentHealthPct = creature:GetHealthPct() + if currentHealthPct < PHASE_TWO_HEALTH and currentPhase == PHASE_ONE then + currentPhase = PHASE_TWO + npcSummonedInPhase = false + Phase2(creature) + elseif currentHealthPct < PHASE_THREE_HEALTH and currentPhase == PHASE_TWO then + currentPhase = PHASE_THREE + npcSummonedInPhase = false + Phase3(creature) + end +end + +local function DespawnSummons(creature, npcID) + local summons = creature:GetCreaturesInRange(100, npcID) + for _, summon in ipairs(summons) do + summon:DespawnOrUnsummon() + end +end + +local function OnDeath(event, creature, killer) + creature:SendUnitYell("My work... left... unfinished...", 0) + DespawnSummons(creature, NPC_HARBINGER_OF_HORROR) + DespawnSummons(creature, NPC_LURKING_TERROR) + DespawnSummons(creature, NPC_PROTEAN_NIGHTMARE) + DespawnSummons(creature, NPC_NIGHTMARE_TENTACLE) + local playersInRange = creature:GetPlayersInRange(100) + for _, player in ipairs(playersInRange) do + player:Teleport(1, 2204.453125, -4794.402344, 64.998360, 1.033404) + end +end + +local function OnKillPlayer(event, creature, victim) + creature:SendUnitYell("Your souls are mine, woven for all time into the fabric of the Nightmare!", 0) +end + +-- Added OnLeaveCombat function to despawn the boss upon leaving combat +local function OnLeaveCombat(event, creature) + creature:SendUnitYell("You cannot escape the Nightmare forever...", 0) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +RegisterCreatureEvent(XAVIUS_NPC_ID, 5, OnSpawn) +RegisterCreatureEvent(XAVIUS_NPC_ID, 1, OnEnterCombat) +RegisterCreatureEvent(XAVIUS_NPC_ID, 9, OnHealthChange) +RegisterCreatureEvent(XAVIUS_NPC_ID, 4, OnDeath) +RegisterCreatureEvent(XAVIUS_NPC_ID, 3, OnKillPlayer) +RegisterCreatureEvent(XAVIUS_NPC_ID, 2, OnLeaveCombat) -- Register OnLeaveCombat event diff --git a/Lua Script/Zorlok(700819).lua b/Lua Script/Zorlok(700819).lua new file mode 100644 index 0000000..644f0a8 --- /dev/null +++ b/Lua Script/Zorlok(700819).lua @@ -0,0 +1,93 @@ +--Zor'Lok Boss script made by Manmadedrummer for Araxia Online + +local BOSS_ZORLOK = 700819 +local MAX_HEALTH = 2057000 + +local SPELL_INHALE = 29158 +local SPELL_EXHALE = 60960 +local SPELL_PHEROMONES_OF_ZEAL = 61463 +local SPELL_ATTENUATION = 75418 +local SPELL_FORCE_AND_VERVE = 59971 + +local SPELL_INHALE_PHEROMONES = 15716 +local SPELL_ECHOES_OF_POWER = 58832 +local SPELL_SONG_OF_THE_EMPRESS = 57061 +local SPELL_ECHO_OF_ATTENUATION = 68835 +local SPELL_ECHO_OF_FORCE_AND_VERVE = 53071 + +local teleportX, teleportY, teleportZ, teleportOrientation = 2204.453125, -4794.402344, 64.998360, 1.033404 +local TELEPORT_MAP_ID = 1 + +local QUOTES = { + "And so it falls to us, Her chosen voice.", + "Behold the voice of Her divine wrath.", + "Her happiness is our reward, her sorrow our failure.", + "Never to question, nor to contemplate; we simply act.", + "Ours is but to serve in Her divine name.", + "Ours is but to serve; yours is but to die.", + "We fight, toil, and serve so that Her vision for us is made reality." +} + +local DEATH_QUOTE = "We will not give in to the despair of the dark void. If Her will for us is to perish, then it shall be so." + +local SPELL_INTERVAL_PHASE1 = 7000 +local SPELL_INTERVAL_PHASE2 = 5000 + +local phaseTwoStarted = false + +local function PhaseOneSpells(event, delay, pCall, creature) + local phase1Spells = {SPELL_INHALE, SPELL_EXHALE, SPELL_PHEROMONES_OF_ZEAL, SPELL_ATTENUATION, SPELL_FORCE_AND_VERVE} + creature:CastSpell(creature:GetVictim(), phase1Spells[math.random(#phase1Spells)], true) +end + +local function PhaseTwoSpells(event, delay, pCall, creature) + local phase2Spells = { + SPELL_INHALE, SPELL_EXHALE, SPELL_PHEROMONES_OF_ZEAL, SPELL_ATTENUATION, SPELL_FORCE_AND_VERVE, + SPELL_INHALE_PHEROMONES, SPELL_ECHOES_OF_POWER, SPELL_SONG_OF_THE_EMPRESS, SPELL_ECHO_OF_ATTENUATION, SPELL_ECHO_OF_FORCE_AND_VERVE + } + creature:CastSpell(creature:GetVictim(), phase2Spells[math.random(#phase2Spells)], true) +end + +local function OnDamageTaken(event, creature, attacker, damage) + if not phaseTwoStarted and creature:GetHealthPct() <= 80 then + phaseTwoStarted = true + creature:SendUnitYell("Witness true power!", 0) + creature:RemoveEvents() + creature:RegisterEvent(PhaseTwoSpells, SPELL_INTERVAL_PHASE2, 0) + end +end + +local function TeleportNearbyPlayers(creature) + local players = creature:GetPlayersInRange(10) + for _, player in ipairs(players) do + player:Teleport(TELEPORT_MAP_ID, teleportX, teleportY, teleportZ, teleportOrientation) + end +end + +local function OnSpawn(event, creature) + creature:SetMaxHealth(MAX_HEALTH) + creature:SetHealth(MAX_HEALTH) +end + +local function OnEnterCombat(event, creature, target) + creature:SendUnitYell(QUOTES[math.random(#QUOTES)], 0) + phaseTwoStarted = false + creature:RegisterEvent(PhaseOneSpells, SPELL_INTERVAL_PHASE1, 0) +end + +local function OnDied(event, creature, killer) + creature:SendUnitYell(DEATH_QUOTE, 0) + TeleportNearbyPlayers(creature) + creature:RemoveEvents() +end + +local function OnLeaveCombat(event, creature) + creature:RemoveEvents() + creature:DespawnOrUnsummon(0) +end + +RegisterCreatureEvent(BOSS_ZORLOK, 1, OnEnterCombat) +RegisterCreatureEvent(BOSS_ZORLOK, 2, OnLeaveCombat) +RegisterCreatureEvent(BOSS_ZORLOK, 4, OnDied) +RegisterCreatureEvent(BOSS_ZORLOK, 5, OnSpawn) +RegisterCreatureEvent(BOSS_ZORLOK, 9, OnDamageTaken) \ No newline at end of file