Advertisement
WIXXZI

Profession Trainer

Jul 3rd, 2012
599
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.35 KB | None | 0 0
  1. function Vendor_OnGossip(pUnit,event,player)
  2. pUnit:GossipCreateMenu(100, player, 0)
  3. pUnit:GossipMenuAddItem(3,"Professions", 100, 0)
  4. pUnit:GossipMenuAddItem(2,"All Done",999,0)
  5. pUnit:GossipSendMenu(player)
  6. end
  7.  
  8. function Vendor_OnSelect(pUnit,event,player,id,intid,code)
  9.  
  10. if(intid == 100) then
  11. pUnit:GossipCreateMenu(50, player, 0)
  12. pUnit:GossipMenuAddItem(0, "Alchemy", 400, 0)
  13. pUnit:GossipMenuAddItem(0, "Blacksmithing", 401, 0)
  14. pUnit:GossipMenuAddItem(0, "Enchanting", 402, 0)
  15. pUnit:GossipMenuAddItem(0, "Engineering", 403, 0)
  16. pUnit:GossipMenuAddItem(0, "Herbalism", 404, 0)
  17. pUnit:GossipMenuAddItem(0, "Inscription", 405, 0)
  18. pUnit:GossipMenuAddItem(0, "Jewelcrafting", 406, 0)
  19. pUnit:GossipMenuAddItem(0, "Leatherworking", 407, 0)
  20. pUnit:GossipMenuAddItem(0, "Mining", 408, 0)
  21. pUnit:GossipMenuAddItem(0, "Skinning", 409, 0)
  22. pUnit:GossipMenuAddItem(0, "Cooking", 410, 0)
  23. pUnit:GossipMenuAddItem(0, "First Aid", 411, 0)
  24. pUnit:GossipMenuAddItem(0, "Fishing", 412, 0)
  25. pUnit:GossipMenuAddItem(0, "Tailoring", 413, 0)
  26. pUnit:GossipMenuAddItem(5, "Set my profession skills to 450", 450,0)
  27. pUnit:GossipMenuAddItem(2,"All Done",999,0)
  28. pUnit:GossipSendMenu(player)
  29. end
  30.  
  31. --Alchemy
  32. if(intid == 400) then
  33. pUnit:GossipCreateMenu(3543, player, 0)
  34. pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Alchemy", 415, 0)
  35. pUnit:GossipMenuAddItem(3, "Grand Master Alchemy", 416, 0)
  36. pUnit:GossipSendMenu(player)
  37. end
  38. --BlackSmithing
  39. if(intid == 401) then
  40. pUnit:GossipCreateMenu(3543, player, 0)
  41. pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Blacksmithing", 417, 0)
  42. pUnit:GossipMenuAddItem(3, "Grand Master Blacksmithing", 418, 0)
  43. pUnit:GossipSendMenu(player)
  44. end
  45. --Enchanting
  46. if(intid == 402) then
  47. pUnit:GossipCreateMenu(3543, player, 0)
  48. pUnit:GossipMenuAddItem(3, "UnlearnGrand Master Enchanting", 419, 0)
  49. pUnit:GossipMenuAddItem(3, "Grand Master Enchanting", 420, 0)
  50. pUnit:GossipSendMenu(player)
  51. end
  52. --Engineering
  53. if(intid == 403) then
  54. pUnit:GossipCreateMenu(3543, player, 0)
  55. pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Engineering", 421, 0)
  56. pUnit:GossipMenuAddItem(3, "Grand Master Engineering", 422, 0)
  57. pUnit:GossipSendMenu(player)
  58. end
  59. --Herbalism
  60. if(intid == 404) then
  61. pUnit:GossipCreateMenu(3543, player, 0)
  62. pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Herbalism", 423, 0)
  63. pUnit:GossipMenuAddItem(3, "Grand Master Herbalism", 424, 0)
  64. pUnit:GossipSendMenu(player)
  65. end
  66. --Inscription
  67. if(intid == 405) then
  68. pUnit:GossipCreateMenu(3543, player, 0)
  69. pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Inscription", 425, 0)
  70. pUnit:GossipMenuAddItem(3, "Grand Master Inscription", 426, 0)
  71. pUnit:GossipSendMenu(player)
  72. end
  73. --Jewelcrafting
  74. if(intid == 406) then
  75. pUnit:GossipCreateMenu(3543, player, 0)
  76. pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Jewelcrafting", 427, 0)
  77. pUnit:GossipMenuAddItem(3, "Grand Master Jewelcrafting", 428, 0)
  78. pUnit:GossipSendMenu(player)
  79. end
  80. --Leatherworking
  81. if(intid == 407) then
  82. pUnit:GossipCreateMenu(3543, player, 0)
  83. pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Leatherworking", 429, 0)
  84. pUnit:GossipMenuAddItem(3, "Grand Master Leatherworking", 430, 0)
  85. pUnit:GossipSendMenu(player)
  86. end
  87. --Mining
  88. if(intid == 408) then
  89. pUnit:GossipCreateMenu(3543, player, 0)
  90. pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Mining", 431, 0)
  91. pUnit:GossipMenuAddItem(3, "Grand Master Mining", 432, 0)
  92. pUnit:GossipSendMenu(player)
  93. end
  94. --Skinning
  95. if(intid == 409) then
  96. pUnit:GossipCreateMenu(3543, player, 0)
  97. pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Skinning", 433, 0)
  98. pUnit:GossipMenuAddItem(3, "Grand Master Skinning", 434, 0)
  99. pUnit:GossipSendMenu(player)
  100. end
  101. --Cooking
  102. if(intid == 410) then
  103. pUnit:GossipCreateMenu(3543, player, 0)
  104. pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Cooking", 435, 0)
  105. pUnit:GossipMenuAddItem(3, "Grand Master Cooking", 436, 0)
  106. pUnit:GossipSendMenu(player)
  107. end
  108. --First Aid
  109. if(intid == 411) then
  110. pUnit:GossipCreateMenu(3543, player, 0)
  111. pUnit:GossipMenuAddItem(3, "Unlearn Grand Master First Aid", 437, 0)
  112. pUnit:GossipMenuAddItem(3, "Grand Master First Aid", 438, 0)
  113. pUnit:GossipSendMenu(player)
  114. end
  115. --Fishing
  116. if(intid == 412) then
  117. pUnit:GossipCreateMenu(3543, player, 0)
  118. pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Fishing", 439, 0)
  119. pUnit:GossipMenuAddItem(3, "Grand Master Fishing", 440, 0)
  120. pUnit:GossipSendMenu(player)
  121. end
  122. --Tailor
  123. if(intid == 413) then
  124. pUnit:GossipCreateMenu(3543, player, 0)
  125. pUnit:GossipMenuAddItem(3, "Unlearn Grand Master Tailor", 441, 0)
  126. pUnit:GossipMenuAddItem(3, "Grand Master Tailor", 442, 0)
  127. pUnit:GossipSendMenu(player)
  128. end
  129. --This is the unlearn/learn procces
  130.  
  131. if(intid == 415) then
  132. pUnit:GossipCreateMenu(3544, player, 0)
  133. player:UnlearnSpell(51303)
  134. player:GossipComplete()
  135. end
  136.  
  137. if(intid == 416) then
  138. pUnit:GossipCreateMenu(3544, player, 0)
  139. pUnit:FullCastSpellOnTarget(51303, player)
  140. player:GossipComplete()
  141. end
  142.  
  143. if(intid == 417) then
  144. pUnit:GossipCreateMenu(3544, player, 0)
  145. player:UnlearnSpell(51298)
  146. player:GossipComplete()
  147. end
  148.  
  149. if(intid == 418) then
  150. pUnit:GossipCreateMenu(3544, player, 0)
  151. pUnit:FullCastSpellOnTarget(51298, player)
  152. player:GossipComplete()
  153. end
  154.  
  155. if(intid == 419) then
  156. pUnit:GossipCreateMenu(3544, player, 0)
  157. player:UnlearnSpell(51312)
  158. player:GossipComplete()
  159. end
  160.  
  161. if(intid == 420) then
  162. pUnit:GossipCreateMenu(3544, player, 0)
  163. pUnit:FullCastSpellOnTarget(51312, player)
  164. player:GossipComplete()
  165. end
  166.  
  167. if(intid == 421) then
  168. pUnit:GossipCreateMenu(3544, player, 0)
  169. player:UnlearnSpell(51305)
  170. player:GossipComplete()
  171. end
  172.  
  173. if(intid == 422) then
  174. pUnit:GossipCreateMenu(3544, player, 0)
  175. pUnit:FullCastSpellOnTarget(51305, player)
  176. player:GossipComplete()
  177. end
  178.  
  179. if(intid == 423) then
  180. pUnit:GossipCreateMenu(3544, player, 0)
  181. player:UnlearnSpell(50301)
  182. player:GossipComplete()
  183. end
  184.  
  185. if(intid == 424) then
  186. pUnit:GossipCreateMenu(3544, player, 0)
  187. pUnit:FullCastSpellOnTarget(50301, player)
  188. player:GossipComplete()
  189. end
  190.  
  191. if(intid == 425) then
  192. pUnit:GossipCreateMenu(3544, player, 0)
  193. player:UnlearnSpell(45380)
  194. player:GossipComplete()
  195. end
  196.  
  197. if(intid == 426) then
  198. pUnit:GossipCreateMenu(3544, player, 0)
  199. pUnit:FullCastSpellOnTarget(45380, player)
  200. player:GossipComplete()
  201. end
  202.  
  203. if(intid == 427) then
  204. pUnit:GossipCreateMenu(3544, player, 0)
  205. player:UnlearnSpell(51310)
  206. player:GossipComplete()
  207. end
  208.  
  209. if(intid == 428) then
  210. pUnit:GossipCreateMenu(3544, player, 0)
  211. pUnit:FullCastSpellOnTarget(51310, player)
  212. player:GossipComplete()
  213. end
  214.  
  215. if(intid == 429) then
  216. pUnit:GossipCreateMenu(3544, player, 0)
  217. player:UnlearnSpell(51301)
  218. player:GossipComplete()
  219. end
  220.  
  221. if(intid == 430) then
  222. pUnit:GossipCreateMenu(3544, player, 0)
  223. pUnit:FullCastSpellOnTarget(51301, player)
  224. player:GossipComplete()
  225. end
  226.  
  227. if(intid == 431) then
  228. pUnit:GossipCreateMenu(3544, player, 0)
  229. player:UnlearnSpell(50309)
  230. player:GossipComplete()
  231. end
  232.  
  233. if(intid == 432) then
  234. pUnit:GossipCreateMenu(3544, player, 0)
  235. pUnit:FullCastSpellOnTarget(50309, player)
  236. player:GossipComplete()
  237. end
  238.  
  239. if(intid == 433) then
  240. pUnit:GossipCreateMenu(3544, player, 0)
  241. player:UnlearnSpell(50307)
  242. player:GossipComplete()
  243. end
  244.  
  245. if(intid == 434) then
  246. pUnit:GossipCreateMenu(3544, player, 0)
  247. pUnit:FullCastSpellOnTarget(50307, player)
  248. player:GossipComplete()
  249. end
  250.  
  251. if(intid == 435) then
  252. pUnit:GossipCreateMenu(3544, player, 0)
  253. player:UnlearnSpell(51295)
  254. player:GossipComplete()
  255. end
  256.  
  257. if(intid == 436) then
  258. pUnit:GossipCreateMenu(3544, player, 0)
  259. pUnit:FullCastSpellOnTarget(51295, player)
  260. player:GossipComplete()
  261. end
  262.  
  263. if(intid == 437) then
  264. pUnit:GossipCreateMenu(3544, player, 0)
  265. player:UnlearnSpell(50299)
  266. player:GossipComplete()
  267. end
  268.  
  269. if(intid == 438) then
  270. pUnit:GossipCreateMenu(3544, player, 0)
  271. pUnit:FullCastSpellOnTarget(50299, player)
  272. player:GossipComplete()
  273. end
  274.  
  275. if(intid == 439) then
  276. pUnit:GossipCreateMenu(3544, player, 0)
  277. player:UnlearnSpell(51293)
  278. player:GossipComplete()
  279. end
  280.  
  281. if(intid == 440) then
  282. pUnit:GossipCreateMenu(3544, player, 0)
  283. pUnit:FullCastSpellOnTarget(51293, player)
  284. player:GossipComplete()
  285. end
  286.  
  287. if(intid == 441) then
  288. pUnit:GossipCreateMenu(3544, player, 0)
  289. player:UnlearnSpell(51308)
  290. player:GossipComplete()
  291. end
  292.  
  293. if(intid == 442) then
  294. pUnit:GossipCreateMenu(3544, player, 0)
  295. pUnit:FullCastSpellOnTarget(51308, player)
  296. player:GossipComplete()
  297. end
  298.  
  299. if (intid == 450) then
  300. pUnit:GossipCreateMenu(3545, player, 0)
  301. player:AdvanceSkill(333, 450)
  302. player:AdvanceSkill(197, 450)
  303. player:AdvanceSkill(202, 450)
  304. player:AdvanceSkill(755, 450)
  305. player:AdvanceSkill(171, 450)
  306. player:AdvanceSkill(164, 450)
  307. player:AdvanceSkill(182, 450)
  308. player:AdvanceSkill(165, 450)
  309. player:AdvanceSkill(186, 450)
  310. player:AdvanceSkill(393, 450)
  311. player:AdvanceSkill(185, 450)
  312. player:AdvanceSkill(129, 450)
  313. player:AdvanceSkill(356, 450)
  314. player:AdvanceSkill(773, 450)
  315. pUnit:SendChatMessage(12,0,"Your Skills Are Set To 450")
  316. player:GossipComplete()
  317. end
  318.  
  319. if (intid == 999) then
  320. player:GossipComplete()
  321. end
  322. end
  323.  
  324. RegisterUnitGossipEvent(58888, 1, "Vendor_OnGossip")
  325. RegisterUnitGossipEvent(58888, 2, "Vendor_OnSelect")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement