MatthiasZoe.lua 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. --[[
  2. Script Name : SpawnScripts/WestFreeport/MatthiasZoe.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.10.09 01:10:32
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 12, "InRange", "LeaveRange")
  11. end
  12. function InRange(NPC,Spawn)
  13. if GetFactionAmount(Spawn, 12) <0 then
  14. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  15. elseif GetTradeskillLevel(Spawn)==19 then
  16. if GetTradeskillClass(Spawn)== 2 or GetTradeskillClass(Spawn)== 6 or GetTradeskillClass(Spawn)== 10 then
  17. FaceTarget(NPC,Spawn)
  18. PlayFlavor(NPC, "voiceover/english/alfred_ironforge/qey_harbor/100_trd_alfred_ironforge_callout_b5408196.mp3", "Please form a line to my left if you need to be certified.", "tapfoot", 3630438710, 674962613, Spawn)
  19. end
  20. end
  21. end
  22. function hailed(NPC, Spawn)
  23. FaceTarget(NPC, Spawn)
  24. if GetFactionAmount(Spawn, 12) <0 then
  25. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  26. elseif GetTradeskillLevel(Spawn)<19 then
  27. if GetTradeskillClass(Spawn)~= 2 or GetTradeskillClass(Spawn)~= 6 or GetTradeskillClass(Spawn)~= 10 or GetTradeskillClass(Spawn)~= 1 then
  28. NotSkilled(NPC,Spawn)
  29. end
  30. elseif GetTradeskillLevel(Spawn)==19 and GetTradeskillClass(Spawn)== 2 or GetTradeskillLevel(Spawn)==19 and GetTradeskillClass(Spawn)== 6 or GetTradeskillLevel(Spawn)==19 and GetTradeskillClass(Spawn)== 10 then
  31. if GetTradeskillClass(Spawn)== 2 then --Craftsman
  32. Craftsman(NPC,Spawn)
  33. elseif GetTradeskillClass(Spawn)== 6 then --Outfitter
  34. Outfitter(NPC,Spawn)
  35. elseif GetTradeskillClass(Spawn)== 10 then --Scholar
  36. Scholar(NPC,Spawn)
  37. end
  38. elseif GetTradeskillClass(Spawn)~= 2 and GetTradeskillClass(Spawn)~= 1 and GetTradeskillClass(Spawn)~= 6 and GetTradeskillClass(Spawn)~= 10 then
  39. AlreadySkilled(NPC,Spawn)
  40. end
  41. end
  42. function NotSkilled(NPC,Spawn)
  43. FaceTarget(NPC, Spawn)
  44. Dialog.New(NPC, Spawn)
  45. Dialog.AddDialog("Hello, friend. You're not skilled enough to receive certification in a tradesman specialty. Practice your skills and return to me after you gain more experience.")
  46. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1034.mp3", "", "hello", 0, 0, Spawn)
  47. Dialog.AddOption("Ok I will do.")
  48. Dialog.Start()
  49. end
  50. function AlreadySkilled(NPC,Spawn)
  51. FaceTarget(NPC, Spawn)
  52. Dialog.New(NPC, Spawn)
  53. Dialog.AddDialog("You're certified already friend.")
  54. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  55. Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge001.mp3",2173353496, 3693694171)
  56. Dialog.AddOption("Oh yes I forgot.")
  57. Dialog.Start()
  58. end
  59. --Craftsman
  60. function Craftsman(NPC, Spawn)
  61. FaceTarget(NPC, Spawn)
  62. Dialog.New(NPC, Spawn)
  63. Dialog.AddDialog("I'm glad that you continued on as an Craftsman and came back to The Coalition of Tradesfolk. My name is Matthias Zoe, and I can certify you in your chosen trade specialty. I need your name and specialty before I can start your paperwork.")
  64. -- Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_1_1033.mp3", 0, 0)
  65. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1033.mp3", "", "hello", 0, 0, Spawn)
  66. Dialog.AddOption("My name is "..GetName(Spawn)..", a Provisioner.", "Provisioner")
  67. Dialog.AddOption("My name is "..GetName(Spawn)..", an Woodworker.", "Woodworker")
  68. Dialog.AddOption("My name is "..GetName(Spawn)..", a Carpenter", "Carpenter")
  69. Dialog.Start()
  70. end
  71. --Provisioner
  72. function Provisioner(NPC, Spawn)
  73. FaceTarget(NPC, Spawn)
  74. Dialog.New(NPC, Spawn)
  75. Dialog.AddDialog("A provisioner, eh? We can always use another provisioner in the city. I want to make sure we're on the same page: As a provisioner you delight in making food and drink. These are the goods that you want to become certified to make, correct?")
  76. -- Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge005.mp3",2473814327, 4225068215)
  77. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  78. Dialog.AddOption("Yes.", "ProvisionerYes1")
  79. Dialog.AddOption("On second thought, let me get back to you.")
  80. Dialog.Start()
  81. end
  82. function ProvisionerYes1(NPC, Spawn)
  83. window = CreateOptionWindow();
  84. AddOptionWindowOption(window, " Become a Provisioner", "Become proficient in the arts of a Provisioner. You will specialize in preparing food and drink as your trade. [This can not be undone!]", 1, 130, "ProvisionerYes2")
  85. AddOptionWindowOption(window, " Reconsider", "Stay an Craftsman. You will not advance beyond tradeskill level 19. Devona to Alfred Ironforge when you've made your decission.", 2, 13, "Cancel")
  86. SendOptionWindow(window, Spawn, "Are you sure you wish to become a Provisioner?", "Cancel")
  87. end
  88. function ProvisionerYes2(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. if GetTradeskillClass(Spawn)== 2 then
  91. SetTradeskillClass(Spawn,3)
  92. SendMessage(Spawn, "Congratulations! You have chosen the path of the Provisioner.","yellow")
  93. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Provisioner.",250,250,200)
  94. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  95. end
  96. FinalHail(NPC,Spawn)
  97. end
  98. --Woodworker
  99. function Woodworker(NPC, Spawn)
  100. FaceTarget(NPC, Spawn)
  101. Dialog.New(NPC, Spawn)
  102. Dialog.AddDialog("A woodworker, eh? We can always use another woodworker in the city. I want to make sure we're on the same page: As a Woodworker you delight in making bows, staffs, arrows, shields, and instruments. These are the goods that you want to become certified to make, correct?")
  103. -- Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge004.mp3",1043864057, 3920328023)
  104. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  105. Dialog.AddOption("Yes.", "WoodworkerYes1")
  106. Dialog.AddOption("On second thought, let me get back to you.")
  107. Dialog.Start()
  108. end
  109. function WoodworkerYes1(NPC, Spawn)
  110. window = CreateOptionWindow();
  111. AddOptionWindowOption(window, " Become a Woodworker", "Become proficient in the arts of Woodworking. You will specialize in making bows, staffs, arrows, shields, and instruments. [This can not be undone!]", 0, 26, "WoodworkerYes2")
  112. AddOptionWindowOption(window, " Reconsider", "Stay an Craftsman. You will not advance beyond tradeskill level 19. Return to Devona Ironforge when you've made your decission.", 2, 13, "Cancel")
  113. SendOptionWindow(window, Spawn, "Are you sure you wish to become a Woodworker?", "Cancel")
  114. end
  115. function WoodworkerYes2(NPC, Spawn)
  116. FaceTarget(NPC, Spawn)
  117. if GetTradeskillClass(Spawn)== 2 then
  118. SetTradeskillClass(Spawn,4)
  119. SendMessage(Spawn, "Congratulations! You have chosen the path of the Woodworker.","yellow")
  120. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Woodworker.",250,250,200)
  121. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  122. end
  123. FinalHail(NPC,Spawn)
  124. end
  125. --Carpenter
  126. function Carpenter(NPC, Spawn)
  127. FaceTarget(NPC, Spawn)
  128. Dialog.New(NPC, Spawn)
  129. Dialog.AddDialog("A carpenter, eh? We can always use another carpenter. I want to make sure we're on the same page: As a Carpenter you delight in making furniture. These are the goods that you want to become certified to make, correct?")
  130. -- Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge006.mp3",2810852405, 855246268)
  131. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  132. Dialog.AddOption("Yes.", "CarpenterYes1")
  133. Dialog.AddOption("On second thought, let me get back to you.")
  134. Dialog.Start()
  135. end
  136. function CarpenterYes1(NPC, Spawn)
  137. window = CreateOptionWindow();
  138. AddOptionWindowOption(window, " Become a Carpenter", "Become proficient in the arts of a Carpenter. You will specialize in making all sorts of furniture and repair kits. [This can not be undone!]", 0, 560, "CarpenterYes2")
  139. AddOptionWindowOption(window, " Reconsider", "Stay an Craftsman. You will not advance beyond tradeskill level 19. Return to Devona Ironforge when you've made your decission.", 2, 13, "Cancel")
  140. SendOptionWindow(window, Spawn, "Are you sure you wish to become a Carpenter?", "Cancel")
  141. end
  142. function CarpenterYes2(NPC, Spawn)
  143. FaceTarget(NPC, Spawn)
  144. if GetTradeskillClass(Spawn)== 2 then
  145. SetTradeskillClass(Spawn,5)
  146. SendMessage(Spawn, "Congratulations! You have chosen the path of the Carpenter.","yellow")
  147. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Carpenter.",250,250,200)
  148. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  149. end
  150. FinalHail(NPC,Spawn)
  151. end
  152. --Outfitter
  153. function Outfitter(NPC, Spawn)
  154. FaceTarget(NPC, Spawn)
  155. Dialog.New(NPC, Spawn)
  156. Dialog.AddDialog("I'm glad that you continued on as an Outfitter and came back to The Coalition of Tradesfolk. My name is Matthias Zoe, and I can certify you in your chosen trade specialty. I need your name and specialty before I can start your paperwork.")
  157. -- Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_1_1033.mp3", 0, 0)
  158. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1031.mp3", "", "hello", 0, 0, Spawn)
  159. Dialog.AddOption("My name is "..GetName(Spawn)..", a Weaponsmith.", "Weaponsmith")
  160. Dialog.AddOption("My name is "..GetName(Spawn)..", an Armorer.", "Armorer")
  161. Dialog.AddOption("My name is "..GetName(Spawn)..", a Tailor", "Tailor")
  162. Dialog.Start()
  163. end
  164. --Weaponsmith
  165. function Weaponsmith(NPC, Spawn)
  166. FaceTarget(NPC, Spawn)
  167. Dialog.New(NPC, Spawn)
  168. Dialog.AddDialog("A weaponsmith, eh? We can always use another weaponsmith in the city. I want to make sure we're on the same page: As a Weaponsmith you delight in making weapons. This is what you want to become certified to make, correct?")
  169. Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge005.mp3",2473814327, 4225068215)
  170. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  171. Dialog.AddOption("Yes.", "WeaponsmithYes1")
  172. Dialog.AddOption("On second thought, let me get back to you.")
  173. Dialog.Start()
  174. end
  175. function WeaponsmithYes1(NPC, Spawn)
  176. window = CreateOptionWindow();
  177. AddOptionWindowOption(window, " Become a Weaponsmith", "Become proficient in the arts of a Weaponsmith. You will learn to forge metal-based weaponry, such as swords, daggers, and axes. [This can not be undone!]", 1, 427, "WeaponsmithYes2")
  178. AddOptionWindowOption(window, " Reconsider", "Stay an Outfitter. You will not advance beyond tradeskill level 19. Devona to Alfred Ironforge when you've made your decission.", 2, 13, "Cancel")
  179. SendOptionWindow(window, Spawn, "Are you sure you wish to become a Weaponsmith?", "Cancel")
  180. end
  181. function WeaponsmithYes2(NPC, Spawn)
  182. FaceTarget(NPC, Spawn)
  183. if GetTradeskillClass(Spawn)== 6 then
  184. SetTradeskillClass(Spawn,7)
  185. SendMessage(Spawn, "Congratulations! You have chosen the path of the Craftsman.","yellow")
  186. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Craftsman.",250,250,200)
  187. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  188. end
  189. FinalHail(NPC,Spawn)
  190. end
  191. --Armorer
  192. function Armorer(NPC, Spawn)
  193. FaceTarget(NPC, Spawn)
  194. Dialog.New(NPC, Spawn)
  195. Dialog.AddDialog("An armorer, eh? We can always use another armorer in the city. I want to make sure we're on the same page: As an Armorer you delight in making plate and chain mail armor. These are the goods that you want to become certified to make, correct?")
  196. -- Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge004.mp3",1043864057, 3920328023)
  197. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  198. Dialog.AddOption("Yes.", "ArmorerYes1")
  199. Dialog.AddOption("On second thought, let me get back to you.")
  200. Dialog.Start()
  201. end
  202. function ArmorerYes1(NPC, Spawn)
  203. window = CreateOptionWindow();
  204. AddOptionWindowOption(window, " Become a Armorer", "Become proficient in the arts of Armorer Smithing. You will learn to forge making plate and chain mail armor. [This can not be undone!]", 2, 411, "ArmorerYes2")
  205. AddOptionWindowOption(window, " Reconsider", "Stay an Outfitter. You will not advance beyond tradeskill level 19. Return to Devona Ironforge when you've made your decission.", 2, 13, "Cancel")
  206. SendOptionWindow(window, Spawn, "Are you sure you wish to become a Armorer?", "Cancel")
  207. end
  208. function ArmorerYes2(NPC, Spawn)
  209. FaceTarget(NPC, Spawn)
  210. if GetTradeskillClass(Spawn)== 6 then
  211. SetTradeskillClass(Spawn,8)
  212. SendMessage(Spawn, "Congratulations! You have chosen the path of the Armorer.","yellow")
  213. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Armorer.",250,250,200)
  214. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  215. end
  216. FinalHail(NPC,Spawn)
  217. end
  218. --Tailor
  219. function Tailor(NPC, Spawn)
  220. FaceTarget(NPC, Spawn)
  221. Dialog.New(NPC, Spawn)
  222. Dialog.AddDialog("A tailor, eh? We can always use another tailor in the city. I want to make sure we're on the same page: As a tailor you delight in making leather and cloth armor. These are the goods that you want to become certified to make, correct?")
  223. -- Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge006.mp3",2810852405, 855246268)
  224. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  225. Dialog.AddOption("Yes.", "TailorYes1")
  226. Dialog.AddOption("On second thought, let me get back to you.")
  227. Dialog.Start()
  228. end
  229. function TailorYes1(NPC, Spawn)
  230. window = CreateOptionWindow();
  231. AddOptionWindowOption(window, " Become a Tailor", "Become proficient in the arts of a Tailoring. You will specialize in sewing and weaving leather and cloth armor for protection. [This can not be undone!]", 1, 417, "TailorYes2")
  232. AddOptionWindowOption(window, " Reconsider", "Stay an Outfitter. You will not advance beyond tradeskill level 19. Return to Devona Ironforge when you've made your decission.", 2, 13, "Cancel")
  233. SendOptionWindow(window, Spawn, "Are you sure you wish to become a Tailor?", "Cancel")
  234. end
  235. function TailorYes2(NPC, Spawn)
  236. FaceTarget(NPC, Spawn)
  237. if GetTradeskillClass(Spawn)== 6 then
  238. SetTradeskillClass(Spawn,9)
  239. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  240. SendMessage(Spawn, "Congratulations! You have chosen the path of the Tailor.","yellow")
  241. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Tailor.",250,250,200)
  242. end
  243. FinalHail(NPC,Spawn)
  244. end
  245. --Scholar
  246. function Scholar(NPC, Spawn)
  247. FaceTarget(NPC, Spawn)
  248. Dialog.New(NPC, Spawn)
  249. Dialog.AddDialog("I'm glad that you continued on as an Scholar and came back to The Coalition of Tradesfolk. My name is Matthias Zoe, and I can certify you in your chosen trade specialty. I need your name and specialty before I can start your paperwork.")
  250. -- Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_1_1033.mp3", 0, 0)
  251. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1033.mp3", "", "hello", 0, 0, Spawn)
  252. Dialog.AddOption("My name is "..GetName(Spawn)..", a Jeweler.", "Jeweler")
  253. Dialog.AddOption("My name is "..GetName(Spawn)..", an Sage.", "Sage")
  254. Dialog.AddOption("My name is "..GetName(Spawn)..", a Alchemist", "Alchemist")
  255. Dialog.Start()
  256. end
  257. --Jeweler
  258. function Jeweler(NPC, Spawn)
  259. FaceTarget(NPC, Spawn)
  260. Dialog.New(NPC, Spawn)
  261. Dialog.AddDialog("A jeweler, eh? We can always use another jeweler in the city. I want to make sure we're on the same page: As a jeweler you enjoy making scout abilities, earrings, necklaces, rings, bracelets, and belts. You want to be certified to make these goods, correct?")
  262. -- Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge005.mp3",2473814327, 4225068215)
  263. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  264. Dialog.AddOption("Yes.", "JewelerYes1")
  265. Dialog.AddOption("On second thought, let me get back to you.")
  266. Dialog.Start()
  267. end
  268. function JewelerYes1(NPC, Spawn)
  269. window = CreateOptionWindow();
  270. AddOptionWindowOption(window, " Become a Jeweler", "Become proficient in the arts of a Jeweler. You will specialize in making scout abilities, earrings, necklaces, rings, bracelets, and belts. [This can not be undone!]", 1, 421, "JewelerYes2")
  271. AddOptionWindowOption(window, " Reconsider", "Stay an Scholar. You will not advance beyond tradeskill level 19. Devona to Alfred Ironforge when you've made your decission.", 2, 13, "Cancel")
  272. SendOptionWindow(window, Spawn, "Are you sure you wish to become a Jeweler?", "Cancel")
  273. end
  274. function JewelerYes2(NPC, Spawn)
  275. FaceTarget(NPC, Spawn)
  276. if GetTradeskillClass(Spawn)== 10 then
  277. SetTradeskillClass(Spawn,11)
  278. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  279. SendMessage(Spawn, "Congratulations! You have chosen the path of the Jeweler.","yellow")
  280. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Jeweler.",250,250,200)
  281. end
  282. FinalHail(NPC,Spawn)
  283. end
  284. --Sage
  285. function Sage(NPC, Spawn)
  286. FaceTarget(NPC, Spawn)
  287. Dialog.New(NPC, Spawn)
  288. Dialog.AddDialog("A sage, eh? We can always use another sage in the city. I want to make sure we're on the same page: As a sage you delight in making mage and priest spell scrolls. These are the goods that you want to become certified to make, correct?")
  289. -- Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge004.mp3",1043864057, 3920328023)
  290. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  291. Dialog.AddOption("Yes.", "SageYes1")
  292. Dialog.AddOption("On second thought, let me get back to you.")
  293. Dialog.Start()
  294. end
  295. function SageYes1(NPC, Spawn)
  296. window = CreateOptionWindow();
  297. AddOptionWindowOption(window, " Become a Sage", "Become proficient in the arts of a Sage. You will specialize in making mage and priest spell scrolls. [This can not be undone!]", 1, 396, "SageYes2")
  298. AddOptionWindowOption(window, " Reconsider", "Stay an Scholar. You will not advance beyond tradeskill level 19. Return to Devona Ironforge when you've made your decission.", 2, 13, "Cancel")
  299. SendOptionWindow(window, Spawn, "Are you sure you wish to become a Sage?", "Cancel")
  300. end
  301. function SageYes2(NPC, Spawn)
  302. FaceTarget(NPC, Spawn)
  303. if GetTradeskillClass(Spawn)== 10 then
  304. SetTradeskillClass(Spawn,12)
  305. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  306. SendMessage(Spawn, "Congratulations! You have chosen the path of the Sage.","yellow")
  307. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Sage.",250,250,200)
  308. end
  309. FinalHail(NPC,Spawn)
  310. end
  311. --Alchemist
  312. function Alchemist(NPC, Spawn)
  313. FaceTarget(NPC, Spawn)
  314. Dialog.New(NPC, Spawn)
  315. Dialog.AddDialog("An alchemist, eh? We could always use another alchemist in the city. I want to make sure we're on the same page: As an alchemist you enjoy making fighter abilities, potions, poisons, and common components. These are the goods that you want to become certified to make, correct?")
  316. -- Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge006.mp3",2810852405, 855246268)
  317. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  318. Dialog.AddOption("Yes.", "AlchemistYes1")
  319. Dialog.AddOption("On second thought, let me get back to you.")
  320. Dialog.Start()
  321. end
  322. function AlchemistYes1(NPC, Spawn)
  323. window = CreateOptionWindow();
  324. AddOptionWindowOption(window, " Become an Alchemist", "Become proficient in the arts of Alchemy. You will specialize in making making fighter abilities, potions, poisons, and common components. [This can not be undone!]", 1, 402, "AlchemistYes2")
  325. AddOptionWindowOption(window, " Reconsider", "Stay an Scholar. You will not advance beyond tradeskill level 19. Return to Devona Ironforge when you've made your decission.", 2, 13, "Cancel")
  326. SendOptionWindow(window, Spawn, "Are you sure you wish to become an Alchemist?", "Cancel")
  327. end
  328. function AlchemistYes2(NPC, Spawn)
  329. FaceTarget(NPC, Spawn)
  330. if GetTradeskillClass(Spawn)== 10 then
  331. SetTradeskillClass(Spawn,13)
  332. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  333. SendMessage(Spawn, "Congratulations! You have chosen the path of the Alchemist.","yellow")
  334. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Alchemist.",250,250,200)
  335. end
  336. FinalHail(NPC,Spawn)
  337. end
  338. function FinalHail(NPC,Spawn)
  339. Dialog.AddDialog("Okay. Now you're certified in your chosen tradesman specialty. I'm glad I could serve you. We always need skilled tradesman in the city.")
  340. Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge008.mp3",3289915162, 765479278)
  341. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  342. Dialog.AddOption("Many thanks, friend.")
  343. Dialog.Start()
  344. ApplySpellVisual(Spawn, 323)
  345. end
  346. function respawn(NPC)
  347. spawn(NPC)
  348. end