InvestigatorCurfeld.lua 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. --[[
  2. Script Name : SpawnScripts/SunkenCity/InvestigatorCurfeld.lua
  3. Script Purpose : Investigator Curfeld <Dismal Rage>
  4. Script Author : Scatman
  5. Script Date : 2009.07.28
  6. Script Notes :
  7. --]]
  8. local QUEST_4_FROM_THORSON = 269
  9. local QUEST_1 = 270
  10. local QUEST_2 = 271
  11. local QUEST_3 = 272
  12. local QUEST_5_FROM_THORSON = 273
  13. function spawn(NPC)
  14. ProvidesQuest(NPC, QUEST_1)
  15. ProvidesQuest(NPC, QUEST_2)
  16. ProvidesQuest(NPC, QUEST_3)
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function hailed(NPC, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. conversation = CreateConversation()
  24. if HasCompletedQuest(Spawn, QUEST_1) then
  25. if HasCompletedQuest(Spawn, QUEST_2) then
  26. if HasCompletedQuest(Spawn, QUEST_3) then
  27. if HasCompletedQuest(Spawn, QUEST_5_FROM_THORSON) then
  28. Say(NPC, "You again? You can't stop a son of Prexus. Maybe the next fool who comes after you will have better luck!", Spawn)
  29. elseif HasQuest(Spawn, QUEST_5_FROM_THORSON) then
  30. OnQuest3(NPC, Spawn, conversation)
  31. else
  32. OnQuest3(NPC, Spawn, conversation)
  33. end
  34. elseif HasQuest(Spawn, QUEST_3) then
  35. OnQuest3(NPC, Spawn, conversation)
  36. else
  37. SoYouFoundTheShrine(NPC, Spawn, conversation)
  38. end
  39. elseif HasQuest(Spawn, QUEST_2) then
  40. OnQuest2(NPC, Spawn, conversation)
  41. else
  42. WhyHaveYouReturned(NPC, Spawn, conversation)
  43. end
  44. elseif HasQuest(Spawn, QUEST_1) then
  45. OnQuest1(NPC, Spawn, conversation)
  46. else
  47. if not HasCompletedQuest(Spawn, QUEST_4_FROM_THORSON) then
  48. VeryBusy(NPC, Spawn, conversation)
  49. else
  50. YouAgain(NPC, Spawn, conversation)
  51. end
  52. end
  53. end
  54. ---------------------------------------------------------------------------------------------------------------------------
  55. -- QUEST_4_FROM_THORSON
  56. ---------------------------------------------------------------------------------------------------------------------------
  57. function VeryBusy(NPC, Spawn, conversation)
  58. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld001.mp3", "", "", 587048685, 18941612, Spawn)
  59. if HasQuest(Spawn, QUEST_4_FROM_THORSON) then
  60. AddConversationOption(conversation, "My name is " .. GetName(Spawn) .. ". Inquisitor Thorson sent me.", "dlg_12_1")
  61. end
  62. AddConversationOption(conversation, "Nothing at all.")
  63. StartConversation(conversation, NPC, Spawn, "I'm very busy. What is it that you want from me?")
  64. end
  65. function dlg_12_1(NPC, Spawn)
  66. SetStepComplete(Spawn, QUEST_4_FROM_THORSON, 1)
  67. FaceTarget(NPC, Spawn)
  68. conversation = CreateConversation()
  69. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld002.mp3", "", "", 2776959402, 3983139293, Spawn)
  70. AddConversationOption(conversation, "The inquisitor did some research on spectral essences, and he asked me to give it to you.", "dlg_12_2")
  71. AddConversationOption(conversation, "I'll leave you alone.")
  72. StartConversation(conversation, NPC, Spawn, "Thorson, eh? He mentioned a newly arrived hero of Freeport was coming. State your business quickly, for my time is valuable.")
  73. end
  74. ---------------------------------------------------------------------------------------------------------------------------
  75. -- QUEST 1
  76. ---------------------------------------------------------------------------------------------------------------------------
  77. function YouAgain(NPC, Spawn, conversation)
  78. AddConversationOption(conversation, "Inquisitor Thorson sent me to help look into the rise of undead activity.", "dlg_12_5")
  79. AddConversationOption(conversation, "Nevermind.")
  80. StartConversation(conversation, NPC, Spawn, "You again. What is it that you wanted?")
  81. end
  82. function dlg_12_2(NPC, Spawn)
  83. FaceTarget(NPC, Spawn)
  84. conversation = CreateConversation()
  85. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld003.mp3", "", "", 1468838299, 855905444, Spawn)
  86. AddConversationOption(conversation, "He mentioned you might need my assistance.", "dlg_12_3")
  87. AddConversationOption(conversation, "That's all.")
  88. StartConversation(conversation, NPC, Spawn, "Fine, hand it over! Is that all?")
  89. end
  90. function dlg_12_3(NPC, Spawn)
  91. FaceTarget(NPC, Spawn)
  92. conversation = CreateConversation()
  93. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld004.mp3", "", "", 984029368, 2280448766, Spawn)
  94. AddConversationOption(conversation, "I am willing to do whatever is required to serve Freeport.", "dlg_12_4")
  95. AddConversationOption(conversation, "Never mind, I rescind my offer.")
  96. StartConversation(conversation, NPC, Spawn, "Assistance? What I need is solitude so that I can complete my research! What is it that you think you can offer an investigator who serves the Dismal Rage?")
  97. end
  98. function dlg_12_4(NPC, Spawn)
  99. FaceTarget(NPC, Spawn)
  100. conversation = CreateConversation()
  101. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld005.mp3", "", "", 1117786309, 2475990866, Spawn)
  102. AddConversationOption(conversation, "Looking into the increase in undead activity, correct?", "dlg_12_5")
  103. AddConversationOption(conversation, "This doesn't interest me.")
  104. StartConversation(conversation, NPC, Spawn, "Well, come to think of it, there is some work you could do for me. As you know, I've been here in the Sunken City for a while now, conducting some important research.")
  105. end
  106. function dlg_12_5(NPC, Spawn)
  107. FaceTarget(NPC, Spawn)
  108. conversation = CreateConversation()
  109. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld006.mp3", "", "", 3352004340, 1089685047, Spawn)
  110. AddConversationOption(conversation, "Who do you suspect has stolen it?", "dlg_12_6")
  111. AddConversationOption(conversation, "Do your own grunt work.")
  112. StartConversation(conversation, NPC, Spawn, "Yes, undead activity... of course. At any rate, some of my research has been stolen, and it is vital that I get it back. I need you to retrieve it for me.")
  113. end
  114. function dlg_12_6(NPC, Spawn)
  115. FaceTarget(NPC, Spawn)
  116. conversation = CreateConversation()
  117. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld007.mp3", "", "", 753008127, 4149258442, Spawn)
  118. AddConversationOption(conversation, "Where should I look for your research papers?", "OfferQuest1")
  119. AddConversationOption(conversation, "I have no interest in pirates.")
  120. StartConversation(conversation, NPC, Spawn, "I have observed a gang of pirates operating in the abandoned houses to the north. I believe they call themselves the Blackshields, a group of thugs based on the shores of the Commonlands. It is my belief that they're using the Sunken City as a place to store their stolen treasures.")
  121. end
  122. function OfferQuest1(NPC, Spawn)
  123. FaceTarget(NPC, Spawn)
  124. OfferQuest(NPC, Spawn, QUEST_1)
  125. end
  126. function OnQuest1(NPC, Spawn, conversation)
  127. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld009.mp3", "", "", 987373655, 3497715065, Spawn)
  128. if GetQuestStep(Spawn, QUEST_1) == 2 then
  129. AddConversationOption(conversation, "Yes, I found a notebook in an old barrel.", "dlg_19_1")
  130. end
  131. AddConversationOption(conversation, "Not yet.")
  132. StartConversation(conversation, NPC, Spawn, "Have you retrieved my research materials from the Blackshields yet?")
  133. end
  134. function dlg_19_1(NPC, Spawn)
  135. SetStepComplete(Spawn, QUEST_1, 2)
  136. FaceTarget(NPC, Spawn)
  137. conversation = CreateConversation()
  138. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld010.mp3", "", "", 1290071481, 14179397, Spawn)
  139. AddConversationOption(conversation, "I'm ready for anything.", "dlg_19_2")
  140. AddConversationOption(conversation, "I don't need your insults.")
  141. StartConversation(conversation, NPC, Spawn, "Excellent! You may prove useful to me after all. I wonder if I can now entrust you with a more crucial task.")
  142. end
  143. ---------------------------------------------------------------------------------------------------------------------------
  144. -- QUEST 2
  145. ---------------------------------------------------------------------------------------------------------------------------
  146. function WhyHaveYouReturned(NPC, Spawn, conversation)
  147. AddConversationOption(conversation, "I would like to help you further.", "dlg_19_2")
  148. AddConversationOption(conversation, "I guess I will be leaving.")
  149. StartConversation(conversation, NPC, Spawn, "Why have you returned to me?")
  150. end
  151. function dlg_19_2(NPC, Spawn)
  152. FaceTarget(NPC, Spawn)
  153. conversation = CreateConversation()
  154. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld011.mp3", "", "", 2158708484, 291273731, Spawn)
  155. AddConversationOption(conversation, "What do you mean by 'usable'?", "dlg_19_3")
  156. AddConversationOption(conversation, "Your task doesn't interest me.")
  157. StartConversation(conversation, NPC, Spawn, "Back when this place was known as Plank's Edge, the followers of Prexus built a shrine to the Ocean Lord. I need to know if any part of that shrine still exists, and if so, whether it still resonates with any usable divine power.")
  158. end
  159. function dlg_19_3(NPC, Spawn)
  160. FaceTarget(NPC, Spawn)
  161. conversation = CreateConversation()
  162. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld012.mp3", "", "", 3900893827, 953702832, Spawn)
  163. AddConversationOption(conversation, "No need to be so testy! I will do it.", "dlg_19_4")
  164. AddConversationOption(conversation, "I don't need to stand for your rudeness.")
  165. StartConversation(conversation, NPC, Spawn, "Do not question me! You are not experienced enough in the ways of the Dismal Rage to understand these matters. Will you undertake this mission or not?")
  166. end
  167. function dlg_19_4(NPC, Spawn)
  168. FaceTarget(NPC, Spawn)
  169. conversation = CreateConversation()
  170. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld013.mp3", "", "", 279847227, 949322829, Spawn)
  171. AddConversationOption(conversation, "I will be careful.", "OfferQuest2")
  172. AddConversationOption(conversation, "I'd best be off.")
  173. StartConversation(conversation, NPC, Spawn, "Then be about your work. Find whatever remains of the shrine of Prexus and tell me if it has any remnants of its former power. Beware, for the corpses of the Darkfathom followers may still be guarding their once holy place.")
  174. end
  175. function OfferQuest2(NPC, Spawn)
  176. FaceTarget(NPC, Spawn)
  177. OfferQuest(NPC, Spawn, QUEST_2)
  178. end
  179. function OnQuest2(NPC, Spawn, conversation)
  180. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld015.mp3", "", "", 3353662707, 2467058534, Spawn)
  181. if GetQuestStep(Spawn, QUEST_2) == 2 then
  182. AddConversationOption(conversation, "I've found the ruined shrine, and it has an eerie hum surrounding it.", "dlg_20_1")
  183. end
  184. AddConversationOption(conversation, "I haven't found it yet.")
  185. StartConversation(conversation, NPC, Spawn, "Did you find the shrine of Prexus? Does it still resonate with power?")
  186. end
  187. function dlg_20_1(NPC, Spawn)
  188. SetStepComplete(Spawn, QUEST_2, 2)
  189. FaceTarget(NPC, Spawn)
  190. conversation = CreateConversation()
  191. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld016.mp3", "", "", 2893810330, 4143475866, Spawn)
  192. AddConversationOption(conversation, "What may still be possible?", "dlg_20_2")
  193. AddConversationOption(conversation, "I don't have time for this.")
  194. StartConversation(conversation, NPC, Spawn, "Magnificent news! Then it might still be possible! This confirms all my fondest hopes!")
  195. end
  196. ---------------------------------------------------------------------------------------------------------------------------
  197. -- QUEST 3
  198. ---------------------------------------------------------------------------------------------------------------------------
  199. function SoYouFoundTheShrine(NPC, Spawn, conversation)
  200. AddConversationOption(conversation, "I was curious what you wanted from that shrine.", "dlg_20_2")
  201. AddConversationOption(conversation, "I'm tired of this abuse.")
  202. StartConversation(conversation, NPC, Spawn, "So you found the Shrine of Prexus. Why are you still disturbing my work?")
  203. end
  204. function dlg_20_2(NPC, Spawn)
  205. FaceTarget(NPC, Spawn)
  206. conversation = CreateConversation()
  207. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld017.mp3", "", "", 3975555869, 3311883027, Spawn)
  208. AddConversationOption(conversation, "Inquisitor Thorson said he needed information from you to complete his report.", "OfferQuest3")
  209. AddConversationOption(conversation, "I'm tired of this abuse.")
  210. StartConversation(conversation, NPC, Spawn, "Uh... nothing! You have no right to question me! Go back to Thorson, for I have no further use for you.")
  211. end
  212. function OfferQuest3(NPC, Spawn)
  213. FaceTarget(NPC, Spawn)
  214. OfferQuest(NPC, Spawn, QUEST_3)
  215. end
  216. function OnQuest3(NPC, Spawn, conversation)
  217. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld019.mp3", "", "", 1269088457, 2406366669, Spawn)
  218. if HasQuest(Spawn, QUEST_5_FROM_THORSON) and GetQuestStep(Spawn, QUEST_5_FROM_THORSON) == 1 then
  219. AddConversationOption(conversation, "You did, and we found some rather disturbing notes in your journal.", "dlg_23_1")
  220. end
  221. AddConversationOption(conversation, "I'm going back to him right now.")
  222. StartConversation(conversation, NPC, Spawn, "You again! I thought I sent you back to Thorson.")
  223. end
  224. --------------------------------------------------------------------------------------------------------------------
  225. -- QUEST_5_FROM_THORSON
  226. --------------------------------------------------------------------------------------------------------------------
  227. function dlg_23_1(NPC, Spawn)
  228. FaceTarget(NPC, Spawn)
  229. conversation = CreateConversation()
  230. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld020.mp3", "", "", 1297570306, 1157170727, Spawn)
  231. AddConversationOption(conversation, "Indeed we did. You have some explaining to do.", "dlg_23_2")
  232. AddConversationOption(conversation, "No, we didn't.")
  233. StartConversation(conversation, NPC, Spawn, "In my journal? What do you... Oh, I, uh, seem to have given you the wrong notes to take to him. Just some old scribbles, nothing too interesting. You two didn't read it, did you?")
  234. end
  235. function dlg_23_2(NPC, Spawn)
  236. FaceTarget(NPC, Spawn)
  237. conversation = CreateConversation()
  238. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld021.mp3", "", "", 2210460542, 3190306576, Spawn)
  239. AddConversationOption(conversation, "You're a madman!", "dlg_23_3")
  240. AddConversationOption(conversation, "Time for me to get out of here.")
  241. StartConversation(conversation, NPC, Spawn, "I do not need to explain myself to lesser beings like you. Soon I will recreate Aquel's ritual, only this time I will succeed in sinking Freeport to the bottom of the ocean. And the delicious irony is that you are the one who helped me do it!")
  242. end
  243. function dlg_23_3(NPC, Spawn)
  244. FaceTarget(NPC, Spawn)
  245. conversation = CreateConversation()
  246. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld022.mp3", "", "", 2667398233, 1390342428, Spawn)
  247. AddConversationOption(conversation, "Oh no you won't, Curfeld!", "dlg_23_4")
  248. AddConversationOption(conversation, "Nevermind, we'll settle this another time.")
  249. StartConversation(conversation, NPC, Spawn, "When I have caused the waters to rise and drown this city, Prexus will return and bless me with unlimited power! Even the Overlord's floating citadel will sink to the depths, leaving me to rule all of Norrath!")
  250. end
  251. function dlg_23_4(NPC, Spawn)
  252. SpawnSet(NPC, "attackable", 1)
  253. SpawnSet(NPC, "show_level", 1)
  254. AddHate(Spawn, NPC, 100)
  255. end