9
3

ArrinClelland.lua 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/ArrinClelland.lua
  3. Script Purpose : Arrin Clelland <Camp Provisioner>
  4. Script Author : theFoof
  5. Script Date : 2013.5.12
  6. Script Notes : Ememjr 2017.10.21 changed refs of Player to Spawn
  7. --]]
  8. local CrustoseRemoval = 6
  9. local RepellingCritters = 7
  10. local ScragglyFoodstuffs = 9
  11. local FrigidFishing = 10
  12. function spawn(NPC)
  13. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  14. ProvidesQuest(NPC, CrustoseRemoval)
  15. ProvidesQuest(NPC, RepellingCritters)
  16. ProvidesQuest(NPC, ScragglyFoodstuffs)
  17. ProvidesQuest(NPC, FrigidFishing)
  18. end
  19. function respawn(NPC)
  20. spawn(NPC)
  21. end
  22. function InRange(NPC, Spawn)
  23. end
  24. function LeaveRange(NPC, Spawn)
  25. end
  26. function hailed(NPC, Spawn)
  27. FaceTarget(NPC, Spawn)
  28. conversation = CreateConversation()
  29. if HasCompletedQuest(Spawn, CrustoseRemoval) == false and HasQuest(Spawn, CrustoseRemoval) == false then
  30. PlayFlavor(NPC, "arrin_clelland/halas/pilgrims_landing/clelland_001.mp3", "", "", 316593235, 3019636341, Spawn)
  31. AddConversationOption(conversation, "" .. GetName(Spawn) .. ". My boat was attacked and destroyed by the orcs, apparently.", "Quest1Chat_2")
  32. StartConversation(conversation, NPC, Spawn, "I don't recognize you, newcomer, but welcome. I'm Arrin, the camp provisioner. Who are you?")
  33. elseif GetQuestStep(Spawn, CrustoseRemoval) == 1 then
  34. PlayFlavor(NPC, "", "It's a good thing I sent you after lichen and not lycan!", "chuckle", 1689589577, 4560189, Spawn)
  35. elseif GetQuestStep(Spawn, CrustoseRemoval) == 2 then
  36. PlayFlavor(NPC, "yasha_redblade/halas/pilgrims_landing/redblade_014.mp3", "", "", 2562189235, 2582498054, Spawn)
  37. AddConversationOption(conversation, "What are you going to do with the crustose spore samples?", "Quest2Chat_1")
  38. StartConversation(conversation, NPC, Spawn, "I see you were successful, " .. GetName(Spawn) .. ". That is great news!")
  39. elseif HasCompletedQuest(Spawn, CrustoseRemoval) and HasQuest(Spawn, RepellingCritters) == false and HasCompletedQuest(Spawn, RepellingCritters) == false then
  40. PlayFlavor(NPC, "arrin_clelland/halas/pilgrims_landing/clelland_010.mp3", "", "", 2177024399, 2827013799, Spawn)
  41. AddConversationOption(conversation, "What are you going to do with the crustose spore samples?", "Quest2Chat_1")
  42. StartConversation(conversation, NPC, Spawn, "You certainly helped us by getting those crustose spore samples, " .. GetName(Spawn) .. ".")
  43. elseif GetQuestStep(Spawn, RepellingCritters) == 1 then
  44. if HasItem(Spawn, 45806) == false then
  45. SummonItem(Spawn, 45806, 1)
  46. end
  47. AddConversationOption(conversation, "Me too.")
  48. AddConversationOption(conversation, "How do I use the crustose repellent?", "Quest2Chat_4")
  49. StartConversation(conversation, NPC, Spawn, "I hope the crustose repellent works.")
  50. elseif GetQuestStep(Spawn, RepellingCritters) == 2 then
  51. PlayFlavor(NPC, "yasha_redblade/halas/pilgrims_landing/redblade_021.mp3", "", "", 1180705969, 2151107815, Spawn)
  52. AddConversationOption(conversation, "The repellent worked great!", "Quest2Chat_5")
  53. StartConversation(conversation, NPC, Spawn, "How did it go out there?")
  54. elseif GetQuestStep(Spawn, RepellingCritters) == 3 then
  55. if HasItem(Spawn, 45805) == false then
  56. SummonItem(Spawn, 45805, 1)
  57. end
  58. PlayFlavor(NPC, "", "Be sure to apply enough of the crustose repellent to our barrels of foodstuff.", "nod", 1689589577, 4560189, Spawn)
  59. elseif GetQuestStep(Spawn, RepellingCritters) == 4 then
  60. SetStepComplete(Spawn, RepellingCritters, 4)
  61. PlayFlavor(NPC, "yasha_redblade/halas/pilgrims_landing/redblade_024.mp3", "", "", 117755636, 4146358523, Spawn)
  62. AddConversationOption(conversation, "You are welcome.", "Quest3Chat_1")
  63. StartConversation(conversation, NPC, Spawn, "Those crustose creatures sure disappeared! That will certainly help me keep mouths fed around here. Thank you, " .. GetName(Spawn) .. "!")
  64. elseif HasCompletedQuest(Spawn, RepellingCritters) and HasCompletedQuest(Spawn, ScragglyFoodstuffs) == false and HasQuest(Spawn, ScragglyFoodstuffs) == false then
  65. Quest3Chat_1(NPC, Spawn)
  66. elseif GetQuestStep(Spawn, ScragglyFoodstuffs) == 1 then
  67. PlayFlavor(NPC, "", "Not much wants to grow in such an unforgiving environment, but hopefully you will find a few scraggly shrubs growing on the windy cliffs overlooking the sea, northeast of me.", "nod", 1689589577, 4560189, Spawn)
  68. elseif GetQuestStep(Spawn, ScragglyFoodstuffs) == 2 then
  69. PlayFlavor(NPC, "arrin_clelland/halas/pilgrims_landing/clelland_006.mp3", "", "", 1163105313, 2486934582, Spawn)
  70. AddConversationOption(conversation, "I was.", "Quest3Chat_3")
  71. StartConversation(conversation, NPC, Spawn, "Not much wants to grow in such an unforgiving environment, but I hope that you were able to find us a few edible items to add to our stores, " .. GetName(Spawn) .. ".")
  72. elseif HasCompletedQuest(Spawn, ScragglyFoodstuffs) and HasCompletedQuest(Spawn, FrigidFishing) == false and HasQuest(Spawn, FrigidFishing) == false then
  73. Quest4Chat_1(NPC, Spawn)
  74. elseif GetQuestStep(Spawn, FrigidFishing) == 1 then
  75. PlayFlavor(NPC, "", "The Iceclad cod are too smart for lures or nets, but they should offer you little challenge in a fight.", "agree", 1689589577, 4560189, Spawn)
  76. elseif GetQuestStep(Spawn, FrigidFishing) == 2 then
  77. PlayFlavor(NPC, "arrin_clelland/halas/pilgrims_landing/clelland_012.mp3", "", "", 2983925092, 3211744371, Spawn)
  78. AddConversationOption(conversation, "I'm not cleaning them though.", "Quest4Chat_3")
  79. StartConversation(conversation, NPC, Spawn, "You've returned, and with an arm full of fresh fish for us, " .. GetName(Spawn) .. ". That's wonderful!")
  80. elseif HasCompletedQuest(Spawn, FrigidFishing) then
  81. PlayFlavor(NPC, "", "Thank you for all of your help. Truly, you have been sent to us by the gods!", "thanks", 1689589577, 4560189, Spawn)
  82. end
  83. end
  84. function Quest1Chat_2(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. conversation = CreateConversation()
  87. PlayFlavor(NPC, "arrin_clelland/halas/pilgrims_landing/clelland_001.mp3", "", "", 316593235, 3019636341, Spawn)
  88. AddConversationOption(conversation, "My boat was attacked and destroyed by the orcs, apparently.", "Quest1Chat_3")
  89. StartConversation(conversation, NPC, Spawn, "That was a great feat, I'm telling you! So, what happened, " .. GetName(Spawn) .. "?")
  90. end
  91. function Quest1Chat_3(NPC, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. conversation = CreateConversation()
  94. PlayFlavor(NPC, "arrin_clelland/halas/pilgrims_landing/clelland_002.mp3", "", "", 364246106, 545315196, Spawn)
  95. AddConversationOption(conversation, "Me too.", "Quest1Chat_4")
  96. StartConversation(conversation, NPC, Spawn, "Ah, that does explain how you ended up here. They've been trying to stop any and all ships from docking on Erollis and providing more forces to New Halas. I'm glad that you survived.")
  97. end
  98. function Quest1Chat_4(NPC, Spawn)
  99. FaceTarget(NPC, Spawn)
  100. conversation = CreateConversation()
  101. PlayFlavor(NPC, "arrin_clelland/halas/pilgrims_landing/clelland_003.mp3", "", "", 3988738726, 2897027247, Spawn)
  102. AddConversationOption(conversation, "You don't have any food?", "Quest1Chat_5")
  103. AddConversationOption(conversation, "Well, keep thinking warm thoughts. Goodbye.")
  104. StartConversation(conversation, NPC, Spawn, "Of course that doesn't mean the hard part is over, mind you. I'd say you've jumped out of the frying pan to land in the fire, but that just reminds me how nice it would be to have food and a warm fire.")
  105. end
  106. function Quest1Chat_5(NPC, Spawn)
  107. FaceTarget(NPC, Spawn)
  108. conversation = CreateConversation()
  109. PlayFlavor(NPC, "arrin_clelland/halas/pilgrims_landing/clelland_004.mp3", "", "", 684238252, 3234255296, Spawn)
  110. AddConversationOption(conversation, "I can help you.", "Quest1Chat_6")
  111. AddConversationOption(conversation, "Good luck with that.")
  112. StartConversation(conversation, NPC, Spawn, "I have some, sure, but it's not fit for man or beast, anymore. Bothersome, little lichen creatures keep breaking into our stores and spoiling them.")
  113. end
  114. function Quest1Chat_6(NPC, Spawn)
  115. FaceTarget(NPC, Spawn)
  116. conversation = CreateConversation()
  117. PlayFlavor(NPC, "arrin_clelland/halas/pilgrims_landing/clelland_005.mp3", "", "", 4016452199, 1810004622, Spawn)
  118. AddConversationOption(conversation, "Right away!", "OfferCrustoseRemoval")
  119. AddConversationOption(conversation, "I refuse to squish fungus men! Goodbye.")
  120. StartConversation(conversation, NPC, Spawn, "I would appreciate it, " .. GetName(Spawn) .. ". Slay any of the crustose defenders or sporetenders you find on the western side of the isle in search of spore samples. They congregate there amongst the big stones. Return to me when you have done this.")
  121. end
  122. function Quest2Chat_1(NPC, Spawn)
  123. if HasCompletedQuest(Spawn, CrustoseRemoval) == false then
  124. SetStepComplete(Spawn, CrustoseRemoval, 2)
  125. end
  126. FaceTarget(NPC, Spawn)
  127. conversation = CreateConversation()
  128. PlayFlavor(NPC, "yasha_redblade/halas/pilgrims_landing/redblade_015.mp3", "", "", 2583587651, 4014807200, Spawn)
  129. AddConversationOption(conversation, "I like your thinking!", "Quest2Chat_2")
  130. AddConversationOption(conversation, "But killing them is more enjoyable.", "Quest2Chat_3")
  131. StartConversation(conversation, NPC, Spawn, "We are going to use the crustose spore samples to create a repellent against the little spoilers. There will be no need to kill them if we can just make them stay away.")
  132. end
  133. function Quest2Chat_2(NPC, Spawn)
  134. FaceTarget(NPC, Spawn)
  135. conversation = CreateConversation()
  136. PlayFlavor(NPC, "yasha_redblade/halas/pilgrims_landing/redblade_017.mp3", "", "", 2609708421, 904219877, Spawn)
  137. AddConversationOption(conversation, "Sure thing.", "OfferRepellingCritters")
  138. AddConversationOption(conversation, "How do I use the crustose repellent?", "Quest2Chat_4")
  139. AddConversationOption(conversation, "On second thought, maybe not.")
  140. StartConversation(conversation, NPC, Spawn, "Thanks. Now take this repellent potion and apply it on crustose sporetenders. They are the ones spreading their spores around. I hope to Marr that they shuffle their stems away from here! Be sure to use it on a good number of different ones so that we are sure of its effects.")
  141. end
  142. function Quest2Chat_3(NPC, Spawn)
  143. FaceTarget(NPC, Spawn)
  144. conversation = CreateConversation()
  145. PlayFlavor(NPC, "yasha_redblade/halas/pilgrims_landing/redblade_018.mp3", "", "", 3283115264, 905683886, Spawn)
  146. AddConversationOption(conversation, "I like your thinking!", "Quest2Chat_2")
  147. StartConversation(conversation, NPC, Spawn, "Perhaps, but I would rather you be able to turn your fighting skills on more challenging foes, like those blasted orcs that are attacking the camp here.")
  148. end
  149. function Quest2Chat_4(NPC, Spawn)
  150. FaceTarget(NPC, Spawn)
  151. conversation = CreateConversation()
  152. PlayFlavor(NPC, "yasha_redblade/halas/pilgrims_landing/redblade_019.mp3", "", "", 2496773416, 2201749960, Spawn)
  153. AddConversationOption(conversation, "I'll remember that.", "OfferRepellingCritters")
  154. StartConversation(conversation, NPC, Spawn, "Ah, Good question! Open your inventory and you will find it. You can either equip it, or you can choose to use it directly from your inventory, but either way you have to target a crustose sporetender first. Then right click on the object and choose 'Use.' This will spread the repellent on your target.")
  155. end
  156. function Quest2Chat_5(NPC, Spawn)
  157. SetStepComplete(Spawn, RepellingCritters, 2)
  158. FaceTarget(NPC, Spawn)
  159. conversation = CreateConversation()
  160. PlayFlavor(NPC, "yasha_redblade/halas/pilgrims_landing/redblade_022.mp3", "", "", 457686629, 137846411, Spawn)
  161. AddConversationOption(conversation, "I'll get right on it.")
  162. AddConversationOption(conversation, "Where are the provisions?", "Quest2Chat_6")
  163. StartConversation(conversation, NPC, Spawn, "That is a relief! Now apply it to our provisions right here and keep the bothersome creatures away from them!")
  164. end
  165. function Quest2Chat_6(NPC, Spawn)
  166. FaceTarget(NPC, Spawn)
  167. conversation = CreateConversation()
  168. PlayFlavor(NPC, "yasha_redblade/halas/pilgrims_landing/redblade_023.mp3", "", "", 2487757767, 4041358970, Spawn)
  169. AddConversationOption(conversation, "I will get right on it!")
  170. StartConversation(conversation, NPC, Spawn, "They are the barrels here, northwest of me.")
  171. end
  172. function Quest3Chat_1(NPC, Spawn)
  173. FaceTarget(NPC, Spawn)
  174. conversation = CreateConversation()
  175. PlayFlavor(NPC, "arrin_clelland/halas/pilgrims_landing/clelland_005.mp3", "", "", 4016452199, 1810004622, Spawn)
  176. AddConversationOption(conversation, "What can I do for you?", "Quest3Chat_2")
  177. AddConversationOption(conversation, "Unfortunately, I am too busy right now.")
  178. StartConversation(conversation, NPC, Spawn, "Say, I could use your help with replenishing those barrels now that you've removed the lichen creatures.")
  179. end
  180. function Quest3Chat_2(NPC, Spawn)
  181. FaceTarget(NPC, Spawn)
  182. conversation = CreateConversation()
  183. PlayFlavor(NPC, "arrin_clelland/halas/pilgrims_landing/clelland_005.mp3", "", "", 4016452199, 1810004622, Spawn)
  184. AddConversationOption(conversation, "I'll gather them for you.", "OfferScragglyFoodstuffs")
  185. AddConversationOption(conversation, "I'm more of a hunter, not a gatherer.")
  186. StartConversation(conversation, NPC, Spawn, "There are some rather scraggly looking shrubs that grow on the windy cliffs overlooking the sea, northeast of here. Take the path behind me, and you can't miss them. Their tubers aren't very appetizing, but they are rich in nutrition.")
  187. end
  188. function Quest3Chat_3(NPC, Spawn)
  189. SetStepComplete(Spawn, ScragglyFoodstuffs, 2)
  190. FaceTarget(NPC, Spawn)
  191. conversation = CreateConversation()
  192. PlayFlavor(NPC, "arrin_clelland/halas/pilgrims_landing/clelland_007.mp3", "", "", 256610018, 4036678874, Spawn)
  193. AddConversationOption(conversation, "You're welcome. ", "Quest4Chat_1")
  194. AddConversationOption(conversation, "Can I help you with anything else?", "Quest4Chat_1")
  195. StartConversation(conversation, NPC, Spawn, "Oh, that's better than I would have hoped! Thank you!")
  196. end
  197. function Quest4Chat_1(NPC, Spawn)
  198. FaceTarget(NPC, Spawn)
  199. conversation = CreateConversation()
  200. PlayFlavor(NPC, "arrin_clelland/halas/pilgrims_landing/clelland_008.mp3", "", "", 2456971105, 1721744123, Spawn)
  201. AddConversationOption(conversation, "Yeah, I can do that.", "Quest4Chat_2")
  202. AddConversationOption(conversation, "Oh, sorry. That isn't really my thing.")
  203. StartConversation(conversation, NPC, Spawn, "May I ask another favor of you? I was hoping you might be keen on getting us some fresh fish, too.")
  204. end
  205. function Quest4Chat_2(NPC, Spawn)
  206. FaceTarget(NPC, Spawn)
  207. conversation = CreateConversation()
  208. PlayFlavor(NPC, "arrin_clelland/halas/pilgrims_landing/clelland_011.mp3", "", "", 3182846019, 423433267, Spawn)
  209. AddConversationOption(conversation, "That's no problem.", "OfferFrigidFishing")
  210. StartConversation(conversation, NPC, Spawn, "It would help us a great deal. You'll find the Iceclad cod surrounding this island within the freezing waters. They are not enticed by lures or nets, so you'll have to fight them.")
  211. end
  212. function Quest4Chat_3(NPC, Spawn)
  213. SetStepComplete(Spawn, FrigidFishing, 2)
  214. FaceTarget(NPC, Spawn)
  215. conversation = CreateConversation()
  216. PlayFlavor(NPC, "arrin_clelland/halas/pilgrims_landing/clelland_013.mp3", "", "", 1935077662, 3458701305, Spawn)
  217. AddConversationOption(conversation, "You're welcome.")
  218. AddConversationOption(conversation, "On to other adventures!")
  219. StartConversation(conversation, NPC, Spawn, "Ha ha ha! That's fine! I can do that. I have asked too much of you, as it stands. One as powerful and brave as you have bigger adventures and challenges to meet. Thank you again!")
  220. end
  221. function OfferCrustoseRemoval(NPC, Spawn)
  222. if HasCompletedQuest(Spawn, CrustoseRemoval) == false then
  223. OfferQuest(NPC, Spawn, CrustoseRemoval)
  224. end
  225. end
  226. function OfferRepellingCritters(NPC, Spawn)
  227. if HasCompletedQuest(Spawn, CrustoseRemoval) then
  228. OfferQuest(NPC, Spawn, RepellingCritters)
  229. end
  230. end
  231. function OfferScragglyFoodstuffs(NPC, Spawn)
  232. if HasCompletedQuest(Spawn, RepellingCritters) then
  233. OfferQuest(NPC, Spawn, ScragglyFoodstuffs)
  234. end
  235. end
  236. function OfferFrigidFishing(NPC, Spawn)
  237. if HasCompletedQuest(Spawn, ScragglyFoodstuffs) then
  238. OfferQuest(NPC, Spawn, FrigidFishing)
  239. end
  240. end