ActingLieutenantGermain.lua 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  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_REMMY = 533
  9. local QUEST_FROM_POKO = 5474
  10. local QUEST_1 = 520 --News for Germain
  11. local QUEST_2 = 521 --Favors
  12. local QUEST_3 = 522 --Return to the Disturbance
  13. local QUEST_4 = 5492 --Uncovering the Caches
  14. function spawn(NPC)
  15. ProvidesQuest(NPC, QUEST_1)
  16. ProvidesQuest(NPC, QUEST_2)
  17. ProvidesQuest(NPC, QUEST_3)
  18. ProvidesQuest(NPC, QUEST_4)
  19. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  20. end
  21. function InRange(NPC, Spawn)
  22. if math.random(1, 100) <= 75 then
  23. choice = math.random(1,3)
  24. FaceTarget(NPC, Spawn)
  25. if choice ==1 then
  26. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  27. elseif choice ==2 then
  28. PlayFlavor(NPC, "", "", "salute", 0, 0, Spawn)
  29. else
  30. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  31. end
  32. end
  33. end
  34. function respawn(NPC)
  35. spawn(NPC)
  36. end
  37. function hailed(NPC, Spawn)
  38. FaceTarget(NPC, Spawn)
  39. conversation = CreateConversation()
  40. if HasQuest(Spawn, QUEST_FROM_POKO) and GetQuestStep(Spawn, QUEST_FROM_POKO) == 3 then
  41. AddConversationOption(conversation, "I have news for you.", "NewsForYou")
  42. elseif HasQuest(Spawn, QUEST_FROM_REMMY) and GetQuestStep(Spawn, QUEST_FROM_REMMY) == 2 then
  43. AddConversationOption(conversation, "I have news for you.", "NewsForYou2")
  44. end
  45. --[[ choice = math.random(1, 3)
  46. if choice == 1 then
  47. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1004.mp3", "", "", 0, 0)
  48. elseif choice == 2 then
  49. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1004.mp3", "", "", 0, 0)
  50. else
  51. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1004.mp3", "", "", 0, 0)
  52. end]]--
  53. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain000.mp3", "", "hello", 3884077763, 891162435, Spawn)
  54. if HasCompletedQuest(Spawn, QUEST_1) then
  55. -- Say(NPC, "Hey! quest 1 complete")
  56. if HasCompletedQuest(Spawn, QUEST_2) then
  57. -- Say(NPC, "Hey! quest 2 complete")
  58. if HasCompletedQuest(Spawn, QUEST_3) then
  59. Say(NPC, "Hey! quest 3 complete")
  60. elseif HasQuest(Spawn, QUEST_4) then
  61. AddConversationOption(conversation, "Not yet.")
  62. StartConversation(conversation, NPC, Spawn, "Have you destroyed the tools?")
  63. if GetQuestStep(Spawn,QUEST_3)==3 or HasCompletedQuest(Spawn, QUEST_3) then
  64. AddConversationOption(conversation, "I found this book.","Step3Done")
  65. end
  66. AddConversationOption(conversation, "I'll come back when I've performed the task.")
  67. StartConversation(conversation, NPC, Spawn, "Well?")
  68. elseif HasCompletedQuest(Spawn, QUEST_3) then
  69. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain009.mp3", "", "", 4053457773, 134802130, Spawn)
  70. AddConversationOption(conversation, "What happened with the leaf?", "dlg_3_1")
  71. StartConversation(conversation, NPC, Spawn, "Welcome back. Are you ready for some more work?")
  72. end
  73. elseif HasQuest(Spawn, QUEST_2) then
  74. if GetQuestStep(Spawn, QUEST_2) == 8 then
  75. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain009.mp3", "", "", 4053457773, 134802130, Spawn)
  76. AddConversationOption(conversation, "What happened with the leaf?", "dlg_3_1")
  77. StartConversation(conversation, NPC, Spawn, "Welcome back. Are you ready for some more work?")
  78. end
  79. else
  80. OnQuest1(NPC, Spawn, conversation)
  81. end
  82. elseif HasQuest(Spawn, QUEST_1) then
  83. OnQuest1(NPC, Spawn, conversation)
  84. else
  85. if GetLevel(Spawn) >= 5 then
  86. WelcomeCitizen(NPC, Spawn, conversation)
  87. else
  88. Say(NPC, "Come back to me once you've gotten a bit stronger.", Spawn)
  89. end
  90. end
  91. end
  92. --[[
  93. if convo==1 then
  94. AddConversationOption(conversation, "I do not know yet.", "dlg_0_1")
  95. StartConversation(conversation, NPC, Spawn, "What does Poko say?")
  96. end
  97. if convo==6 then
  98. end
  99. if convo==7 then
  100. StartConversation(conversation, NPC, Spawn, "Any news of Del Varun?")
  101. end
  102. if convo==8 then
  103. AddConversationOption(conversation, "I do not know yet.", "dlg_8_1")
  104. StartConversation(conversation, NPC, Spawn, "What does Poko say?")
  105. end
  106. if convo==16 then
  107. AddConversationOption(conversation, "I have news for you.", "dlg_16_1")
  108. StartConversation(conversation, NPC, Spawn, "Welcome, citizen. Please be careful around here.")
  109. end
  110. --]]
  111. ----------------------------------------------------------------------------------------------------------
  112. -- QUEST FROM POKO
  113. ----------------------------------------------------------------------------------------------------------
  114. function NewsForYou(NPC, Spawn)
  115. SetStepComplete(Spawn, QUEST_FROM_POKO, 3)
  116. FaceTarget(NPC, Spawn)
  117. conversation = CreateConversation()
  118. PlayFlavor(NPC, "", "", "ponder", 0, 0)
  119. 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")
  120. StartConversation(conversation, NPC, Spawn, "What is it, citizen?")
  121. end
  122. function dlg_16_2(NPC, Spawn)
  123. FaceTarget(NPC, Spawn)
  124. conversation = CreateConversation()
  125. PlayFlavor(NPC, "", "", "nod", 0, 0)
  126. if not HasQuest(Spawn, QUEST_1) and not HasCompletedQuest(Spawn, QUEST_1) then
  127. AddConversationOption(conversation, "I can help.", "dlg_1_3")
  128. else
  129. AddConversationOption(conversation, "You're welcome.")
  130. end
  131. 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.")
  132. end
  133. ----------------------------------------------------------------------------------------------------------
  134. -- QUEST FROM REMMY
  135. ----------------------------------------------------------------------------------------------------------
  136. function NewsForYou2(NPC, Spawn)
  137. FaceTarget(NPC, Spawn)
  138. conversation = CreateConversation()
  139. PlayFlavor(NPC, "", "", "ponder", 0, 0)
  140. AddConversationOption(conversation, "Remmy Tumbum is innocent. I found this clump of fur on some of the supplies recently broken into. It smells like gnoll.", "dlg_16_2a")
  141. StartConversation(conversation, NPC, Spawn, "What is it, citizen?")
  142. end
  143. function dlg_16_2a(NPC, Spawn)
  144. FaceTarget(NPC, Spawn)
  145. conversation = CreateConversation()
  146. PlayFlavor(NPC, "", "", "nod", 0, 0)
  147. SetStepComplete(Spawn, QUEST_FROM_REMMY, 2)
  148. while HasItem(Player, 7797) do
  149. RemoveItem(Player,7797)
  150. end
  151. if not HasQuest(Spawn, QUEST_1) and not HasCompletedQuest(Spawn, QUEST_1) then
  152. AddConversationOption(conversation, "I can help.", "dlg_1_3")
  153. else
  154. AddConversationOption(conversation, "You're welcome.")
  155. end
  156. 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.")
  157. end
  158. ----------------------------------------------------------------------------------------------------------
  159. -- QUEST 1
  160. ----------------------------------------------------------------------------------------------------------
  161. function WelcomeCitizen(NPC, Spawn, conversation)
  162. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain000.mp3", "", "hello", 3884077763, 891162435, Spawn)
  163. AddConversationOption(conversation, "Is it dangerous here?", "dlg_1_1")
  164. StartConversation(conversation, NPC, Spawn, "Welcome, citizen. Please be careful around here.")
  165. end
  166. function dlg_1_1(NPC, Spawn)
  167. FaceTarget(NPC, Spawn)
  168. conversation = CreateConversation()
  169. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain001.mp3", "", "", 1672198547, 0, Spawn)
  170. AddConversationOption(conversation, "It sounds very busy here.", "dlg_1_2")
  171. 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.")
  172. end
  173. function dlg_1_2(NPC, Spawn)
  174. FaceTarget(NPC, Spawn)
  175. conversation = CreateConversation()
  176. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain002.mp3", "", "nod", 2829219447, 0, Spawn)
  177. AddConversationOption(conversation, "I can help.", "dlg_1_3")
  178. AddConversationOption(conversation, "Sorry, I can't help right now.")
  179. 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?")
  180. end
  181. function dlg_1_3(NPC, Spawn)
  182. FaceTarget(NPC, Spawn)
  183. conversation = CreateConversation()
  184. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain003.mp3", "", "", 1108120794, 0, Spawn)
  185. AddConversationOption(conversation, "I'll see what I can find.", "OfferQuest1")
  186. 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.")
  187. end
  188. function OfferQuest1(NPC, Spawn)
  189. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain003a.mp3", "Don't get yourself hurt doing something foolish!", "", 3821205637, 0, Spawn)
  190. FaceTarget(NPC, Spawn)
  191. OfferQuest(NPC, Spawn, QUEST_1)
  192. end
  193. function OnQuest1(NPC, Spawn, conversation)
  194. if (HasQuest(Spawn, QUEST_1) and GetQuestStep(Spawn, QUEST_1) == 4) or (HasCompletedQuest(Spawn, QUEST_1)) then
  195. AddConversationOption(conversation, "Yes. I found his satchel.", "dlg_7_1")
  196. else
  197. AddConversationOption(conversation, "Not quite yet.")
  198. end
  199. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain004.mp3", "", "nod", 4174680410, 4068442606, Spawn)
  200. StartConversation(conversation, NPC, Spawn, "Any news of Del Varun?")
  201. end
  202. function dlg_3_1(NPC, Spawn)
  203. FaceTarget(NPC, Spawn)
  204. conversation = CreateConversation()
  205. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain010.mp3", "", "", 2663997308, 470495818, Spawn)
  206. AddConversationOption(conversation, "What are we going to do?", "dlg_3_2")
  207. 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.")
  208. end
  209. function dlg_3_2(NPC, Spawn)
  210. FaceTarget(NPC, Spawn)
  211. SetStepComplete(Spawn, QUEST_2, 8)
  212. conversation = CreateConversation()
  213. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain011.mp3", "", "", 3240178244, 1388073275, Spawn)
  214. AddConversationOption(conversation, "What should I be looking for?", "dlg_3_3")
  215. 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.")
  216. end
  217. function dlg_3_3(NPC, Spawn)
  218. FaceTarget(NPC, Spawn)
  219. OfferQuest(NPC, Spawn, QUEST_3)
  220. -- Sprinkle Nullification Powder
  221. conversation = CreateConversation()
  222. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain011a.mp3", "", "", 1214679313, 1635044010, Spawn)
  223. AddConversationOption(conversation, "Okay.")
  224. StartConversation(conversation, NPC, Spawn, "Plans would help the most. Some paper or a book or something of the kind.")
  225. end
  226. function dlg_7_1(NPC, Spawn)
  227. FaceTarget(NPC, Spawn)
  228. conversation = CreateConversation()
  229. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/acting_lieutenant_germain/qey_adv02_ruins/quests/germain/germain005.mp3", "", "", 1917536977, 2373330590, Spawn)
  230. 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")
  231. StartConversation(conversation, NPC, Spawn, "Only his satchel? I was afraid of this. I wish we had some leads, he may yet be alive.")
  232. end
  233. function dlg_7_2(NPC, Spawn)
  234. if HasQuest(Spawn, QUEST_1) then
  235. SetStepComplete(Spawn, QUEST_1, 4)
  236. end
  237. FaceTarget(NPC, Spawn)
  238. conversation = CreateConversation()
  239. AddConversationOption(conversation, "Yes, take a look at this leaf.", "dlg_7_3")
  240. StartConversation(conversation, NPC, Spawn, "Ah, good thinking. Did you see the glowing too? Perhaps it was a transitory thing.")
  241. end
  242. ----------------------------------------------------------------------------------------------------------
  243. -- QUEST 2
  244. ----------------------------------------------------------------------------------------------------------
  245. function dlg_7_3(NPC, Spawn)
  246. FaceTarget(NPC, Spawn)
  247. conversation = CreateConversation()
  248. AddConversationOption(conversation, "What do you think it is?", "OfferQuest2")
  249. StartConversation(conversation, NPC, Spawn, "Incredible. Please, take this to Poko Zing over there. Have him analyze it for us.")
  250. end
  251. function OfferQuest2(NPC, Spawn)
  252. FaceTarget(NPC, Spawn)
  253. OfferQuest(NPC, Spawn, QUEST_2)
  254. end
  255. function dlg_7_4(NPC, Spawn)
  256. FaceTarget(NPC, Spawn)
  257. conversation = CreateConversation()
  258. AddConversationOption(conversation, "All right.", "dlg_7_5")
  259. StartConversation(conversation, NPC, Spawn, "I don't know, but I'm hoping Poko will be able to tell us.")
  260. end
  261. function dlg_7_5(NPC, Spawn)
  262. FaceTarget(NPC, Spawn)
  263. conversation = CreateConversation()
  264. AddConversationOption(conversation, "I do not know yet.", "dlg_7_6")
  265. StartConversation(conversation, NPC, Spawn, "What does Poko say?")
  266. end
  267. function QuestComplete(NPC, Spawn)
  268. FaceTarget(NPC, Spawn)
  269. conversation = CreateConversation()
  270. SetStepComplete(Spawn, QUEST_2, 8)
  271. AddConversationOption(conversation, "I HAVE COMPLETED QUEST PLACEHOLDER")
  272. StartConversation(conversation, NPC, Spawn, "GOOD JOB PLACEHOLDER")
  273. end
  274. ----------------------------------------------------------------------------------------------------------
  275. -- QUEST 3
  276. ----------------------------------------------------------------------------------------------------------
  277. function OfferQuest3(NPC, Spawn)
  278. FaceTarget(NPC, Spawn)
  279. OfferQuest(NPC, Spawn, QUEST_3)
  280. end
  281. function Step3Done(NPC, Spawn)
  282. FaceTarget(NPC, Spawn)
  283. conversation = CreateConversation()
  284. AddConversationOption(conversation, "It was a camp.", "Step3Done2")
  285. StartConversation(conversation, NPC, Spawn, "Gnolls... was there anything else other than the book?")
  286. end
  287. function Step3Done2(NPC, Spawn)
  288. FaceTarget(NPC, Spawn)
  289. conversation = CreateConversation()
  290. SetStepComplete(Spawn, QUEST_3, 3)
  291. PlayFlavor(NPC, "", "", "sigh", 1917536977, 2373330590, Spawn)
  292. AddConversationOption(conversation, "Does the book say what the gnolls are planning?", "Step3Done3")
  293. StartConversation(conversation, NPC, Spawn, "That is quite unfortunate. This diagrams in this book look like they involve digging tools and machines. Thi- wait a minute! Accoding to these plans the gnolls have digging tools stored all over the place! They are probably under the same magical veil as the camp.")
  294. end
  295. function Step3Done3(NPC, Spawn)
  296. FaceTarget(NPC, Spawn)
  297. conversation = CreateConversation()
  298. PlayFlavor(NPC, "", "", "no", 1917536977, 2373330590, Spawn)
  299. AddConversationOption(conversation, "All right, I'll return.", "OfferQuest4")
  300. StartConversation(conversation, NPC, Spawn, "No, but we need to stop them. I need you to go back out around the ruins. Find these hidden digging tools, sprinkle some of Poko's powder on them, and destroy them.")
  301. end
  302. function OfferQuest4(NPC, Spawn)
  303. FaceTarget(NPC, Spawn)
  304. OfferQuest(NPC, Spawn, QUEST_4)
  305. end