BrahnaganMacLahnan.lua 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. --[[
  2. Script Name : SpawnScripts/Everfrost/BrahnaganMacLahnan.lua
  3. Script Author : Flunklesnarkin
  4. Script Date : 2015.10.14 11:10:51
  5. Script Purpose :
  6. :
  7. --]]
  8. local TheStoriesofEverfrost = 167
  9. local CullTheThreatToThePioneers = 169
  10. local FurtherCulling = 170
  11. local SuppliesForThePioneers = 171
  12. function spawn(NPC)
  13. ProvidesQuest(NPC, TheStoriesofEverfrost)
  14. ProvidesQuest(NPC, CullTheThreatToThePioneers)
  15. ProvidesQuest(NPC, FurtherCulling)
  16. ProvidesQuest(NPC, SuppliesForThePioneers)
  17. end
  18. function hailed(NPC, Spawn)
  19. FaceTarget(NPC, Spawn)
  20. if GetLevel(Spawn) < 41 then
  21. UnderLevel_Chat(NPC, Spawn)
  22. else
  23. if HasCompletedQuest(Spawn, TheStoriesofEverfrost) == false and HasQuest(Spawn, TheStoriesofEverfrost) == false then
  24. Quest1Chat_1(NPC, Spawn)
  25. elseif HasQuest(Spawn, TheStoriesofEverfrost) == true and GetQuestStep(Spawn, 167) == 1 then
  26. Quest1Chat_5(NPC, Spawn)
  27. elseif HasQuest(Spawn, TheStoriesofEverfrost) == true and GetQuestStep(Spawn, 167) == 2 then
  28. Quest1Chat_5(NPC, Spawn)
  29. elseif HasQuest(Spawn, TheStoriesofEverfrost) == true and GetQuestStep(Spawn, 167) == 3 then
  30. Quest1Chat_6(NPC, Spawn)
  31. elseif HasCompletedQuest(Spawn, TheStoriesofEverfrost) == true and HasCompletedQuest(Spawn, CullTheThreatToThePioneers) == false and HasQuest(Spawn, CullTheThreatToThePioneers) == false then
  32. Quest2Chat_1(NPC, Spawn)
  33. elseif HasQuest(Spawn, CullTheThreatToThePioneers) == true and GetQuestStep(Spawn, 169) == 1 then
  34. Quest2Chat_3(NPC, Spawn)
  35. elseif HasQuest(Spawn, CullTheThreatToThePioneers) == true and GetQuestStep(Spawn, 169) == 2 then
  36. Quest2Chat_4(NPC, Spawn)
  37. elseif HasCompletedQuest(Spawn, CullTheThreatToThePioneers) == true and HasCompletedQuest(Spawn, FurtherCulling) == false and HasQuest(Spawn, FurtherCulling) == false then
  38. Quest3Chat_1(NPC, Spawn)
  39. elseif HasQuest(Spawn, FurtherCulling) == true and GetQuestStep(Spawn, 170) == 1 then
  40. Quest3Chat_2(NPC, Spawn)
  41. elseif HasQuest(Spawn, FurtherCulling) == true and GetQuestStep(Spawn, 170) == 2 then
  42. Quest3Chat_3(NPC, Spawn)
  43. elseif HasCompletedQuest(Spawn, FurtherCulling) == true and HasCompletedQuest(Spawn, SuppliesForThePioneers) == false and HasQuest(Spawn, SuppliesForThePioneers) == false then
  44. Quest4Chat_1(NPC, Spawn)
  45. elseif HasQuest(Spawn, SuppliesForThePioneers) then
  46. Quest4Chat_2(NPC, Spawn)
  47. end
  48. end
  49. end
  50. function respawn(NPC)
  51. spawn(NPC)
  52. end
  53. function UnderLevel_Chat(NPC, Spawn)
  54. Say(NPC, "Welcome to Everfrost. You'll find her a beautiful, if cold, region.")
  55. end
  56. function Quest1Chat_1(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. conversation = CreateConversation()
  59. AddConversationOption(conversation, "Oh? This is your homeland?", "Quest1Chat_2")
  60. StartConversation(conversation, NPC, Spawn, "Why, hello there! You look as though you've come an awful long way to visit our frosty homeland.")
  61. end
  62. function Quest1Chat_2(NPC, Spawn)
  63. FaceTarget(NPC, Spawn)
  64. conversation = CreateConversation()
  65. AddConversationOption(conversation, "I see. And so you are here trying to do ... what?", "Quest1Chat_3")
  66. StartConversation(conversation, NPC, Spawn, "Oh, yes! Long ago, before the Rending, the Everfrost Peaks were home to the great Northern tribes. Like many other things, they were changed completely when it happened.")
  67. end
  68. function Quest1Chat_3(NPC, Spawn)
  69. FaceTarget(NPC, Spawn)
  70. conversation = CreateConversation()
  71. AddConversationOption(conversation, "I see.", "Quest1Chat_4")
  72. StartConversation(conversation, NPC, Spawn, "Depends. Some hope to one day found settlements here, while others are simply after the thick furs of its snow-born beasts.")
  73. end
  74. function Quest1Chat_4(NPC, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. conversation = CreateConversation()
  77. AddConversationOption(conversation, "I'd be happy to.", "Offer_The_Stories_of_Everfrost")
  78. AddConversationOption(conversation, "No time for talk.")
  79. StartConversation(conversation, NPC, Spawn, "Why don't you speak with some of the others? They can offer you different perspectives than I can. Go speak with them, come back to me, and we will talk more.")
  80. end
  81. function Quest1Chat_5(NPC, Spawn)
  82. FaceTarget(NPC, Spawn)
  83. conversation = CreateConversation()
  84. AddConversationOption(conversation, "No, still searching for perspective.")
  85. StartConversation(conversation, NPC, Spawn, "Well? Have you spoken with a few others?")
  86. end
  87. function Quest1Chat_6(NPC, Spawn)
  88. FaceTarget(NPC, Spawn)
  89. conversation = CreateConversation()
  90. AddConversationOption(conversation, "Yes, I think I have some perspective now. Li Ning Ventur seems to have had a tough time. The sharks of the Bay, well, ate her husband.", "SetCompleteQuest_1")
  91. StartConversation(conversation, NPC, Spawn, "Well? Have you spoken with a few others?")
  92. end
  93. function SetCompleteQuest_1(NPC, Spawn)
  94. SetStepComplete(Spawn, TheStoriesofEverfrost, 3)
  95. Quest2Chat_1(NPC, Spawn)
  96. end
  97. function Quest2Chat_1(NPC, Spawn)
  98. FaceTarget(NPC, Spawn)
  99. conversation = CreateConversation()
  100. AddConversationOption(conversation, "Yeah, it seems a bit risky for pioneers to cross.", "Quest2Chat_2")
  101. StartConversation(conversation, NPC, Spawn, "Now that is not a good thing to hear. I will confess that the moment the Venturs arrived, I assumed they would be leaving soon enough -- not quite the heartiest individuals I've ever seen, but good people and I hate to hear what happened")
  102. end
  103. function Quest2Chat_2(NPC, Spawn)
  104. FaceTarget(NPC, Spawn)
  105. conversation = CreateConversation()
  106. AddConversationOption(conversation, "I can do that.", "Offer_Cull_the_Threat_to_the_Pioneers")
  107. AddConversationOption(conversation, "Sharks? No thanks.")
  108. StartConversation(conversation, NPC, Spawn, "So it does... You, though, you look as though you might be a little more difficult to kill. Maybe you would like to prove your mettle by removing a few of the primal frostfins from the waters?")
  109. end
  110. function Quest2Chat_3(NPC, Spawn)
  111. FaceTarget(NPC, Spawn)
  112. conversation = CreateConversation()
  113. AddConversationOption(conversation, "No, not nearly few enough.")
  114. StartConversation(conversation, NPC, Spawn, "Well? Are there fewer frostfins than there were before?")
  115. end
  116. function Quest2Chat_4(NPC, Spawn)
  117. FaceTarget(NPC, Spawn)
  118. conversation = CreateConversation()
  119. AddConversationOption(conversation, "Yes, I killed quite a few of them.", "Quest2Chat_5")
  120. StartConversation(conversation, NPC, Spawn, "Well? Are there fewer frostfins than there were before?")
  121. end
  122. function Quest2Chat_5(NPC, Spawn)
  123. SetStepComplete(Spawn, CullTheThreatToThePioneers, 2)
  124. FaceTarget(NPC, Spawn)
  125. conversation = CreateConversation()
  126. AddConversationOption(conversation, "...")
  127. StartConversation(conversation, NPC, Spawn, "I see far fewer fins in the ocean, very good!")
  128. end
  129. function Quest3Chat_1(NPC, Spawn)
  130. FaceTarget(NPC, Spawn)
  131. conversation = CreateConversation()
  132. AddConversationOption(conversation, "Yeah, I think I can handle them.", "Offer_Further_Culling")
  133. AddConversationOption(conversation, "Ah, no, that sounds a bit too rough for me.")
  134. StartConversation(conversation, NPC, Spawn, "Well, you seemed to handle them easily enough. Perhaps you'd like to take on the more formidable ancient frostfins, hmm?")
  135. end
  136. function Quest3Chat_2(NPC, Spawn)
  137. FaceTarget(NPC, Spawn)
  138. conversation = CreateConversation()
  139. AddConversationOption(conversation, "Yes, I haven't quite finished the job yet.")
  140. StartConversation(conversation, NPC, Spawn, "Well, your fingers seem intact. Are the sharks so fortunate?")
  141. end
  142. function Quest3Chat_3(NPC, Spawn)
  143. FaceTarget(NPC, Spawn)
  144. conversation = CreateConversation()
  145. AddConversationOption(conversation, "No, their blood mixes with the salt water now.", "Quest3Chat_4")
  146. StartConversation(conversation, NPC, Spawn, "Well, your fingers seem intact. Are the sharks so fortunate?")
  147. end
  148. function Quest3Chat_4(NPC, Spawn)
  149. SetStepComplete(Spawn, FurtherCulling, 2)
  150. FaceTarget(NPC, Spawn)
  151. conversation = CreateConversation()
  152. AddConversationOption(conversation, "You're Welcome.", "Quest4Chat_1")
  153. StartConversation(conversation, NPC, Spawn, "Ahh, that's good to hear! The trip to land won't be quite so perilous now. Thank you, Player Name")
  154. end
  155. function Quest4Chat_1(NPC, Spawn)
  156. FaceTarget(NPC, Spawn)
  157. conversation = CreateConversation()
  158. AddConversationOption(conversation, "I can do that. It's on my way.", "Offer_Supplies_for_the_Pioneers")
  159. AddConversationOption(conversation, "No, I don't want to be burdened.")
  160. StartConversation(conversation, NPC, Spawn, "If you're going to be traveling on into Everfrost, would you be willing to deliver some supplies to one of our pioneer camps? There are some very important items that need to be delivered, and you'd have their gratitude -- and mine.")
  161. end
  162. function Quest4Chat_2(NPC, Spawn)
  163. FaceTarget(NPC, Spawn)
  164. Say(NPC, "Those pioneers need what I've given you. Hurry on.")
  165. end
  166. function Offer_The_Stories_of_Everfrost(NPC, Spawn)
  167. OfferQuest(NPC, Spawn, TheStoriesofEverfrost)
  168. FaceTarget(NPC, Spawn)
  169. conversation = CreateConversation()
  170. AddConversationOption(conversation, "I will.")
  171. StartConversation(conversation, NPC, Spawn, "Very good. Come back to me when you've gotten a good earful.")
  172. end
  173. function Offer_Cull_the_Threat_to_the_Pioneers(NPC, Spawn)
  174. OfferQuest(NPC, Spawn, CullTheThreatToThePioneers)
  175. end
  176. function Offer_Further_Culling(NPC, Spawn)
  177. OfferQuest(NPC, Spawn, FurtherCulling)
  178. end
  179. function Offer_Supplies_for_the_Pioneers(NPC, Spawn)
  180. OfferQuest(NPC, Spawn, SuppliesForThePioneers)
  181. end