ActingLieutenantGermain.lua 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. --[[
  2. Script Name : SpawnScripts/ForestRuins/ActingLieutenantGermain.lua
  3. Script Purpose : Acting Lieutenant Germain <Qeynos Guard>
  4. Script Author : Scatman
  5. Script Date : 2009.09.27
  6. Script Notes :
  7. --]]
  8. local QUEST_FROM_POKO = 201
  9. local QUEST_1 = 202
  10. local QUEST_2 = 1
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, QUEST_1)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. conversation = CreateConversation()
  20. if HasQuest(Spawn, QUEST_FROM_POKO) and GetQuestStep(Spawn, QUEST_FROM_POKO) == 3 then
  21. AddConversationOption(conversation, "I have news for you.", "NewsForYou")
  22. end
  23. choice = math.random(1, 3)
  24. if choice == 1 then
  25. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1004.mp3", "", "", 0, 0)
  26. elseif choice == 2 then
  27. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1004.mp3", "", "", 0, 0)
  28. else
  29. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1004.mp3", "", "", 0, 0)
  30. end
  31. if HasCompletedQuest(Spawn, QUEST_1) then
  32. if HasCompletedQuest(Spawn, QUEST_2) then
  33. elseif HasQuest(Spawn, QUEST_2) then
  34. else
  35. OnQuest1(NPC, Spawn, conversation)
  36. end
  37. elseif HasQuest(Spawn, QUEST_1) then
  38. OnQuest1(NPC, Spawn, conversation)
  39. else
  40. if GetLevel(Spawn) >= 5 then
  41. WelcomeCitizen(NPC, Spawn, conversation)
  42. else
  43. Say(NPC, "Come back to me once you've gotten a bit stronger.", Spawn)
  44. end
  45. end
  46. --[[
  47. if convo==1 then
  48. AddConversationOption(conversation, "I do not know yet.", "dlg_0_1")
  49. StartConversation(conversation, NPC, Spawn, "What does Poko say?")
  50. end
  51. if convo==6 then
  52. end
  53. if convo==7 then
  54. StartConversation(conversation, NPC, Spawn, "Any news of Del Varun?")
  55. end
  56. if convo==8 then
  57. AddConversationOption(conversation, "I do not know yet.", "dlg_8_1")
  58. StartConversation(conversation, NPC, Spawn, "What does Poko say?")
  59. end
  60. if convo==16 then
  61. AddConversationOption(conversation, "I have news for you.", "dlg_16_1")
  62. StartConversation(conversation, NPC, Spawn, "Welcome, citizen. Please be careful around here.")
  63. end
  64. --]]
  65. end
  66. ----------------------------------------------------------------------------------------------------------
  67. -- QUEST FROM POKO
  68. ----------------------------------------------------------------------------------------------------------
  69. function NewsForYou(NPC, Spawn)
  70. SetStepComplete(Spawn, QUEST_FROM_POKO, 3)
  71. FaceTarget(NPC, Spawn)
  72. conversation = CreateConversation()
  73. 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")
  74. StartConversation(conversation, NPC, Spawn, "What is it, citizen?")
  75. end
  76. function dlg_16_2(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. conversation = CreateConversation()
  79. if not HasQuest(Spawn, QUEST_1) and not HasCompletedQuest(Spawn, QUEST_1) then
  80. AddConversationOption(conversation, "I can help.", "dlg_16_3")
  81. else
  82. AddConversationOption(conversation, "You're welcome.")
  83. end
  84. 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.")
  85. end
  86. ----------------------------------------------------------------------------------------------------------
  87. -- QUEST 1
  88. ----------------------------------------------------------------------------------------------------------
  89. function WelcomeCitizen(NPC, Spawn, conversation)
  90. AddConversationOption(conversation, "Is it dangerous here?", "dlg_1_1")
  91. StartConversation(conversation, NPC, Spawn, "Welcome, citizen. Please be careful around here.")
  92. end
  93. function dlg_1_1(NPC, Spawn)
  94. FaceTarget(NPC, Spawn)
  95. conversation = CreateConversation()
  96. AddConversationOption(conversation, "It sounds very busy here.", "dlg_1_2")
  97. 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.")
  98. end
  99. function dlg_1_2(NPC, Spawn)
  100. FaceTarget(NPC, Spawn)
  101. conversation = CreateConversation()
  102. AddConversationOption(conversation, "I can help.", "dlg_1_3")
  103. AddConversationOption(conversation, "Sorry, I can't help right now.")
  104. 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?")
  105. end
  106. function dlg_1_3(NPC, Spawn)
  107. FaceTarget(NPC, Spawn)
  108. conversation = CreateConversation()
  109. AddConversationOption(conversation, "I'll see what I can find.", "OfferQuest1")
  110. 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.")
  111. end
  112. function OfferQuest1(NPC, Spawn)
  113. FaceTarget(NPC, Spawn)
  114. OfferQuest(NPC, Spawn, QUEST_1)
  115. end
  116. function OnQuest1(NPC, Spawn, conversation)
  117. if (HasQuest(Spawn, QUSET_1) and GetQuestStep(Spawn, QUEST_1) == 4) or (HasCompletedQuest(Spawn, QUEST_1)) then
  118. AddConversationOption(conversation, "Yes. I found his satchel.", "dlg_7_1")
  119. elseif GetQuestStep(Spawn, QUEST_1) == 2 then
  120. SetStepComplete(Spawn, QUEST_1, 2)
  121. else
  122. AddConversationOption(conversation, "Not quite yet.")
  123. end
  124. StartConversation(conversation, NPC, Spawn, "Any news of Del Varun?")
  125. end
  126. function dlg_7_1(NPC, Spawn)
  127. FaceTarget(NPC, Spawn)
  128. conversation = CreateConversation()
  129. 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")
  130. StartConversation(conversation, NPC, Spawn, "Only his satchel? I was afraid of this. I wish we had some leads, he may yet be alive.")
  131. end
  132. function dlg_7_2(NPC, Spawn)
  133. if HasQuest(Spawn, QUEST_1) then
  134. SetStepComplete(Spawn, QUEST_1, 4)
  135. end
  136. FaceTarget(NPC, Spawn)
  137. conversation = CreateConversation()
  138. AddConversationOption(conversation, "Yes, take a look at this leaf.", "dlg_7_3")
  139. StartConversation(conversation, NPC, Spawn, "Ah, good thinking. Did you see the glowing too? Perhaps it was a transitory thing.")
  140. end
  141. ----------------------------------------------------------------------------------------------------------
  142. -- QUEST 2
  143. ----------------------------------------------------------------------------------------------------------
  144. function dlg_7_3(NPC, Spawn)
  145. FaceTarget(NPC, Spawn)
  146. conversation = CreateConversation()
  147. AddConversationOption(conversation, "What do you think it is?", "OfferQuest2")
  148. StartConversation(conversation, NPC, Spawn, "Incredible. Please, take this to Poko Zing over there. Have him analyze it for us.")
  149. end
  150. function OfferQuest2(NPC, Spawn)
  151. FaceTarget(NPC, Spawn)
  152. --OfferQuest(NPC, Spawn, QUEST_2)
  153. end
  154. function dlg_7_4(NPC, Spawn)
  155. FaceTarget(NPC, Spawn)
  156. conversation = CreateConversation()
  157. AddConversationOption(conversation, "All right.", "dlg_7_5")
  158. StartConversation(conversation, NPC, Spawn, "I don't know, but I'm hoping Poko will be able to tell us.")
  159. end
  160. function dlg_7_5(NPC, Spawn)
  161. FaceTarget(NPC, Spawn)
  162. conversation = CreateConversation()
  163. AddConversationOption(conversation, "I do not know yet.", "dlg_7_6")
  164. StartConversation(conversation, NPC, Spawn, "What does Poko say?")
  165. end