aSapswillsoothsayer.lua 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. --[[
  2. Script Name : aSapswillsoothsayer
  3. Script Purpose : Quest and Conversations
  4. Script Author : Unknown
  5. Script Date : 2020.04.11
  6. Script Notes : Need loot changes
  7. Modified Date : 2020.04.11
  8. Modified by : premierio015
  9. Modified Notes : Added missing Favors
  10. --]]
  11. local GhostsAndGoblins = 184
  12. local DoggoneIt = 165
  13. local ADiplomaticMission = 166
  14. function spawn(NPC)
  15. ProvidesQuest(NPC, ADiplomaticMission)
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function hailed(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. if HasCompletedQuest(Spawn, GhostsAndGoblins) then
  23. text = math.random(1,6)
  24. if text == 1 then
  25. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/a_sapswill_soothsayer/tutorial_island02_revamp/quest/qst_goblin_soothsayer_hail_df93707a.mp3", "Sapswill thirsty! Always thirsty!", "", 297731422, 2828024691, Spawn)
  26. elseif text == 2 then
  27. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/a_sapswill_soothsayer/tutorial_island02_revamp/quest/qst_goblin_soothsayer_hail_5b087fab.mp3", "Yoo hoo! Hello, happy friend!", "", 2294144427, 914727908, Spawn)
  28. elseif text == 3 then
  29. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/a_sapswill_soothsayer/tutorial_island02_revamp/quest/qst_goblin_soothsayer_hail_dbbe9e5a.mp3", "Learn from the plants!", "", 3158068630, 3373859959, Spawn)
  30. elseif text == 4 then
  31. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/a_sapswill_soothsayer/tutorial_island02_revamp/quest/qst_goblin_soothsayer_hail_5b15c9a5.mp3", "Greetings, happy friend!", "", 1580044071, 504462891, Spawn)
  32. elseif text == 5 then
  33. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/a_sapswill_soothsayer/tutorial_island02_revamp/quest/qst_goblin_soothsayer_hail_b4e9d8d7.mp3", "Grexx knows all!", "", 282355163, 2914685235, Spawn)
  34. else
  35. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/a_sapswill_soothsayer/tutorial_island02_revamp/quest/qst_goblin_soothsayer_hail_b576b38b.mp3", "Diplomats always diplomatic, I say!", "", 4290529755, 4235299010, Spawn)
  36. end
  37. elseif HasQuest(Spawn, GhostsAndGoblins) then
  38. if GetQuestStep(Spawn, GhostsAndGoblins) == 4 then
  39. GrexxPromises(NPC, Spawn, 1)
  40. elseif GetQuestStep(Spawn, GhostsAndGoblins) >= 4 and GetQuestStep(Spawn, GhostsAndGoblins) <= 8 then
  41. GrexxPromises(NPC, Spawn, 0)
  42. elseif GetQuestStep(Spawn, GhostsAndGoblins) == 9 then
  43. GrexxPromises(NPC, Spawn, 2)
  44. end
  45. else
  46. GrexxPromises(NPC, Spawn, 0)
  47. end
  48. end
  49. --[[
  50. function hailed(NPC, Spawn)
  51. FaceTarget(NPC, Spawn)
  52. if HasCompletedQuest(Spawn, GhostsAndGoblins) then
  53. GrexxPromises(NPC, Spawn, 0)
  54. elseif HasQuest(Spawn, GhostsAndGoblins) then
  55. if GetQuestStep(Spawn, GhostsAndGoblins) == 4 then
  56. GrexxPromises(NPC, Spawn, 1)
  57. elseif GetQuestStep(Spawn, GhostsAndGoblins) >= 4 and GetQuestStep(Spawn, GhostsAndGoblins) <= 8 then
  58. GrexxPromises(NPC, Spawn, 0)
  59. elseif GetQuestStep(Spawn, GhostsAndGoblins) == 9 then
  60. GrexxPromises(NPC, Spawn, 2)
  61. end
  62. else
  63. GrexxPromises(NPC, Spawn, 0)
  64. end
  65. end
  66. --]]
  67. function GrexxPromises(NPC, Spawn, Choice)
  68. FaceTarget(NPC, Spawn)
  69. conversation = CreateConversation()
  70. if HasCompletedQuest(Spawn, DoggoneIt) then
  71. if HasCompletedQuest(Spawn, ADiplomaticMission) then
  72. elseif HasQuest(Spawn, ADiplomaticMission) then
  73. AddConversationOption(conversation, "I just wanted to say, about that present...", "GiftFromQeynos")
  74. else
  75. AddConversationOption(conversation, "I just wanted to say, about that present...", "GiftFromQeynos")
  76. end
  77. elseif HasQuest(Spawn, DoggoneIt) then
  78. if GetQuestStep(Spawn, DoggoneIt) == 7 then
  79. AddConversationOption(conversation, "I bring you a gift from the people of Qeynos.", "GiftFromQeynos")
  80. end
  81. end
  82. if Choice == 1 then
  83. AddConversationOption(conversation, "The Forest Keeper sent me to ...", "ForestKeeperSentMe")
  84. elseif Choice == 2 then
  85. AddConversationOption(conversation, "I've gotten the items you've asked for.", "GotYourItemsBitch")
  86. end
  87. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/a_sapswill_soothsayer/tutorial_island02_revamp/quests/sapswill_soothsayer/sapswill_soothsayer001.mp3", "", "", 3035051138, 3409395583, Spawn)
  88. AddConversationOption(conversation, "I'll bet they are.")
  89. StartConversation(conversation, NPC, Spawn, "Grexx promises us and his promise is kept!")
  90. end
  91. function ForestKeeperSentMe(NPC, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. conversation = CreateConversation()
  94. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/a_sapswill_soothsayer/tutorial_island02_revamp/quests/sapswill_soothsayer/sapswill_soothsayer002.mp3", "", "dance", 2152575465, 987709738, Spawn)
  95. AddConversationOption(conversation, "But what...", "ButWhat")
  96. StartConversation(conversation, NPC, Spawn, "Forest Keeper, big tree! Yes, yes, waiting for you. Big tree, big promise! Water is needed, yes! Three waters, fallen from the skies and the roots from deep beneath! Fetch the waters! Gather the roots!")
  97. end
  98. function ButWhat(NPC, Spawn)
  99. SetStepComplete(Spawn, GhostsAndGoblins, 4)
  100. FaceTarget(NPC, Spawn)
  101. conversation = CreateConversation()
  102. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/a_sapswill_soothsayer/tutorial_island02_revamp/quests/sapswill_soothsayer/sapswill_soothsayer003.mp3", "", "heckno", 993058875, 4130995149, Spawn)
  103. AddConversationOption(conversation, "Well. Okay.")
  104. StartConversation(conversation, NPC, Spawn, "Nothing more to say! Big tree sends you to me to help! Big tree keeps promise! Bring waters and roots first, then sayings I will sooth! Must bring to me, or nothing more will I say!")
  105. end
  106. function GotYourItemsBitch(NPC, Spawn)
  107. FaceTarget(NPC, Spawn)
  108. conversation = CreateConversation()
  109. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/a_sapswill_soothsayer/tutorial_island02_revamp/quests/sapswill_soothsayer/sapswill_soothsayer004.mp3", "", "dance", 3937302704, 1061992396, Spawn)
  110. AddConversationOption(conversation, "The Forest Keeper said you'd know how to stop the corruption of the colony.", "ForestKeeperSaid")
  111. StartConversation(conversation, NPC, Spawn, "Yes! Yes! Freshest waters! Tasty roots! Now will I tell you what you want to know. What you want to know?")
  112. end
  113. function ForestKeeperSaid(NPC, Spawn)
  114. FaceTarget(NPC, Spawn)
  115. conversation = CreateConversation()
  116. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/a_sapswill_soothsayer/tutorial_island02_revamp/quests/sapswill_soothsayer/sapswill_soothsayer005.mp3", "", "", 2503394497, 3201897096, Spawn)
  117. AddConversationOption(conversation, "Then what was all that stuff for?", "StuffFor")
  118. StartConversation(conversation, NPC, Spawn, "Me? No! Grexx knows all, no sayings need to sooth on that! Ha! Why tree tell you such a joke? Ha! Evil things creeping up on poor gobbies, long time now! Big tree is wrong, nothing new to know about that. Happy you came to help us, though!")
  119. end
  120. function StuffFor(NPC, Spawn)
  121. FaceTarget(NPC, Spawn)
  122. conversation = CreateConversation()
  123. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/a_sapswill_soothsayer/tutorial_island02_revamp/quests/sapswill_soothsayer/sapswill_soothsayer006.mp3", "", "nod", 4023935260, 2261160052, Spawn)
  124. AddConversationOption(conversation, "You mean you're going to make a brew out of them?", "MakeBrew")
  125. StartConversation(conversation, NPC, Spawn, "Ah, tasty roots! Mash them up, grind them up and soak in the waters. After the moons are new again, ready to drink, it is! Helps to forget, helps to remember. Tasty Roots!")
  126. end
  127. function MakeBrew(NPC, Spawn)
  128. SetStepComplete(Spawn, GhostsAndGoblins, 9)
  129. FaceTarget(NPC, Spawn)
  130. conversation = CreateConversation()
  131. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/a_sapswill_soothsayer/tutorial_island02_revamp/quests/sapswill_soothsayer/sapswill_soothsayer007.mp3", "", "dance", 1551319640, 2145632407, Spawn)
  132. AddConversationOption(conversation, "I don't think it's very even.")
  133. StartConversation(conversation, NPC, Spawn, "Yes, yes! Tasty brew! If you knew there was no sooth to be said, would you have got tasty roots and fresh waters for us? No! So now we have them and now you will know as much as Sapswills! Even trade! Even trade! Share with you, we will, too!")
  134. end
  135. ------------------------------------------------------------------------------------------
  136. -- diplomat quest
  137. ------------------------------------------------------------------------------------------
  138. function GiftFromQeynos(NPC, Spawn)
  139. if HasQuest(Spawn, DoggoneIt) and HasItem(Spawn, 1565) then
  140. -- remove a Diplomatic Gift
  141. RemoveItem(Spawn, 1565)
  142. SetStepComplete(Spawn, DoggoneIt, 7)
  143. end
  144. FaceTarget(NPC, Spawn)
  145. conversation = CreateConversation()
  146. if not HasQuest(Spawn, ADiplomaticMission) and not HasCompletedQuest(Spawn, ADiplomaticMission) and HasCompletedQuest(Spawn, DoggoneIt) then
  147. AddConversationOption(conversation, "It's a small token of friendship. A diplomatic gesture.", "TokenOfFriendship")
  148. end
  149. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/a_sapswill_soothsayer/tutorial_island02_revamp/quests/sapswill_soothsayer/sapswill_soothsayer008.mp3", "", "", 4111507292, 2842514657, Spawn)
  150. AddConversationOption(conversation, "It's my pleasure to meet you.")
  151. StartConversation(conversation, NPC, Spawn, "Hello! Hello! I knew you would be coming! I knew! And bringing a present...we loves presents!")
  152. end
  153. ------------------------------------------------------------------------------------------
  154. -- diplomat quest
  155. ------------------------------------------------------------------------------------------
  156. function TokenOfFriendship(NPC, Spawn)
  157. FaceTarget(NPC, Spawn)
  158. conversation = CreateConversation()
  159. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/a_sapswill_soothsayer/tutorial_island02_revamp/quests/sapswill_soothsayer/sapswill_soothsayer009.mp3", "", "dance", 3719258575, 2018058923, Spawn)
  160. AddConversationOption(conversation, "I'll pay my respect to your...er people.", "OfferQuest1")
  161. AddConversationOption(conversation, "I need to run.")
  162. StartConversation(conversation, NPC, Spawn, "Friends for life, we are now! Is our tradition to greet everyone we meet. Go meet the Sapswills! Is the diplomatic way! Hail them all! We like friends! Meet the Sapswills, then meet High Chiefain Grexx! He likes friends too! To long life and happy friendships!")
  163. end
  164. function OfferQuest1(NPC, Spawn)
  165. FaceTarget(NPC, Spawn)
  166. OfferQuest(NPC, Spawn, ADiplomaticMission)
  167. end