9
3

TylliaNavar.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. --[[
  2. Script Name : TylliaNavar.lua
  3. Script Purpose : Tyllia Navar
  4. Script Author : Emagi
  5. Script Date : 05/14/2020
  6. Script Notes : Made from General/1028/Antonica-Mar15-v3.log
  7. --]]
  8. local QUEST_1 = 3000
  9. local QUEST_2 = 5560
  10. local QUEST_3 = 5561
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, QUEST_1)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. local greetingsTable = { "voiceover/english/voice_emotes/greetings/greetings_1_1061.mp3",
  18. "voiceover/english/voice_emotes/greetings/greetings_2_1061.mp3",
  19. "voiceover/english/voice_emotes/greetings/greetings_3_1061.mp3"};
  20. function hailed(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. PlayFlavor(NPC, greetingsTable[math.random(#greetingsTable)], "", "", 0, 0, Spawn)
  23. math.randomseed(os.time());
  24. if not HasQuest(Spawn, QUEST_1) and not HasCompletedQuest(Spawn, QUEST_1) then
  25. dlg_0_0(NPC, Spawn)
  26. elseif HasQuest(Spawn, QUEST_1) or not HasQuest(Spawn, QUEST_2) and not HasCompletedQuest(Spawn, QUEST_2) then
  27. Quest1_Progress(NPC, Spawn)
  28. elseif HasQuest(Spawn, QUEST_2) or not HasQuest(Spawn, QUEST_3) and not HasCompletedQuest(Spawn, QUEST_3) then
  29. Quest2_Progress(NPC, Spawn)
  30. elseif HasQuest(Spawn, QUEST_3) then
  31. Quest3_Progress(NPC, Spawn)
  32. end
  33. end
  34. function Quest3_Progress(NPC, Spawn)
  35. conversation = CreateConversation()
  36. if GetQuestStep(Spawn, QUEST_3) == 3 or HasCompletedQuest(Spawn, QUEST_3) then
  37. AddConversationOption(conversation, "Yes, here.", "dlg_4_1")
  38. end
  39. AddConversationOption(conversation, "Not yet.")
  40. StartConversation(conversation, NPC, Spawn, "Did you get the manfiest?")
  41. end
  42. function Quest2_Progress(NPC, Spawn)
  43. conversation = CreateConversation()
  44. if GetQuestStep(Spawn, QUEST_2) == 3 or HasCompletedQuest(Spawn, QUEST_2) then
  45. AddConversationOption(conversation, "The gnolls are dead.", "dlg1_1")
  46. end
  47. AddConversationOption(conversation, "I am not finished yet, I will return.")
  48. StartConversation(conversation, NPC, Spawn, "Well?")
  49. end
  50. function Quest1_Progress(NPC, Spawn)
  51. conversation = CreateConversation()
  52. if GetQuestStep(Spawn, QUEST_1) == 1 or GetQuestStep(Spawn, QUEST_1) == 2 or GetQuestStep(Spawn, QUEST_1) == 3 then
  53. AddConversationOption(conversation, "I haven't done anything you asked me yet.")
  54. elseif GetQuestStep(Spawn, QUEST_1) == 4 or HasCompletedQuest(Spawn, QUEST_1) then
  55. AddConversationOption(conversation, "The gnolls are dead. The boat contained nothing, unfortunately.", "dlg_complete_1")
  56. end
  57. AddConversationOption(conversation, "I will return later.")
  58. StartConversation(conversation, NPC, Spawn, "What of the boat and the gnolls?")
  59. end
  60. function dlg_0_1(NPC, Spawn)
  61. FaceTarget(NPC, Spawn)
  62. conversation = CreateConversation()
  63. AddConversationOption(conversation, "What are you doing up here?", "dlg_0_2")
  64. StartConversation(conversation, NPC, Spawn, "The gnolls are foolish and unorganized, but they are not stupid. They would drive me away if they knew I was up here.")
  65. end
  66. function dlg_0_0(NPC, Spawn)
  67. conversation = CreateConversation()
  68. AddConversationOption(conversation, "What are you doing up here?", "dlg_0_2")
  69. AddConversationOption(conversation, "Why is that?", "dlg_0_1")
  70. StartConversation(conversation, NPC, Spawn, "Greetings, you are welcome to rest here, but please be quiet and start no fires.")
  71. end
  72. function dlg_0_2(NPC, Spawn)
  73. FaceTarget(NPC, Spawn)
  74. conversation = CreateConversation()
  75. AddConversationOption(conversation, "I am " .. GetName(Spawn) .. ".", "dlg_0_3")
  76. StartConversation(conversation, NPC, Spawn, "Observing, of course. I am Tyllia Navar. And you?")
  77. end
  78. function dlg_0_3(NPC, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. conversation = CreateConversation()
  81. AddConversationOption(conversation, "What exactly are you observing?", "dlg_0_4")
  82. StartConversation(conversation, NPC, Spawn, "It is nice to make your acquaintance, " .. GetName(Spawn) .. ".")
  83. end
  84. function dlg_0_4(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. conversation = CreateConversation()
  87. AddConversationOption(conversation, "Who makes up the unit?", "dlg_0_5")
  88. AddConversationOption(conversation, "And what have you found so far?", "dlg_0_6")
  89. StartConversation(conversation, NPC, Spawn, "The gnolls of this area. After what has been going on in the lands closer to Qeynos her majesty has commissioned a special unit of the Qeynos Guard to collect intelligence on current and future gnoll threats. I am one third of that unit. This area is my charge.")
  90. end
  91. function dlg_0_5(NPC, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. conversation = CreateConversation()
  94. AddConversationOption(conversation, "And what have you found so far?", "dlg_0_6")
  95. StartConversation(conversation, NPC, Spawn, "Magnon Baelvurn the former fisherman and Bulvar Rakgam, a self proclaimed \"true Halasian,\" make up the other two thirds of the unit. Magnon and I keep watch on the northern and southern portions of western Antonica, respectively. Magnon alone watches over the east side. We harry the gnolls to keep them from gaining strength. At the same time we watch for signs of concern.")
  96. end
  97. function dlg_0_6(NPC, Spawn)
  98. FaceTarget(NPC, Spawn)
  99. conversation = CreateConversation()
  100. AddConversationOption(conversation, "What's so interesting about the cave?", "dlg_0_7")
  101. StartConversation(conversation, NPC, Spawn, "The gnolls around here are suddenly more active. I have seen them using a small boat to carry things to and from the islands just south of here. It is a curious thing, and I wish to learn more of it, but right now my attention is on the cave north of here.")
  102. end
  103. function dlg_0_7(NPC, Spawn)
  104. FaceTarget(NPC, Spawn)
  105. conversation = CreateConversation()
  106. AddConversationOption(conversation, "How can I help?", "dlg_0_8")
  107. StartConversation(conversation, NPC, Spawn, "The gnolls have been hiding in there for some time now. They bring supplies in often, but they never bring anything out. I plan to see what is going on in there soon, but not before I finish collecting my information. You, though... you could help me.")
  108. end
  109. function dlg_0_8(NPC, Spawn)
  110. FaceTarget(NPC, Spawn)
  111. conversation = CreateConversation()
  112. AddConversationOption(conversation, "What would you have me do?", "dlg_0_9")
  113. StartConversation(conversation, NPC, Spawn, "It is almost time for me to move against the gnolls of this area. If you set them off balance to begin with--all while collecting information for me--it will set them up better for what I will do. Would you care to help, " .. GetName(Spawn) .. "?")
  114. end
  115. function dlg_0_9(NPC, Spawn)
  116. FaceTarget(NPC, Spawn)
  117. conversation = CreateConversation()
  118. AddConversationOption(conversation, "Alright.", "OfferQuest1")
  119. StartConversation(conversation, NPC, Spawn, "For starters I'd like you to take out some of the neophytes and runts just south of here. There are far too many for now. While you're down there I'd also like you to check the contents of that small boat they've been using. You'll find it south west of here, on the rocky shore. Check its contents, if we know what they've been moving around we can get a better idea of what they're up to.")
  120. end
  121. function dlg1_1(NPC, Spawn)
  122. if GetQuestStep(Spawn, QUEST_2) == 3 then
  123. SetStepComplete(Spawn, QUEST_2, 3)
  124. end
  125. FaceTarget(NPC, Spawn)
  126. local conversation = CreateConversation()
  127. AddConversationOption(conversation, "No, nothing like that on the island.", "dlg_2_1")
  128. StartConversation(conversation, NPC, Spawn, "That is a relief... And what of the island itself? Were there supplies? Perhaps a shipping port of some sort.")
  129. end
  130. function dlg_2_1(NPC, Spawn)
  131. FaceTarget(NPC, Spawn)
  132. local conversation = CreateConversation()
  133. AddConversationOption(conversation, "I will.", "dlg_2_2")
  134. StartConversation(conversation, NPC, Spawn, "Then it must be on the other island... that is unfortunate. Will you go back, " .. GetName(Spawn) .. "")
  135. end
  136. function dlg_2_2(NPC, Spawn)
  137. FaceTarget(NPC, Spawn)
  138. local conversation = CreateConversation()
  139. AddConversationOption(conversation, "What is so important about the docks?", "dlg_3_1")
  140. StartConversation(conversation, NPC, Spawn, "You'll have to venture to the other island. It is fortified with stronger ranks and far more dangerous. I would not recommend setting foot on it, but I believe you can still find the dock by swimming about the isle, the gnolls won't notice you then. Yes, I think that is the best bet.")
  141. end
  142. function dlg_3_1(NPC, Spawn)
  143. FaceTarget(NPC, Spawn)
  144. local conversation = CreateConversation()
  145. AddConversationOption(conversation, "Alright.", "OfferQuest3")
  146. StartConversation(conversation, NPC, Spawn, "As I said, if we can determine what items the gnolls are moving we are that much closer to discovering their plans... if they even have plans; I do hope the gnolls are not bent on making a more permanent residence here. However, at the docks I am certain you will find a manifest of some sort. Find it and bring it to me.")
  147. end
  148. function dlg_4_1(NPC, Spawn)
  149. if GetQuestStep(Spawn, QUEST_3) == 3 then
  150. SetStepComplete(Spawn, QUEST_3, 3)
  151. end
  152. FaceTarget(NPC, Spawn)
  153. local conversation = CreateConversation()
  154. AddConversationOption(conversation, "I will")
  155. StartConversation(conversation, NPC, Spawn, "Thank you. Hmmm... arcanic fluids? " .. GetName(Spawn) .. ", the time to act is now. Will you continue to offer your aid? ")
  156. end
  157. function OfferQuest1(NPC, Spawn)
  158. FaceTarget(NPC, Spawn)
  159. OfferQuest(NPC, Spawn, QUEST_1)
  160. end
  161. function OfferQuest2(NPC, Spawn)
  162. FaceTarget(NPC, Spawn)
  163. OfferQuest(NPC, Spawn, QUEST_2)
  164. end
  165. function OfferQuest3(NPC, Spawn)
  166. FaceTarget(NPC, Spawn)
  167. OfferQuest(NPC, Spawn, QUEST_3)
  168. end
  169. function dlg_complete_1(NPC, Spawn)
  170. if QuestStepIsComplete(Spawn, QUEST_1, 1) and QuestStepIsComplete(Spawn, QUEST_1, 2) and QuestStepIsComplete(Spawn, QUEST_1, 3) then
  171. SetStepComplete(Spawn, QUEST_1, 4)
  172. end
  173. conversation = CreateConversation()
  174. AddConversationOption(conversation, "I am willing.", "OfferQuest2")
  175. AddConversationOption(conversation, "Not now.", "RejectQuest")
  176. StartConversation(conversation, NPC, Spawn, "By Zek, an empty boat is worthless. At least the neophytes and runts have been slain. Their foul stench will soon return, however. I have another task for you if you're willing.")
  177. end