Skip to content

Commit de6a77c

Browse files
authored
Scripts/AQ20: Rewrite Moam (#31216)
* New register model * Repeat events instead of scheduling them * Added unique names for enums * Added comments for script names * Added AI for Mana Fiend * Added missing emote * Use all emotes * Create master-script to summon Mana Fiends * Implement & use Zero Mana/Full Health spell * Implement Energize script to end stoned phase * Implement Drain Mana master spell script with correct amount of targets and checks to ensure only players and mana-users will be targeted * Implement Drain Mana visual effect * Now, once all Mana Fiends are dead, stone phase is finished * Rework the way stone phase is started and finished * Moam now drops obsidian mineral once dead * Added a check to ensure all combat spells will be used * Added event to handle Arcane Eruption instead of trying to cast it every update tick Credit for a lot of things goes to CMaNGOS
1 parent 5c6bf61 commit de6a77c

3 files changed

Lines changed: 279 additions & 140 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--
2+
DELETE FROM `spell_script_names` WHERE `ScriptName` IN (
3+
'spell_moam_summon_mana_fiends',
4+
'spell_moam_energize',
5+
'spell_moam_drain_mana',
6+
'spell_moam_drain_mana_effect',
7+
'spell_gen_zero_mana_full_health');
8+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
9+
(25684, 'spell_moam_summon_mana_fiends'),
10+
(25685, 'spell_moam_energize'),
11+
(25676, 'spell_moam_drain_mana'),
12+
(25671, 'spell_moam_drain_mana_effect'),
13+
(25755, 'spell_moam_drain_mana_effect'),
14+
(23777, 'spell_gen_zero_mana_full_health');
15+
16+
DELETE FROM `creature_text` WHERE `CreatureID` = 15340 AND `GroupID` = 2;
17+
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
18+
(15340,2,0,"%s drains your mana and turns to stone.",16,0,100,0,0,0,11474,0,"moam EMOTE_ENERGIZE");
19+
20+
UPDATE `creature_template` SET `AIName` = 'SmartAI', `flags_extra` = `flags_extra`&~2 WHERE `entry` = 15527;
21+
DELETE FROM `smart_scripts` WHERE `entryorguid` = 15527 AND `source_type` = 0;
22+
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
23+
(15527,0,0,0,37,0,100,0,0,0,0,0,0,116,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Mana Fiend - On AI Initialize - Set Corpse Delay"),
24+
(15527,0,1,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,"Mana Fiend - On Spawn - Set In Combat With Zone"),
25+
(15527,0,2,0,0,0,100,0,5000,7000,5000,7000,0,11,25679,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Mana Fiend - In Combat - Cast 'Arcane Explosion'"),
26+
(15527,0,3,0,13,0,100,0,10000,20000,0,0,0,11,15122,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Mana Fiend - Target Casting - Cast 'Counterspell'");

0 commit comments

Comments
 (0)