9
3

ThirinVeliumdelver_(caves).lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/ThirinVeliumdelver_(caves).lua
  3. Script Purpose : Thirin Veliumdelver
  4. Script Author : theFoof
  5. Script Date : 2013.06.11
  6. Script Notes :
  7. --]]
  8. local BelowWaves = 59
  9. local RyGorrOperations = 60
  10. local GoodDistraction = 61
  11. local SleetfootParty = 62
  12. local SeekingEducation = 63
  13. local NapEvigis = 64
  14. function spawn(NPC)
  15. AddSpawnAccess(NPC, NPC)
  16. SetPlayerProximityFunction(NPC, 50, "SpawnAccess", "SpawnAccess")
  17. ProvidesQuest(NPC, RyGorrOperations)
  18. ProvidesQuest(NPC, GoodDistraction)
  19. ProvidesQuest(NPC, SleetfootParty)
  20. ProvidesQuest(NPC, SeekingEducation)
  21. end
  22. function respawn(NPC)
  23. spawn(NPC)
  24. end
  25. function hailed(NPC, Spawn)
  26. FaceTarget(NPC, Spawn)
  27. conversation = CreateConversation()
  28. if not HasCompletedQuest(Spawn, RyGorrOperations) and not HasQuest(Spawn, RyGorrOperations) then
  29. PlayFlavor(NPC, "thirin_veliumdelver/halas/cragged_spine/thirin_veliumdelver_cave001.mp3", "", "", 2709713344, 2359332874, Spawn)
  30. AddConversationOption(conversation, "Agreed. We must act quickly.", "Quest1Chat_1")
  31. StartConversation(conversation, NPC, Spawn, "This is most impressive. I never knew the Ry'Gorr could be so devious.")
  32. elseif GetQuestStep(Spawn, RyGorrOperations) == 1 or GetQuestStep(Spawn, RyGorrOperations) == 2 then
  33. PlayFlavor(NPC, "", "The explosives should be around this area, " .. GetName(Spawn) .. ".", "", 0, 0, Spawn)
  34. elseif GetQuestStep(Spawn, RyGorrOperations) == 3 then
  35. SetStepComplete(Spawn, RyGorrOperations, 3)
  36. PlayFlavor(NPC, "thirin_veliumdelver/halas/cragged_spine/thirin_veliumdelver_cave006.mp3", "", "", 2990250717, 1905406099, Spawn)
  37. AddConversationOption(conversation, "You were right, they were keeping something imprisoned beyond the cave-in, though I fear what I've found will be of no use to us.", "Quest2Chat_1")
  38. StartConversation(conversation, NPC, Spawn, "That was a magnificent display of destruction on your part, adventurer. Did ye find anything? What are those scoundrels hiding?")
  39. elseif HasCompletedQuest(Spawn, RyGorrOperations) and not HasCompletedQuest(Spawn, GoodDistraction) and not HasQuest(Spawn, GoodDistraction) then
  40. Quest2Chat_1(NPC, Spawn)
  41. elseif HasQuest(Spawn, GoodDistraction) and GetQuestStep(Spawn, GoodDistraction) < 6 then
  42. PlayFlavor(NPC, "", "Protect my man, " .. GetName(Spawn) .. ".", "", 1689589577, 4560189, Spawn)
  43. elseif GetQuestStep(Spawn, GoodDistraction) == 6 then
  44. SetStepComplete(Spawn, GoodDistraction, 6)
  45. PlayFlavor(NPC, "thirin_veliumdelver/halas/cragged_spine/thirin_veliumdelver_cave011.mp3", "", "", 1460125884, 1686109939, Spawn)
  46. AddConversationOption(conversation, "I have. He told me he was going to search further into the Velinoid Catacombs and wouldn't need any further assistance.", "Quest3Chat_1")
  47. StartConversation(conversation, NPC, Spawn, "Hmm, you've returned without Ordin?")
  48. elseif HasCompletedQuest(Spawn, GoodDistraction) and not HasCompletedQuest(Spawn, SleetfootParty) and not HasQuest(Spawn, SleetfootParty) then
  49. Quest3Chat_1(NPC, Spawn)
  50. elseif GetQuestStep(Spawn, SleetfootParty) == 1 then
  51. PlayFlavor(NPC, "", "By Brell, I pray my man is ok.", "", 0, 0, Spawn)
  52. elseif GetQuestStep(Spawn, SleetfootParty) == 2 then
  53. RemoveSpawnAccess(GetSpawnByLocationID(GetZone(Spawn), 34036), Spawn)
  54. SetStepComplete(Spawn, SleetfootParty, 2)
  55. PlayFlavor(NPC, "thirin_veliumdelver/halas/cragged_spine/thirin_veliumdelver_cave015.mp3", "", "", 1359546210, 1807793457, Spawn)
  56. AddConversationOption(conversation, "I... I found him dead. He seemed to have discovered a large ice and velium elemental. A monstrous creature.", "Quest4Chat_1")
  57. StartConversation(conversation, NPC, Spawn, "You return alone? Is... is he gone?")
  58. elseif HasCompletedQuest(Spawn, SleetfootParty) and not HasCompletedQuest(Spawn, SeekingEducation) and not HasQuest(Spawn, SeekingEducation) then
  59. Quest4Chat_1(NPC, Spawn)
  60. elseif GetQuestStep(Spawn, SleetfootParty) == 1 then
  61. PlayFlavor(NPC, "", "Make haste for the White Lodge. Seek out Toril Blackbow.", "", 0, 0, Spawn)
  62. else
  63. PlayFlavor(NPC, "", "Hello my friend. It is good to see you.", "hello", 0, 0, Spawn)
  64. end
  65. end
  66. function SpawnAccess(NPC, Spawn)
  67. if HasCompletedQuest(Spawn, BelowWaves) and not HasCompletedQuest(Spawn, NapEvigis) then
  68. AddSpawnAccess(NPC, Spawn)
  69. end
  70. end
  71. function Quest1Chat_1(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. conversation = CreateConversation()
  74. PlayFlavor(NPC, "thirin_veliumdelver/halas/cragged_spine/thirin_veliumdelver_cave002.mp3", "", "", 3505397088, 1978736216, Spawn)
  75. AddConversationOption(conversation, "I would agree. This wall is an unnecessary risk, even for them.", "Quest1Chat_2")
  76. StartConversation(conversation, NPC, Spawn, "Aye. I saw this wall ye spoke of. Whoever caused this cave-in did not do so thoughtfully. Meaning it was done with haste. It seems as though it was meant to keep something trapped. What could scare the Ry'Gorr so much they would risk such a dangerous explosion?")
  77. end
  78. function Quest1Chat_2(NPC, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. conversation = CreateConversation()
  81. PlayFlavor(NPC, "thirin_veliumdelver/halas/cragged_spine/thirin_veliumdelver_cave003.mp3", "", "", 2117741125, 3692044901, Spawn)
  82. AddConversationOption(conversation, "You intend to re-open the tunnel entrance then?", "Quest1Chat_3")
  83. StartConversation(conversation, NPC, Spawn, "Whatever they are hiding or keeping imprisoned may be used to give us an advantage. Whatever they fear would surely give us an upper hand in stopping their impending invasion.")
  84. end
  85. function Quest1Chat_3(NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. conversation = CreateConversation()
  88. PlayFlavor(NPC, "thirin_veliumdelver/halas/cragged_spine/thirin_veliumdelver_cave004.mp3", "", "", 79469292, 3225324999, Spawn)
  89. AddConversationOption(conversation, "Sounds like a blast. I'm in.", "OfferRyGorrOperations")
  90. AddConversationOption(conversation, "I'm not really one for mining, so I'll be going.")
  91. StartConversation(conversation, NPC, Spawn, "I do, though we have no mining equipment on hand. However, these orcs could not have made so much progress in so a little a time without some help. I imagine there are some explosive barrels about, if ye just follow yer nose. Look around where they are currently mining, they should leave them lying around. Once you've got the explosives use it on the cave-in. Find out what the Ry'Gorr were trying to imprison.")
  92. end
  93. function Quest2Chat_1(NPC, Spawn)
  94. FaceTarget(NPC, Spawn)
  95. conversation = CreateConversation()
  96. PlayFlavor(NPC, "thirin_veliumdelver/halas/cragged_spine/thirin_veliumdelver_cave007.mp3", "", "", 563381258, 467794942, Spawn)
  97. AddConversationOption(conversation, "I found a race of beings that look as though they were birthed from the velium itself. There were orcish bodies among them as well. I was able to escape, but I don't believe they will side with us. We are all in danger.", "Quest2Chat_2")
  98. StartConversation(conversation, NPC, Spawn, "What are ye talking about? What was there?")
  99. end
  100. function Quest2Chat_2(NPC, Spawn)
  101. FaceTarget(NPC, Spawn)
  102. conversation = CreateConversation()
  103. PlayFlavor(NPC, "thirin_veliumdelver/halas/cragged_spine/thirin_veliumdelver_cave008.mp3", "", "", 1682427027, 3451821464, Spawn)
  104. AddConversationOption(conversation, "I cannot tell, but the blast has severely damaged the surrounding walls. I do not believe that a third blast will do any good in one area underground.", "Quest2Chat_3")
  105. StartConversation(conversation, NPC, Spawn, "This means there were caverns here before the orcs? They themselves must have discovered them. I know not what these creatures are, but if what ye say is true they may be more of a threat than those blasted Ry'Gorr. Is there any chance we can quickly re-build the wall, as the orcs did? Can we protect ourselves from these, what should they be called? Velinoids?")
  106. end
  107. function Quest2Chat_3(NPC, Spawn)
  108. FaceTarget(NPC, Spawn)
  109. conversation = CreateConversation()
  110. PlayFlavor(NPC, "thirin_veliumdelver/halas/cragged_spine/thirin_veliumdelver_cave009.mp3", "", "", 494358718, 200929086, Spawn)
  111. AddConversationOption(conversation, "You can count on me, Thirin.", "OfferGoodDistraction")
  112. AddConversationOption(conversation, "That sounds way too dangerous.")
  113. StartConversation(conversation, NPC, Spawn, "Blast! I fear we've made a grave mistake, adventurer, one we must rectify immediately. It is time we informed my good friend, Torli Blackbow. However, I intend to return with as much intelligence as possible. I am sending in one of my scouts to investigate the area. I'd like for you to act as a distraction of sorts so he can sneak in undetected. Speak with him when you are ready.")
  114. end
  115. function Quest3Chat_1(NPC, Spawn)
  116. FaceTarget(NPC, Spawn)
  117. conversation = CreateConversation()
  118. PlayFlavor(NPC, "thirin_veliumdelver/halas/cragged_spine/thirin_veliumdelver_cave012.mp3", "", "", 196969429, 3399805289, Spawn)
  119. AddConversationOption(conversation, "Perhaps he just needs more time? It wasn't long ago that I left him.", "Quest3Chat_2")
  120. StartConversation(conversation, NPC, Spawn, "Hmm, this is most troubling. I am worried, adventurer, he would have returned by now. I fear something may have happened to him.")
  121. end
  122. function Quest3Chat_2(NPC, Spawn)
  123. FaceTarget(NPC, Spawn)
  124. conversation = CreateConversation()
  125. PlayFlavor(NPC, "thirin_veliumdelver/halas/cragged_spine/thirin_veliumdelver_cave013.mp3", "", "", 516198965, 3758808523, Spawn)
  126. AddConversationOption(conversation, "I shall search for him. It was my responsibility to protect him.", "OfferSleetfootParty")
  127. AddConversationOption(conversation, "Good luck in your search.")
  128. StartConversation(conversation, NPC, Spawn, "He was my best scout, and a good friend. He would have returned by now. No, I fear he may be stuck in the dark corners of this cavern, unable to return for some reason. I'll need to look for him. The coldain do not leave their brothers behind. I have far too many ales to share with him before his time is up.")
  129. end
  130. function Quest4Chat_1(NPC, Spawn)
  131. FaceTarget(NPC, Spawn)
  132. conversation = CreateConversation()
  133. PlayFlavor(NPC, "thirin_veliumdelver/halas/cragged_spine/thirin_veliumdelver_cave016.mp3", "", "", 3750387458, 3923287586, Spawn)
  134. AddConversationOption(conversation, "I know very little, other than it appears to be very old and quite angry. I don't believe it enjoys visitors.", "Quest4Chat_2")
  135. StartConversation(conversation, NPC, Spawn, "Monstrous? I see. Tell me of this creature you speak of.")
  136. end
  137. function Quest4Chat_2(NPC, Spawn)
  138. FaceTarget(NPC, Spawn)
  139. conversation = CreateConversation()
  140. PlayFlavor(NPC, "thirin_veliumdelver/halas/cragged_spine/thirin_veliumdelver_cave017.mp3", "", "", 4283075830, 3738516832, Spawn)
  141. AddConversationOption(conversation, "It's " .. GetName(Spawn) .. ".", "OfferSeekingEducation")
  142. StartConversation(conversation, NPC, Spawn, "This is most troubling, my friend. We are not prepared for this. I was rash and quick to judge the situation. I regret venturing into these blasted caverns. What have we awakened? Ordin will not have died in vain, I swear it. We must speak with Torli, she will know what to do. Adventurer, what is yer name? You've done so much and I never had the time to ask.")
  143. end
  144. function OfferRyGorrOperations(NPC, Spawn)
  145. OfferQuest(NPC, Spawn, RyGorrOperations)
  146. end
  147. function OfferGoodDistraction(NPC, Spawn)
  148. OfferQuest(NPC, Spawn, GoodDistraction)
  149. end
  150. function OfferSleetfootParty(NPC, Spawn)
  151. OfferQuest(NPC, Spawn, SleetfootParty)
  152. end
  153. function OfferSeekingEducation(NPC, Spawn)
  154. OfferQuest(NPC, Spawn, SeekingEducation)
  155. end