9
3

MagisterNiksel.lua 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. --[[
  2. Script Name : SpawnScripts/SouthQeynos/MagisterNiksel.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.07.19 10:07:36
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Mage1 = 5767
  10. local Mage2 = 5768
  11. local Sorc = 5769
  12. local Summ = 5770
  13. local Ench = 5771
  14. function spawn(NPC)
  15. ProvidesQuest(NPC, Mage1)
  16. ProvidesQuest(NPC, Mage2)
  17. ProvidesQuest(NPC, Sorc)
  18. ProvidesQuest(NPC, Summ)
  19. ProvidesQuest(NPC, Ench)
  20. end
  21. function respawn(NPC)
  22. spawn(NPC)
  23. end
  24. function hailed(NPC, Spawn)
  25. if GetLevel(Spawn) ==7 and HasCompletedQuest(Spawn,Mage1) then
  26. DoneToday(NPC,Spawn)
  27. elseif GetLevel(Spawn) ==8 and HasCompletedQuest(Spawn,Mage2) then
  28. DoneToday(NPC,Spawn)
  29. elseif GetLevel(Spawn) ==9 and HasCompletedQuest(Spawn,Mage2) and GetClass(Spawn)==21 then
  30. FinalClassTest(NPC,Spawn)
  31. else
  32. FaceTarget(NPC, Spawn)
  33. Dialog.New(NPC, Spawn)
  34. Dialog.AddDialog("Well, well, well ... a good day to you! I must say, a breath of fresh air sure gets the springs and gears runnin' in the 'ole noggin! At my age, I know all kinds of tricks to slip away from a lecture. Err ... you're not one of my students, are you?")
  35. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel000.mp3", 3187388846, 3295150638)
  36. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  37. if GetClass(Spawn)== 21 and GetLevel(Spawn)>=7 and not HasQuest(Spawn,Mage1) and not HasCompletedQuest(Spawn,Mage1) then
  38. Dialog.AddOption("No, but I would be honored to have someone as famed and skilled as you help me advance my magic abilities.","Dialog1")
  39. end
  40. if HasCompletedQuest(Spawn,Mage1) and GetQuestStep(Spawn,Mage1)==2 then
  41. Dialog.AddOption("I've dispersed the bog slugs. They seemed to be rather malformed.","Dialog2")
  42. end
  43. if HasCompletedQuest(Spawn,Mage1) and GetQuestStep(Spawn,Mage1)==6 then
  44. Dialog.AddOption("I've gained some useful insight from your former students about sorcery and weaving of elements.","Dialog3")
  45. end
  46. if GetClass(Spawn)== 21 and GetLevel(Spawn)>=8 and not HasQuest(Spawn,Mage2) and not HasCompletedQuest(Spawn,Mage2) and HasCompletedQuest(Spawn,Mage1) then
  47. Dialog.AddOption("Do you have time to continue my training today?","Dialog4")
  48. end
  49. if HasCompletedQuest(Spawn,Mage2) and GetQuestStep(Spawn,Mage2)==2 then
  50. Dialog.AddOption("I've \"convinced\" Willim to have a little more confidence.","Dialog5")
  51. end
  52. if HasCompletedQuest(Spawn,Mage2) and GetQuestStep(Spawn,Mage2)==4 then
  53. Dialog.AddOption("I've brought you an eyeball from a Klicnik.","Dialog6")
  54. end
  55. Dialog.AddOption("Um, ok. Thank you for that. Good luck with your students.")
  56. Dialog.Start()
  57. end
  58. end
  59. function Dialog1(NPC,Spawn)
  60. FaceTarget(NPC, Spawn)
  61. Dialog.New(NPC, Spawn)
  62. Dialog.AddDialog("Hahaha! Well, flattery will get you everywhere, my young student. Well, I was taking a little breather to contemplate a confounding conundrum but--AHA! I got it! Elementals equal magic and casters all in a square! Weeheehee! I must remember this formula! Err... where was I?")
  63. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel001.mp3", 784274360, 2830832827)
  64. PlayFlavor(NPC, "", "", "chuckle", 0, 0, Spawn)
  65. Dialog.AddOption("Possibly teaching me more about magic?","Dialog1a")
  66. Dialog.AddOption("I... should be going.")
  67. Dialog.Start()
  68. end
  69. function Dialog1a(NPC,Spawn)
  70. FaceTarget(NPC, Spawn)
  71. Dialog.New(NPC, Spawn)
  72. Dialog.AddDialog("Oh, yes, yes, yes. Well, judging by your appearance, you have some magical aptitude. Then, again, one of my first lessons for you is never judge a book by its cover--many a mage has walked away with a burnt beard making that mistake!")
  73. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel002.mp3", 4179756044, 2171161837)
  74. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  75. Dialog.AddOption("Perhaps I could prove myself? Like a test?","Dialog1b")
  76. Dialog.Start()
  77. end
  78. function Dialog1b(NPC,Spawn)
  79. FaceTarget(NPC, Spawn)
  80. Dialog.New(NPC, Spawn)
  81. Dialog.AddDialog("What an excellent idea! How about I run you through a primer course? This will allow you to focus on one school of training. Yes, this will do just fine. Let's begin with my personal favorite, summoning. A summoner sees the \"holes\", if you will, in the fabric of reality. With enough studying summoners can use those gaps to cast spells. ")
  82. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel003.mp3", 2810155587, 3579473530)
  83. PlayFlavor(NPC, "", "", "smile", 0, 0, Spawn)
  84. Dialog.AddOption("What are these reality holes?","Dialog1c")
  85. Dialog.Start()
  86. end
  87. function Dialog1c(NPC,Spawn)
  88. FaceTarget(NPC, Spawn)
  89. Dialog.New(NPC, Spawn)
  90. Dialog.AddDialog("They're pieces of the world that do not fit together. The conundrum I just solved may help me understand it better, give or take another hundred years of studying. It's easier to think of the holes as places where a summoner \"pulls\" matter that doesn't actually exist. Whether it's a traveling companion or a tasty loaf of bread, it matters not.")
  91. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel004.mp3", 3848481052, 1928107101)
  92. PlayFlavor(NPC, "", "", "orate", 0, 0, Spawn)
  93. Dialog.AddOption("What are these reality holes?","OfferMage1")
  94. Dialog.Start()
  95. end
  96. function OfferMage1(NPC,Spawn)
  97. OfferQuest(NPC,Spawn,Mage1)
  98. FaceTarget(NPC,Spawn)
  99. end
  100. function Dialog2(NPC,Spawn)
  101. FaceTarget(NPC, Spawn)
  102. Dialog.New(NPC, Spawn)
  103. Dialog.AddDialog("Very observant, my student. When summoners bring forth companions from these holes, they should dispose of the creatures when they're done. No one likes a messy laboratory, let alone a messy world.")
  104. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel006.mp3", 1370391486, 1025084614)
  105. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  106. Dialog.AddOption("Well, at least I was able to take care of some of the lost creatures.","Dialog2a")
  107. Dialog.Start()
  108. end
  109. function Dialog2a(NPC,Spawn)
  110. FaceTarget(NPC, Spawn)
  111. Dialog.New(NPC, Spawn)
  112. Dialog.AddDialog("Let us move on to the next lesson. Another school of magic is sorcery. Sorcerers work with raw ingredients and shape them to their liking.")
  113. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel007.mp3", 2728241078, 3382419628)
  114. Dialog.AddOption("[Listen]","Dialog2b")
  115. Dialog.AddOption("Hopefully with a little less \"bog\".","Dialog2b")
  116. Dialog.Start()
  117. end
  118. function Dialog2b(NPC,Spawn)
  119. SetStepComplete(Spawn,Mage1,2)
  120. FaceTarget(NPC, Spawn)
  121. Dialog.New(NPC, Spawn)
  122. Dialog.AddDialog("By taking these energies and forming them into all manners of tools, life can be made so much easier. I think it's best if you spoke to some of my former students who pursued sorcery. Let me write their names in your journal. Go speak with them and see how they apply their studies.")
  123. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel008.mp3", 1804800533, 912997283)
  124. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  125. Dialog.AddOption("Alright. I'll return once I've spoken with them.")
  126. Dialog.Start()
  127. end
  128. function Dialog3(NPC,Spawn)
  129. SetStepComplete(Spawn,Mage1,6)
  130. FaceTarget(NPC, Spawn)
  131. Dialog.New(NPC, Spawn)
  132. Dialog.AddDialog("Good, good, good. I hope you learned the many uses of sorcery's power--just remember to respect this power.")
  133. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel009.mp3", 3515068214, 3688909586)
  134. PlayFlavor(NPC, "", "", "happy", 0, 0, Spawn)
  135. Dialog.AddOption("It was enlightening to hear how elemental magics can be destructive, but also deadly.","DoneToday")
  136. Dialog.Start()
  137. end
  138. function DoneToday(NPC,Spawn)
  139. FaceTarget(NPC, Spawn)
  140. Dialog.New(NPC, Spawn)
  141. Dialog.AddDialog("I'm pleased with your progress. Unfortunately, today's lesson is over. I must write this postulate before I forget it. Please study what I taught you thus far. We can continue your lessons at another time.")
  142. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel010.mp3", 2118767322, 484427585)
  143. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  144. Dialog.AddOption("Thank you. I'll return soon for more lessons.")
  145. if GetClass(Spawn)== 21 and GetLevel(Spawn)>=8 and not HasQuest(Spawn,Mage2) and not HasCompletedQuest(Spawn,Mage2) and HasCompletedQuest(Spawn,Mage1) then
  146. Dialog.AddOption("Please, I can't wait! I am eager to keep learning from more from your lessons if you have time.","Dialog4")
  147. end
  148. Dialog.Start()
  149. end
  150. ---MAGE2
  151. function Dialog4(NPC,Spawn)
  152. FaceTarget(NPC, Spawn)
  153. Dialog.New(NPC, Spawn)
  154. Dialog.AddDialog("For you? Of course I do! Your last visit inspired me to solve my Theory of Elementary--perhaps you can help me work on it a bit later. Now, if you recall, in our last lesson, you learned the skills of a sorcerer and a summoner. Today, you shall learn the skills of an enchanter. Shall we begin?")
  155. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel011.mp3", 2118767322, 484427585)
  156. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  157. Dialog.AddOption("Yes, I am ready.","Dialog4a")
  158. Dialog.Start()
  159. end
  160. function Dialog4a(NPC,Spawn)
  161. FaceTarget(NPC, Spawn)
  162. Dialog.New(NPC, Spawn)
  163. Dialog.AddDialog("Let's pick up where we left off. I can summarize an enchanter's philosophy in one phrase: \"I think, therefore you should too.\"")
  164. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel012.mp3", 3711475963, 1487434543)
  165. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  166. Dialog.AddOption("[Listen]","Dialog4b")
  167. Dialog.Start()
  168. end
  169. function Dialog4b(NPC,Spawn)
  170. FaceTarget(NPC, Spawn)
  171. Dialog.New(NPC, Spawn)
  172. Dialog.AddDialog("This means if you understand how a person thinks, then that person is more likely to work with you and not against you. Add a little magic to the equation and presto -- instant obfuscation!")
  173. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel013.mp3", 1799784542, 2411177016)
  174. PlayFlavor(NPC, "", "", "orate", 0, 0, Spawn)
  175. Dialog.AddOption("[Listen]","Dialog4c")
  176. Dialog.AddOption("So, enchanters influence thought?","Dialog4c")
  177. Dialog.Start()
  178. end
  179. function Dialog4c(NPC,Spawn)
  180. FaceTarget(NPC, Spawn)
  181. Dialog.New(NPC, Spawn)
  182. Dialog.AddDialog("Enchanters use their magic to affect the minds of others. Before you try casting an enchantment spell, you must learn how to enchant without magic. How can I show you this? Hmmm...")
  183. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel014.mp3", 1243742435, 942352584)
  184. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  185. Dialog.AddOption("[Wait patiently]","OfferMage2")
  186. Dialog.Start()
  187. end
  188. function OfferMage1(NPC,Spawn)
  189. OfferQuest(NPC,Spawn,Mage1)
  190. FaceTarget(NPC,Spawn)
  191. end
  192. function Dialog5(NPC,Spawn)
  193. FaceTarget(NPC, Spawn)
  194. Dialog.New(NPC, Spawn)
  195. Dialog.AddDialog("Oh, you did? What transpired during your conversation?")
  196. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel016.mp3", 1372935476, 2342843498)
  197. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  198. Dialog.AddOption("I gave him a magic charm that built his confidence.","Dialog5a")
  199. Dialog.Start()
  200. end
  201. function Dialog5a(NPC,Spawn)
  202. FaceTarget(NPC, Spawn)
  203. Dialog.New(NPC, Spawn)
  204. Dialog.AddDialog("You did? That's odd ... I didn't know you had enchanting skills ... Oh! I see! Good show, friend! Well, you aced all your lessons. Now it's time for a final test.")
  205. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel017.mp3", 1446574979, 1771976575)
  206. PlayFlavor(NPC, "", "", "boggle", 0, 0, Spawn)
  207. Dialog.AddOption("I'd be willing to be tested.","Dialog5b")
  208. Dialog.Start()
  209. end
  210. function Dialog5b(NPC,Spawn)
  211. FaceTarget(NPC, Spawn)
  212. Dialog.New(NPC, Spawn)
  213. Dialog.AddDialog("Of course your test! I can't teach you without evaluating your progress. You're quite gifted, indeed, but you must apply your lessons. And I need some time to write out a magical formula.")
  214. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel018.mp3", 2726943196, 3101869542)
  215. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  216. Dialog.AddOption("What must I do?","Dialog5c")
  217. Dialog.Start()
  218. end
  219. function Dialog5c(NPC,Spawn)
  220. SetStepComplete(Spawn,Mage2,2)
  221. FaceTarget(NPC, Spawn)
  222. Dialog.New(NPC, Spawn)
  223. Dialog.AddDialog("It's a test that was given to me during my early years of research. Travel to Antonica and bring me an eyeball from a Klicnik Mite. Now, if I abbreviate Elemental to the letter E, then an equal sign...")
  224. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel019.mp3", 654990311, 3534891739)
  225. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  226. Dialog.AddOption("Alright. I'll be back shortly!")
  227. Dialog.Start()
  228. end
  229. function Dialog6(NPC,Spawn)
  230. SetStepComplete(Spawn,Mage2,4)
  231. FaceTarget(NPC, Spawn)
  232. Dialog.New(NPC, Spawn)
  233. Dialog.AddDialog("Let me see it. Wonderful! This is the perfect size for pickling. Mmmm ... nothing's better than a pickled Klicnik eye sandwich with mustard and mayonnaise. Oh, drat! I dropped my sandwich on my formula! And that was my only copy! I can't recreate it either! Oh well... the formula would never work anyway. As for you, it's time you make a choice.")
  234. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel020.mp3", 538297903, 4048671950)
  235. PlayFlavor(NPC, "", "", "happy", 0, 0, Spawn)
  236. if GetLevel(Spawn)== 8 then
  237. Dialog.AddOption("Am I ready now?","DoneToday")
  238. elseif GetLevel(Spawn) >8 then
  239. Dialog.AddOption("That task was simple enough. What must I do to advance?","FinalClassTest")
  240. end
  241. Dialog.Start()
  242. end
  243. --FINAL Test
  244. function FinalClassTest(NPC,Spawn)
  245. FaceTarget(NPC, Spawn)
  246. Dialog.New(NPC, Spawn)
  247. Dialog.AddDialog("What field of arcane studies do you want to pursue? You showed great aptitude in all three schools, but you must focus your studies. So what's your choice?")
  248. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel021.mp3", 167518160, 503095515)
  249. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  250. Dialog.AddOption("Summoning [WORK-IN-PROGRESS]","Summoner")
  251. Dialog.AddOption("Sorcery [WORK-IN-PROGRESS]","Sorcery")
  252. Dialog.AddOption("Enchanting [WORK-IN-PROGRESS]","Enchanter")
  253. Dialog.Start()
  254. end
  255. --I feel the destructive arts are to my liking. I shall study to be a sorcerer.
  256. function Summoner(NPC,Spawn)
  257. FaceTarget(NPC, Spawn)
  258. Dialog.New(NPC, Spawn)
  259. Dialog.AddDialog("By peering into the unseen, summoners use magic to create matter from nothing. A summoner never wants for anything -- companions, food, or even a nice fluffy pillow to snuggle up with when it gets cold at night ... er, where was I? Ah, yes, do you want to study summoning?")
  260. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel023.mp3", 990225084, 344110692)
  261. PlayFlavor(NPC, "", "", "orate", 0, 0, Spawn)
  262. Dialog.AddOption("I will never again be without anything I need. I am a summoner.")
  263. Dialog.AddOption("Actually, I better rethink this.","FinalClassTest")
  264. Dialog.Start()
  265. end
  266. function Sorcery(NPC,Spawn)
  267. FaceTarget(NPC, Spawn)
  268. Dialog.New(NPC, Spawn)
  269. Dialog.AddDialog("A sorcerer taps into the mana flow and draws the hidden energies that swirl within that maelstrom of forces. By taking these energies, sorcerers simplify their lives, and make their opponent's lives a heck of a lot harder. But along with sorcery's incredible power, comes incredible responsibility. Can you handle this?")
  270. PlayFlavor(NPC, "", "", "orate", 0, 0, Spawn)
  271. Dialog.AddOption("The forces of the arcane will be at my beck and call. I am a sorcerer.")
  272. Dialog.AddOption("Actually, I better rethink this.","FinalClassTest")
  273. Dialog.Start()
  274. end
  275. function Enchanter(NPC,Spawn)
  276. FaceTarget(NPC, Spawn)
  277. Dialog.New(NPC, Spawn)
  278. Dialog.AddDialog("Enchanters love hearing people say, \"I'll believe it when I see it.\" Using their magic, enchanters make people believe in all matter of things! Illusionary dragons are just as threatening as real ones to the common enemy, if you \"see\" what I'm saying. So, will you focus your studies on enchanting?")
  279. PlayFlavor(NPC, "", "", "orate", 0, 0, Spawn)
  280. Dialog.AddOption("I prefer to see what is real and what isn't. I am an enchanter.")
  281. Dialog.AddOption("Actually, I better rethink this.","FinalClassTest")
  282. Dialog.Start()
  283. end
  284. --Now, now, there's no one thing that gives you the power to become a sorcerer, but this should help you get a better grasp on how to use your sorcery power. No need to return to me afterwards, I've taught you as much as I can.
  285. --I feel the destructive arts are to my liking. I shall study to be a sorcerer.
  286. --You'll be an enchanter... yes... perhaps ... First, let's see how you deal with an angry crowd. Not everyone is cut out to deal with the thought required behind this choice ... we need to make sure that you are.