CharlesArker.lua 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. --[[
  2. Script Name : SpawnScripts/OutpostOverlord/CharlesArker.lua
  3. Script Author : Cynnar, premierio015
  4. Script Date : 2018.10.14 07:10:58, 18.05.2020(UPDATE)
  5. Script Purpose : Offer Quests "In the Name of Prestige", "In the Name of Honor"
  6. Notes : Made some rewrites on "In The Name Of Prestige" dialogues, so now work as intended. Added "In the Name of Honor" dialogues.
  7. --]]
  8. local InTheNameOfPrestige = 489
  9. local InTheNameOfHonor = 490
  10. local TheTunarianPlot = 491
  11. function spawn (NPC)
  12. end
  13. function respawn (NPC)
  14. spawn(NPC)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. local conversation = CreateConversation()
  19. if GetQuestStep(Spawn, InTheNameOfPrestige) == 1 then
  20. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker004.mp3", "", "", 1870656524, 1643000002, Spawn)
  21. AddConversationOption(conversation, "I'll see what I can find out.", "dlg_1_5")
  22. StartConversation(conversation, NPC, Spawn, "I appreciate it, " .. GetName(Spawn) .. " Whatever glory comes of this, we'll share in the credit. I'm sure this will more than make up for the work I've done that others have taken credit for.")
  23. elseif not HasQuest(Spawn, InTheNameOfPrestige) and not HasCompletedQuest(Spawn, InTheNameOfPrestige) then
  24. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker001.mp3", "", "nod", 2051119928, 4163051805, Spawn)
  25. AddConversationOption(conversation, "I don't talk to strangers.")
  26. AddConversationOption(conversation, "I'm not a recruit. I volunteered.", "dlg_1_2")
  27. StartConversation(conversation, NPC, Spawn, "You're that new recruit I keep hearing about. " .. GetName(Spawn) .. " , isn't it?")
  28. elseif HasQuest(Spawn, InTheNameOfPrestige) and GetQuestStep(Spawn, InTheNameOfPrestige) <= 8 then
  29. missingpieces(NPC, Spawn)
  30. elseif HasQuest(Spawn, InTheNameOfHonor) and GetQuestStep(Spawn, InTheNameOfHonor) <= 6 then
  31. isdead(NPC, Spawn)
  32. elseif HasCompletedQuest(Spawn, InTheNameOfPrestige) and not HasCompletedQuest(Spawn, TheTunarianPlot) then
  33. dlg_1_6(NPC, Spawn)
  34. end
  35. if HasQuest(Spawn, TheTunarianPlot) and GetQuestStep(Spawn, TheTunarianPlot) == 5 then
  36. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker013.mp3", "", "peer", 1963096274, 3996749562, Spawn)
  37. AddConversationOption(conversation, "Yes, but something about it puzzles me.", "dlg_3_1")
  38. AddConversationOption(conversation, "Huh?")
  39. StartConversation(conversation, NPC, Spawn, "What's that? You found more of the parchment?")
  40. elseif GetQuestStep(Spawn, TheTunarianPlot) == 6 then
  41. dlg_3_1(NPC,Spawn)
  42. end
  43. if HasCompletedQuest(Spawn, TheTunarianPlot) then
  44. choice = math.random (1, 4)
  45. if choice == 1 then
  46. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quest/quest_charles_arker_complete02_d9b903b7.mp3", "Once again, I'm in your debt.", "", 2421222814, 2543907839, Spawn)
  47. elseif choice == 2 then
  48. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quest/quest_charles_arker_complete02_2a10e388.mp3", "Soon I'll be able to return home, with prestige and honor, thanks to your help.", "", 3771023938, 797205485, Spawn)
  49. elseif choice == 3 then
  50. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quest/quest_charles_arker_complete02_6f536069.mp3", "Those wood elf vixens are vile creatures who lure good men to their destruction!", "", 2187772267, 3225973212, Spawn)
  51. else
  52. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quest/quest_charles_arker_complete02_e40ced16.mp3", "I appreciate your help.", "", 1970845095, 134772962, Spawn)
  53. end
  54. end
  55. end
  56. function missingpieces(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. local conversation = CreateConversation()
  59. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker005.mp3", "", "nod", 3781470259, 2263609559)
  60. if GetQuestStep(Spawn, InTheNameOfPrestige) == 8 then
  61. AddConversationOption(conversation, "Yes. This is the message I've managed to put together.", "dlg_1_6")
  62. end
  63. AddConversationOption(conversation, "Not all of them.")
  64. StartConversation(conversation, NPC, Spawn, "Have you found more of the missing pieces?")
  65. end
  66. function dlg_1_2(NPC, Spawn)
  67. FaceTarget(NPC, Spawn)
  68. local conversation = CreateConversation()
  69. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker002.mp3", "", "", 1779982844, 2478664547, Spawn)
  70. AddConversationOption(conversation, "Not really.")
  71. AddConversationOption(conversation, "What kind of help do you need?", "dlg_1_3")
  72. StartConversation(conversation, NPC, Spawn, "Your reputation precedes you -- as will mine, someday soon. When I return to Freeport, my prestige will bring honor to my family. I came here to make a name for myself, but it's been difficult to stand out in the crowd. I have a new assignment and it's puzzling me. Would you help me unravel it?")
  73. end
  74. function dlg_1_3(NPC, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. local conversation = CreateConversation()
  77. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker003.mp3", "", "", 435953835, 2242560449, Spawn)
  78. AddConversationOption(conversation, "Certainly.", "questoffer")
  79. StartConversation(conversation, NPC, Spawn, "There's a lot of undercover work here, which means even if you do well, the higher-ups may not know it's you doing the work. Some of my best work was claimed by someone else and I mean to fix that. Not long ago, I intercepted part of a note one of the Tunarian spies was delivering. They've hidden the remaining pieces. We need to get them all back to learn more of what they're doing.")
  80. end
  81. function dlg_1_4(NPC, Spawn)
  82. FaceTarget(NPC, Spawn)
  83. local conversation = CreateConversation()
  84. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker004.mp3", "", "thank", 1870656524, 1643000002, Spawn)
  85. AddConversationOption(conversation, "I'll see what I can find out.", "dlg_1_5")
  86. StartConversation(conversation, NPC, Spawn, "I appreciate it, " .. GetName(Spawn) .. " Whatever glory comes of this, we'll share in the credit. I'm sure this will more than make up for the work I've done that others have taken credit for.")
  87. end
  88. function dlg_1_5(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. SetStepComplete(Spawn, InTheNameOfPrestige, 1)
  91. local conversation = CreateConversation()
  92. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker021.mp3", "", "", 1916109124, 3504506765, Spawn)
  93. AddConversationOption(conversation, "I'll keep that in mind.")
  94. StartConversation(conversation, NPC, Spawn, "A word of warning: be wary of those wood elves. They're more cunning than others may realize.")
  95. end
  96. function dlg_1_6(NPC, Spawn)
  97. FaceTarget(NPC, Spawn)
  98. SetStepComplete(Spawn, InTheNameOfPrestige, 8)
  99. local conversation = CreateConversation()
  100. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker006.mp3", "", "", 2475145114, 3569833047, Spawn)
  101. if HasCompletedQuest(Spawn, InTheNameOfPrestige) and not HasCompletedQuest(Spawn, InTheNameOfHonor) then
  102. AddConversationOption(conversation, "In what way?", "dlg_2_1")
  103. end
  104. AddConversationOption(conversation, "Not at the moment.")
  105. StartConversation(conversation, NPC, Spawn, "The Tunarian note is still incomplete, but this may be enough to advance our prestige, " .. GetName(Spawn) .. ". You know, you're very good at this kind of thing. Tell me, would you be interested in helping me on a more personal level?")
  106. end
  107. function questoffer(NPC, Spawn)
  108. -- Gives a quest after some chat (dlg_1_1>dlg_1_2>dlg_1_3)
  109. FaceTarget(NPC, Spawn)
  110. OfferQuest(NPC, Spawn, InTheNameOfPrestige)
  111. end
  112. -- IN THE NAME OF HONOR
  113. function dlg_2_1(NPC, Spawn)
  114. FaceTarget(NPC, Spawn)
  115. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker007.mp3", "", "nod", 3047126327, 3117887484, Spawn)
  116. local conversation = CreateConversation()
  117. AddConversationOption(conversation, "That's pretty unfortunate.", "dlg_2_2")
  118. StartConversation(conversation, NPC, Spawn, "As you know, I came here to make more of a name for myself. When I return home, my marriage will take place. I've been betrothed since birth to a lady from a good family. The match will elevate my family's status. Unfortunately, my betrothed has the face of a horse.")
  119. end
  120. function dlg_2_2(NPC, Spawn)
  121. FaceTarget(NPC, Spawn)
  122. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker008.mp3", "", "ponder", 103196051, 3322236068, Spawn)
  123. local conversation = CreateConversation()
  124. AddConversationOption(conversation, "What do you need me to do?", "dlg_2_3")
  125. AddConversationOption(conversation, "I'm sorry, but I can't help you.")
  126. StartConversation(conversation, NPC, Spawn, "Also, unfortunately, I've found myself unnaturally attracted to one of those Tunarian spies. A wood elf...she's graceful, beautiful and deadly. Nothing must come of this fancy of mine. I cannot let my reputation be sullied by even the merest hint of a romance with one of their kind.")
  127. end
  128. function dlg_2_3(NPC, Spawn)
  129. FaceTarget(NPC, Spawn)
  130. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker009.mp3", "", "cutthroat", 2534306844, 3795442038, Spawn)
  131. local conversation = CreateConversation()
  132. AddConversationOption(conversation, "I'll take care of her.", "questoffer2")
  133. AddConversationOption(conversation, "I've got something else to take care of first.")
  134. StartConversation(conversation, NPC, Spawn, "Find Laena. Kill her. I'd do it myself, but I fear that seeing her again might weaken my resolve. She could be anywhere on this island. Once she's out of the way, I won't be tempted again and my family's honor will not be stained. For all I know, she was put here specifically to entice men like me to falter.")
  135. end
  136. function isdead(NPC, Spawn)
  137. FaceTarget(NPC, Spawn)
  138. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker010.mp3", "", "nod", 2230888578, 3016454691, Spawn)
  139. local conversation = CreateConversation()
  140. if GetQuestStep(Spawn, InTheNameOfHonor) == 6 then
  141. AddConversationOption(conversation, "Yes. Do you want details?", "dlg_2_4")
  142. end
  143. AddConversationOption(conversation, "I'm still searching for the wench.")
  144. StartConversation(conversation, NPC, Spawn, "Is she...dead?")
  145. end
  146. function dlg_2_4(NPC, Spawn)
  147. FaceTarget(NPC, Spawn)
  148. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker011.mp3", "", "no", 3557914078, 266939946, Spawn)
  149. local conversation = CreateConversation()
  150. AddConversationOption(conversation, "To tell the truth, I don't know how she died. She was dead when I found her.", "dlg_2_5")
  151. StartConversation(conversation, NPC, Spawn, "I don't care for details. I...just want to make sure she died with honor.")
  152. end
  153. function dlg_2_5(NPC, Spawn)
  154. FaceTarget(NPC, Spawn)
  155. SetStepComplete(Spawn, InTheNameOfHonor, 6)
  156. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker012.mp3", "", "ponder", 4109402051, 786259154, Spawn)
  157. local conversation = CreateConversation()
  158. AddConversationOption(conversation, "You're welcome.")
  159. StartConversation(conversation, NPC, Spawn, "I see. I hadn't expected that. The main thing is that Laena will no longer...bother me. I wonder, though...who could've killed her? We may never know...and I can marry my betrothed in peace. Thank you, " .. GetName(Spawn) .. ". ")
  160. end
  161. function questoffer2(NPC, Spawn)
  162. FaceTarget(NPC, Spawn)
  163. OfferQuest(NPC, Spawn, InTheNameOfHonor)
  164. local conversation = CreateConversation()
  165. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker020.mp3", "", "", 3837612635, 962972593, Spawn)
  166. AddConversationOption(conversation, "Easy to you to say.")
  167. StartConversation(conversation, NPC, Spawn, "There's no time like the present.")
  168. end
  169. -- THE TUNARIAN PLOT
  170. function dlg_3_1(NPC, Spawn)
  171. FaceTarget(NPC, Spawn)
  172. SetStepComplete(Spawn, TheTunarianPlot, 5)
  173. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker014.mp3", "", "no", 4112615277, 2509927086, Spawn)
  174. local conversation = CreateConversation()
  175. AddConversationOption(conversation, "All right. I'll see you there.")
  176. StartConversation(conversation, NPC, Spawn, "I can't speak of it here. It is very important that we draw no attention to ourselves. Meet me in the Wilderwood. There's a shallow alcove known as ''the Nook'' beyond the trees, along the northern wall.")
  177. end