Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.29 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2.  
  3. /*
  4. SQL:
  5. UPDATE `creature_template` SET `modelid1` = '24843' WHERE `entry` = '4779';
  6. UPDATE `creature_template` SET `modelid1` = '24839' WHERE `entry` = '4777';
  7. UPDATE `creature_template` SET `modelid1` = '18724' WHERE `entry` = '20150';
  8. UPDATE `creature_template` SET `modelid1` = '29673' WHERE `entry` = '20152';
  9. UPDATE `creature_template` SET `modelid1` = '28060' WHERE `entry` = '22511';
  10. UPDATE `creature_template` SET `modelid1` = '28649' WHERE `entry` = '20151';
  11. UPDATE `creature_template` SET `modelid1` = '11088' WHERE `entry` = '20072';
  12. UPDATE `creature_template` SET `modelid1` = '28871' WHERE `entry` = '22513';
  13. UPDATE `creature_template` SET `modelid1` = '25682' WHERE `entry` = '12148';
  14. UPDATE `creature_template` SET `modelid1` = '25753' WHERE `entry` = '14549';
  15. UPDATE `creature_template` SET `modelid1` = '19252' WHERE `entry` = '22512';
  16. UPDATE `creature_template` SET `modelid1` = '21602' WHERE `entry` = '20149';
  17. UPDATE `creature_template` SET `modelid1` = '29079' WHERE `entry` = '14333';
  18. UPDATE `creature_template` SET `modelid1` = '19252' WHERE `entry` = '22512';
  19. UPDATE `creature_template` SET `modelid1` = '28811' WHERE `entry` = '22510';
  20. UPDATE `creature_template` SET `modelid1` = '29115' WHERE `entry` = '7749';
  21. UPDATE `creature_template` SET `modelid1` = '31664' WHERE `entry` = '10180';
  22. UPDATE `creature_template` SET `modelid1` = '8011' WHERE `entry` = '6074';
  23. UPDATE `creature_template` SET `modelid1` = '17328' WHERE `entry` = '308';
  24. UPDATE `creature_template` SET `modelid1` = '17166' WHERE `entry` = '358';
  25. UPDATE `creature_template` SET `modelid1` = '19367' WHERE `entry` = '284';
  26. UPDATE `creature_template` SET `modelid1` = '20782' WHERE `entry` = '4271';
  27. UPDATE `creature_template` SET `modelid1` = '21661' WHERE `entry` = '4710';
  28. UPDATE `creature_template` SET `modelid1` = '20526' WHERE `entry` = '4272';
  29. UPDATE `creature_template` SET `modelid1` = '26610' WHERE `entry` = '7739';
  30. UPDATE `creature_template` SET `modelid1` = '19060' WHERE `entry` = '4269';
  31. UPDATE `creature_template` SET `modelid1` = '2490' WHERE `entry` = '7690';
  32. UPDATE `creature_template` SET `modelid1` = '10318' WHERE `entry` = '7687';
  33. UPDATE `creature_template` SET `modelid1` = '17702' WHERE `entry` = '307';
  34. */
  35.  
  36. int32 duration = 10000; // 10 seconds in milliseconds.
  37. uint32 spellid[] = { 72282, 75620, 6899, 6898, 34899, // mount spell ids
  38. 34898, 39316, 34897, 34896, 39318,
  39. 18992, 23249, 39317, 34790, 22718,
  40. 39317, 39315, 10969, 17454, 8394,
  41. 470, 580, 458, 6653, 6777, 6654,
  42. 10873, 6648, 10793, 10789, 472 };
  43.  
  44. class Try_Script : public CreatureScript
  45. {
  46. public:
  47. Try_Script() : CreatureScript("Try_Script") { }
  48.  
  49. void SetAuraDuration(Player* plr)
  50. {
  51. for (uint32 spell : spellid)
  52. {
  53. if (!plr->HasAura(spell))
  54. continue;
  55.  
  56. Aura* aura = plr->GetAura(spell);
  57. aura->SetDuration(duration, false);
  58. plr->GetSession()->SendAreaTriggerMessage("Done, you can now test your mount. Remember that you have only 10 seconds to test it.");
  59. }
  60. }
  61.  
  62. bool OnGossipHello(Player *player, Creature * creature)
  63. {
  64. if (!player->IsAlive())
  65. return false;
  66.  
  67. player->ADD_GOSSIP_ITEM(10, "|CFF6a6a6a -------- 1875 Arena Points --------", GOSSIP_SENDER_MAIN, 100);
  68. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/spell_deathknight_summondeathcharger:26:26:-22:0|t|r Invincible's Reins", GOSSIP_SENDER_MAIN, 1);
  69. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/ability_mount_celestialhorse:26:26:-22:0|t|r Celestial Steed", GOSSIP_SENDER_MAIN, 2);
  70. player->ADD_GOSSIP_ITEM(10, "|CFF6a6a6a -- 1750 Rating + 1875 Arena Points --", GOSSIP_SENDER_MAIN, 100);
  71. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/inv_misc_bone_08:26:26:-22:0|t|r Centaur-Mammoth", GOSSIP_SENDER_MAIN, 3);
  72. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/inv_misc_bone_07:26:26:-22:0|t|r Frozen Centaur-Mammoth", GOSSIP_SENDER_MAIN, 4);
  73. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/inv_misc_monsterfang_01:26:26:-22:0|t|r Black Stinger", GOSSIP_SENDER_MAIN, 5);
  74. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/ability_mount_blackdirewolf:26:26:-22:0|t|r Skoll", GOSSIP_SENDER_MAIN, 6);
  75. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/ability_mount_flyingcarpet:26:26:-22:0|t|r Earth Carpet", GOSSIP_SENDER_MAIN, 7);
  76. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/inv_misc_head_tiger_01:26:26:-22:0|t|r Loque'nahak", GOSSIP_SENDER_MAIN, 8);
  77. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/inv_misc_orb_05:26:26:-22:0|t|r Mounting Wasp", GOSSIP_SENDER_MAIN, 9);
  78. player->ADD_GOSSIP_ITEM(10, "|CFF6a6a6a -- 1930 Rating + 2250 Arena Points --", GOSSIP_SENDER_MAIN, 100);
  79. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/Ability_Hunter_Pet_NetherRay:26:26:-22:0|t|r Blue MANTARRAYA", GOSSIP_SENDER_MAIN, 11);
  80. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/ability_mount_spectraltiger:26:26:-22:0|t|r Gondria Tiger", GOSSIP_SENDER_MAIN, 12);
  81. player->ADD_GOSSIP_ITEM(10, "Next page -->", GOSSIP_SENDER_MAIN, 13);
  82. player->ADD_GOSSIP_ITEM(10, "Bye", GOSSIP_SENDER_MAIN, 100);
  83.  
  84. player->PlayerTalkClass->SendGossipMenu(1, creature->GetGUID());
  85. return true;
  86. }
  87.  
  88. bool OnGossipSelect(Player * player, Creature * creature, uint32 sender, uint32 uiAction)
  89. {
  90. player->PlayerTalkClass->ClearMenus();
  91.  
  92. if (player->IsMounted())
  93. {
  94. player->GetSession()->SendAreaTriggerMessage("|cff87CEFAYou must get down of your mount.|r");
  95. player->CLOSE_GOSSIP_MENU();
  96. return false;
  97. }
  98.  
  99. if (sender == GOSSIP_SENDER_MAIN)
  100. {
  101. switch (uiAction)
  102. {
  103. case 1:
  104. player->AddAura(72282, player);
  105. break;
  106. case 2:
  107. player->AddAura(75620, player);
  108. break;
  109. case 3:
  110. player->AddAura(6899, player);
  111. break;
  112. case 4:
  113. player->AddAura(6898, player);
  114. break;
  115. case 5:
  116. player->AddAura(34899, player);
  117. break;
  118. case 6:
  119. player->AddAura(34898, player);
  120. break;
  121. case 7:
  122. player->AddAura(39316, player);
  123. break;
  124. case 8:
  125. player->AddAura(34897, player);
  126. break;
  127. case 9:
  128. player->AddAura(34896, player);
  129. break;
  130. case 11:
  131. player->AddAura(65641, player);
  132. break;
  133. case 12:
  134. player->AddAura(39318, player);
  135. break;
  136. case 13:
  137. {
  138. player->ADD_GOSSIP_ITEM(10, "|CFF6a6a6a -- 2050 rating + 2625 arena points --|r", GOSSIP_SENDER_MAIN, 100);
  139. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/ability_mount_blackpanther:26:26:-22:0|t|r Jade Tiger", GOSSIP_SENDER_MAIN, 14);
  140. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/ability_hunter_pet_bat:26:26:-22:0|t|r Gargoyle", GOSSIP_SENDER_MAIN, 15);
  141. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/inv_misc_sandbox_spectraltiger_01:26:26:-22:0|t|r Spectral Toy Tiger", GOSSIP_SENDER_MAIN, 21);
  142. player->ADD_GOSSIP_ITEM(10, "|CFF6a6a6a -- 2350 rating + 3000 ap --", GOSSIP_SENDER_MAIN, 100);
  143. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/ability_mount_ridingelekk_purple:26:26:-22:0|t|r Pink Elephant", GOSSIP_SENDER_MAIN, 16);
  144. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/inv_misc_gem_pearl_05:26:26:-22:0|t|r Pink Stinger", GOSSIP_SENDER_MAIN, 20);
  145. player->ADD_GOSSIP_ITEM(10, "|CFF6a6a6a -- arena top: 1,2,3 --", GOSSIP_SENDER_MAIN, 100);
  146. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/inv_misc_head_tauren_01:26:26:-22:0|t|r Tauren Boat", GOSSIP_SENDER_MAIN, 17);
  147. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/achievement_boss_xt002deconstructor_01:26:26:-22:0|t|r Mechanic Robot", GOSSIP_SENDER_MAIN, 18);
  148. player->ADD_GOSSIP_ITEM(10, "Next page -->", GOSSIP_SENDER_MAIN, 19);
  149. player->ADD_GOSSIP_ITEM(10, "<- Prvious Page", GOSSIP_SENDER_MAIN, 101);
  150. player->ADD_GOSSIP_ITEM(10, "Bye", GOSSIP_SENDER_MAIN, 100);
  151. player->PlayerTalkClass->SendGossipMenu(1, creature->GetGUID());
  152. return true;
  153. break;
  154. }
  155. case 14:
  156. player->AddAura(18992, player);
  157. break;
  158. case 15:
  159. player->AddAura(23249, player);
  160. break;
  161. case 16:
  162. player->AddAura(39317, player);
  163. break;
  164. case 17:
  165. player->AddAura(34790, player);
  166. break;
  167. case 18:
  168. player->AddAura(22718, player);
  169. break;
  170. case 19:
  171. {
  172. player->ADD_GOSSIP_ITEM(10, "|CFF6a6a6a -- Zul'Aman Loot --|r", GOSSIP_SENDER_MAIN, 100);
  173. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/inv_misc_gear_01:26:26:-22:0|t|r Bronze Mechano-Tank", GOSSIP_SENDER_MAIN, 22);
  174. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/inv_misc_gear_05:26:26:-22:0|t|r White Mechano-Tank", GOSSIP_SENDER_MAIN, 23);
  175. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/ability_mount_gyrocoptor:26:26:-22:0|t|r Light Aircraft", GOSSIP_SENDER_MAIN, 24);
  176. //player->ADD_GOSSIP_ITEM(10, "|CFF6a6a6a -- Zul'Aman 5 Tokens --|r", GOSSIP_SENDER_MAIN, 100);
  177. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/ability_mount_ebongryphon:26:26:-22:0|t|r Ghost Bird", GOSSIP_SENDER_MAIN, 25);
  178. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/ability_mount_ebonblade:26:26:-22:0|t|r Skeletal Bird", GOSSIP_SENDER_MAIN, 26);
  179. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/spell_nature_nullifypoison:26:26:-22:0|t|r Yellow Stinger", GOSSIP_SENDER_MAIN, 27);
  180. //player->ADD_GOSSIP_ITEM(10, "|CFF6a6a6a -- Zul'Aman 5 Tokens + 1800 Rating --|r", GOSSIP_SENDER_MAIN, 100);
  181. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/inv_misc_orb_01:26:26:-22:0|t|r Waterball", GOSSIP_SENDER_MAIN, 28);
  182. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/inv_misc_drum_06:26:26:-22:0|t|r L70 ETC Drummer", GOSSIP_SENDER_MAIN, 29);
  183. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/inv_ore_ethernium_01:26:26:-22:0|t|r Jellyfishy", GOSSIP_SENDER_MAIN, 30);
  184. //player->ADD_GOSSIP_ITEM(10, "|CFF6a6a6a -- Zul'Aman 5 Tokens + 2200 Rating --|r", GOSSIP_SENDER_MAIN, 100);
  185. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/spell_nature_naturesblessing:26:26:-22:0|t|r It's a stick!|r", GOSSIP_SENDER_MAIN, 31);
  186. player->ADD_GOSSIP_ITEM(10, "Next page -->", GOSSIP_SENDER_MAIN, 32);
  187. player->ADD_GOSSIP_ITEM(10, "<- Prvious Page", GOSSIP_SENDER_MAIN, 13);
  188. player->ADD_GOSSIP_ITEM(10, "Bye", GOSSIP_SENDER_MAIN, 100);
  189. player->PlayerTalkClass->SendGossipMenu(1, creature->GetGUID());
  190. return true;
  191. break;
  192. }
  193. case 20:
  194. player->AddAura(39317, player);
  195. break;
  196. case 21:
  197. player->AddAura(39315, player);
  198. break;
  199. case 22:
  200. player->AddAura(10969, player);
  201. break;
  202. case 23:
  203. player->AddAura(17454, player);
  204. break;
  205. case 24:
  206. player->AddAura(8394, player);
  207. break;
  208. case 25:
  209. player->AddAura(470, player);
  210. break;
  211. case 26:
  212. player->AddAura(580, player);
  213. break;
  214. case 27:
  215. player->AddAura(458, player);
  216. break;
  217. case 28:
  218. player->AddAura(6653, player);
  219. break;
  220. case 29:
  221. player->AddAura(6777, player);
  222. break;
  223. case 30:
  224. player->AddAura(6654, player);
  225. break;
  226. case 31:
  227. player->AddAura(10873, player);
  228. break;
  229. case 32:
  230. {
  231. player->ADD_GOSSIP_ITEM(10, "|CFF6a6a6a -- Exclusive Mounts --|r", GOSSIP_SENDER_MAIN, 100);
  232. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/ability_mount_razorscale:26:26:-22:0|t|r Dark Drake", GOSSIP_SENDER_MAIN, 33);
  233. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/inv_misc_toy_08:26:26:-22:0|t|r Gnome Rocket", GOSSIP_SENDER_MAIN, 34);
  234. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/ability_mount_rocketmount:26:26:-22:0|t|r Podracer", GOSSIP_SENDER_MAIN, 35);
  235. player->ADD_GOSSIP_ITEM(10, "|TInterface/icons/ability_mount_goldengryphon:26:26:-22:0|t|r Corrupted Gryphon", GOSSIP_SENDER_MAIN, 36);
  236. player->ADD_GOSSIP_ITEM(10, "<- Prvious Page", GOSSIP_SENDER_MAIN, 19);
  237. player->ADD_GOSSIP_ITEM(10, "Bye", GOSSIP_SENDER_MAIN, 100);
  238. player->PlayerTalkClass->SendGossipMenu(1, creature->GetGUID());
  239. return true;
  240. break;
  241. }
  242. case 33:
  243. player->AddAura(6648, player);
  244. break;
  245. case 34:
  246. player->AddAura(10793, player);
  247. break;
  248. case 35:
  249. player->AddAura(10789, player);
  250. break;
  251. case 36:
  252. player->AddAura(472, player);
  253. break;
  254. case 100:
  255. player->CLOSE_GOSSIP_MENU();
  256. break;
  257. case 101:
  258. OnGossipHello(player, creature);
  259. return true;
  260. break;
  261. }
  262.  
  263. SetAuraDuration(player);
  264. player->CLOSE_GOSSIP_MENU();
  265. }
  266. return true;
  267. }
  268. };
  269.  
  270. void AddSC_Try_Script()
  271. {
  272. new Try_Script();
  273. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement