TylliaNavar.lua 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. function spawn(NPC)
  10. ProvidesQuest(NPC, QUEST_1)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. local greetingsTable = { "voiceover/english/voice_emotes/greetings/greetings_1_1061.mp3",
  16. "voiceover/english/voice_emotes/greetings/greetings_2_1061.mp3",
  17. "voiceover/english/voice_emotes/greetings/greetings_3_1061.mp3"};
  18. function hailed(NPC, Spawn)
  19. FaceTarget(NPC, Spawn)
  20. math.randomseed(os.time());
  21. conversation = CreateConversation()
  22. local introMsg = "Greetings, you are welcome to rest here, but please be quiet and start no fires."
  23. local hasSuspiciousActivityQuest = HasQuest(Spawn, QUEST_1)
  24. local suspiciousActivityQuestComplete = false
  25. if HasCompletedQuest(Spawn, QUEST_1) then
  26. suspiciousActivityQuestComplete = true
  27. hasSuspiciousActivityQuest = true
  28. end
  29. if hasSuspiciousActivityQuest == true then
  30. introMsg = "What of the boat and the gnolls?"
  31. if QuestStepIsComplete(Spawn, QUEST_1, 1) and QuestStepIsComplete(Spawn, QUEST_1, 2) and QuestStepIsComplete(Spawn, QUEST_1, 3) then
  32. suspiciousActivityQuestComplete = true
  33. end
  34. end
  35. PlayFlavor(NPC, greetingsTable[math.random(#greetingsTable)], introMsg, "", 0, 0, Spawn)
  36. if hasSuspiciousActivityQuest == false and suspiciousActivityQuestComplete == false then
  37. AddConversationOption(conversation, "What are you doing up here?", "dlg_0_2")
  38. AddConversationOption(conversation, "Why is that?", "dlg_0_1")
  39. StartConversation(conversation, NPC, Spawn, introMsg)
  40. elseif hasSuspiciousActivityQuest == true and suspiciousActivityQuestComplete == false then
  41. AddConversationOption(conversation, "I will return later.", "dlg_complete_0")
  42. StartConversation(conversation, NPC, Spawn, introMsg)
  43. else
  44. AddConversationOption(conversation, "The gnolls are dead. The boat contained nothing, unfortunately.", "dlg_complete_1")
  45. AddConversationOption(conversation, "I will return later.", "dlg_complete_0")
  46. StartConversation(conversation, NPC, Spawn, introMsg)
  47. end
  48. end
  49. function dlg_0_1(NPC, Spawn)
  50. FaceTarget(NPC, Spawn)
  51. conversation = CreateConversation()
  52. AddConversationOption(conversation, "What are you doing up here?", "dlg_0_2")
  53. 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.")
  54. end
  55. function dlg_0_2(NPC, Spawn)
  56. FaceTarget(NPC, Spawn)
  57. conversation = CreateConversation()
  58. AddConversationOption(conversation, "I am " .. GetName(Spawn) .. ".", "dlg_0_3")
  59. StartConversation(conversation, NPC, Spawn, "Observing, of course. I am Tyllia Navar. And you?")
  60. end
  61. function dlg_0_3(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. conversation = CreateConversation()
  64. AddConversationOption(conversation, "What exactly are you observing?", "dlg_0_4")
  65. StartConversation(conversation, NPC, Spawn, "It is nice to make your acquaintance, " .. GetName(Spawn) .. ".")
  66. end
  67. function dlg_0_4(NPC, Spawn)
  68. FaceTarget(NPC, Spawn)
  69. conversation = CreateConversation()
  70. AddConversationOption(conversation, "Who makes up the unit?", "dlg_0_5")
  71. AddConversationOption(conversation, "And what have you found so far?", "dlg_0_6")
  72. 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.")
  73. end
  74. function dlg_0_5(NPC, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. conversation = CreateConversation()
  77. AddConversationOption(conversation, "And what have you found so far?", "dlg_0_6")
  78. 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.")
  79. end
  80. function dlg_0_6(NPC, Spawn)
  81. FaceTarget(NPC, Spawn)
  82. conversation = CreateConversation()
  83. AddConversationOption(conversation, "What's so interesting about the cave?", "dlg_0_7")
  84. 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.")
  85. end
  86. function dlg_0_7(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. conversation = CreateConversation()
  89. AddConversationOption(conversation, "How can I help?", "dlg_0_8")
  90. 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.")
  91. end
  92. function dlg_0_8(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. conversation = CreateConversation()
  95. AddConversationOption(conversation, "What would you have me do?", "dlg_0_9")
  96. 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) .. "?")
  97. end
  98. function dlg_0_9(NPC, Spawn)
  99. FaceTarget(NPC, Spawn)
  100. conversation = CreateConversation()
  101. AddConversationOption(conversation, "Alright.", "OfferQuest1")
  102. 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.")
  103. end
  104. function OfferQuest1(NPC, Spawn)
  105. FaceTarget(NPC, Spawn)
  106. OfferQuest(NPC, Spawn, QUEST_1)
  107. end
  108. function dlg_complete_1(NPC, Spawn)
  109. if QuestStepIsComplete(Spawn, QUEST_1, 1) and QuestStepIsComplete(Spawn, QUEST_1, 2) and QuestStepIsComplete(Spawn, QUEST_1, 3) then
  110. SetStepComplete(Spawn, QUEST_1, 4)
  111. end
  112. if HasCompletedQuest(Spawn, QUEST_1) then
  113. conversation = CreateConversation()
  114. AddConversationOption(conversation, "I am willing.", "OfferQuest2")
  115. AddConversationOption(conversation, "Not now.", "RejectQuest")
  116. 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.")
  117. end
  118. end