9
3

Timrek.lua 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. --[[
  2. Script Name : SpawnScripts/TheLostVillageofKugup/Timrek.lua
  3. Script Purpose : Timrek
  4. Script Author : neatz09
  5. Script Date : 2023.05.06
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local ThePuzzledTactician = 5930
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, ThePuzzledTactician)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. if not HasQuest(Spawn, ThePuzzledTactician) and not HasCompletedQuest(Spawn, ThePuzzledTactician) then
  19. Dialog2(NPC, Spawn)
  20. elseif HasQuest(Spawn, ThePuzzledTactician) and GetQuestStep(Spawn, ThePuzzledTactician) == 1 then
  21. Dialog12(NPC, Spawn)
  22. else
  23. RandomGreeting(NPC, Spawn)
  24. end
  25. end
  26. function RandomGreeting(NPC, Spawn)
  27. local choice = MakeRandomInt(1,5)
  28. if choice == 1 then
  29. PlayFlavor(NPC, "", "I'm afraid my task will require your full attention. Come see me again when you're not preoccupied...", "", 0, 0, Spawn, 0)
  30. elseif choice == 2 then
  31. PlayFlavor(NPC, "", "Ahh, my mind is finally free to think about more important issues. Now, where was I?", "", 0, 0, Spawn, 0)
  32. elseif choice == 3 then
  33. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1024.mp3", 0, 0, Spawn)
  34. elseif choice == 4 then
  35. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1024.mp3", 0, 0, Spawn)
  36. elseif choice == 5 then
  37. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1024.mp3", 0, 0, Spawn)
  38. end
  39. end
  40. function Dialog1(NPC, Spawn)
  41. FaceTarget(NPC, Spawn)
  42. Dialog.New(NPC, Spawn)
  43. Dialog.AddDialog("What order did they finish in the contest, from most to least cats eaten?")
  44. Dialog.AddOption("End.")
  45. Dialog.Start()
  46. end
  47. function Dialog2(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. Dialog.New(NPC, Spawn)
  50. Dialog.AddDialog("No no... that can't be it... hmm... If he ate three cats... no... no that's inconceivable.")
  51. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_3_1024.mp3", 0, 0)
  52. Dialog.AddOption("Excuse me?", "Dialog10")
  53. Dialog.AddOption("Uh, you're crazy! ")
  54. Dialog.Start()
  55. end
  56. function Dialog3(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. Dialog.New(NPC, Spawn)
  59. Dialog.AddDialog("No no... that can't be it... hmm... If he ate three cats... no... no that's inconceivable.")
  60. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_1_1024.mp3", 0, 0)
  61. Dialog.AddOption("Excuse me?", "Dialog10")
  62. Dialog.AddOption("Uh, you're crazy! ")
  63. Dialog.Start()
  64. end
  65. function Dialog4(NPC, Spawn)
  66. FaceTarget(NPC, Spawn)
  67. Dialog.New(NPC, Spawn)
  68. Dialog.AddDialog("Hmmm, no, something seems wrong about it... ")
  69. Dialog.AddOption("Reset the puzzle.", "Dialog7")
  70. Dialog.Start()
  71. end
  72. function Dialog5(NPC, Spawn)
  73. FaceTarget(NPC, Spawn)
  74. Dialog.New(NPC, Spawn)
  75. Dialog.AddDialog("The two brothers, Krunk and Brunk, ate the most and least cats.")
  76. Dialog.AddOption("Next...", "Dialog6")
  77. Dialog.Start()
  78. end
  79. function Dialog6(NPC, Spawn)
  80. FaceTarget(NPC, Spawn)
  81. Dialog.New(NPC, Spawn)
  82. Dialog.AddDialog("Barzan ate less than Brunk, but more than Vrack.")
  83. Dialog.AddOption("Next...", "Dialog1")
  84. Dialog.Start()
  85. end
  86. function Dialog7(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. Dialog.New(NPC, Spawn)
  89. Dialog.AddDialog("Alright, it's reset.")
  90. Dialog.AddOption("Thanks.")
  91. Dialog.Start()
  92. end
  93. function Dialog8(NPC, Spawn)
  94. FaceTarget(NPC, Spawn)
  95. Dialog.New(NPC, Spawn)
  96. Dialog.AddDialog("Five blundering Trolls, Kraznar, Vrack, Krunk, Brunk, and Barzan, had a cat eating contest...")
  97. Dialog.AddOption("Next...", "Dialog17")
  98. Dialog.Start()
  99. end
  100. function Dialog9(NPC, Spawn)
  101. FaceTarget(NPC, Spawn)
  102. Dialog.New(NPC, Spawn)
  103. Dialog.AddDialog("No no... that can't be it... hmm... If he ate three cats... no... no that's inconceivable.")
  104. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_2_1024.mp3", 0, 0)
  105. Dialog.AddOption("Excuse me?", "Dialog10")
  106. Dialog.AddOption("Uh, you're crazy! ")
  107. Dialog.Start()
  108. end
  109. function Dialog10(NPC, Spawn)
  110. FaceTarget(NPC, Spawn)
  111. Dialog.New(NPC, Spawn)
  112. Dialog.AddDialog("Oh, I'm very sorry. It's just that I'm so preoccupied with this logic puzzle. Why, I haven't even been able to plan any new battle tactics in weeks! This is driving me crazy!")
  113. Dialog.AddOption("Battle Tactics? What are you talking about?", "Dialog16")
  114. Dialog.AddOption("Yeah... Crazy...")
  115. Dialog.Start()
  116. end
  117. function Dialog11(NPC, Spawn)
  118. FaceTarget(NPC, Spawn)
  119. Dialog.New(NPC, Spawn)
  120. Dialog.AddDialog("It's a logic puzzle. If you'd like to take a crack at it, be my guest. I must warn you though, it isn't easy.")
  121. Dialog.AddOption("Sure, I'll take a look.", "ThePuzzledTacticianQuest")
  122. Dialog.AddOption("No thanks, I enjoy my sanity.")
  123. Dialog.Start()
  124. end
  125. function Dialog12(NPC, Spawn)
  126. FaceTarget(NPC, Spawn)
  127. Dialog.New(NPC, Spawn)
  128. Dialog.AddDialog("So you've had a crack at it now, eh? What do you think?")
  129. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_2_1024.mp3", 0, 0)
  130. Dialog.AddOption("Can I hear the riddle again?", "Dialog8")
  131. Dialog.AddOption("I think I have it!", "Dialog13")
  132. Dialog.AddOption("Reset the puzzle", "Dialog7")
  133. Dialog.AddOption("Nevermind")
  134. Dialog.Start()
  135. end
  136. function Dialog13(NPC, Spawn)
  137. FaceTarget(NPC, Spawn)
  138. Dialog.New(NPC, Spawn)
  139. Dialog.AddDialog("Let me see here... Yes, yes I believe you've done it! This is amazing! Thank you so much, now I can finally get back to work!")
  140. Dialog.AddOption("Glad I could help!")
  141. Dialog.Start()
  142. end
  143. function Dialog14(NPC, Spawn)
  144. FaceTarget(NPC, Spawn)
  145. Dialog.New(NPC, Spawn)
  146. Dialog.AddDialog("So, you've had a crack at it now, eh? What do you think?")
  147. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_2_1024.mp3", 0, 0)
  148. Dialog.AddOption("Can I hear the riddle again?")
  149. Dialog.AddOption("I think I have it!", "Dialog13")
  150. Dialog.AddOption("Reset the puzzle", "Dialog7")
  151. Dialog.AddOption("Nevermind")
  152. Dialog.Start()
  153. end
  154. function Dialog15(NPC, Spawn)
  155. FaceTarget(NPC, Spawn)
  156. Dialog.New(NPC, Spawn)
  157. Dialog.AddDialog("Alright! Here's the riddle. Once you hear it, go place the totems on the correct platforms. When you think you're finished, or you want to start over, come talk to me!")
  158. Dialog.AddOption("What's the riddle?", "Dialog8")
  159. Dialog.AddOption("I don't need to hear the riddle.")
  160. Dialog.Start()
  161. end
  162. function Dialog16(NPC, Spawn)
  163. FaceTarget(NPC, Spawn)
  164. Dialog.New(NPC, Spawn)
  165. Dialog.AddDialog("Well, I'm Kugup's master tactician, but lately I've just been too busy with this puzzle to formulate any new stratagems. It's really becoming a problem!")
  166. Dialog.AddOption("What puzzle?", "Dialog11")
  167. Dialog.AddOption("That's intriguing, but I must be going.")
  168. Dialog.Start()
  169. end
  170. function Dialog17(NPC, Spawn)
  171. FaceTarget(NPC, Spawn)
  172. Dialog.New(NPC, Spawn)
  173. Dialog.AddDialog("Vrack ate more than at least two other Trolls.")
  174. Dialog.AddOption("Next...", "Dialog5")
  175. Dialog.Start()
  176. end
  177. function Dialog18(NPC, Spawn)
  178. FaceTarget(NPC, Spawn)
  179. Dialog.New(NPC, Spawn)
  180. Dialog.AddDialog("So, you've had a crack at it now, eh? What do you think?")
  181. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_3_1024.mp3", 0, 0)
  182. Dialog.AddOption("Can I hear the riddle again?", "Dialog8")
  183. Dialog.AddOption("I think I have it!", "Dialog4")
  184. Dialog.AddOption("Reset the puzzle")
  185. Dialog.AddOption("Nevermind")
  186. Dialog.Start()
  187. end
  188. function Dialog19(NPC, Spawn)
  189. FaceTarget(NPC, Spawn)
  190. Dialog.New(NPC, Spawn)
  191. Dialog.AddDialog("So, you've had a crack at it now, eh? What do you think?")
  192. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_1_1024.mp3", 0, 0)
  193. Dialog.AddOption("Can I hear the riddle again?")
  194. Dialog.AddOption("I think I have it!", "Dialog4")
  195. Dialog.AddOption("Reset the puzzle")
  196. Dialog.AddOption("Nevermind")
  197. Dialog.Start()
  198. end
  199. function ThePuzzledTacticianQuest(NPC, Spawn)
  200. OfferQuest(NPC, Spawn, ThePuzzledTactician)
  201. Dialog15(NPC, Spawn)
  202. end