ConsulBree.lua 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. --[[
  2. Script Name : SpawnScripts/Caves/ConsulBree.lua
  3. Script Purpose : Consul Bree <Qeynos Guard>
  4. Script Author : Scatman
  5. Script Date : 2008.09.21
  6. Script Notes : Updated 1/8/2020 by Shatou
  7. --]]
  8. local QUEST_FROM_OAKMYST = 212
  9. local QUEST_FROM_PEATBOG = 512
  10. local QUEST_1 = 361
  11. local QUEST_2 = 493
  12. local QUEST_3 = 494
  13. local QUEST_4 = 495
  14. local QUEST_4_SUMMONING_STAFF_ID = 13583
  15. function spawn(NPC)
  16. ProvidesQuest(NPC, QUEST_1)
  17. ProvidesQuest(NPC, QUEST_2)
  18. ProvidesQuest(NPC, QUEST_3)
  19. ProvidesQuest(NPC, QUEST_4)
  20. end
  21. function respawn(NPC)
  22. spawn(NPC)
  23. end
  24. function hailed(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. conversation = CreateConversation()
  27. if HasQuest(Spawn, QUEST_FROM_OAKMYST) or HasQuest(Spawn, QUEST_FROM_PEATBOG) then
  28. AddConversationOption(conversation, "I am here as requested.", "HereAsRequested")
  29. end
  30. if HasCompletedQuest(Spawn, QUEST_1) then
  31. if HasCompletedQuest(Spawn, QUEST_2) then
  32. if HasCompletedQuest(Spawn, QUEST_3) then
  33. if HasCompletedQuest(Spawn, QUEST_4) then
  34. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/qst_bree_done_c548f9b0.mp3", "The Queen was right about you. We may yet meet again.", "", 2998869341, 2973499858)
  35. elseif HasQuest(Spawn, QUEST_4) then
  36. OnQuest4(NPC, Spawn, conversation)
  37. else
  38. OnQuest3(NPC, Spawn, conversation)
  39. end
  40. elseif HasQuest(Spawn, QUEST_3) then
  41. OnQuest3(NPC, Spawn, conversation)
  42. else
  43. OnQuest2(NPC, Spawn, conversation)
  44. end
  45. elseif HasQuest(Spawn, QUEST_2) then
  46. OnQuest2(NPC, Spawn, conversation)
  47. else
  48. OnQuest1(NPC, Spawn, conversation)
  49. end
  50. elseif HasQuest(Spawn, QUEST_1) then
  51. OnQuest1(NPC, Spawn, conversation)
  52. else
  53. IAmGladYouAreHere(NPC, Spawn, conversation)
  54. end
  55. end
  56. -------------------------------------------------------------------------------------------------------------------
  57. -- QUEST FROM OAKMYST
  58. -------------------------------------------------------------------------------------------------------------------
  59. function HereAsRequested(NPC, Spawn)
  60. if HasQuest(Spawn, QUEST_FROM_OAKMYST) then
  61. SetStepComplete(Spawn, QUEST_FROM_OAKMYST, 1)
  62. elseif HasQuest(Spawn, QUEST_FROM_PEATBOG) then
  63. SetStepComplete(Spawn, QUEST_FROM_PEATBOG, 1)
  64. end
  65. FaceTarget(NPC, Spawn)
  66. conversation = CreateConversation()
  67. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_001.mp3", "", "", 2064805321, 3198467105)
  68. if not HasCompletedQuest(Spawn, QUEST_1) and not HasQuest(Spawn, QUEST_1) then
  69. AddConversationOption(conversation, "How can I be of service?", "dlg_0_2")
  70. else
  71. AddConversationOption(conversation, "I will get to work on my current task.", "dlg_2_2")
  72. end
  73. StartConversation(conversation, NPC, Spawn, "That you are. I appreciate your answering the summons.")
  74. end
  75. -------------------------------------------------------------------------------------------------------------------
  76. -- QUEST 1
  77. -------------------------------------------------------------------------------------------------------------------
  78. function IAmGladYouAreHere(NPC, Spawn, conversation)
  79. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_000.mp3", "", "", 312135119, 4181129061)
  80. AddConversationOption(conversation, "Why is that?", "dlg_0_1")
  81. AddConversationOption(conversation, "What is going on here?", "dlg_1_1")
  82. AddConversationOption(conversation, "I have to go.")
  83. StartConversation(conversation, NPC, Spawn, "I am glad you are here.")
  84. end
  85. function dlg_0_1(NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. conversation = CreateConversation()
  88. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_002.mp3", "", "", 2428180651, 3557450253)
  89. AddConversationOption(conversation, "What must I do?", "dlg_0_2")
  90. StartConversation(conversation, NPC, Spawn, "There are problems here to solve. You and I are part of the solution.")
  91. end
  92. function dlg_0_2(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. conversation = CreateConversation()
  95. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_003.mp3", "", "", 502817302, 1202580742)
  96. AddConversationOption(conversation, "What can I do to help?", "dlg_0_3")
  97. AddConversationOption(conversation, "How do you know this?", "dlg_1_1")
  98. StartConversation(conversation, NPC, Spawn, "The Rockpaw gnoll clan has wrested control of these caves to themselves. They are planning something very large.")
  99. end
  100. function dlg_0_3(NPC, Spawn)
  101. FaceTarget(NPC, Spawn)
  102. conversation = CreateConversation()
  103. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_004.mp3", "", "", 3518125832, 3106838592)
  104. AddConversationOption(conversation, "Very well.", "OfferQuest1")
  105. StartConversation(conversation, NPC, Spawn, "To begin with you can help me retrieve an updated copy of the gnoll field book. My copy is more than a few weeks old and these gnolls are more organized than one would like to credit their race capable of. The leaders of each clan of gnolls within these caves will have the order book. There is a Dustpaw gnoll camp west of here, on this level. Retrieve their field book. It may be encoded. If you see a small symbol of a paw held to an eye, then it is encoded. If it is then you must find the key to the cipher, this could be carried by any gnoll. Once you have the key, bring it and the book back to me so I can study it.")
  106. end
  107. function dlg_1_1(NPC, Spawn)
  108. FaceTarget(NPC, Spawn)
  109. conversation = CreateConversation()
  110. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_000.mp3", "", "", 3394008889, 3046376303)
  111. AddConversationOption(conversation, "Was there a link?", "dlg_1_2")
  112. StartConversation(conversation, NPC, Spawn, "I was here on my own a short time ago. These Caves are home to a few gnoll clans: the Dustpaw, the Mudpaw and the Rockpaw. Previously they had fought amongst themselves. After a series of strange reports from a few of the areas that surround Qeynos, I was sent here to investigate a possible link.")
  113. end
  114. function dlg_1_2(NPC, Spawn)
  115. FaceTarget(NPC, Spawn)
  116. conversation = CreateConversation()
  117. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_001.mp3", "", "", 3459374999, 3197214487)
  118. AddConversationOption(conversation, "So what was the link?", "dlg_1_3")
  119. StartConversation(conversation, NPC, Spawn, "A strong link. Among the Rockpaw gnolls a new leader has come, High Shaman Zen/'Durath. He/'s smart, smarter than any other gnoll I know of. He rallied the Rockpaw gnolls and brought them victory over the other two clans. He then reestablished ties with Blackburrow. Blackburrow provided him with some contacts. Through these contacts Zen/'Durath got in touch with a few Freeportian engineers, Fluwkowir and Fulkoir Haggleton.")
  120. end
  121. function dlg_1_3(NPC, Spawn)
  122. FaceTarget(NPC, Spawn)
  123. conversation = CreateConversation()
  124. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_002.mp3", "", "", 16239315, 349954635)
  125. AddConversationOption(conversation, "Why not?", "dlg_1_4")
  126. StartConversation(conversation, NPC, Spawn, "There had been gnoll sightings in the Forest Ruins, the Oakmyst Forest and the Peat Bog. That alone is very strange. There were also reports of gnolls possessing strange machines. The purpose of most of these machines has yet to be deciphered. A couple, however, are known to us. One is meant to dig, and the other is meant to poison. When I arrived here things were quiet, for a time. Now that is no longer the case.")
  127. end
  128. function dlg_1_4(NPC, Spawn)
  129. FaceTarget(NPC, Spawn)
  130. conversation = CreateConversation()
  131. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_003.mp3", "", "", 3632364295, 1198051029)
  132. AddConversationOption(conversation, "They plan on attacking Qeynos?", "dlg_1_5")
  133. StartConversation(conversation, NPC, Spawn, "The gnolls have brought an expert smithy from Blackburrow. They/'ve been creating armor to outfit an army for some time now. And that isn/'t the only source of noise... The Haggletons have provided these gnolls with massive digging machines. When I was last down here the plans were not finalized, but it looked like they were going to tunnel directly into Qeynos. This is why we must act discretely. Panic would only complicate things at this point.")
  134. end
  135. function dlg_1_5(NPC, Spawn)
  136. FaceTarget(NPC, Spawn)
  137. conversation = CreateConversation()
  138. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_004.mp3", "", "", 1057994736, 896440060)
  139. AddConversationOption(conversation, "How can I help?", "dlg_0_3")
  140. StartConversation(conversation, NPC, Spawn, "I believe so, though not directly.")
  141. end
  142. function OfferQuest1(NPC, Spawn)
  143. FaceTarget(NPC, Spawn)
  144. OfferQuest(NPC, Spawn, QUEST_1)
  145. end
  146. function OnQuest1(NPC, Spawn, conversation)
  147. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_005.mp3", "", "", 3442310120, 962597541)
  148. if (HasQuest(Spawn, QUEST_1) and GetQuestStep(Spawn, QUEST_1) == 4) or (HasCompletedQuest(Spawn, QUEST_1)) then
  149. AddConversationOption(conversation, "I have. Here it is.", "dlg_7_1")
  150. else
  151. AddConversationOption(conversation, "No, not yet.")
  152. end
  153. --------- TEMPORARY
  154. if HasQuest(Spawn, QUEST_1) and GetQuestStep(Spawn, QUEST_1) == 2 then
  155. SetStepComplete(Spawn, QUEST_1, 2)
  156. end
  157. AddConversationOption(conversation, "What can you tell me about the Caves?", "AboutCaves")
  158. StartConversation(conversation, NPC, Spawn, "Have you gotten the gnollish order book?")
  159. end
  160. function AboutCaves(NPC, Spawn)
  161. FaceTarget(NPC, Spawn)
  162. conversation = CreateConversation()
  163. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_000.mp3", "", "", 3394008889, 3046376303)
  164. AddConversationOption(conversation, "Was there a link?", "dlg_4_2")
  165. StartConversation(conversation, NPC, Spawn, "I was here on my own a short time ago. These Caves are home to a few gnoll clans: the Dustpaw, the Mudpaw and the Rockpaw. Previously they had fought amongst themselves. After a series of strange reports from a few of the areas that surround Qeynos, I was sent here to investigate a possible link.")
  166. end
  167. function dlg_4_2(NPC, Spawn)
  168. FaceTarget(NPC, Spawn)
  169. conversation = CreateConversation()
  170. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_001.mp3", "", "", 3459374999, 3197214487)
  171. AddConversationOption(conversation, "So what was the link?", "dlg_4_3")
  172. StartConversation(conversation, NPC, Spawn, "A strong link. Among the Rockpaw gnolls a new leader has come, High Shaman Zen/'Durath. He/'s smart, smarter than any other gnoll I know of. He rallied the Rockpaw gnolls and brought them victory over the other two clans. He then reestablished ties with Blackburrow. Blackburrow provided him with some contacts. Through these contacts Zen/'Durath got in touch with a few Freeportian engineers, Fluwkowir and Fulkoir Haggleton.")
  173. end
  174. function dlg_4_3(NPC, Spawn)
  175. FaceTarget(NPC, Spawn)
  176. conversation = CreateConversation()
  177. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_002.mp3", "", "", 16239315, 349954635)
  178. AddConversationOption(conversation, "Why not?", "dlg_4_4")
  179. StartConversation(conversation, NPC, Spawn, "There had been gnoll sightings in the Forest Ruins, the Oakmyst Forest and the Peat Bog. That alone is very strange. There were also reports of gnolls possessing strange machines. The purpose of most of these machines has yet to be deciphered. A couple, however, are known to us. One is meant to dig, and the other is meant to poison. When I arrived here things were quiet, for a time. Now that is no longer the case.")
  180. end
  181. function dlg_4_4(NPC, Spawn)
  182. FaceTarget(NPC, Spawn)
  183. conversation = CreateConversation()
  184. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_003.mp3", "", "", 3632364295, 1198051029)
  185. AddConversationOption(conversation, "They plan on attacking Qeynos?", "dlg_4_5")
  186. StartConversation(conversation, NPC, Spawn, "The gnolls have brought an expert smithy from Blackburrow. They/'ve been creating armor to outfit an army for some time now. And that isn/'t the only source of noise... The Haggletons have provided these gnolls with massive digging machines. When I was last down here the plans were not finalized, but it looked like they were going to tunnel directly into Qeynos. This is why we must act discretely. Panic would only complicate things at this point.")
  187. end
  188. function dlg_4_5(NPC, Spawn)
  189. FaceTarget(NPC, Spawn)
  190. conversation = CreateConversation()
  191. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_004.mp3", "", "", 1057994736, 896440060)
  192. AddConversationOption(conversation, "I will see what I can find out.")
  193. StartConversation(conversation, NPC, Spawn, "I believe so, though not directly.")
  194. end
  195. function dlg_7_1(NPC, Spawn)
  196. if HasQuest(Spawn, QUEST_1) then
  197. SetStepComplete(Spawn, QUEST_1, 4)
  198. end
  199. FaceTarget(NPC, Spawn)
  200. conversation = CreateConversation()
  201. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_006.mp3", "", "", 3677963528, 2296083792)
  202. AddConversationOption(conversation, "I am ready.", "dlg_7_2")
  203. StartConversation(conversation, NPC, Spawn, "Great! This will prove to be very useful I am certain... Yes, their plans are as we suspected. " .. GetName(Spawn) .. ", we need to put an immediate halt to their production! Are you ready to act again?")
  204. end
  205. -------------------------------------------------------------------------------------------------------------------
  206. -- QUEST 2
  207. -------------------------------------------------------------------------------------------------------------------
  208. function dlg_7_2(NPC, Spawn)
  209. FaceTarget(NPC, Spawn)
  210. conversation = CreateConversation()
  211. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_007.mp3", "", "", 2761151538, 2929645199)
  212. AddConversationOption(conversation, "All right.", "OfferQuest2")
  213. StartConversation(conversation, NPC, Spawn, "The gnolls are creating an army that will be used to invade Qeynos. I had Emma whip up some explosives just for times like this. Take these charges. I need you to destroy the forge in the armory; it/'s on the level above this one. The gnolls also have a number of machine parts scattered around. These are not the two, main digging machines that they are using, but they are still part of the gnoll war machine and should be destroyed.")
  214. end
  215. function OfferQuest2(NPC, Spawn)
  216. FaceTarget(NPC, Spawn)
  217. OfferQuest(NPC, Spawn, QUEST_2)
  218. end
  219. function dlg_7_3(NPC, Spawn)
  220. FaceTarget(NPC, Spawn)
  221. conversation = CreateConversation()
  222. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_005.mp3", "", "", 3442310120, 962597541)
  223. AddConversationOption(conversation, "I have. Here it is.", "dlg_7_4")
  224. AddConversationOption(conversation, "What can you tell me about the Caves?")
  225. StartConversation(conversation, NPC, Spawn, "Have you gotten the gnollish order book?")
  226. end
  227. function OnQuest2(NPC, Spawn, conversation)
  228. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_008.mp3", "", "", 3464612854, 1006122097)
  229. if (HasQuest(Spawn, QUEST_2) and GetQuestStep(Spawn, QUEST_2) == 3) or (HasCompletedQuest(Spawn, QUEST_2)) then
  230. AddConversationOption(conversation, "Yes, I destroyed the machines and the forge.", "dlg_15_1")
  231. else
  232. AddConversationOption(conversation, "I need more explosives.", "MoreExplosives")
  233. AddConversationOption(conversation, "No, not yet.")
  234. end
  235. AddConversationOption(conversation, "What can you tell me about the Caves?", "AboutCaves")
  236. AddConversationOption(conversation, "Have you learned anything new from the book?", "LearnedFromBook")
  237. StartConversation(conversation, NPC, Spawn, "Have you done as I asked?")
  238. end
  239. function LearnedFromBook(NPC, Spawn)
  240. FaceTarget(NPC, Spawn)
  241. conversation = CreateConversation()
  242. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_005.mp3", "", "", 2808914338, 1740276714)
  243. AddConversationOption(conversation, "Can they be stopped?", "dlg_9_2")
  244. StartConversation(conversation, NPC, Spawn, "The gnolls have a very sophisticated attack plan, especially considering they/'re gnolls. They plan to dig under Qeynos and sneak inside. Once there they will fight, but not with much force. Eventually they will attack, forcing us to defend ourselves. As this happens they plan on attacking from a new entry point, hopefully catching us unaware.")
  245. end
  246. function dlg_9_2(NPC, Spawn)
  247. FaceTarget(NPC, Spawn)
  248. conversation = CreateConversation()
  249. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_006.mp3", "", "", 1238557944, 2958306914)
  250. AddConversationOption(conversation, "I see.")
  251. StartConversation(conversation, NPC, Spawn, "Sure, but not without a heavy loss of life. It would be preferable, by far, to stop them here, now. Crippling their ability to dig and produce armor is our best bet at this point.")
  252. end
  253. function MoreExplosives(NPC, Spawn)
  254. -- 7 explosives
  255. for i = 1, 7, 1 do
  256. SummonItem(Spawn, 6975)
  257. SendMessage(Spawn, "You receive [explosives].")
  258. SendPopUpMessage(Spawn, "You receive explosives.", 255, 255, 255)
  259. end
  260. end
  261. function dlg_15_1(NPC, Spawn)
  262. if HasQuest(Spawn, QUEST_2) then
  263. SetStepComplete(Spawn, QUEST_2, 3)
  264. end
  265. FaceTarget(NPC, Spawn)
  266. conversation = CreateConversation()
  267. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_009.mp3", "", "", 2550748211, 2686782300)
  268. AddConversationOption(conversation, "What do you mean?", "dlg_15_2")
  269. StartConversation(conversation, NPC, Spawn, "Wonderful. A setback like this will cost them dearly. They may not have proper time to recoup. I do not intend to give them that chance.")
  270. end
  271. -------------------------------------------------------------------------------------------------------------------
  272. -- QUEST 3
  273. -------------------------------------------------------------------------------------------------------------------
  274. function dlg_15_2(NPC, Spawn)
  275. FaceTarget(NPC, Spawn)
  276. conversation = CreateConversation()
  277. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_011.mp3", "", "", 980784513, 319939534)
  278. AddConversationOption(conversation, "What is the ritual?", "dlg_15_3")
  279. StartConversation(conversation, NPC, Spawn, "I know enough of these gnolls. I did stay here for quite some time, hidden but among them, you realize. The Rockpaw have a ritual they use when they wish to speak with Zen/'Durath. If we mimic that ritual he will show.")
  280. end
  281. function dlg_15_3(NPC, Spawn)
  282. FaceTarget(NPC, Spawn)
  283. conversation = CreateConversation()
  284. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_012.mp3", "", "", 4286756342, 1858639464)
  285. AddConversationOption(conversation, "I can do it.", "OfferQuest3")
  286. StartConversation(conversation, NPC, Spawn, "First you must collect the necessary items. You will need five crown scales from the albino pythons. You will also need some of the Rockpaw shaman/'s incantation powder, you can find this in the Rockpaw camps. Finally, you will need a river stone from the river behemoths. These can all be found on the uppermost level here. However, the river stone may be difficult to get.")
  287. end
  288. function OfferQuest3(NPC, Spawn)
  289. FaceTarget(NPC, Spawn)
  290. OfferQuest(NPC, Spawn, QUEST_3)
  291. end
  292. function OnQuest3(NPC, Spawn, conversation)
  293. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_013.mp3", "", "", 1041018837, 4007905391)
  294. if (HasQuest(Spawn, QUEST_3) and GetQuestStep(Spawn, QUEST_3) == 5) or (HasCompletedQuest(Spawn, QUEST_3)) then
  295. AddConversationOption(conversation, "Yes, here they are.", "dlg_22_1")
  296. else
  297. AddConversationOption(conversation, "No, not yet.")
  298. end
  299. AddConversationOption(conversation, "What can you tell me about the Caves?", "AboutCaves")
  300. AddConversationOption(conversation, "What can you tell me about the gnoll attack plan?", "GnollAttack")
  301. AddConversationOption(conversation, "Have you learned anything new from the book?", "LearnedFromBook")
  302. StartConversation(conversation, NPC, Spawn, "Have you collected the materials?")
  303. end
  304. function GnollAttack(NPC, Spawn)
  305. FaceTarget(NPC, Spawn)
  306. conversation = CreateConversation()
  307. AddConversationOption(conversation, "Can they be stopped?", "CanTheyBeStopped")
  308. StartConversation(conversation, NPC, Spawn, "The gnolls have a very sophistical attack plan, especially considering they/'re gnolls. They plan to dig under Qeynos and attack inside. Once there, they will fight, but not with much force. Eventually they will attack, forcing us to defend ourselves. As this happens they plan on attacking from every entry point hopefully catching us unaware.")
  309. end
  310. function CanTheyBeStopped(NPC, Spawn)
  311. FaceTarget(NPC, Spawn)
  312. conversation = CreateConversation()
  313. AddConversationOption(conversation, "I see.")
  314. StartConversation(conversation, NPC, Spawn, "Sure, but not without a heavy loss of life. It would be preferable, by far, to stop them here, now. Crippling their ability to dig and produce armor is our best bet at this point.")
  315. end
  316. function dlg_22_1(NPC, Spawn)
  317. if HasQuest(Spawn, QUEST_3) then
  318. SetStepComplete(Spawn, QUEST_3, 5)
  319. end
  320. FaceTarget(NPC, Spawn)
  321. conversation = CreateConversation()
  322. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_014.mp3", "", "", 247398570, 2593527030)
  323. AddConversationOption(conversation, "Yes.", "dlg_22_2")
  324. StartConversation(conversation, NPC, Spawn, "Then I have all I need. I will make the staff of summoning now. Do not be alarmed, the skeleton that adorns it is not a recent one. With this staff Zen/'Durath will be summoned. Are you ready?")
  325. end
  326. -------------------------------------------------------------------------------------------------------------------
  327. -- QUEST 4
  328. -------------------------------------------------------------------------------------------------------------------
  329. function dlg_22_2(NPC, Spawn)
  330. FaceTarget(NPC, Spawn)
  331. conversation = CreateConversation()
  332. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_015.mp3", "", "", 2549188816, 2219129213)
  333. AddConversationOption(conversation, "I will return.", "OfferQuest4")
  334. StartConversation(conversation, NPC, Spawn, "Good. Take this staff to the large skull on the northern end one level above this one. Once there place the staff in the skull, this will bring forth Zen/'Durath. Return to me when he is dead.")
  335. end
  336. function OfferQuest4(NPC, Spawn)
  337. FaceTarget(NPC, Spawn)
  338. OfferQuest(NPC, Spawn, QUEST_4)
  339. end
  340. function OnQuest4(NPC, Spawn, conversation)
  341. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_016.mp3", "", "", 2025655936, 1813056075)
  342. if GetQuestStep(Spawn, QUEST_4) == 2 then
  343. AddConversationOption(conversation, "Yes.", "dlg_28_1")
  344. else
  345. AddConversationOption(conversation, "Not yet.", "dlg_27_1")
  346. AddConversationOption(conversation, "I need the summoning staff.", "NeedStaff")
  347. end
  348. AddConversationOption(conversation, "What can you tell me about the Caves?", "AboutCaves")
  349. AddConversationOption(conversation, "What can you tell me about the gnoll attack plan?", "GnollAttack")
  350. AddConversationOption(conversation, "Is there anything else you can tell me?", "AnythingElse")
  351. StartConversation(conversation, NPC, Spawn, "Is Zen/'Durath dead?")
  352. end
  353. function AnythingElse(NPC, Spawn)
  354. FaceTarget(NPC, Spawn)
  355. conversation = CreateConversation()
  356. AddConversationOption(conversation, "Thanks.")
  357. StartConversation(conversation, NPC, Spawn, "The book spoke of /'Haggletons/' who are Freeportian gnomes. We don/'t know if they acted alone or with some element of their government. It/'s not likely we/'ll ever know. From the way things are around here now, it/'s clear the gnoll/'s production is slowing. I do not expect this to last much longer, thanks in large part to you. I am lucky to have you on my side.")
  358. end
  359. function NeedStaff(NPC, Spawn)
  360. -- summoning staff
  361. if not HasItem(Spawn, QUEST_4_SUMMONING_STAFF_ID) then
  362. SummonItem(Spawn, QUEST_4_SUMMONING_STAFF_ID, 1)
  363. end
  364. end
  365. function dlg_28_1(NPC, Spawn)
  366. SetStepComplete(Spawn, QUEST_4, 2)
  367. FaceTarget(NPC, Spawn)
  368. conversation = CreateConversation()
  369. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_017.mp3", "", "", 1945105628, 3603406518)
  370. AddConversationOption(conversation, "Thank you.")
  371. StartConversation(conversation, NPC, Spawn, "Then it is done, and the Rockpaw shall soon fall. I am very relieved. I am lucky to have you, " .. GetName(Spawn) .. ". Please, take this as a sign of my thanks, and the thanks of the Queen. You have earned it.")
  372. end