CharlesArker.lua 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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. ProvidesQuest(NPC, InTheNameOfPrestige)
  13. ProvidesQuest(NPC, InTheNameOfHonor)
  14. ProvidesQuest(NPC, TheTunarianPlot)
  15. end
  16. function respawn (NPC)
  17. spawn(NPC)
  18. end
  19. function hailed(NPC, Spawn)
  20. FaceTarget(NPC, Spawn)
  21. local conversation = CreateConversation()
  22. if GetQuestStep(Spawn, InTheNameOfPrestige) == 1 then
  23. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker004.mp3", "", "", 1870656524, 1643000002, Spawn)
  24. AddConversationOption(conversation, "I'll see what I can find out.", "dlg_1_5")
  25. 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.")
  26. elseif not HasQuest(Spawn, InTheNameOfPrestige) and not HasCompletedQuest(Spawn, InTheNameOfPrestige) then
  27. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker001.mp3", "", "nod", 2051119928, 4163051805, Spawn)
  28. AddConversationOption(conversation, "I don't talk to strangers.")
  29. AddConversationOption(conversation, "I'm not a recruit. I volunteered.", "dlg_1_2")
  30. StartConversation(conversation, NPC, Spawn, "You're that new recruit I keep hearing about. " .. GetName(Spawn) .. " , isn't it?")
  31. elseif HasQuest(Spawn, InTheNameOfPrestige) and GetQuestStep(Spawn, InTheNameOfPrestige) <= 8 then
  32. missingpieces(NPC, Spawn)
  33. elseif HasQuest(Spawn, InTheNameOfHonor) and GetQuestStep(Spawn, InTheNameOfHonor) <= 6 then
  34. isdead(NPC, Spawn)
  35. elseif HasCompletedQuest(Spawn, InTheNameOfPrestige) and not HasCompletedQuest(Spawn, TheTunarianPlot) then
  36. dlg_1_6(NPC, Spawn)
  37. end
  38. if HasQuest(Spawn, TheTunarianPlot) and GetQuestStep(Spawn, TheTunarianPlot) == 5 then
  39. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker013.mp3", "", "peer", 1963096274, 3996749562, Spawn)
  40. AddConversationOption(conversation, "Yes, but something about it puzzles me.", "dlg_3_1")
  41. AddConversationOption(conversation, "Huh?")
  42. StartConversation(conversation, NPC, Spawn, "What's that? You found more of the parchment?")
  43. elseif GetQuestStep(Spawn, TheTunarianPlot) == 6 then
  44. dlg_3_1(NPC,Spawn)
  45. end
  46. if HasCompletedQuest(Spawn, TheTunarianPlot) then
  47. choice = math.random (1, 4)
  48. if choice == 1 then
  49. 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)
  50. elseif choice == 2 then
  51. 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)
  52. elseif choice == 3 then
  53. 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)
  54. else
  55. 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)
  56. end
  57. end
  58. end
  59. function missingpieces(NPC, Spawn)
  60. FaceTarget(NPC, Spawn)
  61. local conversation = CreateConversation()
  62. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker005.mp3", "", "nod", 3781470259, 2263609559)
  63. if GetQuestStep(Spawn, InTheNameOfPrestige) == 8 then
  64. AddConversationOption(conversation, "Yes. This is the message I've managed to put together.", "dlg_1_6")
  65. end
  66. AddConversationOption(conversation, "Not all of them.")
  67. StartConversation(conversation, NPC, Spawn, "Have you found more of the missing pieces?")
  68. end
  69. function dlg_1_2(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. local conversation = CreateConversation()
  72. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker002.mp3", "", "", 1779982844, 2478664547, Spawn)
  73. AddConversationOption(conversation, "Not really.")
  74. AddConversationOption(conversation, "What kind of help do you need?", "dlg_1_3")
  75. 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?")
  76. end
  77. function dlg_1_3(NPC, Spawn)
  78. FaceTarget(NPC, Spawn)
  79. local conversation = CreateConversation()
  80. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker003.mp3", "", "", 435953835, 2242560449, Spawn)
  81. AddConversationOption(conversation, "Certainly.", "questoffer")
  82. 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.")
  83. end
  84. function dlg_1_4(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. local conversation = CreateConversation()
  87. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker004.mp3", "", "thank", 1870656524, 1643000002, Spawn)
  88. AddConversationOption(conversation, "I'll see what I can find out.", "dlg_1_5")
  89. 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.")
  90. end
  91. function dlg_1_5(NPC, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. SetStepComplete(Spawn, InTheNameOfPrestige, 1)
  94. local conversation = CreateConversation()
  95. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker021.mp3", "", "", 1916109124, 3504506765, Spawn)
  96. AddConversationOption(conversation, "I'll keep that in mind.")
  97. StartConversation(conversation, NPC, Spawn, "A word of warning: be wary of those wood elves. They're more cunning than others may realize.")
  98. end
  99. function dlg_1_6(NPC, Spawn)
  100. FaceTarget(NPC, Spawn)
  101. SetStepComplete(Spawn, InTheNameOfPrestige, 8)
  102. local conversation = CreateConversation()
  103. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker006.mp3", "", "", 2475145114, 3569833047, Spawn)
  104. if HasCompletedQuest(Spawn, InTheNameOfPrestige) and not HasCompletedQuest(Spawn, InTheNameOfHonor) then
  105. AddConversationOption(conversation, "In what way?", "dlg_2_1")
  106. end
  107. AddConversationOption(conversation, "Not at the moment.")
  108. 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?")
  109. end
  110. function questoffer(NPC, Spawn)
  111. -- Gives a quest after some chat (dlg_1_1>dlg_1_2>dlg_1_3)
  112. FaceTarget(NPC, Spawn)
  113. OfferQuest(NPC, Spawn, InTheNameOfPrestige)
  114. end
  115. -- IN THE NAME OF HONOR
  116. function dlg_2_1(NPC, Spawn)
  117. FaceTarget(NPC, Spawn)
  118. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker007.mp3", "", "nod", 3047126327, 3117887484, Spawn)
  119. local conversation = CreateConversation()
  120. AddConversationOption(conversation, "That's pretty unfortunate.", "dlg_2_2")
  121. 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.")
  122. end
  123. function dlg_2_2(NPC, Spawn)
  124. FaceTarget(NPC, Spawn)
  125. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker008.mp3", "", "ponder", 103196051, 3322236068, Spawn)
  126. local conversation = CreateConversation()
  127. AddConversationOption(conversation, "What do you need me to do?", "dlg_2_3")
  128. AddConversationOption(conversation, "I'm sorry, but I can't help you.")
  129. 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.")
  130. end
  131. function dlg_2_3(NPC, Spawn)
  132. FaceTarget(NPC, Spawn)
  133. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker009.mp3", "", "cutthroat", 2534306844, 3795442038, Spawn)
  134. local conversation = CreateConversation()
  135. AddConversationOption(conversation, "I'll take care of her.", "questoffer2")
  136. AddConversationOption(conversation, "I've got something else to take care of first.")
  137. 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.")
  138. end
  139. function isdead(NPC, Spawn)
  140. FaceTarget(NPC, Spawn)
  141. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker010.mp3", "", "nod", 2230888578, 3016454691, Spawn)
  142. local conversation = CreateConversation()
  143. if GetQuestStep(Spawn, InTheNameOfHonor) == 6 then
  144. AddConversationOption(conversation, "Yes. Do you want details?", "dlg_2_4")
  145. end
  146. AddConversationOption(conversation, "I'm still searching for the wench.")
  147. StartConversation(conversation, NPC, Spawn, "Is she...dead?")
  148. end
  149. function dlg_2_4(NPC, Spawn)
  150. FaceTarget(NPC, Spawn)
  151. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker011.mp3", "", "no", 3557914078, 266939946, Spawn)
  152. local conversation = CreateConversation()
  153. AddConversationOption(conversation, "To tell the truth, I don't know how she died. She was dead when I found her.", "dlg_2_5")
  154. StartConversation(conversation, NPC, Spawn, "I don't care for details. I...just want to make sure she died with honor.")
  155. end
  156. function dlg_2_5(NPC, Spawn)
  157. FaceTarget(NPC, Spawn)
  158. SetStepComplete(Spawn, InTheNameOfHonor, 6)
  159. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker012.mp3", "", "ponder", 4109402051, 786259154, Spawn)
  160. local conversation = CreateConversation()
  161. AddConversationOption(conversation, "You're welcome.")
  162. 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) .. ". ")
  163. end
  164. function questoffer2(NPC, Spawn)
  165. FaceTarget(NPC, Spawn)
  166. OfferQuest(NPC, Spawn, InTheNameOfHonor)
  167. local conversation = CreateConversation()
  168. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker020.mp3", "", "", 3837612635, 962972593, Spawn)
  169. AddConversationOption(conversation, "Easy to you to say.")
  170. StartConversation(conversation, NPC, Spawn, "There's no time like the present.")
  171. end
  172. -- THE TUNARIAN PLOT
  173. function dlg_3_1(NPC, Spawn)
  174. FaceTarget(NPC, Spawn)
  175. SetStepComplete(Spawn, TheTunarianPlot, 5)
  176. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/charles_arker/tutorial_island02_evil_revamp/quests/quest_charles_arker/charles_arker014.mp3", "", "no", 4112615277, 2509927086, Spawn)
  177. local conversation = CreateConversation()
  178. AddConversationOption(conversation, "All right. I'll see you there.")
  179. 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.")
  180. end