kusanagy

NPC Professions Lua

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