YanariCyellann.lua 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. --[[
  2. Script Name : SpawnScripts/Castleview/YanariCyellann.lua
  3. Script Purpose : Yanari Cyellann
  4. Script Author : Dorbin
  5. Script Date : 2022.01.28
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  10. local Badgers = 5465
  11. local Slime = 5466
  12. local Mage1 = 5767
  13. function spawn(NPC)
  14. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  15. ProvidesQuest(NPC, Badgers)
  16. ProvidesQuest(NPC, Slime)
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function InRange(NPC, Spawn) --Quest Callout
  22. if GetFactionAmount(Spawn,11) <0 then
  23. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/100_researcher_yanari_multhail1_ba125732.mp3", "I'm very busy and don't want you getting hurt. Please leave me to my work.", "shakefist", 2153034813, 3927600348, Spawn)
  24. else
  25. if math.random(1, 100) <= 70 then
  26. if not HasCompletedQuest (Spawn, Badgers) and not HasCompletedQuest (Spawn, Slime) then
  27. choice = math.random(1,3)
  28. FaceTarget(NPC, Spawn)
  29. if choice ==1 then
  30. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/100_researcher_yanari_multhail1_ba125732.mp3", "I'm very busy and don't want you getting hurt. Please leave me to my work.", "no", 2153034813, 3927600348, Spawn)
  31. elseif choice ==2 then
  32. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/100_researcher_yanari_callout2_3cf87337.mp3", "Let's see... Two vials of gunk extract mixed with... Oh, dear! I'm out of extract! You, adventurer, interested in making some coin?", "confused", 812719323, 2645014610, Spawn)
  33. else
  34. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/100_researcher_yanari_callout1_306f718b.mp3", "Hmmm... All out of badger claws. This will never do!", "ponder", 1224876034, 2351112322, Spawn)
  35. end
  36. end
  37. elseif HasCompletedQuest (Spawn, Badgers) and HasCompletedQuest (Spawn, Slime) then
  38. choice = math.random(1,3)
  39. if choice ==1 then
  40. FaceTarget(NPC, Spawn)
  41. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/100_researcher_yanari_multhail1_ba125732.mp3", "I'm very busy and don't want you getting hurt. Please leave me to my work.", "no", 2153034813, 3927600348, Spawn)
  42. elseif choice ==2 then
  43. FaceTarget(NPC, Spawn)
  44. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/100_researcher_yanari_multhail5_d4faf799.mp3", "Don't touch anything! You could turn yourself into a goo or destroy the entire building! I'm very busy and don't want you getting hurt. On your way, now!", "frustrated", 3857840792, 1030063822, Spawn)
  45. else
  46. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  47. end
  48. end
  49. end
  50. end
  51. function hailed(NPC, Spawn)
  52. if GetFactionAmount(Spawn,11) <0 then
  53. FaceTarget(NPC, Spawn)
  54. FactionChecking(NPC, Spawn, faction)
  55. else
  56. FaceTarget(NPC, Spawn)
  57. Dialog.New(NPC, Spawn)
  58. Dialog.AddDialog("Do not touch anything! You could turn yourself into a goo or destroy the entire building. What do you need?")
  59. Dialog.AddVoiceover("voiceover/english/yanari_cyellann/qey_village04/yanaricyellan.mp3", 3613336528, 1736617695)
  60. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  61. if not HasQuest(Spawn, Badgers) and not HasCompletedQuest (Spawn, Badgers) then
  62. Dialog.AddOption("Don't worry, I'm not going to touch anything. I'm just interested in your work.", "BadgerStart")
  63. end
  64. if not HasQuest(Spawn, Slime) and not HasCompletedQuest (Spawn, Slime) then
  65. Dialog.AddOption("I do not care to be a goo.", "SlimeStart")
  66. end
  67. if GetQuestStep(Spawn, Badgers)==2 then
  68. Dialog.AddOption("I brought the claws that you asked for.", "DoneBadger")
  69. end
  70. if GetQuestStep(Spawn, Slime)==2 then
  71. Dialog.AddOption("I have collected your substance extract.", "DoneSlime")
  72. end
  73. if GetQuestStep(Spawn,Mage1)==3 then
  74. Dialog.AddOption("The Magister suggested I asked you about what you use your sorcery for.", "MageTraining1")
  75. end
  76. Dialog.AddOption("You seem to be a bit busy at the moment. I'll leave you alone.")
  77. Dialog.Start()
  78. end
  79. end
  80. function BadgerStart(NPC, Spawn)
  81. FaceTarget(NPC, Spawn)
  82. Dialog.New(NPC, Spawn)
  83. Dialog.AddDialog("Interested, are you? Well, I am trying to make my spells and items more potent. Unfortunately I ran out of volatility components. Would you do me a favor and collect some vicious badger claws?")
  84. Dialog.AddVoiceover("voiceover/english/yanari_cyellann/qey_village04/yanaricyellan000.mp3",913747199,2909702718)
  85. PlayFlavor(NPC, "", "", "sniff", 0,0 , Spawn)
  86. Dialog.AddOption("I can do that for you. A few badgers shouldn`t be a problem for me.", "BadgerStarting")
  87. Dialog.AddOption("I wouldn't even touch a regular badger, let alone a vicious one!")
  88. Dialog.Start()
  89. end
  90. function DoneBadger(NPC, Spawn)
  91. FaceTarget(NPC, Spawn)
  92. Dialog.New(NPC, Spawn)
  93. Dialog.AddDialog("Marvelous! I shall use one of the claws to imbue a wand for you. Um ... just take a few steps back, safety and all.")
  94. Dialog.AddVoiceover("voiceover/english/yanari_cyellann/qey_village04/yanaricyellan002.mp3",3385634498, 2633500192)
  95. PlayFlavor(NPC, "", "", "happy", 0,0 , Spawn)
  96. Dialog.AddOption("I'll just be under this very thick table.","BadgerFinish")
  97. Dialog.Start()
  98. end
  99. function BadgerFinish(NPC, Spawn)
  100. SetStepComplete(Spawn, Badgers, 2)
  101. FaceTarget(NPC, Spawn)
  102. Dialog.New(NPC, Spawn)
  103. Dialog.AddDialog("It worked! I mean ... here is a wand for you. Use it well.")
  104. Dialog.AddVoiceover("voiceover/english/yanari_cyellann/qey_village04/yanaricyellan003.mp3", 3490869984, 2394433819)
  105. PlayFlavor(NPC, "", "", "boggle", 0,0 , Spawn)
  106. Dialog.AddOption("I plan to be very careful with it.")
  107. Dialog.AddOption("...I could have been blown up! Thanks, but I'm getting out of here.")
  108. Dialog.Start()
  109. end
  110. function SlimeStart(NPC, Spawn)
  111. FaceTarget(NPC, Spawn)
  112. Dialog.New(NPC, Spawn)
  113. Dialog.AddDialog("Then keep your hands away from my experiments! Since you've wasted my precious time with your incessant babbling, I believe you owe me a bit of your own time. I need your help with a task.")
  114. Dialog.AddVoiceover("voiceover/english/yanari_cyellann/qey_village04/yanaricyellan004.mp3", 2138601896,740497069)
  115. PlayFlavor(NPC, "", "", "no", 0,0 , Spawn)
  116. Dialog.AddOption("I can do your task.", "QuestBegin2")
  117. Dialog.AddOption("...I must be going!")
  118. Dialog.Start()
  119. end
  120. function DoneSlime(NPC, Spawn)
  121. FaceTarget(NPC, Spawn)
  122. Dialog.New(NPC, Spawn)
  123. Dialog.AddDialog("Its about time! I almost sent Bleemeb up to go get my extract. I thought the gunks made a meal out of you. Take this pay for your task and leave me with my research.")
  124. Dialog.AddVoiceover("voiceover/english/yanari_cyellann/qey_village04/yanaricyellan006.mp3", 3747403661,785681662)
  125. PlayFlavor(NPC, "", "", "tapfoot", 0,0 , Spawn)
  126. Dialog.AddOption("Have fun with that gunk.", "RewardSlime")
  127. Dialog.AddOption("Yeesh, okay. I'm going now.", "RewardSlime")
  128. Dialog.Start()
  129. end
  130. function BadgerStarting (NPC, Spawn)
  131. FaceTarget(NPC, Spawn)
  132. OfferQuest(NPC, Spawn, Badgers)
  133. end
  134. function QuestBegin2 (NPC, Spawn)
  135. FaceTarget(NPC, Spawn)
  136. OfferQuest(NPC, Spawn, Slime)
  137. end
  138. function RewardSlime(NPC, Spawn)
  139. SetStepComplete(Spawn, Slime, 2)
  140. end
  141. --[[ CLASS Quest material
  142. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/yanaricyellan007.mp3", "If Niksel sent you to me, then that's another story. I have done well by his teachings. What do you want to know about sorcery?", "ponder", 1398879355, 1149892616, Spawn)
  143. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/yanaricyellan008.mp3", "I draw from unstable ether and turn it into different types of fire. Igniting a brazier with a simple incantation is easier than rubbing two sticks together.", "ponder", 3056968266, 3365736320, Spawn)
  144. PlayFlavor(NPC, "voiceover/english/yanari_cyellann/qey_village04/yanaricyellan009.mp3", "Oh, of course ... Back in the day, I was quite the Fire Magi ... firestorms here, explosions there, that kind of thing. I retired from the battlefield before it was too late. You know what they say about playing with fire and all. I hope this helps you.", "ponder", 1034698890, 3446841302, Spawn)
  145. ]]--
  146. function MageTraining1(NPC, Spawn)
  147. FaceTarget(NPC, Spawn)
  148. Dialog.New(NPC, Spawn)
  149. Dialog.AddDialog("If Niksel sent you to me, then that's another story. I have done well by his teachings. What do you want to know about sorcery?")
  150. Dialog.AddVoiceover("voiceover/english/yanari_cyellann/qey_village04/yanaricyellan007.mp3", 1398879355, 1149892616)
  151. PlayFlavor(NPC, "", "", "ponder", 0,0 , Spawn)
  152. Dialog.AddOption("What methods do you use elementals in your magic?", "MageTraining1a")
  153. Dialog.Start()
  154. end
  155. function MageTraining1(NPC, Spawn)
  156. FaceTarget(NPC, Spawn)
  157. Dialog.New(NPC, Spawn)
  158. Dialog.AddDialog("If Niksel sent you to me, then that's another story. I have done well by his teachings. What do you want to know about sorcery?")
  159. Dialog.AddVoiceover("voiceover/english/yanari_cyellann/qey_village04/yanaricyellan008.mp3", 3056968266, 3365736320)
  160. CastSpell(NPC,19)
  161. Dialog.AddOption("No doubt you've used your magic for other purposes outside of your laboratory?", "MageTraining1a")
  162. Dialog.Start()
  163. end
  164. function MageTraining1(NPC, Spawn)
  165. SetStepComplete(Spawn,Mage1,3)
  166. FaceTarget(NPC, Spawn)
  167. Dialog.New(NPC, Spawn)
  168. Dialog.AddDialog("Oh, of course ... Back in the day, I was quite the Fire Magi ... firestorms here, explosions there, that kind of thing. I retired from the battlefield before it was too late. You know what they say about playing with fire and all. I hope this helps you.")
  169. Dialog.AddVoiceover("voiceover/english/yanari_cyellann/qey_village04/yanaricyellan009.mp3", 1034698890, 3446841302)
  170. PlayFlavor(NPC, "", "", "ponder", 0,0 , Spawn)
  171. Dialog.AddOption("Thank you. It was most helpful.")
  172. Dialog.Start()
  173. end