TrinityCore/TrinityCore — Issue #4763: Quest 11089 "The Soul Cannon of Reth'hedron" In progress
Author: malcrom
Created: 2012-01-10 16:31:29+00:00
State: open

```SQL
-- Quest 11089 "The Soul Cannon of Reth'hedron"
-- Gossip Menu insert from sniff
DELETE FROM `gossip_menu` WHERE `entry`=8725 AND `text_id`=11030;
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8725,11030);
-- Creature Gossip_menu_id Update from sniff
UPDATE `creature_template` SET `gossip_menu_id`=8725 WHERE `entry`=23093;
-- Creature Gossip_menu_option Update from sniff
DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (8725) AND `id` IN (0);
INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES
(8725,0,0, 'I am an envoy of Balthas. He has sent me to collect a flawless arcane essence.',1,1,0,0,0,0, '');
-- Gossip conditions
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=8725;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(15,8725,0,0,9,11089,0,0,0,'','Show gossip option if player has Quest 11089 The Soul Cannon of Reth''hedron');
-- NPC talk text insert from sniff
DELETE FROM `creature_text` WHERE `entry`=23093 AND `groupid` BETWEEN 0 AND 7;
DELETE FROM `creature_text` WHERE `entry`=23100 AND `groupid`=0;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(23093,0,0, '%s places a fetish at the ritual pile.',16,0,100,16,0,0, 'Sar''this'),
(23093,1,0, 'The process is arduous. We must first summon forth acolytes of the elements. You must then destroy these acolytes so that my minions can make preparations.',12,0,100,0,0,0, 'Sar''this'),
(23093,2,0, 'Prepare yourself! The acolyte of water is soon to come...',12,0,100,0,0,0, 'Sar''this'),
(23093,3,0, 'Come forth, acolyte of earth!',12,0,100,0,0,0, 'Sar''this'),
(23093,4,0, 'Fire, show yourself!',12,0,100,0,0,0, 'Sar''this'),
(23093,5,0, 'Well done! Let''s continue.',12,0,100,0,0,0, 'Sar''this'),
(23093,6,0, 'Now we call forth the the arcane acolyte.',12,0,100,0,0,0, 'Sar''this'),
(23093,7,0, 'It is yours my Lord!',12,0,100,0,0,0, 'Sar''this'),
(23100,0,0, 'I require your life essence to maintain my existence in this realm.',12,0,100,0,0,0, 'Flawless Arcane Elemental');
-- SAI for Sar''this
SET @ENTRY := 23093; -- NPC entry
SET @SPELL1 := 40129; -- Summon Air Elemental
SET @SPELL2 := 40130; -- Summon Water Elemental
SET @SPELL3 := 40132; -- Summon Earth Elemental
SET @SPELL4 := 40133; -- Summon Fire Elemental
SET @SPELL5 := 40134; -- Summon Arcane Elemental
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*100 AND `source_type`=9;
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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,1,62,0,100,0,8725,0,0,0,72,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sar''this - On gossip Option select - close gossip'),
(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sar''this - On gossip Option select - run script');
```