aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authortkrokli <tkrokli@hotmail.com>2016-02-25 20:06:16 +0100
committertkrokli <tkrokli@hotmail.com>2016-02-25 20:06:16 +0100
commit7c9a26c608e4e03d25195ffde0e4abf62f28bb7f (patch)
tree40f408821623eed94ab386053ec374ba698bca3b /sql
parentb6720af4cb59ea056f423011bae2e0ca5a3952d9 (diff)
Core/Scripts: move npc_tirion_fordring to DB/SAI
This removes the current core script npc_tirion_fordring and replaces it with database entries in: - `conditions` 9 (quest taken) + 41 (unit_state) - `gossip_menu_option` (3502,3681,3682,3683) - `smart_scripts` (SmartAI) Gossip text / `npc_text` is already in the database. Closes #16430 (my old attempt at removing hardcoded text)
Diffstat (limited to 'sql')
-rw-r--r--sql/updates/world/2016_02_25_00_world_335.sql25
1 files changed, 25 insertions, 0 deletions
diff --git a/sql/updates/world/2016_02_25_00_world_335.sql b/sql/updates/world/2016_02_25_00_world_335.sql
new file mode 100644
index 00000000000..473cbd506ce
--- /dev/null
+++ b/sql/updates/world/2016_02_25_00_world_335.sql
@@ -0,0 +1,25 @@
+-- new gossip_menus for Quest 5742 Redemption (Tirion's Tale)
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (3502,3681,3682,3683) AND `id` = 0;
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES
+(3502, 0,0, 'I am ready to hear your tale, Tirion.', 7219, 1,1, 3681, 0,0,0,'',0),
+(3681, 0,0, 'Thank you, Tirion. What of your identity?', 7221, 1,1, 3682, 0,0,0,'',0),
+(3682, 0,0, 'That is terrible.', 7223, 1,1, 3683, 0,0,0,'',0),
+(3683, 0,0, 'I will, Tirion.', 7225, 1,1, 0, 0,0,0,'',0);
+
+-- update creature entry 1855 Tirion Fordring
+UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName`= '' WHERE `entry` = 1855;
+
+-- SmartAI script actions for Quest 5742 Redemption (Tirion's Tale)
+DELETE FROM `smart_scripts` WHERE `entryorguid`= 1855 AND `source_type`= 0;
+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
+(1855,0, 0,0, 62, 0,100,0, 3502, 0,0,0, 98, 3681, 4493, 0,0,0,0, 7,0,0,0,0,0,0,0, 'Tirion Fordring - on gossip_menu 3502 selected - Send Gossip text 4493 with menu option 3681'),
+(1855,0, 1,0, 62, 0,100,0, 3681, 0,0,0, 98, 3682, 4494, 0,0,0,0, 7,0,0,0,0,0,0,0, 'Tirion Fordring - on gossip_menu 3681 selected - Send Gossip text 4494 with menu option 3682'),
+(1855,0, 2,0, 62, 0,100,0, 3682, 0,0,0, 98, 3683, 4495, 0,0,0,0, 7,0,0,0,0,0,0,0, 'Tirion Fordring - on gossip_menu 3682 selected - Send Gossip text 4495 with menu option 3683'),
+(1855,0, 3,4, 62, 0,100,0, 3683, 0,0,0, 15, 5742, 0, 0,0,0,0, 7,0,0,0,0,0,0,0, 'Tirion Fordring - on gossip_menu 3683 selected - Give credit for Quest 5742 Redemption'),
+(1855,0, 4,0, 61, 0,100,0, 0, 0,0,0, 72, 0, 0, 0,0,0,0, 7,0,0,0,0,0,0,0, 'Tirion Fordring - on gossip_menu 3683 selected - Close Gossip');
+
+-- conditions for Quest 5742 Redemption (Tirion's Tale)
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 15 AND `SourceGroup`= 3502;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15, 3502,0, 0,1, 9,0, 5742, 0,0,0,0,0, '', 'Show gossip menu option 3502 only if Quest 5742 is taken (active)'),
+(15, 3502,0, 0,1, 41,0, 1, 1,0,0,0,0, '', 'Show gossip menu option 3502 only if player is sitting (any type)');