Advertisement
Rochet2

Capital cities to submenu

Feb 12th, 2012
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 6.27 KB | None | 0 0
  1. -- CHANGE THESE VALUES!!!! - if needed ..
  2. SET @Menu_ID = 50000;
  3. SET @Text_ID = 300000;
  4. SET @NPC_Entry = 190000;
  5.  
  6.  
  7.  
  8. UPDATE smart_scripts SET event_param1 = @Menu_ID+9 WHERE entryorguid = @NPC_Entry AND event_type = 62 AND event_param1 = @Menu_ID AND event_param2 BETWEEN 0 AND 11;
  9.  
  10. -- This line deletes the main cities from the original menu.
  11. DELETE FROM `gossip_menu_option` WHERE `menu_id`=@Menu_ID AND `id` BETWEEN 0 AND 11;
  12.  
  13. -- add main menus option
  14. 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 (@Menu_ID, 3, 2, 'Capital Cities', 1, 1, @Menu_ID+9, 0, 0, 0, '');
  15.  
  16. -- delete textIDs for the new menu
  17. DELETE FROM `gossip_menu` WHERE (`entry`=@Menu_ID+9 AND `text_id`=@Text_ID+1) OR (`entry`=@Menu_ID+9 AND `text_id`=@Text_ID+0);
  18. -- This line adds "For the Alliance/Horde" to the top of the new City menu.
  19. INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (@Menu_ID+9, @Text_ID+1);
  20. INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES (@Menu_ID+9, @Text_ID+0);
  21. DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId`=14 AND `SourceGroup`=@Menu_ID+9) OR (`SourceTypeOrReferenceId`=15 AND `SourceGroup`=@Menu_ID+9);
  22. DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId`=15 AND `SourceGroup`=@Menu_ID AND `SourceEntry` BETWEEN 0 AND 11);
  23. INSERT INTO conditions (SourceTypeOrReferenceId, SourceGroup, SourceEntry, ConditionTypeOrReference, ConditionValue1, Comment) VALUES (14, @Menu_ID+9, @Text_ID+1, 6, 469, 'For the Alliance');
  24. INSERT INTO conditions (SourceTypeOrReferenceId, SourceGroup, SourceEntry, ConditionTypeOrReference, ConditionValue1, Comment) VALUES (14, @Menu_ID+9, @Text_ID+0, 6, 67, 'For the Horde');
  25. INSERT INTO conditions (SourceTypeOrReferenceId, SourceGroup, SourceEntry, ConditionTypeOrReference, ConditionValue1, Comment) VALUES
  26. (15, @Menu_ID+9, 1, 6, 469, 'Stormwind'),
  27. (15, @Menu_ID+9, 2, 6, 67, 'Orgrimmar'),
  28. (15, @Menu_ID+9, 3, 6, 469, 'Darnassus'),
  29. (15, @Menu_ID+9, 4, 6, 469, 'Ironforge'),
  30. (15, @Menu_ID+9, 5, 6, 469, 'Exodar'),
  31. (15, @Menu_ID+9, 6, 6, 67, 'Thunder bluff'),
  32. (15, @Menu_ID+9, 7, 6, 67, 'Undercity'),
  33. (15, @Menu_ID+9, 8, 6, 67, 'Silvermoon city');
  34. INSERT INTO conditions (SourceTypeOrReferenceId, SourceGroup, SourceEntry, ConditionTypeOrReference, ConditionValue1, ConditionValue2, ConditionValue3, Comment) VALUES
  35. (15, @Menu_ID+9, 11, 27, 30, 3, 0, 'Portal Master - Level req'),
  36. (15, @Menu_ID+9, 10, 27, 57, 3, 0, 'Portal Master - Level req'),
  37. (15, @Menu_ID+9, 9, 27, 67, 3, 0, 'Portal Master - Level req');
  38.  
  39.  
  40. DELETE FROM `gossip_menu_option` WHERE (`menu_id`=@Menu_ID+9);
  41. -- These lines add the City teleport options to the main city menu.
  42. 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 (@Menu_ID+9, 1, 2, 'Stormwind', 1, 1, @Menu_ID, 0, 0, 0, 'Are you sure,that you want to go to Stormwind?');
  43. 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 (@Menu_ID+9, 2, 2, 'Orgrimmar', 1, 1, @Menu_ID, 0, 0, 0, 'Are you sure,that you want to go to Orgrimmar?');
  44. 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 (@Menu_ID+9, 3, 2, 'Darnassus', 1, 1, @Menu_ID, 0, 0, 0, 'Are you sure,that you want to go to Darnassus?');
  45. 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 (@Menu_ID+9, 4, 2, 'Ironforge', 1, 1, @Menu_ID, 0, 0, 0, 'Are you sure,that you want to go to Ironforge?');
  46. 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 (@Menu_ID+9, 5, 2, 'Exodar', 1, 1, @Menu_ID, 0, 0, 0, 'Are you sure,that you want to go to Exodar?');
  47. 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 (@Menu_ID+9, 6, 2, 'Thunder bluff', 1, 1, @Menu_ID, 0, 0, 0, 'Are you sure,that you want to go to Thunder bluff?');
  48. 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 (@Menu_ID+9, 7, 2, 'Undercity', 1, 1, @Menu_ID, 0, 0, 0, 'Are you sure,that you want to go to Undercity?');
  49. 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 (@Menu_ID+9, 8, 2, 'Silvermoon city', 1, 1, @Menu_ID, 0, 0, 0, 'Are you sure,that you want to go to Silvermoon city?');
  50. 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 (@Menu_ID+9, 9, 2, 'Dalaran', 1, 1, @Menu_ID, 0, 0, 0, 'Are you sure,that you want to go to Dalaran?');
  51. 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 (@Menu_ID+9, 10, 2, 'Shattrath', 1, 1, @Menu_ID, 0, 0, 0, 'Are you sure,that you want to go to Shattrath?');
  52. 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 (@Menu_ID+9, 11, 2, 'Booty bay', 1, 1, @Menu_ID, 0, 0, 0, 'Are you sure,that you want to go to Booty bay?');
  53. 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 (@Menu_ID+9, 12, 7, 'Back..', 1, 1, @Menu_ID, 0, 0, 0, NULL);
  54.  
  55. -- #Success
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement