9
3

DaryannStormrider.lua 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/DaryannStormrider.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.02.15 11:02:34
  5. Script Purpose :
  6. :
  7. --]]
  8. local TheBalanceOfLife = 5480
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, TheBalanceOfLife)
  11. end
  12. function hailed(NPC, Spawn)
  13. FaceTarget(NPC, Spawn)
  14. if not HasQuest(Spawn, TheBalanceOfLife) and not HasCompletedQuest(Spawn, TheBalanceOfLife) then
  15. Option1(NPC, Spawn)
  16. elseif GetQuestStep(Spawn, TheBalanceOfLife) == 1 or GetQuestStep(Spawn, TheBalanceOfLife) == 2 then
  17. Option4(NPC, Spawn)
  18. elseif GetQuestStep(Spawn, TheBalanceOfLife) == 4 or GetQuestStep(Spawn, TheBalanceOfLife) == 3 then
  19. Option5(NPC, Spawn)
  20. elseif GetQuestStep(Spawn, TheBalanceOfLife) == 5 or GetQuestStep(Spawn, TheBalanceOfLife) == 6 then
  21. Option6(NPC, Spawn)
  22. elseif HasCompletedQuest(Spawn, TheBalanceOfLife) then
  23. Quest_Finished(NPC, Spawn)
  24. end
  25. end
  26. function respawn(NPC)
  27. spawn(NPC)
  28. end
  29. function Option1(NPC, Spawn)
  30. FaceTarget(NPC, Spawn)
  31. local conversation = CreateConversation()
  32. PlayFlavor(NPC, "voiceover/english/daryann_stormrider/qey_village05/quests/daryann_stormrider/daryann001.mp3", "", "", 2350021449, 2306066877, Spawn)
  33. if GetLevel(Spawn)>=13 then
  34. AddConversationOption(conversation, "Do you need help with anything?", "Option2")
  35. end
  36. AddConversationOption(conversation, "Luckily, I am busy with other tasks. ")
  37. StartConversation(conversation, NPC, Spawn, "I watch over the woodlands and keep nature in balance. Sometimes it's an unpleasant and difficult task, but without hunters, the hunted would overrun our land.")
  38. end
  39. function Option2(NPC, Spawn)
  40. FaceTarget(NPC, Spawn)
  41. local conversation = CreateConversation()
  42. PlayFlavor(NPC, "voiceover/english/daryann_stormrider/qey_village05/quests/daryann_stormrider/daryann002.mp3", "", "", 3412334991, 3636507740, Spawn)
  43. AddConversationOption(conversation, "Sounds like that would suit me well.", "offer")
  44. AddConversationOption(conversation, "Maybe I'll come back later.")
  45. StartConversation(conversation, NPC, Spawn, "Each village has someone who decides which creatures' numbers need culling and what populations are stable. I'm the representative for the Willow Wood. If you wish to help me, I will gladly assign you some tasks.")
  46. end
  47. function Option3(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. local conversation = CreateConversation()
  50. PlayFlavor(NPC, "voiceover/english/daryann_stormrider/qey_village05/quests/daryann_stormrider/daryann003.mp3", "", "nod", 1849804125, 150143999, Spawn)
  51. AddConversationOption(conversation, "I will return.", "offer")
  52. StartConversation(conversation, NPC, Spawn, "Sometimes a population grows rapidly, and we must hunt weak and sickly creatures to ensure others in the population remain healthy. Other times, predators disrupt nature's balance. I need you to hunt ten sea turtles near Antonica's shore before their egg laying season begins. Please return to me when you finish.")
  53. end
  54. function Quest_Progress(NPC, Spawn)
  55. PlayFlavor(NPC, "", "Good luck on your hunt, adventurer.", "", 1689589577, 4560189, Spawn)
  56. end
  57. function Option4(NPC, Spawn)
  58. FaceTarget(NPC, Spawn)
  59. local conversation = CreateConversation()
  60. PlayFlavor(NPC, "voiceover/english/daryann_stormrider/qey_village05/quests/daryann_stormrider/daryann004.mp3", "", "", 3495621527, 2357616200, Spawn)
  61. if GetQuestStep (Spawn, TheBalanceOfLife)==2 then
  62. AddConversationOption(conversation, "Your request is done.", "Option4a")
  63. end
  64. AddConversationOption(conversation, "I'm still working on it.")
  65. StartConversation(conversation, NPC, Spawn, "Have you thinned the sea turtle population?")
  66. end
  67. function Option4a(NPC, Spawn)
  68. FaceTarget(NPC, Spawn)
  69. local conversation = CreateConversation()
  70. PlayFlavor(NPC, "voiceover/english/daryann_stormrider/qey_village05/quests/daryann_stormrider/daryann005.mp3", "", "", 1446658959, 3624870178, Spawn)
  71. AddConversationOption(conversation, "What else do I need to do?", "Option4b")
  72. StartConversation(conversation, NPC, Spawn, "Thank you for your help. Are you ready for another task?")
  73. end
  74. function Option4b(NPC, Spawn)
  75. SetStepComplete(Spawn, TheBalanceOfLife, 2)
  76. FaceTarget(NPC, Spawn)
  77. local conversation = CreateConversation()
  78. PlayFlavor(NPC, "voiceover/english/daryann_stormrider/qey_village06/quests/daryann_stormrider/daryann006.mp3", "", "", 4199318136, 2611202176, Spawn)
  79. AddConversationOption(conversation, "I will return soon.")
  80. StartConversation(conversation, NPC, Spawn, "The red tailed hawk population in Antonica has risen to unhealthy levels. They are fighting eachother for territory rather than ridding the land of pests. Return to me when defeat a handfull of them.")
  81. end
  82. function Option5(NPC, Spawn)
  83. FaceTarget(NPC, Spawn)
  84. local conversation = CreateConversation()
  85. PlayFlavor(NPC, "voiceover/english/daryann_stormrider/qey_village05/quests/daryann_stormrider/daryann007.mp3", "", "nod", 1943261209, 407620242, Spawn)
  86. if GetQuestStep (Spawn,TheBalanceOfLife)==4 then
  87. AddConversationOption(conversation, "Your request is done.", "Option5a")
  88. end
  89. AddConversationOption(conversation, "I'm still working on it.")
  90. StartConversation(conversation, NPC, Spawn, "Have you thinned the red tailed hawks? They are so beautiful in flight. I do hate to single them out.")
  91. end
  92. function Option5a(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. local conversation = CreateConversation()
  95. PlayFlavor(NPC, "voiceover/english/daryann_stormrider/qey_village05/quests/daryann_stormrider/daryann008.mp3", "", "", 3502562650, 3671794991, Spawn)
  96. AddConversationOption(conversation, "What else do I need to do?", "Option5b")
  97. StartConversation(conversation, NPC, Spawn, "You have been very helpful. They say I have the gift of helping others in need. It appears you also have this gift. Are you ready to use it once again?")
  98. end
  99. function Option5b(NPC, Spawn)
  100. SetStepComplete(Spawn, TheBalanceOfLife, 4)
  101. FaceTarget(NPC, Spawn)
  102. local conversation = CreateConversation()
  103. PlayFlavor(NPC, "voiceover/english/daryann_stormrider/qey_village06/quests/daryann_stormrider/daryann009.mp3", "", "", 1780914877, 503351078, Spawn)
  104. AddConversationOption(conversation, "I will return soon.")
  105. StartConversation(conversation, NPC, Spawn, "Antonica's dark claw crabs have experienced a surge in population. We need to bring their levels under control. Return to me after you thin out the population.")
  106. end
  107. function Option6(NPC, Spawn)
  108. FaceTarget(NPC, Spawn)
  109. local conversation = CreateConversation()
  110. PlayFlavor(NPC, "voiceover/english/daryann_stormrider/qey_village05/quests/daryann_stormrider/daryann010.mp3", "", "nod", 1284135083, 2776970357, Spawn)
  111. if GetQuestStep (Spawn,TheBalanceOfLife)==6 then
  112. AddConversationOption(conversation, "Your request is done.", "Option7")
  113. end
  114. AddConversationOption(conversation, "I'm still working on it.")
  115. StartConversation(conversation, NPC, Spawn, "Have you dealt with the dark claw crabs?")
  116. end
  117. function Option7(NPC, Spawn)
  118. FaceTarget(NPC, Spawn)
  119. local conversation = CreateConversation()
  120. PlayFlavor(NPC, "voiceover/english/daryann_stormrider/qey_village05/quests/daryann_stormrider/daryann011.mp3", "", "", 1936168502, 3017543852, Spawn)
  121. AddConversationOption(conversation, "Thank you, Daryann.","Reward")
  122. StartConversation(conversation, NPC, Spawn, "Thank you for your services. You proved to be a valuable member of the community here in The Willow Wood. Good luck in your future endeavors. Please take this small token of our appreciation.")
  123. end
  124. function Quest_Finished(NPC, Spawn)
  125. PlayFlavor(NPC, "", "Thanks to your help. The populations in Antonica are somewhat stabilized. At least, for now.", "", 1689589577, 4560189, Spawn)
  126. end
  127. function Reward(NPC, Spawn)
  128. SetStepComplete(Spawn, TheBalanceOfLife, 6)
  129. end
  130. function offer(NPC, Spawn)
  131. OfferQuest(NPC, Spawn, TheBalanceOfLife)
  132. end