DevonaIronforge.lua 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. --[[
  2. Script Name : SpawnScripts/QeynosHarbor/DevonaIronforge.lua
  3. Script Purpose : Devona Ironforge <Crafting Trainer>
  4. Script Author : Dorbin
  5. Script Date : 2022.10.08
  6. Script Notes :
  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, 11) <0 then
  14. FaceTarget(NPC,Spawn)
  15. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  16. elseif GetTradeskillLevel(Spawn)==19 then
  17. if GetTradeskillClass(Spawn)== 2 or GetTradeskillClass(Spawn)== 6 or GetTradeskillClass(Spawn)== 10 then
  18. FaceTarget(NPC,Spawn)
  19. PlayFlavor(NPC, "", "Please form a line to my left if you need to be certified.", "bye", 0, 0, Spawn)
  20. end
  21. end
  22. end
  23. function hailed(NPC, Spawn)
  24. FaceTarget(NPC, Spawn)
  25. if GetFactionAmount(Spawn, 11) <0 then
  26. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  27. elseif GetTradeskillLevel(Spawn)<19 then
  28. if GetTradeskillClass(Spawn)~= 2 or GetTradeskillClass(Spawn)~= 6 or GetTradeskillClass(Spawn)~= 10 or GetTradeskillClass(Spawn)~= 1 then
  29. NotSkilled(NPC,Spawn)
  30. end
  31. 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
  32. if GetTradeskillClass(Spawn)== 2 then --Craftsman
  33. Craftsman(NPC,Spawn)
  34. elseif GetTradeskillClass(Spawn)== 6 then --Outfitter
  35. Outfitter(NPC,Spawn)
  36. elseif GetTradeskillClass(Spawn)== 10 then --Scholar
  37. Scholar(NPC,Spawn)
  38. end
  39. elseif GetTradeskillClass(Spawn)~= 2 and GetTradeskillClass(Spawn)~= 1 and GetTradeskillClass(Spawn)~= 6 and GetTradeskillClass(Spawn)~= 10 then
  40. AlreadySkilled(NPC,Spawn)
  41. end
  42. end
  43. function NotSkilled(NPC,Spawn)
  44. FaceTarget(NPC, Spawn)
  45. Dialog.New(NPC, Spawn)
  46. 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.")
  47. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1033.mp3", "", "hello", 0, 0, Spawn)
  48. Dialog.AddOption("Ok I will do.")
  49. Dialog.Start()
  50. end
  51. function AlreadySkilled(NPC,Spawn)
  52. FaceTarget(NPC, Spawn)
  53. Dialog.New(NPC, Spawn)
  54. Dialog.AddDialog("You're certified already friend.")
  55. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  56. Dialog.AddVoiceover("voiceover/english/alethea_augustine/fprt_west/alethea_augustine001.mp3", 462001478, 657343064)
  57. Dialog.AddOption("Oh yes I forgot.")
  58. Dialog.AddOption("Just saying hello!")
  59. Dialog.Start()
  60. end
  61. --Craftsman
  62. function Craftsman(NPC, Spawn)
  63. FaceTarget(NPC, Spawn)
  64. Dialog.New(NPC, Spawn)
  65. Dialog.AddDialog("I'm glad that you continued on as an Craftsman and came back to The Ironforge Exchange. My name is Devona Ironforge, and I can certify you in your chosen trade specialty. I need your name and specialty before I can start your paperwork.")
  66. -- Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_1_1033.mp3", 0, 0)
  67. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1033.mp3", "", "hello", 0, 0, Spawn)
  68. Dialog.AddOption("My name is "..GetName(Spawn)..", a Provisioner.", "Provisioner")
  69. Dialog.AddOption("My name is "..GetName(Spawn)..", an Woodworker.", "Woodworker")
  70. Dialog.AddOption("My name is "..GetName(Spawn)..", a Carpenter", "Carpenter")
  71. Dialog.Start()
  72. end
  73. --Provisioner
  74. function Provisioner(NPC, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. Dialog.New(NPC, Spawn)
  77. 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?")
  78. -- Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge005.mp3",2473814327, 4225068215)
  79. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  80. Dialog.AddOption("Yes.", "ProvisionerYes1")
  81. Dialog.AddOption("On second thought, let me get back to you.")
  82. Dialog.Start()
  83. end
  84. function ProvisionerYes1(NPC, Spawn)
  85. window = CreateOptionWindow();
  86. 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")
  87. 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")
  88. SendOptionWindow(window, Spawn, "Are you sure you wish to become a Provisioner?", "Cancel")
  89. end
  90. function ProvisionerYes2(NPC, Spawn)
  91. FaceTarget(NPC, Spawn)
  92. if GetTradeskillClass(Spawn)== 2 then
  93. SetTradeskillClass(Spawn,3)
  94. SendMessage(Spawn, "Congratulations! You have chosen the path of the Provisioner.","yellow")
  95. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Provisioner.",250,250,200)
  96. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  97. end
  98. FinalHail(NPC,Spawn)
  99. end
  100. --Woodworker
  101. function Woodworker(NPC, Spawn)
  102. FaceTarget(NPC, Spawn)
  103. Dialog.New(NPC, Spawn)
  104. 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?")
  105. -- Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge004.mp3",1043864057, 3920328023)
  106. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  107. Dialog.AddOption("Yes.", "WoodworkerYes1")
  108. Dialog.AddOption("On second thought, let me get back to you.")
  109. Dialog.Start()
  110. end
  111. function WoodworkerYes1(NPC, Spawn)
  112. window = CreateOptionWindow();
  113. 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")
  114. 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")
  115. SendOptionWindow(window, Spawn, "Are you sure you wish to become a Woodworker?", "Cancel")
  116. end
  117. function WoodworkerYes2(NPC, Spawn)
  118. FaceTarget(NPC, Spawn)
  119. if GetTradeskillClass(Spawn)== 2 then
  120. SetTradeskillClass(Spawn,4)
  121. SendMessage(Spawn, "Congratulations! You have chosen the path of the Woodworker.","yellow")
  122. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Woodworker.",250,250,200)
  123. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  124. end
  125. FinalHail(NPC,Spawn)
  126. end
  127. --Carpenter
  128. function Carpenter(NPC, Spawn)
  129. FaceTarget(NPC, Spawn)
  130. Dialog.New(NPC, Spawn)
  131. 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?")
  132. -- Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge006.mp3",2810852405, 855246268)
  133. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  134. Dialog.AddOption("Yes.", "CarpenterYes1")
  135. Dialog.AddOption("On second thought, let me get back to you.")
  136. Dialog.Start()
  137. end
  138. function CarpenterYes1(NPC, Spawn)
  139. window = CreateOptionWindow();
  140. 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")
  141. 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")
  142. SendOptionWindow(window, Spawn, "Are you sure you wish to become a Carpenter?", "Cancel")
  143. end
  144. function CarpenterYes2(NPC, Spawn)
  145. FaceTarget(NPC, Spawn)
  146. if GetTradeskillClass(Spawn)== 2 then
  147. SetTradeskillClass(Spawn,5)
  148. SendMessage(Spawn, "Congratulations! You have chosen the path of the Carpenter.","yellow")
  149. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Carpenter.",250,250,200)
  150. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  151. end
  152. FinalHail(NPC,Spawn)
  153. end
  154. --Outfitter
  155. function Outfitter(NPC, Spawn)
  156. FaceTarget(NPC, Spawn)
  157. Dialog.New(NPC, Spawn)
  158. Dialog.AddDialog("I'm glad that you continued on as an Outfitter and came back to The Ironforge Exchange. My name is Devona Ironforge, and I can certify you in your chosen trade specialty. I need your name and specialty before I can start your paperwork.")
  159. -- Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_1_1033.mp3", 0, 0)
  160. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1031.mp3", "", "hello", 0, 0, Spawn)
  161. Dialog.AddOption("My name is "..GetName(Spawn)..", a Weaponsmith.", "Weaponsmith")
  162. Dialog.AddOption("My name is "..GetName(Spawn)..", an Armorer.", "Armorer")
  163. Dialog.AddOption("My name is "..GetName(Spawn)..", a Tailor", "Tailor")
  164. Dialog.Start()
  165. end
  166. --Weaponsmith
  167. function Weaponsmith(NPC, Spawn)
  168. FaceTarget(NPC, Spawn)
  169. Dialog.New(NPC, Spawn)
  170. 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?")
  171. Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge005.mp3",2473814327, 4225068215)
  172. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  173. Dialog.AddOption("Yes.", "WeaponsmithYes1")
  174. Dialog.AddOption("On second thought, let me get back to you.")
  175. Dialog.Start()
  176. end
  177. function WeaponsmithYes1(NPC, Spawn)
  178. window = CreateOptionWindow();
  179. 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")
  180. 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")
  181. SendOptionWindow(window, Spawn, "Are you sure you wish to become a Weaponsmith?", "Cancel")
  182. end
  183. function WeaponsmithYes2(NPC, Spawn)
  184. FaceTarget(NPC, Spawn)
  185. if GetTradeskillClass(Spawn)== 6 then
  186. SetTradeskillClass(Spawn,7)
  187. SendMessage(Spawn, "Congratulations! You have chosen the path of the Craftsman.","yellow")
  188. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Craftsman.",250,250,200)
  189. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  190. end
  191. FinalHail(NPC,Spawn)
  192. end
  193. --Armorer
  194. function Armorer(NPC, Spawn)
  195. FaceTarget(NPC, Spawn)
  196. Dialog.New(NPC, Spawn)
  197. 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?")
  198. -- Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge004.mp3",1043864057, 3920328023)
  199. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  200. Dialog.AddOption("Yes.", "ArmorerYes1")
  201. Dialog.AddOption("On second thought, let me get back to you.")
  202. Dialog.Start()
  203. end
  204. function ArmorerYes1(NPC, Spawn)
  205. window = CreateOptionWindow();
  206. 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")
  207. 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")
  208. SendOptionWindow(window, Spawn, "Are you sure you wish to become a Armorer?", "Cancel")
  209. end
  210. function ArmorerYes2(NPC, Spawn)
  211. FaceTarget(NPC, Spawn)
  212. if GetTradeskillClass(Spawn)== 6 then
  213. SetTradeskillClass(Spawn,8)
  214. SendMessage(Spawn, "Congratulations! You have chosen the path of the Armorer.","yellow")
  215. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Armorer.",250,250,200)
  216. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  217. end
  218. FinalHail(NPC,Spawn)
  219. end
  220. --Tailor
  221. function Tailor(NPC, Spawn)
  222. FaceTarget(NPC, Spawn)
  223. Dialog.New(NPC, Spawn)
  224. 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?")
  225. -- Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge006.mp3",2810852405, 855246268)
  226. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  227. Dialog.AddOption("Yes.", "TailorYes1")
  228. Dialog.AddOption("On second thought, let me get back to you.")
  229. Dialog.Start()
  230. end
  231. function TailorYes1(NPC, Spawn)
  232. window = CreateOptionWindow();
  233. 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")
  234. 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")
  235. SendOptionWindow(window, Spawn, "Are you sure you wish to become a Tailor?", "Cancel")
  236. end
  237. function TailorYes2(NPC, Spawn)
  238. FaceTarget(NPC, Spawn)
  239. if GetTradeskillClass(Spawn)== 6 then
  240. SetTradeskillClass(Spawn,9)
  241. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  242. SendMessage(Spawn, "Congratulations! You have chosen the path of the Tailor.","yellow")
  243. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Tailor.",250,250,200)
  244. end
  245. FinalHail(NPC,Spawn)
  246. end
  247. --Scholar
  248. function Scholar(NPC, Spawn)
  249. FaceTarget(NPC, Spawn)
  250. Dialog.New(NPC, Spawn)
  251. Dialog.AddDialog("I'm glad that you continued on as an Scholar and came back to The Ironforge Exchange. My name is Devona Ironforge, and I can certify you in your chosen trade specialty. I need your name and specialty before I can start your paperwork.")
  252. -- Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_1_1033.mp3", 0, 0)
  253. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1033.mp3", "", "hello", 0, 0, Spawn)
  254. Dialog.AddOption("My name is "..GetName(Spawn)..", a Jeweler.", "Jeweler")
  255. Dialog.AddOption("My name is "..GetName(Spawn)..", an Sage.", "Sage")
  256. Dialog.AddOption("My name is "..GetName(Spawn)..", a Alchemist", "Alchemist")
  257. Dialog.Start()
  258. end
  259. --Jeweler
  260. function Jeweler(NPC, Spawn)
  261. FaceTarget(NPC, Spawn)
  262. Dialog.New(NPC, Spawn)
  263. 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?")
  264. -- Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge005.mp3",2473814327, 4225068215)
  265. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  266. Dialog.AddOption("Yes.", "JewelerYes1")
  267. Dialog.AddOption("On second thought, let me get back to you.")
  268. Dialog.Start()
  269. end
  270. function JewelerYes1(NPC, Spawn)
  271. window = CreateOptionWindow();
  272. 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")
  273. 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")
  274. SendOptionWindow(window, Spawn, "Are you sure you wish to become a Jeweler?", "Cancel")
  275. end
  276. function JewelerYes2(NPC, Spawn)
  277. FaceTarget(NPC, Spawn)
  278. if GetTradeskillClass(Spawn)== 10 then
  279. SetTradeskillClass(Spawn,11)
  280. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  281. SendMessage(Spawn, "Congratulations! You have chosen the path of the Jeweler.","yellow")
  282. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Jeweler.",250,250,200)
  283. end
  284. FinalHail(NPC,Spawn)
  285. end
  286. --Sage
  287. function Sage(NPC, Spawn)
  288. FaceTarget(NPC, Spawn)
  289. Dialog.New(NPC, Spawn)
  290. 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?")
  291. -- Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge004.mp3",1043864057, 3920328023)
  292. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  293. Dialog.AddOption("Yes.", "SageYes1")
  294. Dialog.AddOption("On second thought, let me get back to you.")
  295. Dialog.Start()
  296. end
  297. function SageYes1(NPC, Spawn)
  298. window = CreateOptionWindow();
  299. 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")
  300. 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")
  301. SendOptionWindow(window, Spawn, "Are you sure you wish to become a Sage?", "Cancel")
  302. end
  303. function SageYes2(NPC, Spawn)
  304. FaceTarget(NPC, Spawn)
  305. if GetTradeskillClass(Spawn)== 10 then
  306. SetTradeskillClass(Spawn,12)
  307. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  308. SendMessage(Spawn, "Congratulations! You have chosen the path of the Sage.","yellow")
  309. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Sage.",250,250,200)
  310. end
  311. FinalHail(NPC,Spawn)
  312. end
  313. --Alchemist
  314. function Alchemist(NPC, Spawn)
  315. FaceTarget(NPC, Spawn)
  316. Dialog.New(NPC, Spawn)
  317. 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?")
  318. -- Dialog.AddVoiceover("voiceover/english/alfred_ironforge/qey_harbor/alfred_ironforge006.mp3",2810852405, 855246268)
  319. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  320. Dialog.AddOption("Yes.", "AlchemistYes1")
  321. Dialog.AddOption("On second thought, let me get back to you.")
  322. Dialog.Start()
  323. end
  324. function AlchemistYes1(NPC, Spawn)
  325. window = CreateOptionWindow();
  326. 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")
  327. 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")
  328. SendOptionWindow(window, Spawn, "Are you sure you wish to become an Alchemist?", "Cancel")
  329. end
  330. function AlchemistYes2(NPC, Spawn)
  331. FaceTarget(NPC, Spawn)
  332. if GetTradeskillClass(Spawn)== 10 then
  333. SetTradeskillClass(Spawn,13)
  334. PlaySound(Spawn, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
  335. SendMessage(Spawn, "Congratulations! You have chosen the path of the Alchemist.","yellow")
  336. SendPopUpMessage(Spawn, "Congratulations! You have chosen the path of the Alchemist.",250,250,200)
  337. end
  338. FinalHail(NPC,Spawn)
  339. end
  340. function FinalHail(NPC,Spawn)
  341. 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.")
  342. Dialog.AddVoiceover("voiceover/english/alethea_augustine/fprt_west/alethea_augustine008.mp3", 1879179238, 3019465921)
  343. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  344. Dialog.AddOption("Many thanks, friend.")
  345. Dialog.Start()
  346. ApplySpellVisual(Spawn, 323)
  347. end
  348. function respawn(NPC)
  349. spawn(NPC)
  350. end
  351. --[[]
  352. local choice = math.random(1,2)
  353. if choice == 1 then
  354. PlayFlavor(NPC, "", "I have nothing else to teach you for the moment. Please return to me when you have earned enough experience to choose your profession.", "", 1689589577, 4560189, Spawn)
  355. elseif choice == 2 then
  356. PlayFlavor(NPC, "", "You have learned everything I have to teach. You are free to use our crafting facilities to hone your skills and master your craft.", "", 1689589577, 4560189, Spawn)
  357. else
  358. end
  359. end]]--