9
3

EbikWobblecog.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/EbikWobblecog.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.25 03:09:00
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local EbiksMissingParts = 5755
  10. function spawn(NPC)
  11. ProvidesQuest(NPC,EbiksMissingParts)
  12. end
  13. function hailed(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. if not HasQuest(Spawn, EbiksMissingParts) and not HasCompletedQuest(Spawn,EbiksMissingParts) then
  16. Dialog1(NPC, Spawn)
  17. elseif GetQuestStep(Spawn, EbiksMissingParts) < 4 then
  18. Dialog21(NPC, Spawn)
  19. elseif GetQuestStep(Spawn, EbiksMissingParts) == 4 then
  20. Dialog22(NPC, Spawn)
  21. elseif HasCompletedQuest(Spawn, EbiksMissingParts) then
  22. Dialog1(NPC, Spawn)
  23. end
  24. end
  25. function respawn(NPC)
  26. spawn(NPC)
  27. end
  28. function Dialog1(NPC, Spawn)
  29. FaceTarget(NPC, Spawn)
  30. Dialog.New(NPC, Spawn)
  31. Dialog.AddDialog("Why, hello there! I was just sitting here waiting for the boat to Qeynos.")
  32. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_01.mp3", 2713964680, 2172979410)
  33. PlayFlavor(NPC,"","","hello",0,0,Spawn)
  34. Dialog.AddOption("Why are you going to Qeynos?", "Dialog2")
  35. Dialog.AddOption("Good luck with that.")
  36. Dialog.Start()
  37. end
  38. function Dialog2(NPC, Spawn)
  39. FaceTarget(NPC, Spawn)
  40. Dialog.New(NPC, Spawn)
  41. Dialog.AddDialog("Ahh, I'm going there to meet my father. He dropped me off on this island because he was afraid our boat wouldn't make the trip. I begged him to stay, but he said he had urgent news for Qeynos.")
  42. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_02.mp3", 532888096, 1705696510)
  43. Dialog.AddOption("What was the news?", "Dialog3")
  44. Dialog.AddOption("Safe travels.")
  45. Dialog.Start()
  46. end
  47. function Dialog3(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. Dialog.New(NPC, Spawn)
  50. Dialog.AddDialog("I'm not quite sure. He was in such a hurry that he never told me. Also I may have been a little distracted by his ship, it was really amazing.")
  51. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_03.mp3", 3248832255, 3165995891)
  52. PlayFlavor(NPC,"","","confused",0,0,Spawn)
  53. Dialog.AddOption("Why was his ship distracting?", "Dialog4")
  54. Dialog.AddOption("Goodbye.")
  55. Dialog.Start()
  56. end
  57. function Dialog4(NPC, Spawn)
  58. FaceTarget(NPC, Spawn)
  59. Dialog.New(NPC, Spawn)
  60. Dialog.AddDialog("Because it was under water, of course! Have you ever seen a boat that runs beneath the waves? I certainly haven't. It was such genius, I spent the entire voyage inspecting it.")
  61. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_04.mp3", 1312724951, 594166513)
  62. PlayFlavor(NPC,"","","nod",0,0,Spawn)
  63. Dialog.AddOption("Go on.", "Dialog5")
  64. Dialog.Start()
  65. end
  66. function Dialog5(NPC, Spawn)
  67. FaceTarget(NPC, Spawn)
  68. Dialog.New(NPC, Spawn)
  69. Dialog.AddDialog("I'm certain he hadn't planned on it falling below the surface. It's just another example of our curse, I suppose.")
  70. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_05.mp3", 2209355729, 410792148)
  71. PlayFlavor(NPC,"","","sigh",0,0,Spawn)
  72. Dialog.AddOption("What curse?", "Dialog6")
  73. Dialog.AddOption("I want no part of your curse, goodbye.")
  74. Dialog.Start()
  75. end
  76. function Dialog6(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. Dialog.New(NPC, Spawn)
  79. Dialog.AddDialog("Surely you've heard of the Wobblecog family curse of miscalculation? No... no, I suppose you haven't, have you? Well, it doesn't appear that the boat is here yet. I imagine I've got time to tell you about our curse if you'd like to hear it.")
  80. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island02/ebik_firsttalk_06.mp3", 848346297, 415788395)
  81. PlayFlavor(NPC,"","","nod",0,0,Spawn)
  82. Dialog.AddOption("Yes, I'd like that.", "Dialog7")
  83. Dialog.AddOption("Not really.")
  84. Dialog.Start()
  85. end
  86. function Dialog7(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. Dialog.New(NPC, Spawn)
  89. Dialog.AddDialog("Very well. It began long ago in Ak'Anon when the king decided to hold a contest. It was grand. The king invited everyone to make a clockwork king, and the one that most resembled him would win.")
  90. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island02/ebik_firsttalk_07.mp3", 489617943, 459263052)
  91. PlayFlavor(NPC,"","","agree",0,0,Spawn)
  92. Dialog.AddOption("Please go on.", "Dialog8")
  93. Dialog.Start()
  94. end
  95. function Dialog8(NPC, Spawn)
  96. FaceTarget(NPC, Spawn)
  97. Dialog.New(NPC, Spawn)
  98. Dialog.AddDialog("The two favored inventors were my ancestor, Tizik Wobblecog, and an ingenious, but maligned tinkerer named Meldrath. They both submitted their designs, and after much deliberation it was found that the Wobblecog plan provided a much more accurate interpretation of the king.")
  99. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_08.mp3", 2658473484, 2726816701)
  100. PlayFlavor(NPC,"","","tapfoot",0,0,Spawn)
  101. Dialog.AddOption("What happened then?", "Dialog9")
  102. Dialog.AddOption("That's nice, fairwell.")
  103. Dialog.Start()
  104. end
  105. function Dialog9(NPC, Spawn)
  106. FaceTarget(NPC, Spawn)
  107. Dialog.New(NPC, Spawn)
  108. Dialog.AddDialog("Tizik's clockwork became the royal doppelganger of course, and Meldrath became infuriated. He placed a curse on my family that has lasted every generation from then onward.")
  109. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_09.mp3", 168646029, 2064100068)
  110. PlayFlavor(NPC,"","","sigh",0,0,Spawn)
  111. Dialog.AddOption("Do go on.", "Dialog10")
  112. Dialog.Start()
  113. end
  114. function Dialog10(NPC, Spawn)
  115. FaceTarget(NPC, Spawn)
  116. Dialog.New(NPC, Spawn)
  117. Dialog.AddDialog("He cursed us with miscalculation! It's nearly driven my family to madness. ")
  118. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_10.mp3", 468670444, 2791058506)
  119. PlayFlavor(NPC,"","","crazy",0,0,Spawn)
  120. Dialog.AddOption("That does sound bothersome.", "Dialog11")
  121. Dialog.Start()
  122. end
  123. function Dialog11(NPC, Spawn)
  124. FaceTarget(NPC, Spawn)
  125. Dialog.New(NPC, Spawn)
  126. Dialog.AddDialog("We're the most ingenious inventors, you see. We have truly inspired ideas, but can not ever see them through to completion because we fumble some inane formula.")
  127. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_11.mp3", 1677273819, 2525140274)
  128. Dialog.AddOption("That sounds devastating.", "Dialog12")
  129. Dialog.AddOption("Good luck with that.")
  130. Dialog.Start()
  131. end
  132. function Dialog12(NPC, Spawn)
  133. FaceTarget(NPC, Spawn)
  134. Dialog.New(NPC, Spawn)
  135. Dialog.AddDialog("Oh, it is! Take my father for instance. We thought he had finally overcome the curse when he made that boat. It looked so beautiful and was more complete than any other Wobblecog invention has been in centuries. ")
  136. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_12.mp3", 605082040, 3732575966)
  137. PlayFlavor(NPC,"","","agree",0,0,Spawn)
  138. Dialog.AddOption("I see.", "Dialog13")
  139. Dialog.Start()
  140. end
  141. function Dialog13(NPC, Spawn)
  142. FaceTarget(NPC, Spawn)
  143. Dialog.New(NPC, Spawn)
  144. Dialog.AddDialog("Then, as soon as we got it out in the ocean, it sunk like a rock. Who knew iron wouldn't float?")
  145. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_13.mp3", 2893072579, 3745020880)
  146. PlayFlavor(NPC,"","","shrug",0,0,Spawn)
  147. Dialog.AddOption("How did you get here if the boat sunk?", "Dialog14")
  148. Dialog.AddOption("Oh boy...I really don't have time for this.")
  149. Dialog.Start()
  150. end
  151. function Dialog14(NPC, Spawn)
  152. FaceTarget(NPC, Spawn)
  153. Dialog.New(NPC, Spawn)
  154. Dialog.AddDialog("Luckily, my father had compensated for the curse. He knew something was bound to go wrong, so he completely encapsulated the boat, making it water tight just in case something went awry. Sure enough, the moment she left the berth the Ticking Tock fell straight to the sea floor.")
  155. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_14.mp3", 950110533, 2594458588)
  156. Dialog.AddOption("But it moved along the floor?", "Dialog15")
  157. Dialog.AddOption("Are you still talking? Goodbye.")
  158. Dialog.Start()
  159. end
  160. function Dialog15(NPC, Spawn)
  161. FaceTarget(NPC, Spawn)
  162. Dialog.New(NPC, Spawn)
  163. Dialog.AddDialog("Oh, yes! There were several waterproofed whirligigs set up in a flagnuvian configuration to displace the meganominal gnoggnards.")
  164. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_15.mp3", 2110642575, 2339438650)
  165. PlayFlavor(NPC,"","","agree",0,0,Spawn)
  166. if not HasQuest(Spawn, EbiksMissingParts) then
  167. Dialog.AddOption("I see...", "Dialog16")
  168. end
  169. Dialog.AddOption("Okay then...I'm just gonna walk away now.")
  170. Dialog.Start()
  171. end
  172. function Dialog16(NPC, Spawn)
  173. FaceTarget(NPC, Spawn)
  174. Dialog.New(NPC, Spawn)
  175. Dialog.AddDialog("So here I am, sitting on the dock with all of the extra par... hmm... Oh! This seems to be a bit of a problem.")
  176. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_16.mp3", 2068602594, 1935966397)
  177. Dialog.AddOption("What's wrong?", "Dialog17")
  178. Dialog.AddOption("And that's my cue to leave.")
  179. Dialog.Start()
  180. end
  181. function Dialog17(NPC, Spawn)
  182. FaceTarget(NPC, Spawn)
  183. Dialog.New(NPC, Spawn)
  184. Dialog.AddDialog("I'm missing the extra parts that my father asked me to collect. Oh no! This is disastrous! I can't leave the dock because I'll miss the boat and I can't go to Qeynos without those parts! What am I going to do?")
  185. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_17.mp3", 1279276755, 1158727410)
  186. PlayFlavor(NPC,"","","pout",0,0,Spawn)
  187. Dialog.AddOption("Maybe I can help?", "Dialog18")
  188. Dialog.AddOption("Sounds like you're out of luck.")
  189. Dialog.Start()
  190. end
  191. function Dialog18(NPC, Spawn)
  192. FaceTarget(NPC, Spawn)
  193. Dialog.New(NPC, Spawn)
  194. Dialog.AddDialog("You'd do that for me? Oh, thank you very, very, much! I'll stay here and ask the boat captain to wait for you to return, should he come. I'm missing three parts and I have no idea where they could be. I know they're on the island somewhere!")
  195. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_18.mp3", 651304560, 3462850597)
  196. PlayFlavor(NPC,"","","whome",0,0,Spawn)
  197. Dialog.AddOption("What parts are you missing?", "Dialog19")
  198. Dialog.Start()
  199. end
  200. function Dialog19(NPC, Spawn)
  201. FaceTarget(NPC, Spawn)
  202. Dialog.New(NPC, Spawn)
  203. Dialog.AddDialog("I'm missing a size 7 clunker, a copper-coated springer, and a triangle spinner. If you could find them and bring them to me, I'd be forever grateful!")
  204. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_firsttalk_19.mp3", 3704607131, 803524082)
  205. PlayFlavor(NPC,"","","nod",0,0,Spawn)
  206. Dialog.AddOption("I'll get right on it.", "QuestOffer")
  207. Dialog.AddOption("I can't right now.")
  208. Dialog.Start()
  209. end
  210. function QuestOffer(NPC,Spawn)
  211. OfferQuest(NPC,Spawn,EbiksMissingParts)
  212. FaceTarget(NPC, Spawn)
  213. end
  214. function Dialog21(NPC, Spawn)
  215. FaceTarget(NPC, Spawn)
  216. Dialog.New(NPC, Spawn)
  217. Dialog.AddDialog("I need all the parts, I can't leave without them and luckily the boat to Qeynos hasn't showed up yet. Please help me find all of the parts.")
  218. PlayFlavor(NPC,"","","tapfoot",0,0,Spawn)
  219. Dialog.AddVoiceover("voiceover/english/ebik_wobblecog/tutorial_island01/ebik/ebik_secondtalk_01.mp3", 688070292, 1255284608)
  220. Dialog.AddOption("Okay.")
  221. Dialog.Start()
  222. end
  223. function Dialog22(NPC, Spawn)
  224. FaceTarget(NPC, Spawn)
  225. Dialog.New(NPC, Spawn)
  226. Dialog.AddDialog("Yes, yes, yes! These are all the parts I need! Thank you ever so much. Please, take this as a token of my appreciation. I'm sure the boat will be here any minute now.")
  227. Dialog.AddVoiceover("voiceover/english/island_of_refuge/ebikwobblecog/ior_ebikwobblecog_021.mp3", 1116547002, 1635450019)
  228. PlayFlavor(NPC,"","","happy",0,0,Spawn)
  229. Dialog.AddOption("Good Luck.")
  230. Dialog.Start()
  231. SetStepComplete(Spawn, EbiksMissingParts, 4)
  232. end