aSapswillsoothsayer.lua 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. --[[
  2. Script Name : <script-name>
  3. Script Purpose : <purpose>
  4. Script Author : <author-name>
  5. Script Date : <date>
  6. Script Notes : <special-instructions>
  7. --]]
  8. local GhostsAndGoblins = 184
  9. local DoggoneIt = 165
  10. local ADiplomaticMission = 166
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, ADiplomaticMission)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. if HasCompletedQuest(Spawn, GhostsAndGoblins) then
  20. GrexxPromises(NPC, Spawn, 0)
  21. elseif HasQuest(Spawn, GhostsAndGoblins) then
  22. if GetQuestStep(Spawn, GhostsAndGoblins) == 4 then
  23. GrexxPromises(NPC, Spawn, 1)
  24. elseif GetQuestStep(Spawn, GhostsAndGoblins) >= 4 and GetQuestStep(Spawn, GhostsAndGoblins) <= 8 then
  25. GrexxPromises(NPC, Spawn, 0)
  26. elseif GetQuestStep(Spawn, GhostsAndGoblins) == 9 then
  27. GrexxPromises(NPC, Spawn, 2)
  28. end
  29. else
  30. GrexxPromises(NPC, Spawn, 0)
  31. end
  32. end
  33. function GrexxPromises(NPC, Spawn, Choice)
  34. FaceTarget(NPC, Spawn)
  35. conversation = CreateConversation()
  36. if HasCompletedQuest(Spawn, DoggoneIt) then
  37. if HasCompletedQuest(Spawn, ADiplomaticMission) then
  38. elseif HasQuest(Spawn, ADiplomaticMission) then
  39. AddConversationOption(conversation, "I just wanted to say, about that present...", "GiftFromQeynos")
  40. else
  41. AddConversationOption(conversation, "I just wanted to say, about that present...", "GiftFromQeynos")
  42. end
  43. elseif HasQuest(Spawn, DoggoneIt) then
  44. if GetQuestStep(Spawn, DoggoneIt) == 7 then
  45. AddConversationOption(conversation, "I bring you a gift from the people of Qeynos.", "GiftFromQeynos")
  46. end
  47. end
  48. if Choice == 1 then
  49. AddConversationOption(conversation, "The Forest Keeper sent me to ...", "ForestKeeperSentMe")
  50. elseif Choice == 2 then
  51. AddConversationOption(conversation, "I've gotten the items you've asked for.", "GotYourItemsBitch")
  52. end
  53. AddConversationOption(conversation, "I'll bet they are.")
  54. StartConversation(conversation, NPC, Spawn, "Grexx promises us and his promise is kept!")
  55. end
  56. function ForestKeeperSentMe(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. conversation = CreateConversation()
  59. AddConversationOption(conversation, "But what...", "ButWhat")
  60. 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!")
  61. end
  62. function ButWhat(NPC, Spawn)
  63. SetStepComplete(Spawn, GhostsAndGoblins, 4)
  64. FaceTarget(NPC, Spawn)
  65. conversation = CreateConversation()
  66. AddConversationOption(conversation, "Well. Okay.")
  67. 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!")
  68. end
  69. function GotYourItemsBitch(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. conversation = CreateConversation()
  72. AddConversationOption(conversation, "The Forest Keeper said you'd know how to stop the corruption of the colony.", "ForestKeeperSaid")
  73. 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?")
  74. end
  75. function ForestKeeperSaid(NPC, Spawn)
  76. FaceTarget(NPC, Spawn)
  77. conversation = CreateConversation()
  78. AddConversationOption(conversation, "Then what was all that stuff for?", "StuffFor")
  79. 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!")
  80. end
  81. function StuffFor(NPC, Spawn)
  82. FaceTarget(NPC, Spawn)
  83. conversation = CreateConversation()
  84. AddConversationOption(conversation, "You mean you're going to make a brew out of them?", "MakeBrew")
  85. 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!")
  86. end
  87. function MakeBrew(NPC, Spawn)
  88. SetStepComplete(Spawn, GhostsAndGoblins, 9)
  89. FaceTarget(NPC, Spawn)
  90. conversation = CreateConversation()
  91. AddConversationOption(conversation, "I don't think it's very even.")
  92. 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!")
  93. end
  94. ------------------------------------------------------------------------------------------
  95. -- diplomat quest
  96. ------------------------------------------------------------------------------------------
  97. function GiftFromQeynos(NPC, Spawn)
  98. if HasQuest(Spawn, DoggoneIt) and HasItem(Spawn, 1565) then
  99. -- remove a Diplomatic Gift
  100. RemoveItem(Spawn, 1565)
  101. SetStepComplete(Spawn, DoggoneIt, 7)
  102. end
  103. FaceTarget(NPC, Spawn)
  104. conversation = CreateConversation()
  105. if not HasQuest(Spawn, ADiplomaticMission) and not HasCompletedQuest(Spawn, ADiplomaticMission) and HasCompletedQuest(Spawn, DoggoneIt) then
  106. AddConversationOption(conversation, "It's a small token of friendship. A diplomatic gesture.", "TokenOfFriendship")
  107. end
  108. AddConversationOption(conversation, "It's my pleasure to meet you.")
  109. StartConversation(conversation, NPC, Spawn, "Hello! Hello! I knew you would be coming! I knew! And bringing a present...we loves presents!")
  110. end
  111. ------------------------------------------------------------------------------------------
  112. -- diplomat quest
  113. ------------------------------------------------------------------------------------------
  114. function TokenOfFriendship(NPC, Spawn)
  115. FaceTarget(NPC, Spawn)
  116. conversation = CreateConversation()
  117. AddConversationOption(conversation, "I'll pay my respect to your...er people.", "OfferQuest1")
  118. AddConversationOption(conversation, "I need to run.")
  119. 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!")
  120. end
  121. function OfferQuest1(NPC, Spawn)
  122. FaceTarget(NPC, Spawn)
  123. OfferQuest(NPC, Spawn, ADiplomaticMission)
  124. end