Skip to content

Commit 994b1df

Browse files
authored
Scripts/Serpentshrine Cavern: Rewrite Karathress (TrinityCore#31136)
* Create AI for Cyclone & summon it by spell * Create formation for linked aggro & replace scripted linked aggro * Script The Beast Within spell & use correct trigger spell * Create proper AI for Fathom Lurker & Fathom Sporebat * Summon Fathom Lurker & Fathom Sporebat by spells * Create AI for all totems used in encounter * Spawn Seer Olum in DB instead of wrongly summoning him * Remove redundant Karathress' event from instance script * Cleanup headers * Correctly use all Karathress' texts * Cleanup & split enum * Use EventMap and TaskScheduler instead of old events * Fix respawn bugs of advisors * Properly handle abilities Karathress gains from advisors * Properly handle Blessing Of Tides * Remove redundant SetBossState calls from advisors * Update timers of all spells * Update targets of all spells
1 parent 48fd041 commit 994b1df

File tree

4 files changed

+397
-470
lines changed

4 files changed

+397
-470
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
-- Misc
2+
DELETE FROM `smart_scripts` WHERE `entryorguid` = 22104 AND `source_type` = 0;
3+
UPDATE `creature_template` SET `AIName` = '', `ScriptName` = 'npc_fathomlord_karathress_cyclone' WHERE `entry` = 22104;
4+
5+
DELETE FROM `creature_formations` WHERE `leaderGUID` = 93766;
6+
INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES
7+
(93766,93766,0,0,3,0,0),
8+
(93766,93765,0,0,3,0,0),
9+
(93766,82975,0,0,3,0,0),
10+
(93766,82976,0,0,3,0,0);
11+
12+
-- Pets
13+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_fathomlord_karathress_the_beast_within';
14+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
15+
(38373, 'spell_fathomlord_karathress_the_beast_within');
16+
17+
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceEntry` = 38371;
18+
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
19+
(13,7,38371,0,0,31,0,3,22119,0,0,0,0,"","Group 0: Spell 'Bestial Wrath' (Effect 0, 1, 2) targets creature 'Fathom Lurker'"),
20+
(13,7,38371,0,1,31,0,3,22120,0,0,0,0,"","Group 1: Spell 'Bestial Wrath' (Effect 0, 1, 2) targets creature 'Fathom Sporebat'");
21+
22+
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (22119,22120) AND `source_type` = 0;
23+
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
24+
(22119,0,0,0,37,0,100,0,0,0,0,0,0,116,6,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Fathom Lurker - On AI Initialize - Set Corpse Delay"),
25+
(22119,0,1,0,11,0,100,0,0,0,0,0,0,11,39795,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Fathom Lurker - On Spawn - Cast 'Spawn with Stun (2.0s)'"),
26+
(22119,0,2,0,11,0,100,0,0,0,0,0,0,38,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Fathom Lurker - On Spawn - Set In Combat With Zone"),
27+
(22119,0,3,0,0,0,100,0,5000,10000,10000,20000,0,11,25778,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Fathom Lurker - In Combat - Cast 'Knock Away'"),
28+
(22119,0,4,0,7,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Fathom Lurker - On Evade - Despawn"),
29+
30+
(22120,0,0,0,37,0,100,0,0,0,0,0,0,116,6,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Fathom Sporebat - On AI Initialize - Set Corpse Delay"),
31+
(22120,0,1,0,11,0,100,0,0,0,0,0,0,11,39795,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Fathom Sporebat - On Spawn - Cast 'Spawn with Stun (2.0s)'"),
32+
(22120,0,2,0,11,0,100,0,0,0,0,0,0,38,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Fathom Sporebat - On Spawn - Set In Combat With Zone"),
33+
(22120,0,3,0,0,0,100,0,5000,10000,10000,20000,0,11,25778,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Fathom Sporebat - In Combat - Cast 'Knock Away'"),
34+
(22120,0,4,0,7,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Fathom Sporebat - On Evade - Despawn");
35+
36+
-- Totems
37+
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (22487,22091);
38+
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (22487,22486,22091) AND `source_type` = 0;
39+
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
40+
(22487,0,0,0,37,0,100,0,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Greater Poison Cleansing Totem - On AI Initialize - Set Reactstate Passive"),
41+
(22487,0,1,0,11,0,100,0,0,0,0,0,0,11,32187,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Greater Poison Cleansing Totem - On Spawn - Cast 'Water Totem Transform'"),
42+
43+
(22486,0,0,0,37,0,100,0,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Greater Earthbind Totem - On AI Initialize - Set Reactstate Passive"),
44+
(22486,0,1,0,11,0,100,0,0,0,0,0,0,11,32184,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Greater Earthbind Totem - On Spawn - Cast 'Earth Totem Transform'"),
45+
(22486,0,2,0,11,0,100,0,0,0,0,0,0,11,6474,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Greater Earthbind Totem - On Spawn - Cast 'Earthbind Totem Passive'"),
46+
47+
(22091,0,0,0,37,0,100,0,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Spitfire Totem - On AI Initialize - Set Reactstate Passive"),
48+
(22091,0,1,0,11,0,100,0,0,0,0,0,0,11,32186,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Spitfire Totem - On Spawn - Cast 'Fire Totem Transform'"),
49+
(22091,0,2,0,11,0,100,0,0,0,0,0,0,38,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Spitfire Totem - On Spawn - Set In Combat With Zone"),
50+
(22091,0,3,0,0,0,100,0,10000,15000,2000,7000,0,11,38296,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Spitfire Totem - In Combat - Cast 'Attack'");
51+
52+
-- Seer Olum
53+
DELETE FROM `creature` WHERE `guid` = 40193 AND `id` = 22820;
54+
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES
55+
(40193,22820,548,0,0,1,1,0,0,451.099,-544.984,-7.46327,0.174533,300,0,0,0,0,0,0,0,0,'',NULL,0);

0 commit comments

Comments
 (0)