9
3

ActingLieutenantGermain.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. --[[
  2. Script Name : SpawnScripts/ForestRuins/ActingLieutenantGermain.lua
  3. Script Purpose : Acting Lieutenant Germain
  4. Script Author : Scatman
  5. Script Date : 2009.09.27
  6. Script Notes :
  7. --]]
  8. local QUEST_FROM_POKO = 201
  9. local QUEST_1 = 520 --News for Germain
  10. local QUEST_2 = 521 --Favors
  11. local QUEST_3 = 522 --Return to the Disturbance
  12. function spawn(NPC)
  13. ProvidesQuest(NPC, QUEST_1)
  14. ProvidesQuest(NPC, QUEST_2)
  15. ProvidesQuest(NPC, QUEST_3)
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function hailed(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. conversation = CreateConversation()
  23. Say(NPC, "Hey! you got this far")
  24. if HasQuest(Spawn, QUEST_FROM_POKO) and GetQuestStep(Spawn, QUEST_FROM_POKO) == 3 then
  25. AddConversationOption(conversation, "I have news for you.", "NewsForYou")
  26. end
  27. choice = math.random(1, 3)
  28. if choice == 1 then
  29. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1004.mp3", "", "", 0, 0)
  30. elseif choice == 2 then
  31. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1004.mp3", "", "", 0, 0)
  32. else
  33. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1004.mp3", "", "", 0, 0)
  34. end
  35. if HasCompletedQuest(Spawn, QUEST_1) then
  36. Say(NPC, "Hey! quest 1 complete")
  37. if HasCompletedQuest(Spawn, QUEST_2) then
  38. Say(NPC, "Hey! quest 2 complete")
  39. if HasCompletedQuest(Spawn, QUEST_3) then
  40. Say(NPC, "Hey! quest 3 complete")
  41. elseif HasQuest(Spawn, QUEST_3) then
  42. Say(NPC, "Hey! you are still on quest 3")
  43. AddConversationOption(conversation, "I'll come back when I've performed the task.")
  44. StartConversation(conversation, NPC, Spawn, "Well?")
  45. else
  46. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain009.mp3", "", "", 4053457773, 134802130, Spawn)
  47. AddConversationOption(conversation, "What happened with the leaf?", "dlg_3_1")
  48. StartConversation(conversation, NPC, Spawn, "Welcome back. Are you ready for some more work?")
  49. end
  50. elseif HasQuest(Spawn, QUEST_2) then
  51. if GetQuestStep(Spawn, QUEST_2) == 8 then
  52. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain009.mp3", "", "", 4053457773, 134802130, Spawn)
  53. AddConversationOption(conversation, "What happened with the leaf?", "dlg_3_1")
  54. StartConversation(conversation, NPC, Spawn, "Welcome back. Are you ready for some more work?")
  55. end
  56. else
  57. OnQuest1(NPC, Spawn, conversation)
  58. end
  59. elseif HasQuest(Spawn, QUEST_1) then
  60. OnQuest1(NPC, Spawn, conversation)
  61. else
  62. if GetLevel(Spawn) >= 5 then
  63. WelcomeCitizen(NPC, Spawn, conversation)
  64. else
  65. Say(NPC, "Come back to me once you've gotten a bit stronger.", Spawn)
  66. end
  67. end
  68. end
  69. --[[
  70. if convo==1 then
  71. AddConversationOption(conversation, "I do not know yet.", "dlg_0_1")
  72. StartConversation(conversation, NPC, Spawn, "What does Poko say?")
  73. end
  74. if convo==6 then
  75. end
  76. if convo==7 then
  77. StartConversation(conversation, NPC, Spawn, "Any news of Del Varun?")
  78. end
  79. if convo==8 then
  80. AddConversationOption(conversation, "I do not know yet.", "dlg_8_1")
  81. StartConversation(conversation, NPC, Spawn, "What does Poko say?")
  82. end
  83. if convo==16 then
  84. AddConversationOption(conversation, "I have news for you.", "dlg_16_1")
  85. StartConversation(conversation, NPC, Spawn, "Welcome, citizen. Please be careful around here.")
  86. end
  87. --]]
  88. ----------------------------------------------------------------------------------------------------------
  89. -- QUEST FROM POKO
  90. ----------------------------------------------------------------------------------------------------------
  91. function NewsForYou(NPC, Spawn)
  92. SetStepComplete(Spawn, QUEST_FROM_POKO, 3)
  93. FaceTarget(NPC, Spawn)
  94. conversation = CreateConversation()
  95. AddConversationOption(conversation, "I was collecting machine parts for Poko and one of the parts I returned seems to be of Freeportian origin.", "dlg_16_2")
  96. StartConversation(conversation, NPC, Spawn, "What is it, citizen?")
  97. end
  98. function dlg_16_2(NPC, Spawn)
  99. FaceTarget(NPC, Spawn)
  100. conversation = CreateConversation()
  101. if not HasQuest(Spawn, QUEST_1) and not HasCompletedQuest(Spawn, QUEST_1) then
  102. AddConversationOption(conversation, "I can help.", "dlg_16_3")
  103. else
  104. AddConversationOption(conversation, "You're welcome.")
  105. end
  106. StartConversation(conversation, NPC, Spawn, "The bad news just doesn't cease. Citizen, there are obviously multiple things afoot in this place, I thank you for your help even if you're adding to my discomfort.")
  107. end
  108. ----------------------------------------------------------------------------------------------------------
  109. -- QUEST 1
  110. ----------------------------------------------------------------------------------------------------------
  111. function WelcomeCitizen(NPC, Spawn, conversation)
  112. AddConversationOption(conversation, "Is it dangerous here?", "dlg_1_1")
  113. StartConversation(conversation, NPC, Spawn, "Welcome, citizen. Please be careful around here.")
  114. end
  115. function dlg_1_1(NPC, Spawn)
  116. FaceTarget(NPC, Spawn)
  117. conversation = CreateConversation()
  118. AddConversationOption(conversation, "It sounds very busy here.", "dlg_1_2")
  119. StartConversation(conversation, NPC, Spawn, "Yes, quite dangerous. We have been getting reports, strange reports, over the past few days. Nobody is sure exactly what is going on, and we don't have the manpower to find out once and for all. I've got scouts but even they can only do so much. We've got so few people that it's hard to take care of all the little things. Ever since the pirates landed the Concordium has been asking for more and more protection.")
  120. end
  121. function dlg_1_2(NPC, Spawn)
  122. FaceTarget(NPC, Spawn)
  123. conversation = CreateConversation()
  124. AddConversationOption(conversation, "I can help.", "dlg_1_3")
  125. AddConversationOption(conversation, "Sorry, I can't help right now.")
  126. StartConversation(conversation, NPC, Spawn, "More than you know. With dead-end investigations, big threats, little threats, and vague orders from the Qeynos Guard AND the Concordium I'm amazed this place hasn't been put under siege by the hawks yet. I'm sorry for complaining to you. Listen, how would you like to help me out?")
  127. end
  128. function dlg_1_3(NPC, Spawn)
  129. FaceTarget(NPC, Spawn)
  130. conversation = CreateConversation()
  131. AddConversationOption(conversation, "I'll see what I can find.", "OfferQuest1")
  132. StartConversation(conversation, NPC, Spawn, "Good, that's great news. The first thing I'd like you to do is help me locate a missing scout. Del Varun was assigned to the small pond on the western side of the ruins. He hasn't checked back in and hasn't been spotted in a few days. I'd like you to head that direction and see if you can find him.")
  133. end
  134. function OfferQuest1(NPC, Spawn)
  135. FaceTarget(NPC, Spawn)
  136. OfferQuest(NPC, Spawn, QUEST_1)
  137. end
  138. function OnQuest1(NPC, Spawn, conversation)
  139. if (HasQuest(Spawn, QUEST_1) and GetQuestStep(Spawn, QUEST_1) == 4) or (HasCompletedQuest(Spawn, QUEST_1)) then
  140. AddConversationOption(conversation, "Yes. I found his satchel.", "dlg_7_1")
  141. else
  142. AddConversationOption(conversation, "Not quite yet.")
  143. end
  144. StartConversation(conversation, NPC, Spawn, "Any news of Del Varun?")
  145. end
  146. function dlg_3_1(NPC, Spawn)
  147. FaceTarget(NPC, Spawn)
  148. conversation = CreateConversation()
  149. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain010.mp3", "", "", 2663997308, 470495818, Spawn)
  150. AddConversationOption(conversation, "What are we going to do?", "dlg_3_2")
  151. StartConversation(conversation, NPC, Spawn, "It was part of an illusion. Poko made up some kind of dust that he says can dispel the illusion for short periods of time. So, it's time for us to figure out what someone has been trying to hide.")
  152. end
  153. function dlg_3_2(NPC, Spawn)
  154. FaceTarget(NPC, Spawn)
  155. SetStepComplete(Spawn, QUEST_2, 8)
  156. conversation = CreateConversation()
  157. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain011.mp3", "", "", 3240178244, 1388073275, Spawn)
  158. AddConversationOption(conversation, "What should I be looking for?", "dlg_3_3")
  159. StartConversation(conversation, NPC, Spawn, "Find out what those plants are hiding. I'd like you to take Poko's dust and go sprinkle it on the plants. Try to bring back some kind of clue if at all possible, I doubt it will all be nailed down.")
  160. end
  161. function dlg_3_3(NPC, Spawn)
  162. FaceTarget(NPC, Spawn)
  163. OfferQuest(NPC, Spawn, QUEST_3)
  164. -- Sprinkle Nullification Powder
  165. conversation = CreateConversation()
  166. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain011a.mp3", "", "", 1214679313, 1635044010, Spawn)
  167. AddConversationOption(conversation, "Okay.")
  168. StartConversation(conversation, NPC, Spawn, "Plans would help the most. Some paper or a book or something of the kind.")
  169. end
  170. function dlg_7_1(NPC, Spawn)
  171. FaceTarget(NPC, Spawn)
  172. conversation = CreateConversation()
  173. AddConversationOption(conversation, "There is more. In his notes he mentioned some strange, glowing plants north of the pond. I brought back a sample.", "dlg_7_2")
  174. StartConversation(conversation, NPC, Spawn, "Only his satchel? I was afraid of this. I wish we had some leads, he may yet be alive.")
  175. end
  176. function dlg_7_2(NPC, Spawn)
  177. if HasQuest(Spawn, QUEST_1) then
  178. SetStepComplete(Spawn, QUEST_1, 4)
  179. end
  180. FaceTarget(NPC, Spawn)
  181. conversation = CreateConversation()
  182. AddConversationOption(conversation, "Yes, take a look at this leaf.", "dlg_7_3")
  183. StartConversation(conversation, NPC, Spawn, "Ah, good thinking. Did you see the glowing too? Perhaps it was a transitory thing.")
  184. end
  185. ----------------------------------------------------------------------------------------------------------
  186. -- QUEST 2
  187. ----------------------------------------------------------------------------------------------------------
  188. function dlg_7_3(NPC, Spawn)
  189. FaceTarget(NPC, Spawn)
  190. conversation = CreateConversation()
  191. AddConversationOption(conversation, "What do you think it is?", "OfferQuest2")
  192. StartConversation(conversation, NPC, Spawn, "Incredible. Please, take this to Poko Zing over there. Have him analyze it for us.")
  193. end
  194. function OfferQuest2(NPC, Spawn)
  195. FaceTarget(NPC, Spawn)
  196. OfferQuest(NPC, Spawn, QUEST_2)
  197. end
  198. function dlg_7_4(NPC, Spawn)
  199. FaceTarget(NPC, Spawn)
  200. conversation = CreateConversation()
  201. AddConversationOption(conversation, "All right.", "dlg_7_5")
  202. StartConversation(conversation, NPC, Spawn, "I don't know, but I'm hoping Poko will be able to tell us.")
  203. end
  204. function dlg_7_5(NPC, Spawn)
  205. FaceTarget(NPC, Spawn)
  206. conversation = CreateConversation()
  207. AddConversationOption(conversation, "I do not know yet.", "dlg_7_6")
  208. StartConversation(conversation, NPC, Spawn, "What does Poko say?")
  209. end
  210. function QuestComplete(NPC, Spawn)
  211. FaceTarget(NPC, Spawn)
  212. conversation = CreateConversation()
  213. SetStepComplete(Spawn, QUEST_2, 8)
  214. AddConversationOption(conversation, "I HAVE COMPLETED QUEST PLACEHOLDER")
  215. StartConversation(conversation, NPC, Spawn, "GOOD JOB PLACEHOLDER")
  216. end
  217. ----------------------------------------------------------------------------------------------------------
  218. -- QUEST 3
  219. ----------------------------------------------------------------------------------------------------------
  220. function OfferQuest3(NPC, Spawn)
  221. FaceTarget(NPC, Spawn)
  222. OfferQuest(NPC, Spawn, QUEST_3)
  223. end