Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,037 changes: 0 additions & 2,037 deletions customWorldboss.lua

This file was deleted.

28 changes: 14 additions & 14 deletions database/world/customWorldboss.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,47 +12,47 @@ INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entr
-- Party-only NPC:
(1112999, 0, 0, 0, 0, 0, 11062, 0, 0, 0, 'Amber Haze', 'Dark Queen of Timeshifts', 62001, 63, 63, 0, 35, 1, 1, 1.14286, 1, 0, 0, 1, 2000, 2000, 1, 1, 1, 33536, 2048, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1.35, 1, 1, 0, 0, 1, 0, 0, 2, '', 0),
-- Event 1 Boss:
(1112001, 0, 0, 0, 0, 0, 3456, 0, 0, 0, 'Glorifrir Flintshoulder', '', 0, 50, 50, 0, 63, 0, 1, 2, 3, 3, 0, 30, 2000, 2000, 1, 1, 1, 32832, 2048, 0, 0, 0, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 450, 1, 1, 0, 0, 1, 634077055, 0, 256, '', 0),
(1112001, 0, 0, 0, 0, 0, 3456, 0, 0, 0, 'Glorifrir Flintshoulder', '', 0, 73, 73, 0, 63, 0, 1, 2, 3, 3, 0, 30, 2000, 2000, 1, 1, 1, 32832, 2048, 0, 0, 0, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 450, 1, 1, 0, 0, 1, 634077055, 0, 256, '', 0),
-- Custom Chromie 1:
(1112002, 0, 0, 0, 0, 0, 10008, 0, 0, 0, 'Chromie', '', 62001, 63, 63, 0, 35, 1, 1, 1.14286, 1, 0, 0, 1, 2000, 2000, 1, 1, 1, 33536, 2048, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1.35, 1, 1, 0, 0, 1, 0, 0, 2, '', 0),
-- Event 1 Add:
(1112003, 0, 0, 0, 0, 0, 21443, 0, 0, 0, 'Zombie Captain', '', 0, 50, 50, 0, 415, 0, 1, 2, 1, 1, 0, 10, 2000, 2000, 1, 1, 1, 0, 2048, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 60, 1, 1, 0, 0, 1, 667631487, 0, 256, '', 0),
(1112003, 0, 0, 0, 0, 0, 21443, 0, 0, 0, 'Zombie Captain', '', 0, 73, 73, 0, 415, 0, 1, 2, 1, 1, 0, 10, 2000, 2000, 1, 1, 1, 0, 2048, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 60, 1, 1, 0, 0, 1, 667631487, 0, 256, '', 0),
-- Event 2 Boss:
(1112011, 0, 0, 0, 0, 0, 24722, 0, 0, 0, 'Pondulum of Deem', '', 0, 40, 40, 0, 63, 0, 1, 2, 3, 3, 0, 30, 2000, 2000, 1, 1, 1, 32832, 2048, 0, 0, 0, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 300, 1, 1, 0, 0, 1, 667631231, 0, 0, '', 0),
(1112011, 0, 0, 0, 0, 0, 24722, 0, 0, 0, 'Pondulum of Deem', '', 0, 73, 73, 0, 63, 0, 1, 2, 3, 3, 0, 30, 2000, 2000, 1, 1, 1, 32832, 2048, 0, 0, 0, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 300, 1, 1, 0, 0, 1, 667631231, 0, 0, '', 0),
-- Custom Chromie 2:
(1112012, 0, 0, 0, 0, 0, 10008, 0, 0, 0, 'Chromie', '', 62002, 63, 63, 0, 35, 1, 1, 1.14286, 1, 0, 0, 1, 2000, 2000, 1, 1, 1, 33536, 2048, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1.35, 1, 1, 0, 0, 1, 0, 0, 2, '', 0),
-- Event 2 Add:
(1112013, 0, 0, 0, 0, 0, 17953, 0, 0, 0, 'Seawitch', '', 0, 40, 40, 0, 63, 0, 1, 2, 1, 1, 0, 10, 2000, 2000, 1, 1, 8, 0, 2048, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 80, 100, 1, 0, 0, 1, 634077055, 0, 256, '', 0),
(1112013, 0, 0, 0, 0, 0, 17953, 0, 0, 0, 'Seawitch', '', 0, 73, 73, 0, 63, 0, 1, 2, 1, 1, 0, 10, 2000, 2000, 1, 1, 8, 0, 2048, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 80, 100, 1, 0, 0, 1, 634077055, 0, 256, '', 0),
-- Event 3 Boss:
(1112021, 0, 0, 0, 0, 0, 17557, 0, 0, 0, 'Crocolisk Dundee', '', 0, 50, 50, 0, 63, 0, 1, 2, 2, 3, 0, 15, 2000, 2000, 1, 1, 1, 32832, 2048, 0, 0, 0, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 300, 100, 1, 0, 0, 1, 667631231, 0, 0, '', 0),
(1112021, 0, 0, 0, 0, 0, 17557, 0, 0, 0, 'Crocolisk Dundee', '', 0, 73, 73, 0, 63, 0, 1, 2, 2, 3, 0, 15, 2000, 2000, 1, 1, 1, 32832, 2048, 0, 0, 0, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 300, 100, 1, 0, 0, 1, 667631231, 0, 0, '', 0),
-- Custom Chromie 3:
(1112022, 0, 0, 0, 0, 0, 10008, 0, 0, 0, 'Chromie', '', 62003, 63, 63, 0, 35, 1, 1, 1.14286, 1, 0, 0, 1, 2000, 2000, 1, 1, 1, 33536, 2048, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1.35, 1, 1, 0, 0, 1, 0, 0, 2, '', 0),
-- Event 3 Add:
(1112023, 0, 0, 0, 0, 0, 1034, 0, 0, 0, 'Aligator Minion', '', 0, 50, 50, 0, 63, 0, 1, 2, 1, 1, 0, 5, 2000, 2000, 1, 1, 8, 0, 2048, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 50, 100, 1, 0, 0, 1, 667631227, 0, 256, '', 0),
(1112023, 0, 0, 0, 0, 0, 1034, 0, 0, 0, 'Aligator Minion', '', 0, 73, 73, 0, 63, 0, 1, 2, 1, 1, 0, 5, 2000, 2000, 1, 1, 8, 0, 2048, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 50, 100, 1, 0, 0, 1, 667631227, 0, 256, '', 0),
-- Event 4 Boss:
(1112031, 0, 0, 0, 0, 0, 17557, 0, 0, 0, 'Crocolisk Bunbee', '', 0, 50, 50, 0, 63, 0, 1, 2, 2, 3, 0, 25, 2000, 2000, 1, 1, 1, 32832, 2048, 0, 0, 0, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 300, 100, 1, 0, 0, 1, 667631231, 0, 0, '', 0),
(1112031, 0, 0, 0, 0, 0, 17557, 0, 0, 0, 'Crocolisk Bunbee', '', 0, 73, 73, 0, 63, 0, 1, 2, 2, 3, 0, 25, 2000, 2000, 1, 1, 1, 32832, 2048, 0, 0, 0, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 300, 100, 1, 0, 0, 1, 667631231, 0, 0, '', 0),
-- Custom Chromie 4:
(1112032, 0, 0, 0, 0, 0, 10008, 0, 0, 0, 'Chromie', '', 62004, 63, 63, 0, 35, 1, 1, 1.14286, 1, 0, 0, 1, 2000, 2000, 1, 1, 1, 33536, 2048, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1.35, 1, 1, 0, 0, 1, 0, 0, 2, '', 0),
-- Event 4 Add:
(1112033, 0, 0, 0, 0, 0, 1034, 0, 0, 0, 'Aligator Pet', '', 0, 50, 50, 0, 63, 0, 1, 2, 1, 1, 0, 5, 2000, 2000, 1, 1, 8, 0, 2048, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 50, 100, 1, 0, 0, 1, 667631227, 0, 256, '', 0),
(1112033, 0, 0, 0, 0, 0, 1034, 0, 0, 0, 'Aligator Pet', '', 0, 73, 73, 0, 63, 0, 1, 2, 1, 1, 0, 5, 2000, 2000, 1, 1, 8, 0, 2048, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 50, 100, 1, 0, 0, 1, 667631227, 0, 256, '', 0),
-- Event 4 Boss:
(1112041, 0, 0, 0, 0, 0, 17557, 0, 0, 0, 'Crocolisk Rundee', '', 0, 60, 60, 0, 63, 0, 1, 2, 2, 3, 0, 30, 2000, 2000, 1, 1, 1, 32832, 2048, 0, 0, 0, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 600, 100, 1, 0, 0, 1, 667631231, 0, 0, '', 0),
(1112041, 0, 0, 0, 0, 0, 17557, 0, 0, 0, 'Crocolisk Rundee', '', 0, 73, 73, 0, 63, 0, 1, 2, 2, 3, 0, 30, 2000, 2000, 1, 1, 1, 32832, 2048, 0, 0, 0, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 600, 100, 1, 0, 0, 1, 667631231, 0, 0, '', 0),
-- Custom Chromie 4:
(1112042, 0, 0, 0, 0, 0, 10008, 0, 0, 0, 'Chromie', '', 62005, 63, 63, 0, 35, 1, 1, 1.14286, 1, 0, 0, 1, 2000, 2000, 1, 1, 1, 33536, 2048, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1.35, 1, 1, 0, 0, 1, 0, 0, 2, '', 0),
-- Event 4 Add:
(1112043, 0, 0, 0, 0, 0, 1034, 0, 0, 0, 'Aligator Guard', '', 0, 60, 60, 0, 63, 0, 1, 2, 1, 1, 0, 15, 2000, 2000, 1, 1, 8, 0, 2048, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 70, 100, 1, 0, 0, 1, 667631227, 0, 256, '', 0),
(1112043, 0, 0, 0, 0, 0, 1034, 0, 0, 0, 'Aligator Guard', '', 0, 73, 73, 0, 63, 0, 1, 2, 1, 1, 0, 15, 2000, 2000, 1, 1, 8, 0, 2048, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 70, 100, 1, 0, 0, 1, 667631227, 0, 256, '', 0),
-- Event 6 Boss:
(1112051, 0, 0, 0, 0, 0, 9475, 0, 0, 0, 'One-Three-Three-Seven', '', 0, 60, 60, 0, 63, 0, 1, 2, 2, 3, 0, 30, 2000, 2000, 1, 1, 1, 32832, 2048, 0, 0, 0, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 1200, 100, 1, 0, 0, 1, 667631231, 0, 0, '', 0),
(1112051, 0, 0, 0, 0, 0, 9475, 0, 0, 0, 'One-Three-Three-Seven', '', 0, 73, 73, 0, 63, 0, 1, 2, 2, 3, 0, 30, 2000, 2000, 1, 1, 1, 32832, 2048, 0, 0, 0, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 1200, 100, 1, 0, 0, 1, 667631231, 0, 0, '', 0),
-- Custom Chromie 6:
(1112052, 0, 0, 0, 0, 0, 10008, 0, 0, 0, 'Chromie', '', 62006, 63, 63, 0, 35, 1, 1, 1.14286, 1, 0, 0, 1, 2000, 2000, 1, 1, 1, 33536, 2048, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1.35, 1, 1, 0, 0, 1, 0, 0, 2, '', 0),
-- Event 6 Add:
(1112053, 0, 0, 0, 0, 0, 8409, 0, 0, 0, 'Ragnarix Qt', '', 0, 60, 60, 0, 63, 0, 1, 2, 2, 1, 0, 15, 2000, 2000, 1, 1, 8, 0, 2048, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 600, 100, 1, 0, 0, 1, 667631227, 0, 256, '', 0),
(1112053, 0, 0, 0, 0, 0, 8409, 0, 0, 0, 'Ragnarix Qt', '', 0, 73, 73, 0, 63, 0, 1, 2, 2, 1, 0, 15, 2000, 2000, 1, 1, 8, 0, 2048, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 600, 100, 1, 0, 0, 1, 667631227, 0, 256, '', 0),
-- Event 7 Boss:
(1112061, 0, 0, 0, 0, 0, 15656, 0, 0, 0, 'Big Bad Bug', '...not related to coding.', 0, 60, 60, 0, 63, 0, 1, 1, 2, 3, 0, 30, 2000, 2000, 1, 1, 1, 32832, 2048, 0, 0, 0, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 1200, 100, 1, 0, 0, 1, 667631231, 0, 0, '', 0),
(1112061, 0, 0, 0, 0, 0, 15656, 0, 0, 0, 'Big Bad Bug', '...not related to coding.', 0, 73, 73, 0, 63, 0, 1, 1, 2, 3, 0, 30, 2000, 2000, 1, 1, 1, 32832, 2048, 0, 0, 0, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 1200, 100, 1, 0, 0, 1, 667631231, 0, 0, '', 0),
-- Custom Chromie 7:
(1112062, 0, 0, 0, 0, 0, 10008, 0, 0, 0, 'Chromie', '', 62007, 63, 63, 0, 35, 1, 1, 1.14286, 1, 0, 0, 1, 2000, 2000, 1, 1, 1, 33536, 2048, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1.35, 1, 1, 0, 0, 1, 0, 0, 2, '', 0),
-- Event 7 Add:
(1112063, 0, 0, 0, 0, 0, 21955, 0, 0, 0, 'Bug\'s Bunny', '', 0, 62, 62, 0, 63, 0, 1, 5, 2, 1, 0, 15, 2000, 2000, 1, 1, 8, 0, 2048, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 600, 100, 1, 0, 0, 1, 667631227, 0, 256, '', 0);
(1112063, 0, 0, 0, 0, 0, 21955, 0, 0, 0, 'Bug\'s Bunny', '', 0, 73, 73, 0, 63, 0, 1, 5, 2, 1, 0, 15, 2000, 2000, 1, 1, 8, 0, 2048, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 1, 600, 100, 1, 0, 0, 1, 667631227, 0, 256, '', 0);

-- Npc_text
SET @NPC_TEXT = 'Greetings, $n. One of the invaders of the timeline is in a nearby timenode. I might be able to make them visible for your eyes and vulnerable to your magic and weapons, but i can not aid you in this fight while i am maintaining the spell. Are you ready to face the worst this timeline has to deal with?\n';
Expand Down
File renamed without changes.
232 changes: 232 additions & 0 deletions scripts/custom_boss_events/eventBoss1.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@
--Copyright (C) 2022-2024 https://github.com/55Honey
--
--This program is free software: you can redistribute it and/or modify
--it under the terms of the GNU Affero General Public License as published by
--the Free Software Foundation, either version 3 of the License, or
--(at your option) any later version.
--
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--GNU Affero General Public License for more details.
--
--You should have received a copy of the GNU Affero General Public License
--along with this program. If not, see <http://www.gnu.org/licenses/>.
--
--
--
--
-- Created by IntelliJ IDEA.
-- User: Silvia
-- Date: 05/02/2024
-- Time: 12:31
-- Originally created by Honey for Azerothcore
-- requires mod-eluna

if not ebs then
require('eventBosses')
end

local bossNPC = {}
local addNPC = {}

------------------------------------------------------------------------------------------
-- The data below is mandatory for the main script to work with the encounter. --
-- Adjust as needed. The encounterId must be unique for each encounter. --
-- entry ..XX1 is the boss. --
-- entry ..XX2 is the gossip NPC. --
-- entry ..XX3 is the add. --
-- For encounterId 2, the entries are 1112011, 1112012, 1112013. Add +10 per Id. --
------------------------------------------------------------------------------------------

local encounterId = 1

ebs.encounter[encounterId] = {
-- type entry map x y z o despawnTime
["npc"] = { TYPE_CREATURE, 1112002, 1, 5507.3, -3685.5, 1594.3, 1.97, 0 }, -- gossip NPC for players to interact with
["npcText"] = 91111, -- gossip NPC text ID
["bossEntry"] = 1112001, -- boss entry (auto summoned)
["addEntry"] = 1112003, -- add entry (auto summoned, if addAmount > 0)
["addHealthModifierParty"] = 0.2, -- modifier for add health in 5man mode
["addAmount"] = 3 -- amount of adds to spawn right at the start of the encounter
}

------------------------------------------------------------------------------------------
-- There are no changes required to this part. It is mandatory for the script to work. --
-- Custom scripting goes to the designated section at the bottom. --
------------------------------------------------------------------------------------------

local addDownCounter = {}

function bossNPC.onEnterCombat( event, creature, target )
creature:CallAssistance()
creature:CallForHelp( 200 )
local difficulty = creature:GetData('ebs_difficulty')
bossNPC.CustomEnterCombat( creature, target, difficulty )
end

function bossNPC.reset( event, creature )
creature:RemoveEvents()
local difficulty = creature:GetData('ebs_difficulty')
bossNPC.CustomReset( creature, difficulty )
ebs.bossReset( event, creature )
end

function addNPC.onEnterCombat( event, add, target )
add:CallAssistance()
local difficulty = add:GetData('ebs_difficulty')
addNPC.CustomEnterCombat( add, target, difficulty )
end

function addNPC.reset( event, add )
add:RemoveEvents()
local slotId
local difficulty = add:GetData('ebs_difficulty')
local bossLowGUID = add:GetData('ebs_boss_lowguid')
local guid = GetUnitGUID( bossLowGUID, ebs.encounter[ encounterId ].bossEntry )
local boss = add:GetMap():GetWorldObject( guid )
if add:IsDead() then

local hasValue
hasValue, slotId = ebs.returnKey ( ebs.spawnedBossGuid, bossLowGUID )
if ebs.fightType[ slotId ] ~= RAID_IN_PROGRESS then
ebs.addReset( event, add )
return
end

if not addDownCounter[ slotId ] then
addDownCounter[ slotId ] = 0
end

addDownCounter[ slotId ] = addDownCounter[ slotId ] + 1
if addDownCounter[ slotId ] == ebs.encounter[ encounterId ].addAmount then

if boss then
addNPC.CustomLastAddDead( add, boss, difficulty, slotId )
end
end
end

addNPC.CustomReset( add, boss, difficulty, slotId )
ebs.addReset( event, add )
end

--**********************************************************************************
--**** CUSTOM SCRIPTING BELOW ****
--**********************************************************************************

function bossNPC.CustomEnterCombat( creature, target, difficulty )
-------------------------------------------------------------------------------
-- This function runs when the raid boss enters combat. It's main use is to register events.
-------------------------------------------------------------------------------
creature:RegisterEvent( bossNPC.Fire, ebs.GetTimer( 10000, difficulty ), 0 )
end

function bossNPC.CustomReset( creature, difficulty )
-------------------------------------------------------------------------------
-- This function runs for the boss when it resets. This includes everything which ends their combat.
-- You can add custom scripting here, e.g. checking:
-- if creature:IsDead() then
-------------------------------------------------------------------------------
end

function addNPC.CustomEnterCombat( add, target, difficulty )
-------------------------------------------------------------------------------
-- This function runs when an add enters combat. It's main use is to register events.
-------------------------------------------------------------------------------
add:RegisterEvent( addNPC.HealBoss, { 10000, 15000 }, 0 )
add:RegisterEvent( addNPC.Splash, { ebs.GetTimer( 10000, difficulty ), 15000 }, 0 )
if difficulty >= 3 or add:GetData('ebs_mode') == PARTY_IN_PROGRESS then
add:RegisterEvent( bossNPC.PullIn, { ebs.GetTimer( 10000, difficulty ), 15000 }, 0 )
end
end

function addNPC.CustomLastAddDead( add, boss, difficulty, slotId )
-------------------------------------------------------------------------------
-- This function runs when the last add has died but the boss is still alive.
-------------------------------------------------------------------------------
boss:SendUnitYell( "You will pay for your actions!", 0 )
boss:RegisterEvent( bossNPC.PullIn, { ebs.GetTimer( 4000, difficulty ), 6000 }, 0 )
boss:RegisterEvent( bossNPC.Pool, { ebs.GetTimer( 10000, difficulty ), 12000}, 0 )
end

function addNPC.CustomReset( add, boss, difficulty, slotId )
-------------------------------------------------------------------------------
-- This function runs for every add that resets. This includes everything which ends their combat.
-- You can add custom scripting here, e.g. checking:
-- if add:IsDead() then
-------------------------------------------------------------------------------
end

-------------------------------------------------------------------------------
-- End of pre-defined hooks
-------------------------------------------------------------------------------
local RAIN_OF_FIRE = 31340
local ABOMINATION_HOOK = 59395
local AIR_BURST = 32014
local DEATH_AND_DECAY = 53721
local HEAL = 30878

function bossNPC.Fire( _, _, _, creature )
local target = creature:GetAITarget( SELECT_TARGET_RANDOM, true, nil, -10 )
if target then
creature:CastSpell( target, RAIN_OF_FIRE, false )
end
end

function bossNPC.PullIn( _, _, _, creature )
local target = creature:GetAITarget( SELECT_TARGET_FARTHEST, true, nil, -10 )
creature:CastSpell( target, ABOMINATION_HOOK, true )
end

function bossNPC.Pool( _, _, _, creature )
if math.random(1,2) == 1 then
creature:CastSpell( creature, AIR_BURST, false )
else
creature:CastSpell( creature:GetVictim(), DEATH_AND_DECAY, false )
end
end

function addNPC.RemoveInterrupt( _, _, _, add )
add:SetImmuneTo( MECHANIC_INTERRUPT, false )
end

function addNPC.HealBoss( _, _, _, add )
local bossLowGUID = add:GetData('ebs_boss_lowguid')
local guid = GetUnitGUID( bossLowGUID, ebs.encounter[ encounterId ].bossEntry )
local boss = add:GetMap():GetWorldObject( guid )
if boss then
if boss:GetHealthPct() < 90 then
if math.random(1,2) == 1 then
boss:SendUnitYell( "HAHAHA! You can't hurt me!", 0 )
else
add:SendUnitYell( "Don't you dare harm the master!", 0 )
end
--add:SetImmuneTo( MECHANIC_INTERRUPT, true )
add:UnitMoveStop()
add:CastCustomSpell( boss, HEAL, false, 1000000 )
add:RegisterEvent( addNPC.ResumeChase, 2600, 1)
--add:RegisterEvent( addNPC.RemoveInterrupt, 3000, 1 )
end
end
end

function addNPC.Splash( _, _, _, add )
add:CastCustomSpell( add:GetVictim(), AIR_BURST, false, nil, 150 )
end

function addNPC.ResumeChase( _, _, _, add )
add:UnitMoveChase()
end

--**********************************************************************************
--**** END OF CUSTOM SCRIPTING ****
--**********************************************************************************

RegisterCreatureEvent( ebs.encounter[ encounterId ].bossEntry, 1, bossNPC.onEnterCombat )
RegisterCreatureEvent( ebs.encounter[ encounterId ].bossEntry, 2, bossNPC.reset ) -- OnLeaveCombat
RegisterCreatureEvent( ebs.encounter[ encounterId ].bossEntry, 4, bossNPC.reset ) -- OnDied

RegisterCreatureEvent( ebs.encounter[ encounterId ].addEntry, 1, addNPC.onEnterCombat )
RegisterCreatureEvent( ebs.encounter[ encounterId ].addEntry, 2, addNPC.reset ) -- OnLeaveCombat
RegisterCreatureEvent( ebs.encounter[ encounterId ].addEntry, 4, addNPC.reset ) -- OnDied
Loading