ConsulBree.lua 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  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 :
  7. --]]
  8. local QUEST_FROM_OAKMYST = 212
  9. local QUEST_FROM_PEATBOG = 220
  10. local QUEST_1 = 361
  11. local QUEST_2 = 224
  12. local QUEST_3 = 225
  13. local QUEST_4 = 230
  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. end
  20. function respawn(NPC)
  21. spawn(NPC)
  22. end
  23. function hailed(NPC, Spawn)
  24. FaceTarget(NPC, Spawn)
  25. conversation = CreateConversation()
  26. if HasQuest(Spawn, QUEST_FROM_OAKMYST) or HasQuest(Spawn, QUEST_FROM_PEATBOG) then
  27. AddConversationOption(conversation, "I am here as requested.", "HereAsRequested")
  28. end
  29. if HasCompletedQuest(Spawn, QUEST_1) then
  30. if HasCompletedQuest(Spawn, QUEST_2) then
  31. if HasCompletedQuest(Spawn, QUEST_3) then
  32. if HasCompletedQuest(Spawn, QUEST_4) then
  33. 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)
  34. elseif HasQuest(Spawn, QUEST_4) then
  35. OnQuest4(NPC, Spawn, conversation)
  36. else
  37. OnQuest3(NPC, Spawn, conversation)
  38. end
  39. elseif HasQuest(Spawn, QUEST_3) then
  40. OnQuest3(NPC, Spawn, conversation)
  41. else
  42. OnQuest2(NPC, Spawn, conversation)
  43. end
  44. elseif HasQuest(Spawn, QUEST_2) then
  45. OnQuest2(NPC, Spawn, conversation)
  46. else
  47. OnQuest1(NPC, Spawn, conversation)
  48. end
  49. elseif HasQuest(Spawn, QUEST_1) then
  50. OnQuest1(NPC, Spawn, conversation)
  51. else
  52. IAmGladYouAreHere(NPC, Spawn, conversation)
  53. end
  54. end
  55. -------------------------------------------------------------------------------------------------------------------
  56. -- QUEST FROM OAKMYST
  57. -------------------------------------------------------------------------------------------------------------------
  58. function HereAsRequested(NPC, Spawn)
  59. if HasQuest(Spawn, QUEST_FROM_OAKMYST) then
  60. SetStepComplete(Spawn, QUEST_FROM_OAKMYST, 1)
  61. elseif HasQuest(Spawn, QUEST_FROM_PEATBOG) then
  62. SetStepComplete(Spawn, QUEST_FROM_PEATBOG, 1)
  63. end
  64. FaceTarget(NPC, Spawn)
  65. conversation = CreateConversation()
  66. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_001.mp3", "", "", 2064805321, 3198467105)
  67. if not HasCompletedQuest(Spawn, QUEST_1) and not HasQuest(Spawn, QUEST_1) then
  68. AddConversationOption(conversation, "How can I be of service?", "dlg_0_2")
  69. else
  70. AddConversationOption(conversation, "I will get to work on my current task.", "dlg_2_2")
  71. end
  72. StartConversation(conversation, NPC, Spawn, "That you are. I appreciate your answering the summons.")
  73. end
  74. -------------------------------------------------------------------------------------------------------------------
  75. -- QUEST 1
  76. -------------------------------------------------------------------------------------------------------------------
  77. function IAmGladYouAreHere(NPC, Spawn, conversation)
  78. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_000.mp3", "", "", 312135119, 4181129061)
  79. AddConversationOption(conversation, "Why is that?", "dlg_0_1")
  80. AddConversationOption(conversation, "What is going on here?", "dlg_1_1")
  81. AddConversationOption(conversation, "I have to go.")
  82. StartConversation(conversation, NPC, Spawn, "I am glad you are here.")
  83. end
  84. function dlg_0_1(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. conversation = CreateConversation()
  87. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_002.mp3", "", "", 2428180651, 3557450253)
  88. AddConversationOption(conversation, "What must I do?", "dlg_0_2")
  89. StartConversation(conversation, NPC, Spawn, "There are problems here to solve. You and I are part of the solution.")
  90. end
  91. function dlg_0_2(NPC, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. conversation = CreateConversation()
  94. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_003.mp3", "", "", 502817302, 1202580742)
  95. AddConversationOption(conversation, "What can I do to help?", "dlg_0_3")
  96. AddConversationOption(conversation, "How do you know this?", "dlg_1_1")
  97. StartConversation(conversation, NPC, Spawn, "The Rockpaw gnoll clan has wrested control of these caves to themselves. They are planning something very large.")
  98. end
  99. function dlg_0_3(NPC, Spawn)
  100. FaceTarget(NPC, Spawn)
  101. conversation = CreateConversation()
  102. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_004.mp3", "", "", 3518125832, 3106838592)
  103. AddConversationOption(conversation, "Very well.", "OfferQuest1")
  104. 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.")
  105. end
  106. function dlg_1_1(NPC, Spawn)
  107. FaceTarget(NPC, Spawn)
  108. conversation = CreateConversation()
  109. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_000.mp3", "", "", 3394008889, 3046376303)
  110. AddConversationOption(conversation, "Was there a link?", "dlg_1_2")
  111. 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.")
  112. end
  113. function dlg_1_2(NPC, Spawn)
  114. FaceTarget(NPC, Spawn)
  115. conversation = CreateConversation()
  116. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_001.mp3", "", "", 3459374999, 3197214487)
  117. AddConversationOption(conversation, "So what was the link?", "dlg_1_3")
  118. 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.")
  119. end
  120. function dlg_1_3(NPC, Spawn)
  121. FaceTarget(NPC, Spawn)
  122. conversation = CreateConversation()
  123. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_002.mp3", "", "", 16239315, 349954635)
  124. AddConversationOption(conversation, "Why not?", "dlg_1_4")
  125. 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.")
  126. end
  127. function dlg_1_4(NPC, Spawn)
  128. FaceTarget(NPC, Spawn)
  129. conversation = CreateConversation()
  130. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_003.mp3", "", "", 3632364295, 1198051029)
  131. AddConversationOption(conversation, "They plan on attacking Qeynos?", "dlg_1_5")
  132. 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.")
  133. end
  134. function dlg_1_5(NPC, Spawn)
  135. FaceTarget(NPC, Spawn)
  136. conversation = CreateConversation()
  137. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_004.mp3", "", "", 1057994736, 896440060)
  138. AddConversationOption(conversation, "How can I help?", "dlg_0_3")
  139. StartConversation(conversation, NPC, Spawn, "I believe so, though not directly.")
  140. end
  141. function OfferQuest1(NPC, Spawn)
  142. FaceTarget(NPC, Spawn)
  143. OfferQuest(NPC, Spawn, QUEST_1)
  144. end
  145. function OnQuest1(NPC, Spawn, conversation)
  146. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_005.mp3", "", "", 3442310120, 962597541)
  147. if (HasQuest(Spawn, QUEST_1) and GetQuestStep(Spawn, QUEST_1) == 4) or (HasCompletedQuest(Spawn, QUEST_1)) then
  148. AddConversationOption(conversation, "I have. Here it is.", "dlg_7_1")
  149. else
  150. AddConversationOption(conversation, "No, not yet.")
  151. end
  152. --------- TEMPORARY
  153. if HasQuest(Spawn, QUEST_1) and GetQuestStep(Spawn, QUEST_1) == 2 then
  154. SetStepComplete(Spawn, QUEST_1, 2)
  155. end
  156. AddConversationOption(conversation, "What can you tell me about the Caves?", "AboutCaves")
  157. StartConversation(conversation, NPC, Spawn, "Have you gotten the gnollish order book?")
  158. end
  159. function AboutCaves(NPC, Spawn)
  160. FaceTarget(NPC, Spawn)
  161. conversation = CreateConversation()
  162. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_000.mp3", "", "", 3394008889, 3046376303)
  163. AddConversationOption(conversation, "Was there a link?", "dlg_4_2")
  164. 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.")
  165. end
  166. function dlg_4_2(NPC, Spawn)
  167. FaceTarget(NPC, Spawn)
  168. conversation = CreateConversation()
  169. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_001.mp3", "", "", 3459374999, 3197214487)
  170. AddConversationOption(conversation, "So what was the link?", "dlg_4_3")
  171. 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.")
  172. end
  173. function dlg_4_3(NPC, Spawn)
  174. FaceTarget(NPC, Spawn)
  175. conversation = CreateConversation()
  176. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_002.mp3", "", "", 16239315, 349954635)
  177. AddConversationOption(conversation, "Why not?", "dlg_4_4")
  178. 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.")
  179. end
  180. function dlg_4_4(NPC, Spawn)
  181. FaceTarget(NPC, Spawn)
  182. conversation = CreateConversation()
  183. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_003.mp3", "", "", 3632364295, 1198051029)
  184. AddConversationOption(conversation, "They plan on attacking Qeynos?", "dlg_4_5")
  185. 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.")
  186. end
  187. function dlg_4_5(NPC, Spawn)
  188. FaceTarget(NPC, Spawn)
  189. conversation = CreateConversation()
  190. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_004.mp3", "", "", 1057994736, 896440060)
  191. AddConversationOption(conversation, "I will see what I can find out.")
  192. StartConversation(conversation, NPC, Spawn, "I believe so, though not directly.")
  193. end
  194. function dlg_7_1(NPC, Spawn)
  195. if HasQuest(Spawn, QUEST_1) then
  196. SetStepComplete(Spawn, QUEST_1, 4)
  197. end
  198. FaceTarget(NPC, Spawn)
  199. conversation = CreateConversation()
  200. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_006.mp3", "", "", 3677963528, 2296083792)
  201. AddConversationOption(conversation, "I am ready.", "dlg_7_2")
  202. 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?")
  203. end
  204. -------------------------------------------------------------------------------------------------------------------
  205. -- QUEST 2
  206. -------------------------------------------------------------------------------------------------------------------
  207. function dlg_7_2(NPC, Spawn)
  208. FaceTarget(NPC, Spawn)
  209. conversation = CreateConversation()
  210. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_007.mp3", "", "", 2761151538, 2929645199)
  211. AddConversationOption(conversation, "All right.", "OfferQuest2")
  212. 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.")
  213. end
  214. function OfferQuest2(NPC, Spawn)
  215. FaceTarget(NPC, Spawn)
  216. OfferQuest(NPC, Spawn, QUEST_2)
  217. end
  218. function dlg_7_3(NPC, Spawn)
  219. FaceTarget(NPC, Spawn)
  220. conversation = CreateConversation()
  221. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_005.mp3", "", "", 3442310120, 962597541)
  222. AddConversationOption(conversation, "I have. Here it is.", "dlg_7_4")
  223. AddConversationOption(conversation, "What can you tell me about the Caves?")
  224. StartConversation(conversation, NPC, Spawn, "Have you gotten the gnollish order book?")
  225. end
  226. function OnQuest2(NPC, Spawn, conversation)
  227. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_008.mp3", "", "", 3464612854, 1006122097)
  228. if (HasQuest(Spawn, QUEST_2) and GetQuestStep(Spawn, QUEST_2) == 3) or (HasCompletedQuest(Spawn, QUEST_2)) then
  229. AddConversationOption(conversation, "Yes, I destroyed the machines and the forge.", "dlg_15_1")
  230. else
  231. AddConversationOption(conversation, "I need more explosives.", "MoreExplosives")
  232. AddConversationOption(conversation, "No, not yet.")
  233. end
  234. AddConversationOption(conversation, "What can you tell me about the Caves?", "AboutCaves")
  235. AddConversationOption(conversation, "Have you learned anything new from the book?", "LearnedFromBook")
  236. StartConversation(conversation, NPC, Spawn, "Have you done as I asked?")
  237. end
  238. function LearnedFromBook(NPC, Spawn)
  239. FaceTarget(NPC, Spawn)
  240. conversation = CreateConversation()
  241. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_005.mp3", "", "", 2808914338, 1740276714)
  242. AddConversationOption(conversation, "Can they be stopped?", "dlg_9_2")
  243. 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.")
  244. end
  245. function dlg_9_2(NPC, Spawn)
  246. FaceTarget(NPC, Spawn)
  247. conversation = CreateConversation()
  248. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_info_006.mp3", "", "", 1238557944, 2958306914)
  249. AddConversationOption(conversation, "I see.")
  250. 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.")
  251. end
  252. function MoreExplosives(NPC, Spawn)
  253. -- 7 explosives
  254. for i = 1, 6, 1 do
  255. SummonItem(Spawn, 4873)
  256. SendMessage(Spawn, "You receive [explosives].")
  257. SendPopUpMessage(Spawn, "You receive explosives.", 255, 255, 255)
  258. end
  259. end
  260. function dlg_15_1(NPC, Spawn)
  261. if HasQuest(Spawn, QUEST_2) then
  262. SetStepComplete(Spawn, QUEST_2, 3)
  263. end
  264. FaceTarget(NPC, Spawn)
  265. conversation = CreateConversation()
  266. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_009.mp3", "", "", 2550748211, 2686782300)
  267. AddConversationOption(conversation, "What do you mean?", "dlg_15_2")
  268. 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.")
  269. end
  270. -------------------------------------------------------------------------------------------------------------------
  271. -- QUEST 3
  272. -------------------------------------------------------------------------------------------------------------------
  273. function dlg_15_2(NPC, Spawn)
  274. FaceTarget(NPC, Spawn)
  275. conversation = CreateConversation()
  276. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_011.mp3", "", "", 980784513, 319939534)
  277. AddConversationOption(conversation, "What is the ritual?", "dlg_15_3")
  278. 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.")
  279. end
  280. function dlg_15_3(NPC, Spawn)
  281. FaceTarget(NPC, Spawn)
  282. conversation = CreateConversation()
  283. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_012.mp3", "", "", 4286756342, 1858639464)
  284. AddConversationOption(conversation, "I can do it.", "OfferQuest3")
  285. 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.")
  286. end
  287. function OfferQuest3(NPC, Spawn)
  288. FaceTarget(NPC, Spawn)
  289. OfferQuest(NPC, Spawn, QUEST_3)
  290. end
  291. function OnQuest3(NPC, Spawn, conversation)
  292. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_013.mp3", "", "", 1041018837, 4007905391)
  293. if (HasQuest(Spawn, QUEST_3) and GetQuestStep(Spawn, QUEST_3) == 5) or (HasCompletedQuest(Spawn, QUEST_3)) then
  294. AddConversationOption(conversation, "Yes, here they are.", "dlg_22_1")
  295. else
  296. AddConversationOption(conversation, "No, not yet.")
  297. end
  298. AddConversationOption(conversation, "What can you tell me about the Caves?", "AboutCaves")
  299. AddConversationOption(conversation, "What can you tell me about the gnoll attack plan?", "GnollAttack")
  300. AddConversationOption(conversation, "Have you learned anything new from the book?", "LearnedFromBook")
  301. StartConversation(conversation, NPC, Spawn, "Have you collected the materials?")
  302. end
  303. function GnollAttack(NPC, Spawn)
  304. FaceTarget(NPC, Spawn)
  305. conversation = CreateConversation()
  306. AddConversationOption(conversation, "Can they be stopped?", "CanTheyBeStopped")
  307. 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.")
  308. end
  309. function CanTheyBeStopped(NPC, Spawn)
  310. FaceTarget(NPC, Spawn)
  311. conversation = CreateConversation()
  312. AddConversationOption(conversation, "I see.")
  313. 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.")
  314. end
  315. function dlg_22_1(NPC, Spawn)
  316. if HasQuest(Spawn, QUEST_3) then
  317. SetStepComplete(Spawn, QUEST_3, 5)
  318. end
  319. FaceTarget(NPC, Spawn)
  320. conversation = CreateConversation()
  321. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_014.mp3", "", "", 247398570, 2593527030)
  322. AddConversationOption(conversation, "Yes.", "dlg_22_2")
  323. 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?")
  324. end
  325. -------------------------------------------------------------------------------------------------------------------
  326. -- QUEST 4
  327. -------------------------------------------------------------------------------------------------------------------
  328. function dlg_22_2(NPC, Spawn)
  329. FaceTarget(NPC, Spawn)
  330. conversation = CreateConversation()
  331. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_015.mp3", "", "", 2549188816, 2219129213)
  332. AddConversationOption(conversation, "I will return.", "OfferQuest4")
  333. 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.")
  334. end
  335. function OfferQuest4(NPC, Spawn)
  336. FaceTarget(NPC, Spawn)
  337. OfferQuest(NPC, Spawn, QUEST_4)
  338. end
  339. function OnQuest4(NPC, Spawn, conversation)
  340. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_016.mp3", "", "", 2025655936, 1813056075)
  341. if GetQuestStep(Spawn, QUEST_4) == 2 then
  342. AddConversationOption(conversation, "Yes.", "dlg_28_1")
  343. else
  344. AddConversationOption(conversation, "Not yet.", "dlg_27_1")
  345. AddConversationOption(conversation, "I need the summoning staff.", "NeedStaff")
  346. end
  347. AddConversationOption(conversation, "What can you tell me about the Caves?", "AboutCaves")
  348. AddConversationOption(conversation, "What can you tell me about the gnoll attack plan?", "GnollAttack")
  349. AddConversationOption(conversation, "Is there anything else you can tell me?", "AnythingElse")
  350. StartConversation(conversation, NPC, Spawn, "Is Zen/'Durath dead?")
  351. end
  352. function AnythingElse(NPC, Spawn)
  353. FaceTarget(NPC, Spawn)
  354. conversation = CreateConversation()
  355. AddConversationOption(conversation, "Thanks.")
  356. 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.")
  357. end
  358. function NeedStaff(NPC, Spawn)
  359. -- summoning staff
  360. if not HasItem(Spawn, 11850) then
  361. SummonItem(Spawn, 11850, 1)
  362. end
  363. end
  364. function dlg_28_1(NPC, Spawn)
  365. SetStepComplete(Spawn, QUEST_4, 2)
  366. FaceTarget(NPC, Spawn)
  367. conversation = CreateConversation()
  368. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_017.mp3", "", "", 1945105628, 3603406518)
  369. AddConversationOption(conversation, "Thank you.")
  370. 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.")
  371. end