IntelligenceOfficerGezlowe.lua 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. --[[
  2. Script Name : SpawnScripts/Freeport/IntelligenceOfficerGezlowe.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.08.07 07:08:31
  5. Script Purpose :
  6. : Needs emote in InRange elseif beckon is just a placeholder
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local SearchForTheMissing = 573
  10. local AFesteringProblem = 5800
  11. function spawn(NPC)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange", Spawn)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. if HasQuest(Spawn, SearchForTheMissing) and GetQuestStep(Spawn, SearchForTheMissing) == 1 then
  19. PlayFlavor(NPC, "", "You there! If you don't wish to be found in violation of treason, you'd better have a word with me.", "beckon", 1689589577, 4560189, Spawn)
  20. elseif HasCompletedQuest(Spawn, SearchForTheMissing) and not HasQuest(Spawn, AFesteringProblem) then
  21. PlayFlavor(NPC, "", "Hey, you! I could use a capable adventurer like you for something!", "beckon", 0, 0, Spawn, 0)
  22. end
  23. end
  24. function LeaveRange(NPC, Spawn)
  25. end
  26. function hailed(NPC, Spawn)
  27. --Say(NPC, "You are currently on step " .. GetQuestStep(Spawn, AFesteringProblem))
  28. QuestChecks(NPC, Spawn)
  29. end
  30. function RandomGreeting(NPC, Spawn)
  31. local choice = MakeRandomInt(1,7)
  32. if choice == 1 then
  33. PlayFlavor(NPC, "", "Move along, move along.", "", 0, 0, Spawn, 0)
  34. elseif choice == 2 then
  35. PlayFlavor(NPC, "", "You there! If you don't wish to be found in violation of treason, you'd better have a word with me.", "", 0, 0, Spawn, 0)
  36. elseif choice == 3 then
  37. PlayFlavor(NPC, "", "Hey, you! I could use a capable adventurer like you for something!", "", 0, 0, Spawn, 0)
  38. elseif choice == 4 then
  39. PlayFlavor(NPC, "", "You display the makings of a fine, upstanding member of this city, you do.", "", 0, 0, Spawn, 0)
  40. elseif choice == 5 then
  41. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1048.mp3", 0, 0, Spawn)
  42. elseif choice == 6 then
  43. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1048.mp3", 0, 0, Spawn)
  44. elseif choice == 7 then
  45. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1048.mp3", 0, 0, Spawn)
  46. end
  47. end
  48. function QuestChecks(NPC, Spawn)
  49. if HasQuest(Spawn, SearchForTheMissing) and GetQuestStep(Spawn, SearchForTheMissing) == 1 then
  50. Dialog3(NPC, Spawn)
  51. elseif HasCompletedQuest(Spawn, SearchForTheMissing) and GetQuestStep(Spawn, AFesteringProblem) ~= 2 and not HasCompletedQuest(Spawn, AFesteringProblem) then
  52. Dialog11(NPC, Spawn)
  53. elseif HasQuest(Spawn, AFesteringProblem) and GetQuestStep(Spawn, AFesteringProblem) == 2 then
  54. Dialog12(NPC, Spawn)
  55. elseif HasCompletedQuest(Spawn, AFesteringProblem) then
  56. Dialog10(NPC, Spawn)
  57. else
  58. PlayFlavor(NPC, "", "Move along, move along.", "", 0, 0, Spawn, 0)
  59. end
  60. end
  61. function Dialog1(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. Dialog.New(NPC, Spawn)
  64. Dialog.AddDialog("Figured an old Freeport hero like yourself wouldn't have a problem with it. One of the guards found this in the frog's cell. Apparently it's got an admirer. I'm sure you'll find the right thing to do.")
  65. Dialog.AddVoiceover("intelligence_officer_gezlowe/fprt_west/io_gezlowe011.mp3", 3091008699, 1945248180)
  66. Dialog.AddOption("I'm sure I will.", "Dialog13")
  67. Dialog.Start()
  68. end
  69. function Dialog2(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. Dialog.New(NPC, Spawn)
  72. Dialog.AddDialog("Good, right along our line of thinking. We can't just have these multi-colored dissidents wandering around, can we?")
  73. Dialog.AddVoiceover("intelligence_officer_gezlowe/fprt_west/io_gezlowe003.mp3", 1225667417, 2186564758)
  74. Dialog.AddOption("No, sir.", "Dialog4")
  75. Dialog.Start()
  76. end
  77. function Dialog3(NPC, Spawn)
  78. FaceTarget(NPC, Spawn)
  79. Dialog.New(NPC, Spawn)
  80. Dialog.AddDialog("Good, good. I'm glad you made the right choice. I understand you've agreed to do a bit of work for a prisoner. Lucan doesn't take kindly to those who would aid enemies of the state.")
  81. Dialog.AddVoiceover("intelligence_officer_gezlowe/fprt_west/io_gezlowe001.mp3", 4100697640, 2084488414)
  82. Dialog.AddOption("Enemies of the state?", "Dialog8")
  83. Dialog.AddOption("I was just getting more information so I could find the rest of them.", "Dialog2")
  84. Dialog.Start()
  85. end
  86. function Dialog4(NPC, Spawn)
  87. SetStepComplete(Spawn, SearchForTheMissing, 1)
  88. FaceTarget(NPC, Spawn)
  89. Dialog.New(NPC, Spawn)
  90. Dialog.AddDialog("So what we're going to do is take care of this little incident before we find more of these things on our doorstep. Go find the one you're looking for. Kill it. Then tell the frog that it died of sunstroke or something.")
  91. Dialog.AddVoiceover("intelligence_officer_gezlowe/fprt_west/io_gezlowe004.mp3", 2945684159, 2849117183)
  92. Dialog.AddOption("Very well.")
  93. Dialog.Start()
  94. end
  95. function Dialog5(NPC, Spawn)
  96. FaceTarget(NPC, Spawn)
  97. Dialog.New(NPC, Spawn)
  98. Dialog.AddDialog("Bingo. Why don't you saunter over there and kill three Qeynosians and a froglok with one stone?")
  99. Dialog.AddVoiceover("intelligence_officer_gezlowe/fprt_west/io_gezlowe007.mp3", 439964706, 2468326434)
  100. Dialog.AddOption("I might be persuaded. But I'm not gonna do this out of the goodness of my heart.", "Dialog6")
  101. Dialog.Start()
  102. end
  103. function Dialog6(NPC, Spawn)
  104. FaceTarget(NPC, Spawn)
  105. Dialog.New(NPC, Spawn)
  106. Dialog.AddDialog("Wouldn't expect you to. Lucan rewards his allies well. I'd imagine though that you might want to please him. You know. Just this once... seeing as how the frog's only alive because you didn't finish the job.")
  107. Dialog.AddVoiceover("intelligence_officer_gezlowe/fprt_west/io_gezlowe008.mp3", 3922312219, 4101212124)
  108. Dialog.AddOption("I told you, it was dead when I left.", "AFesteringProblemQuest")
  109. Dialog.Start()
  110. end
  111. function AFesteringProblemQuest (NPC, Spawn)
  112. FaceTarget(NPC, Spawn)
  113. OfferQuest(NPC, Spawn, AFesteringProblem)
  114. end
  115. function Dialog8(NPC, Spawn)
  116. FaceTarget(NPC, Spawn)
  117. Dialog.New(NPC, Spawn)
  118. Dialog.AddDialog("Frogloks. If the legends are to be believed, they've got some sort of religious relation to Lucan's old enemies. Can't have them wandering around, understand?")
  119. Dialog.AddVoiceover("intelligence_officer_gezlowe/fprt_west/io_gezlowe002.mp3", 2574431215, 475612057)
  120. Dialog.AddOption("Yeah, I understand.", "Dialog4")
  121. Dialog.Start()
  122. end
  123. function Dialog9(NPC, Spawn)
  124. FaceTarget(NPC, Spawn)
  125. Dialog.New(NPC, Spawn)
  126. Dialog.AddDialog("How in Lucan's name am I supposed to know? One of Siegemaker's informants in the Commons found a camp of them. Apparently it's not well enough to travel, so they've set up a camp to protect it while it heals.")
  127. Dialog.AddVoiceover("intelligence_officer_gezlowe/fprt_west/io_gezlowe006.mp3", 440769352, 3623662014)
  128. Dialog.AddOption("I'm guessing from your tone that it needs to die.", "Dialog5")
  129. Dialog.Start()
  130. end
  131. function Dialog10(NPC, Spawn)
  132. FaceTarget(NPC, Spawn)
  133. Dialog.New(NPC, Spawn)
  134. Dialog.AddDialog("Did you lose that scroll? It's a good thing that we keep good records...")
  135. Dialog.AddVoiceover("intelligence_officer_gezlowe/fprt_west/io_gezlowe014.mp3", 1549689638, 2411406729)
  136. Dialog.AddOption("Yes, I need another.", "SummonAnother")
  137. Dialog.AddOption("No, I still have mine.")
  138. Dialog.Start()
  139. end
  140. function SummonAnother(NPC, Spawn)
  141. SummonItem(Spawn, 2611, 1)
  142. end
  143. function Dialog11(NPC, Spawn)
  144. FaceTarget(NPC, Spawn)
  145. Dialog.New(NPC, Spawn)
  146. Dialog.AddDialog("It seems that a band of those filthy Qeynosians managed to save that frog you killed earlier.")
  147. Dialog.AddVoiceover("intelligence_officer_gezlowe/fprt_west/io_gezlowe005.mp3", 1053087635, 2286317524)
  148. Dialog.AddOption("How? I made sure it was dead.", "Dialog9")
  149. Dialog.AddOption("Look, I'm not interested.")
  150. Dialog.Start()
  151. end
  152. function Dialog12(NPC, Spawn)
  153. FaceTarget(NPC, Spawn)
  154. Dialog.New(NPC, Spawn)
  155. Dialog.AddDialog("You're back. I take it that means you've taken care of the little pest.")
  156. Dialog.AddVoiceover("intelligence_officer_gezlowe/fprt_west/io_gezlowe010.mp3", 2403328736, 294239661)
  157. Dialog.AddOption("It's six feet under.", "Dialog1")
  158. Dialog.Start()
  159. end
  160. function Dialog13(NPC, Spawn)
  161. SetStepComplete(Spawn, AFesteringProblem, 2)
  162. FaceTarget(NPC, Spawn)
  163. Dialog.New(NPC, Spawn)
  164. Dialog.AddDialog("Good. You can handle it from here.")
  165. Dialog.AddVoiceover("intelligence_officer_gezlowe/fprt_west/io_gezlowe013.mp3", 1704086596, 3560389288)
  166. Dialog.AddOption("Indeed I can.")
  167. Dialog.Start()
  168. end