diff options
author | tkrokli <tkrokli@users.noreply.github.com> | 2016-10-15 02:13:37 +0200 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-10-03 17:05:25 +0200 |
commit | 8f718043d1f2898b48f3656139347d9a4fc22cf8 (patch) | |
tree | f71ddf76542118ff205460c24b622cc6462007e0 /sql | |
parent | c4ec0d8cfc4dc12fc03a33d20c61c199a1f8d57c (diff) |
Core/Scripts: move npc_saat to DB (#17813)
The core script only contains gossip handling + conditions.
- remove script from file the_black_morass.cpp
- thereby removing 1 line of hardcoded text
- remove redundant SD2 comments in header
- add SAI, gossip and conditions to DB
(cherry picked from commit 028a7b8e45746c0695a579d7883ea0e5878b827b)
Rename 2016_10_32_17813_world.sql to 2016_10_15_01_world.sql
(cherry picked from commit 13b748c682d0f9a42bc8dfa87c31043db5c06148)
Diffstat (limited to 'sql')
-rw-r--r-- | sql/updates/world/master/2017_10_03_05_world_2016_10_15_01_world.sql | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/sql/updates/world/master/2017_10_03_05_world_2016_10_15_01_world.sql b/sql/updates/world/master/2017_10_03_05_world_2016_10_15_01_world.sql new file mode 100644 index 00000000000..c790b540cfe --- /dev/null +++ b/sql/updates/world/master/2017_10_03_05_world_2016_10_15_01_world.sql @@ -0,0 +1,34 @@ +SET @Saat := 20201; +SET @Menu := 8088; + +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName`= '' WHERE `entry` = @Saat; + +DELETE FROM `smart_scripts` WHERE (source_type = 0 AND entryorguid = @Saat); +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 +(@Saat,0, 0,1, 62, 0,100,0,@Menu, 0, 0, 0, 72, 0, 0,0,0,0,0,7,0,0,0,0,0,0,0,"Sa'at - On gossip menu 8088 option id 0 selected - Close gossip"), +(@Saat,0, 1,0, 61, 0,100,0, 0, 0, 0, 0, 11,34975, 0,0,0,0,0,7,0,0,0,0,0,0,0,"Sa'at - On gossip menu 8088 option id 0 selected - Cast 'Conjure Chrono-Beacon'"), +(@Saat,0, 2,3, 62, 0,100,0,@Menu, 1, 0, 0, 72, 0, 0,0,0,0,0,7,0,0,0,0,0,0,0,"Sa'at - On gossip menu 8088 option id 1 selected - Close gossip"), +(@Saat,0, 3,0, 61, 0,100,0, 0, 0, 0, 0, 11,34975, 0,0,0,0,0,7,0,0,0,0,0,0,0,"Sa'at - On gossip menu 8088 option id 1 selected - Cast 'Conjure Chrono-Beacon'"), +(@Saat,0, 4,0, 10, 0,100,1, 1,16,1000,1000, 1, 0, 0,0,0,0,0,7,0,0,0,0,0,0,0,"Sa'at - Out Of Combat, in Line Of Sight - Say text 1"); + +DELETE FROM `gossip_menu_option` WHERE `MenuId`= @Menu AND `OptionIndex`= 1; +INSERT INTO `gossip_menu_option` (`MenuId`,`OptionIndex`,`OptionIcon`,`OptionText`,`OptionBroadcastTextId`,`OptionType`,`OptionNpcflag`,`VerifiedBuild`) VALUES +(@Menu, 1, 0, "I require a chrono-beacon, Sa'at.", 17881, 1, 1, 0); + +DELETE FROM `gossip_menu` WHERE `entry`= @Menu AND `text_id` IN (10000,10001); +INSERT INTO `gossip_menu` (`entry`,`text_id`,`VerifiedBuild`) VALUES +(@Menu, 10000, 0), +(@Menu, 10001, 0); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`= @Menu; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14, @Menu, 10001, 0, 0, 8, 0, 10297, 0, 0, 0, 0, 0, '', 'Show gossip menu 8088 text id 10001 if quest The Opening of the Dark Portal has been rewarded.'), +(14, @Menu, 10000, 0, 0, 8, 0, 10297, 0, 0, 1, 0, 0, '', 'Show gossip menu 8088 text id 10000 if quest The Opening of the Dark Portal is not rewarded.'), +(15, @Menu, 1, 0, 2, 8, 0, 10297, 0, 0, 0, 0, 0, '', 'Show gossip menu 8088 option id 1 if quest The Opening of the Dark Portal has been rewarded'), +(15, @Menu, 1, 0, 2, 2, 0, 24289, 1, 0, 1, 0, 0, '', 'Show gossip menu 8088 option id 1 if player has 0 of Chrono-Beacon. Item cannot be in bank. -AND 2-'), +(15, @Menu, 0, 0, 3, 9, 0, 10297, 0, 0, 0, 0, 0, '', 'Show gossip menu 8088 option id 0 if quest The Opening of the Dark Portal has not been taken. -AND 3-'), +(15, @Menu, 0, 0, 3, 2, 0, 24289, 1, 0, 1, 0, 0, '', 'Show gossip menu 8088 option id 0 if player has 0 of Chrono-Beacon. Item cannot be in bank. -AND 3-'); + +DELETE FROM `creature_text` WHERE `entry`= @Saat; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(@Saat, 0,0,'Stop! Do not go any further, mortal. You are ill-prepared to face the forces of the Infinite Dragonflight. Come, let me help you.', 12,0,100,1,0,0,17814,0, 'Saat'); |