9
3

ArcanistSonius.lua 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. --[[
  2. Script Name : SpawnScripts/NorthFreeport/ArcanistSonius.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.09.29 06:09:41
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Mage1 = 5902
  10. local Sorc = 5904
  11. local Summ = 5905
  12. local Ench = 5903
  13. function spawn(NPC)
  14. ProvidesQuest(NPC, Mage1)
  15. ProvidesQuest(NPC, Sorc)
  16. ProvidesQuest(NPC, Summ)
  17. ProvidesQuest(NPC, Ench)
  18. end
  19. --The Arcanist sent you to me? She's made my promotion to sorcerer so easy!
  20. function respawn(NPC)
  21. spawn(NPC)
  22. end
  23. function hailed(NPC, Spawn)
  24. if GetLevel(Spawn) ==7 and HasCompletedQuest(Spawn,Mage1) then
  25. DoneToday(NPC,Spawn)
  26. elseif GetLevel(Spawn) >=9 and HasCompletedQuest(Spawn,Mage1) and GetClass(Spawn)==21 and not HasQuest(Spawn, Ench) and not HasQuest(Spawn, Sorc) and not HasQuest(Spawn, Summ) then
  27. FinalClassTest(NPC,Spawn)
  28. else
  29. FaceTarget(NPC, Spawn)
  30. Dialog.New(NPC, Spawn)
  31. Dialog.AddDialog("Don't talk to me unless you're devoted to academic research. Unlocking the secrets of arcane powers takes devotion. The lazy need not apply in this field...")
  32. Dialog.AddVoiceover("voiceover/english/arcanist_sonius/fprt_north/arcanistsonius001.mp3", 3905512775, 1010931746)
  33. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  34. if GetClass(Spawn)== 21 and GetLevel(Spawn)>=7 and not HasQuest(Spawn,Mage1) and not HasCompletedQuest(Spawn,Mage1) then
  35. Dialog.AddOption("I am interested in learning how to enhance my magic abilities.","Dialog1")
  36. end
  37. if HasQuest(Spawn,Mage1) and GetQuestStep(Spawn,Mage1)==2 then
  38. Dialog.AddOption("The infestation of slimes has been slowed now that I have destroyed a number of the monstrous goos.","Dialog2")
  39. end
  40. if HasQuest(Spawn,Mage1) and GetQuestStep(Spawn,Mage1)==4 then
  41. Dialog.AddOption("He's written up a contract for forty bottles at five silver pieces each.","Dialog3")
  42. end
  43. if GetClass(Spawn)== 21 and GetLevel(Spawn)>=8 and GetQuestStep(Spawn,Mage1)==5 then
  44. Dialog.AddOption("I would like to continue my lessons, Arcanist.","Dialog4")
  45. elseif GetClass(Spawn)== 21 and GetLevel(Spawn)< 8 and GetQuestStep(Spawn,Mage1)==5 then
  46. Dialog.AddOption("I will return once I've reviewed my studies, Arcanist.")
  47. end
  48. if HasQuest(Spawn,Mage1) and GetQuestStep(Spawn,Mage1)==9 then
  49. Dialog.AddOption("I have collected the information on what was summoned. It looks like three different things were summoned into existence.","Dialog5")
  50. end
  51. if HasCompletedQuest(Spawn,Ench) or HasCompletedQuest(Spawn,Sorc) or HasCompletedQuest(Spawn,Summ) then
  52. Dialog.AddOption("Arcanist. I still reflect on your lessons. Thank you.")
  53. end
  54. if GetLevel(Spawn) <9 and HasCompletedQuest(Spawn,Mage1) and GetClass(Spawn)==21 and not HasQuest(Spawn, Ench) and not HasQuest(Spawn, Sorc) and not HasQuest(Spawn, Summ) then
  55. Dialog.AddOption("I will return for my final exam once I've reviewed my studies, Arcanist.")
  56. end
  57. Dialog.AddOption("In that case, I'll let you get back to work. Goodbye.")
  58. Dialog.Start()
  59. end
  60. end
  61. --I convinced Bulz the troll to defeat a couple of Seafuries for me. I handled the first mate myself.
  62. --Precisely! The mage summoned an elephant! One witness felt its ears drape her head, another ran into its tusks, and the last witness felt the elephant's trunk wrap around his neck. Even though each witness experienced something different, there is only one reality. A summoner can identify this reality and change it to suit his needs. I know who is responsible for summoning the elephant, but this is not your concern. You completed your lessons, my apt pupil. Now it is time for your final exam.
  63. --I do not have time to speak to you unless you are seriously devoted to academic research. This is not something to take lightly, for true research does not just happen all by itself. You must devote your life to unlocking the secrets of arcane powers. Therefore, the lazy need not apply.
  64. function Dialog1(NPC,Spawn)
  65. FaceTarget(NPC, Spawn)
  66. Dialog.New(NPC, Spawn)
  67. Dialog.AddDialog("Or so you say... Many people dabble in the arcane for the promise of great power. Yet, when the time comes, they're too lazy to wrest secrets from the grasp of mystery. How far will you go to unlock the power that knowledge can grant you?")
  68. Dialog.AddVoiceover("voiceover/english/arcanist_sonius/fprt_north/arcanistsonius002.mp3", 2674482409, 809985473)
  69. Dialog.AddOption("I will wield powers yet to be seen in this world!","OfferMage1")
  70. Dialog.AddOption("I... should be going.")
  71. Dialog.Start()
  72. end
  73. function OfferMage1(NPC,Spawn)
  74. OfferQuest(NPC,Spawn,Mage1)
  75. FaceTarget(NPC,Spawn)
  76. end
  77. --I would like to continue my lessons, Arcanist.
  78. function Dialog2(NPC,Spawn)
  79. FaceTarget(NPC, Spawn)
  80. Dialog.New(NPC, Spawn)
  81. Dialog.AddDialog("Hmmm ... you return and in a timely manner. You may be a prize pupil after all. Even though you can't see it, these Slime specimens contain residue of the life force that animated them. You will learn that life is a never-ending resource that surrounds us. Knowledge, on the other hand, is far more difficult to obtain. Thus, the lesson learned is knowledge is far more precious than life. Remember this.")
  82. Dialog.AddVoiceover("voiceover/english/arcanist_sonius/fprt_north/arcanistsonius004.mp3", 3551708297, 2303353482)
  83. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  84. Dialog.AddOption("I see. So my path to knowing will be paved by the bodies before me.","Dialog2a")
  85. Dialog.Start()
  86. end
  87. function Dialog2a(NPC,Spawn)
  88. FaceTarget(NPC, Spawn)
  89. Dialog.New(NPC, Spawn)
  90. Dialog.AddDialog("Next, I shall teach you how to avoid letting other people's concerns disrupt your research. The Coalition of Tradesfolke raised the price of ink this morning. This is unacceptable. Go speak with Aulus in Torlig's Shop. Convince him that the price increase of ink shouldn't apply to someone of my stature.")
  91. Dialog.AddVoiceover("voiceover/english/arcanist_sonius/fprt_north/arcanistsonius005.mp3", 4176304101, 1577206553)
  92. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  93. Dialog.AddOption("How would I do that?","Dialog2b")
  94. Dialog.Start()
  95. end
  96. function Dialog2b(NPC,Spawn)
  97. SetStepComplete(Spawn,Mage1,2)
  98. FaceTarget(NPC, Spawn)
  99. Dialog.New(NPC, Spawn)
  100. Dialog.AddDialog("An enchanter would mesmerise Alus with a simple spell, but you haven't learned these skills. It shall be a difficult task, but mesmerizing Aulus will teach you the skills of an enchanter. Start with the words you use in everyday life, then you will begin to understand how to enhance people with magic.")
  101. Dialog.AddVoiceover("voiceover/english/arcanist_sonius/fprt_north/arcanistsonius006.mp3", 2931456206, 3429721696)
  102. Dialog.AddOption("Alright. I'll return once I've spoken with them.")
  103. Dialog.Start()
  104. end
  105. function Dialog3(NPC,Spawn)
  106. FaceTarget(NPC, Spawn)
  107. Dialog.New(NPC, Spawn)
  108. Dialog.AddDialog("Amazing! He charges ten gold pieces for a bottle and you lowered it to five silver pieces? Well, my pupil, I think you have what it takes to be an enchanter.")
  109. Dialog.AddVoiceover("voiceover/english/arcanist_sonius/fprt_north/arcanistsonius007.mp3", 1459390682, 2672790255)
  110. PlayFlavor(NPC, "", "", "boggle", 0, 0, Spawn)
  111. SetStepComplete(Spawn,Mage1,4)
  112. if GetClass(Spawn)== 21 and GetLevel(Spawn)>=8 and GetQuestStep(Spawn,Mage1)==5 then
  113. Dialog.AddOption("I rather enjoyed manipulating the conversation to my desire...","Dialog4")
  114. elseif GetClass(Spawn)== 21 and GetLevel(Spawn)< 8 and GetQuestStep(Spawn,Mage1)==5 then
  115. Dialog.AddOption("I rather enjoyed manipulating the conversation to my desire...","DoneToday")
  116. end
  117. Dialog.Start()
  118. end
  119. function DoneToday(NPC,Spawn)
  120. if GetQuestStep(Spawn,Mage1)==4 then
  121. SetStepComplete(Spawn,Mage1,4)
  122. end
  123. FaceTarget(NPC, Spawn)
  124. Dialog.New(NPC, Spawn)
  125. 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.")
  126. Dialog.AddVoiceover("voiceover/english/arcanist_sonius/fprt_north/arcanistsonius008.mp3", 0, 0)
  127. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  128. if GetClass(Spawn)== 21 and GetLevel(Spawn)>=8 then
  129. Dialog.AddOption("I would like to continue my lessons, Arcanist. I'm eager to start","Dialog4")
  130. else
  131. Dialog.AddOption("Thank you. I'll return soon for more lessons.")
  132. end
  133. Dialog.Start()
  134. end
  135. ---MAGE2
  136. function Dialog4(NPC,Spawn)
  137. FaceTarget(NPC, Spawn)
  138. Dialog.New(NPC, Spawn)
  139. Dialog.AddDialog("Excellent! I noticed that one of my students dropped out of my course and is attempting home schooling. Without my signature of academic achievement, I cannot tolerate this. I don't know who this dropout is, but I need you to find out. In turn, you will learn the skills of a summoner.")
  140. Dialog.AddVoiceover("voiceover/english/arcanist_sonius/fprt_north/arcanistsonius009.mp3", 3430145629, 2951724267)
  141. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  142. Dialog.AddOption("What does a dropout have to do with summoning?","Dialog4a")
  143. Dialog.Start()
  144. end
  145. function Dialog4a(NPC,Spawn)
  146. FaceTarget(NPC, Spawn)
  147. Dialog.New(NPC, Spawn)
  148. Dialog.AddDialog("I heard that earlier today several people in the districts witnessed the summoning of some kind of creature. Go question these witnesses. After interviewing them, identify the summoned creature. Let me know when you solve this mystery. When I find out who is responsible, I shall kill him for his disobedience! Let me have your journal. I'll write down the names of the witnesses.")
  149. Dialog.AddVoiceover("voiceover/english/arcanist_sonius/fprt_north/arcanistsonius010.mp3", 1221218294, 850810550)
  150. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  151. Dialog.AddOption("Here is my journal. I will get to the bottom of this.","OfferMage2")
  152. Dialog.Start()
  153. end
  154. function OfferMage2(NPC,Spawn)
  155. SetStepComplete(Spawn,Mage1,5)
  156. FaceTarget(NPC,Spawn)
  157. end
  158. function Dialog5(NPC,Spawn)
  159. FaceTarget(NPC, Spawn)
  160. Dialog.New(NPC, Spawn)
  161. Dialog.AddDialog("You have a list? Let me see it. ... One person was draped in a sheet of leather, another was impaled by a stake, and another felt a snake ... this is rubbish! A novice summoner could never summon three objects at once! From this list, I can tell what that delinquent student summoned. To pass this test, you must understand that people's realities differ. Three objects weren't summoned today, only one was. What was it?")
  162. Dialog.AddVoiceover("voiceover/english/arcanist_sonius/fprt_north/arcanistsonius011.mp3", 1663368472, 4059713499)
  163. PlayFlavor(NPC, "", "", "tapfoot", 0, 0, Spawn)
  164. Dialog.AddOption("a goblin","Wrong")
  165. Dialog.AddOption("a really big snake","Wrong")
  166. Dialog.AddOption("an orc","Wrong")
  167. Dialog.AddOption("a sewer slime","Wrong")
  168. Dialog.AddOption("Lucan D'lere","WrongLucan")
  169. Dialog.AddOption("an elephant","Correct")
  170. Dialog.AddOption("a coat-wearing snake wielding spears?","WrongSnake")
  171. Dialog.Start()
  172. end
  173. function Wrong(NPC,Spawn)
  174. FaceTarget(NPC, Spawn)
  175. Dialog.New(NPC, Spawn)
  176. Dialog.AddDialog("Sadly, you fail. Using the facts you presented me, your answer is ridiculous; you obviously put no thought into it. If you continue at this rate, you will never be anything more than a simple mage. Review the clues again, and speak with me when you have the correct answer.")
  177. Dialog.AddVoiceover("voiceover/english/arcanist_sonius/fprt_north/arcanistsonius012.mp3", 2718680677, 1828842152)
  178. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  179. Dialog.AddOption("I'll consider my list again...","Dialog5")
  180. Dialog.Start()
  181. end
  182. function WrongLucan(NPC,Spawn)
  183. FaceTarget(NPC, Spawn)
  184. Dialog.New(NPC, Spawn)
  185. Dialog.AddDialog("Fool! The Overlord is watching you as we speak.")
  186. Dialog.AddVoiceover("voiceover/english/optional2/darkelf_eco_evil_3/ft/darkelf/darkelf_eco_evil_3_notcitizen_gf_e5838bd0.mp3", 644059683, 1813641447)
  187. Dialog.AddVoiceover("voiceover/english/human_eco_evil_1/ft/human/human_eco_evil_1_notcitizen_gf_e5838bd0.mp3", 3487310419, 1932819422)
  188. PlayFlavor(NPC, "", "", "cringe", 0, 0, Spawn)
  189. Dialog.AddOption("Err...")
  190. Dialog.Start()
  191. end
  192. function WrongSnake(NPC,Spawn)
  193. FaceTarget(NPC, Spawn)
  194. Dialog.New(NPC, Spawn)
  195. Dialog.AddDialog("...")
  196. Dialog.AddVoiceover("voiceover/english/arcanist_sonius/fprt_north/arcanistsonius012.mp3", 0, 0)
  197. PlayFlavor(NPC, "", "", "stare", 0, 0, Spawn)
  198. Dialog.AddOption("Uhhh... Only kidding.","Wrong")
  199. Dialog.Start()
  200. end
  201. function Correct(NPC,Spawn)
  202. SetStepComplete(Spawn,Mage1,9)
  203. FaceTarget(NPC, Spawn)
  204. Dialog.New(NPC, Spawn)
  205. Dialog.AddDialog("Precisely! The mage summoned an elephant! One witness felt its ears drape her head, another ran into its tusks, and the last witness felt the elephant's trunk wrap around his neck. Even though each witness experienced something different, there is only one reality. A summoner can identify this reality and change it to suit his needs. I know who is responsible for summoning the elephant, but this is not your concern. You completed your lessons, my apt pupil. Now it is time for your final exam.")
  206. Dialog.AddVoiceover("voiceover/english/arcanist_sonius/fprt_north/arcanistsonius013.mp3", 1007657081, 1911291450)
  207. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  208. Dialog.AddOption("A final exam? What must I do?","FinalClassTest")
  209. Dialog.Start()
  210. end
  211. --FINAL Test
  212. function FinalClassTest(NPC,Spawn)
  213. FaceTarget(NPC, Spawn)
  214. Dialog.New(NPC, Spawn)
  215. Dialog.AddDialog("I taught you three different methods of exploring the secrets of mystical power. Now you must dedicate your arcane studies to one discipline... Which shall it be?")
  216. Dialog.AddVoiceover("voiceover/english/arcanist_sonius/fprt_north/arcanistsonius014.mp3", 196403467, 3470342687)
  217. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  218. Dialog.AddOption("I feel the destructive arts are to my liking. I shall study to be a sorcerer.","Sorcery")
  219. Dialog.AddOption("The complex weaves of enchantment are compelling. I will study to be an enchanter.","Enchanter")
  220. Dialog.AddOption("Bending truths to create something from nothing is intriguing. I will be a summoner.","Summoner")
  221. Dialog.Start()
  222. end
  223. function Summoner(NPC,Spawn)
  224. FaceTarget(NPC, Spawn)
  225. OfferQuest(NPC,Spawn,Summ)
  226. end
  227. function Sorcery(NPC,Spawn)
  228. FaceTarget(NPC, Spawn)
  229. Dialog.New(NPC, Spawn)
  230. Dialog.AddDialog("Craving such immense power is tempting, but beware, others crave it too. They will destroy you in the blink of an eye to obtain even a small portion of your power. Students of the arcane arts must learn to combat these power plays by testing their skills. Now it is your time to test your skills and face your first opponent.")
  231. Dialog.AddVoiceover("voiceover/english/arcanist_sonius/fprt_north/arcanistsonius018.mp3", 2784462451, 4251950023)
  232. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  233. Dialog.AddOption("I am ready. Who will I be testing my skills on?","Sorcery2")
  234. Dialog.AddOption("Perhaps I should reconsider this...","FinalClassTest")
  235. Dialog.Start()
  236. end
  237. function Sorcery2(NPC,Spawn)
  238. FaceTarget(NPC, Spawn)
  239. OfferQuest(NPC,Spawn,Sorc)
  240. end
  241. function Enchanter(NPC,Spawn)
  242. FaceTarget(NPC, Spawn)
  243. Dialog.New(NPC, Spawn)
  244. Dialog.AddDialog("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.")
  245. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  246. Dialog.AddVoiceover("voiceover/english/arcanist_sonius/fprt_north/arcanistsonius012.mp3", 0, 0)
  247. Dialog.AddOption("If it is like my lesson before, I can handle a crowd.","Enchanter2")
  248. Dialog.AddOption("Actually, I better rethink this.","FinalClassTest")
  249. Dialog.Start()
  250. end
  251. function Enchanter2(NPC,Spawn)
  252. FaceTarget(NPC, Spawn)
  253. OfferQuest(NPC,Spawn,Ench)
  254. end
  255. function GoodbyeSumm(NPC,Spawn) -- ALSO SORC
  256. FaceTarget(NPC, Spawn)
  257. Dialog.New(NPC, Spawn)
  258. Dialog.AddDialog("You don't need to return to me. You'll have proved your worth and readiness. Take care, though. You'll be alone and these elementals will not go down without a fight. I hope to see you again one day.")
  259. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel031.mp3", 980785219, 3713600865)
  260. PlayFlavor(NPC, "", "", "bye", 0, 0, Spawn)
  261. Dialog.AddOption("Thank you Magister Niksel.")
  262. Dialog.Start()
  263. end
  264. function GoodbyeEnch(NPC,Spawn)
  265. FaceTarget(NPC, Spawn)
  266. Dialog.New(NPC, Spawn)
  267. Dialog.AddDialog("Once you've quelled the crowd you'll have more than proven yourself to be a capable enchanter. You won't need to return to me, but I hope to see you again. Take care, and good luck!")
  268. PlayFlavor(NPC, "", "", "bye", 0, 0, Spawn)
  269. Dialog.AddOption("Thank you Magister Niksel.")
  270. Dialog.Start()
  271. end