InvestigatorCurfeld.lua 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  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. PlayAnimation(NPC, 20601)
  30. elseif HasQuest(Spawn, QUEST_5_FROM_THORSON) then
  31. OnQuest3(NPC, Spawn, conversation)
  32. else
  33. OnQuest3(NPC, Spawn, conversation)
  34. end
  35. elseif HasQuest(Spawn, QUEST_3) then
  36. OnQuest3(NPC, Spawn, conversation)
  37. else
  38. SoYouFoundTheShrine(NPC, Spawn, conversation)
  39. end
  40. elseif HasQuest(Spawn, QUEST_2) then
  41. OnQuest2(NPC, Spawn, conversation)
  42. else
  43. WhyHaveYouReturned(NPC, Spawn, conversation)
  44. end
  45. elseif HasQuest(Spawn, QUEST_1) then
  46. OnQuest1(NPC, Spawn, conversation)
  47. else
  48. if not HasCompletedQuest(Spawn, QUEST_4_FROM_THORSON) then
  49. VeryBusy(NPC, Spawn, conversation)
  50. else
  51. YouAgain(NPC, Spawn, conversation)
  52. end
  53. end
  54. end
  55. ---------------------------------------------------------------------------------------------------------------------------
  56. -- QUEST_4_FROM_THORSON
  57. ---------------------------------------------------------------------------------------------------------------------------
  58. function VeryBusy(NPC, Spawn, conversation)
  59. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld001.mp3", "", "", 587048685, 18941612, Spawn)
  60. if HasQuest(Spawn, QUEST_4_FROM_THORSON) then
  61. AddConversationOption(conversation, "My name is " .. GetName(Spawn) .. ". Inquisitor Thorson sent me.", "dlg_12_1")
  62. end
  63. AddConversationOption(conversation, "Nothing at all.")
  64. StartConversation(conversation, NPC, Spawn, "I'm very busy. What is it that you want from me?")
  65. end
  66. function dlg_12_1(NPC, Spawn)
  67. SetStepComplete(Spawn, QUEST_4_FROM_THORSON, 1)
  68. FaceTarget(NPC, Spawn)
  69. conversation = CreateConversation()
  70. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld002.mp3", "", "", 2776959402, 3983139293, Spawn)
  71. AddConversationOption(conversation, "The inquisitor did some research on spectral essences, and he asked me to give it to you.", "dlg_12_2")
  72. AddConversationOption(conversation, "I'll leave you alone.")
  73. 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.")
  74. end
  75. ---------------------------------------------------------------------------------------------------------------------------
  76. -- QUEST 1
  77. ---------------------------------------------------------------------------------------------------------------------------
  78. function YouAgain(NPC, Spawn, conversation)
  79. AddConversationOption(conversation, "Inquisitor Thorson sent me to help look into the rise of undead activity.", "dlg_12_5")
  80. AddConversationOption(conversation, "Nevermind.")
  81. StartConversation(conversation, NPC, Spawn, "You again. What is it that you wanted?")
  82. end
  83. function dlg_12_2(NPC, Spawn)
  84. FaceTarget(NPC, Spawn)
  85. conversation = CreateConversation()
  86. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld003.mp3", "", "", 1468838299, 855905444, Spawn)
  87. AddConversationOption(conversation, "He mentioned you might need my assistance.", "dlg_12_3")
  88. AddConversationOption(conversation, "That's all.")
  89. StartConversation(conversation, NPC, Spawn, "Fine, hand it over! Is that all?")
  90. end
  91. function dlg_12_3(NPC, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. conversation = CreateConversation()
  94. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld004.mp3", "", "", 984029368, 2280448766, Spawn)
  95. AddConversationOption(conversation, "I am willing to do whatever is required to serve Freeport.", "dlg_12_4")
  96. AddConversationOption(conversation, "Never mind, I rescind my offer.")
  97. 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?")
  98. end
  99. function dlg_12_4(NPC, Spawn)
  100. FaceTarget(NPC, Spawn)
  101. conversation = CreateConversation()
  102. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld005.mp3", "", "", 1117786309, 2475990866, Spawn)
  103. AddConversationOption(conversation, "Looking into the increase in undead activity, correct?", "dlg_12_5")
  104. AddConversationOption(conversation, "This doesn't interest me.")
  105. 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.")
  106. end
  107. function dlg_12_5(NPC, Spawn)
  108. FaceTarget(NPC, Spawn)
  109. conversation = CreateConversation()
  110. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld006.mp3", "", "", 3352004340, 1089685047, Spawn)
  111. AddConversationOption(conversation, "Who do you suspect has stolen it?", "dlg_12_6")
  112. AddConversationOption(conversation, "Do your own grunt work.")
  113. 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.")
  114. end
  115. function dlg_12_6(NPC, Spawn)
  116. FaceTarget(NPC, Spawn)
  117. conversation = CreateConversation()
  118. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld007.mp3", "", "", 753008127, 4149258442, Spawn)
  119. AddConversationOption(conversation, "Where should I look for your research papers?", "OfferQuest1")
  120. AddConversationOption(conversation, "I have no interest in pirates.")
  121. 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.")
  122. end
  123. function OfferQuest1(NPC, Spawn)
  124. FaceTarget(NPC, Spawn)
  125. OfferQuest(NPC, Spawn, QUEST_1)
  126. end
  127. function OnQuest1(NPC, Spawn, conversation)
  128. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld009.mp3", "", "", 987373655, 3497715065, Spawn)
  129. if GetQuestStep(Spawn, QUEST_1) == 2 then
  130. AddConversationOption(conversation, "Yes, I found a notebook in an old barrel.", "dlg_19_1")
  131. end
  132. AddConversationOption(conversation, "Not yet.")
  133. StartConversation(conversation, NPC, Spawn, "Have you retrieved my research materials from the Blackshields yet?")
  134. end
  135. function dlg_19_1(NPC, Spawn)
  136. SetStepComplete(Spawn, QUEST_1, 2)
  137. FaceTarget(NPC, Spawn)
  138. conversation = CreateConversation()
  139. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld010.mp3", "", "", 1290071481, 14179397, Spawn)
  140. AddConversationOption(conversation, "I'm ready for anything.", "dlg_19_2")
  141. AddConversationOption(conversation, "I don't need your insults.")
  142. 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.")
  143. end
  144. ---------------------------------------------------------------------------------------------------------------------------
  145. -- QUEST 2
  146. ---------------------------------------------------------------------------------------------------------------------------
  147. function WhyHaveYouReturned(NPC, Spawn, conversation)
  148. AddConversationOption(conversation, "I would like to help you further.", "dlg_19_2")
  149. AddConversationOption(conversation, "I guess I will be leaving.")
  150. StartConversation(conversation, NPC, Spawn, "Why have you returned to me?")
  151. end
  152. function dlg_19_2(NPC, Spawn)
  153. FaceTarget(NPC, Spawn)
  154. conversation = CreateConversation()
  155. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld011.mp3", "", "", 2158708484, 291273731, Spawn)
  156. AddConversationOption(conversation, "What do you mean by 'usable'?", "dlg_19_3")
  157. AddConversationOption(conversation, "Your task doesn't interest me.")
  158. 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.")
  159. end
  160. function dlg_19_3(NPC, Spawn)
  161. FaceTarget(NPC, Spawn)
  162. conversation = CreateConversation()
  163. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld012.mp3", "", "", 3900893827, 953702832, Spawn)
  164. AddConversationOption(conversation, "No need to be so testy! I will do it.", "dlg_19_4")
  165. AddConversationOption(conversation, "I don't need to stand for your rudeness.")
  166. 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?")
  167. end
  168. function dlg_19_4(NPC, Spawn)
  169. FaceTarget(NPC, Spawn)
  170. conversation = CreateConversation()
  171. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld013.mp3", "", "", 279847227, 949322829, Spawn)
  172. AddConversationOption(conversation, "I will be careful.", "OfferQuest2")
  173. AddConversationOption(conversation, "I'd best be off.")
  174. 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.")
  175. end
  176. function OfferQuest2(NPC, Spawn)
  177. FaceTarget(NPC, Spawn)
  178. OfferQuest(NPC, Spawn, QUEST_2)
  179. end
  180. function OnQuest2(NPC, Spawn, conversation)
  181. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld015.mp3", "", "", 3353662707, 2467058534, Spawn)
  182. if GetQuestStep(Spawn, QUEST_2) == 2 then
  183. AddConversationOption(conversation, "I've found the ruined shrine, and it has an eerie hum surrounding it.", "dlg_20_1")
  184. end
  185. AddConversationOption(conversation, "I haven't found it yet.")
  186. StartConversation(conversation, NPC, Spawn, "Did you find the shrine of Prexus? Does it still resonate with power?")
  187. end
  188. function dlg_20_1(NPC, Spawn)
  189. SetStepComplete(Spawn, QUEST_2, 2)
  190. FaceTarget(NPC, Spawn)
  191. conversation = CreateConversation()
  192. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld016.mp3", "", "", 2893810330, 4143475866, Spawn)
  193. AddConversationOption(conversation, "What may still be possible?", "dlg_20_2")
  194. AddConversationOption(conversation, "I don't have time for this.")
  195. StartConversation(conversation, NPC, Spawn, "Magnificent news! Then it might still be possible! This confirms all my fondest hopes!")
  196. end
  197. ---------------------------------------------------------------------------------------------------------------------------
  198. -- QUEST 3
  199. ---------------------------------------------------------------------------------------------------------------------------
  200. function SoYouFoundTheShrine(NPC, Spawn, conversation)
  201. AddConversationOption(conversation, "I was curious what you wanted from that shrine.", "dlg_20_2")
  202. AddConversationOption(conversation, "I'm tired of this abuse.")
  203. StartConversation(conversation, NPC, Spawn, "So you found the Shrine of Prexus. Why are you still disturbing my work?")
  204. end
  205. function dlg_20_2(NPC, Spawn)
  206. FaceTarget(NPC, Spawn)
  207. conversation = CreateConversation()
  208. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld017.mp3", "", "", 3975555869, 3311883027, Spawn)
  209. AddConversationOption(conversation, "Inquisitor Thorson said he needed information from you to complete his report.", "OfferQuest3")
  210. AddConversationOption(conversation, "I'm tired of this abuse.")
  211. 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.")
  212. end
  213. function OfferQuest3(NPC, Spawn)
  214. FaceTarget(NPC, Spawn)
  215. OfferQuest(NPC, Spawn, QUEST_3)
  216. end
  217. function OnQuest3(NPC, Spawn, conversation)
  218. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld019.mp3", "", "", 1269088457, 2406366669, Spawn)
  219. if HasQuest(Spawn, QUEST_5_FROM_THORSON) and GetQuestStep(Spawn, QUEST_5_FROM_THORSON) == 1 then
  220. AddConversationOption(conversation, "You did, and we found some rather disturbing notes in your journal.", "dlg_23_1")
  221. end
  222. AddConversationOption(conversation, "I'm going back to him right now.")
  223. StartConversation(conversation, NPC, Spawn, "You again! I thought I sent you back to Thorson.")
  224. end
  225. --------------------------------------------------------------------------------------------------------------------
  226. -- QUEST_5_FROM_THORSON
  227. --------------------------------------------------------------------------------------------------------------------
  228. function dlg_23_1(NPC, Spawn)
  229. FaceTarget(NPC, Spawn)
  230. conversation = CreateConversation()
  231. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld020.mp3", "", "", 1297570306, 1157170727, Spawn)
  232. AddConversationOption(conversation, "Indeed we did. You have some explaining to do.", "dlg_23_2")
  233. AddConversationOption(conversation, "No, we didn't.")
  234. 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?")
  235. end
  236. function dlg_23_2(NPC, Spawn)
  237. FaceTarget(NPC, Spawn)
  238. conversation = CreateConversation()
  239. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld021.mp3", "", "", 2210460542, 3190306576, Spawn)
  240. AddConversationOption(conversation, "You're a madman!", "dlg_23_3")
  241. AddConversationOption(conversation, "Time for me to get out of here.")
  242. 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!")
  243. end
  244. function dlg_23_3(NPC, Spawn)
  245. FaceTarget(NPC, Spawn)
  246. conversation = CreateConversation()
  247. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/investigator_curfeld/fprt_adv01_sunken/investigator_curfeld022.mp3", "", "", 2667398233, 1390342428, Spawn)
  248. AddConversationOption(conversation, "Oh no you won't, Curfeld!", "dlg_23_4")
  249. AddConversationOption(conversation, "Nevermind, we'll settle this another time.")
  250. 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!")
  251. end
  252. function dlg_23_4(NPC, Spawn)
  253. SpawnSet(NPC, "attackable", 1)
  254. SpawnSet(NPC, "show_level", 1)
  255. AddHate(Spawn, NPC, 100)
  256. end