RakanRockbreaker.lua 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/RakanRockbreaker.lua
  3. Script Purpose : Rakan Rockbreaker <Coldain Quartermaster>
  4. Script Author : theFoof
  5. Script Date : 2013.06.01
  6. Script Notes :
  7. --]]
  8. -- add in repeatable quest dialogue when available
  9. local DemandSupplies = 45
  10. local FoilingFlank = 46
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, DemandSupplies)
  13. ProvidesQuest(NPC, FoilingFlank)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function hailed(NPC, Spawn)
  19. FaceTarget(NPC, Spawn)
  20. conversation = CreateConversation()
  21. if not HasCompletedQuest(Spawn, DemandSupplies) and not HasQuest(Spawn, DemandSupplies) then
  22. PlayFlavor(NPC, "rakan_rockbreaker/halas/great_shelf/rakan_rockbreaker/rakan_rockbreaker001.mp3", "", "", 2002637275, 536344722, Spawn)
  23. AddConversationOption(conversation, "What supplies?", "Quest1Chat_1")
  24. AddConversationOption(conversation, "I'm busy at the moment. Goodbye.")
  25. StartConversation(conversation, NPC, Spawn, "We've got to hurry! These supplies need to be delivered to the front lines, and quickly.")
  26. elseif HasQuest(Spawn, DemandSupplies) and GetQuestStep(Spawn, DemandSupplies) < 3 then
  27. PlayFlavor(NPC, "", "Ye've got to hurry! They need those supplies and they need em now!", "threaten", 0, 0, Spawn)
  28. elseif GetQuestStep(Spawn, DemandSupplies) == 3 then
  29. PlayFlavor(NPC, "rakan_rockbreaker/halas/great_shelf/rakan_rockbreaker/rakan_rockbreaker006.mp3", "", "", 3102394371, 3200634636, Spawn)
  30. AddConversationOption(conversation, "I went as quickly as I could.", "Quest1Chat_4")
  31. AddConversationOption(conversation, "They have the supplies they needed.", "Quest1Chat_4")
  32. StartConversation(conversation, NPC, Spawn, "Yer back! I trust ye delivered the supplies to the coldain soldiers.")
  33. elseif HasCompletedQuest(Spawn, DemandSupplies) and not HasQuest(Spawn, FoilingFlank) then
  34. Quest2Chat_2(NPC, Spawn)
  35. elseif HasQuest(Spawn, FoilingFlank) and GetQuestStep(Spawn, FoilingFlank) ~= 3 then
  36. PlayFlavor(NPC, "", "As we speak, those snow glimmered runners are making their way up the choke!", "tap foot", 0, 0, Spawn)
  37. elseif GetQuestStep(Spawn, FoilingFlank) == 3 then
  38. PlayFlavor(NPC, "rakan_rockbreaker/halas/great_shelf/rakan_rockbreaker/rakan_rockbreaker015.mp3", "", "", 26313219, 1364697377, Spawn)
  39. AddConversationOption(conversation, "Of course.", "Quest2Chat_4")
  40. AddConversationOption(conversation, "It wasn't easy, but I took care of them.", "Quest2Chat_4")
  41. StartConversation(conversation, NPC, Spawn, "Yer back, and in one piece. Were ye successful in yer task? Did ye take care of the orcs?")
  42. end
  43. end
  44. function Quest1Chat_1(NPC, Spawn)
  45. FaceTarget(NPC, Spawn)
  46. conversation = CreateConversation()
  47. PlayFlavor(NPC, "rakan_rockbreaker/halas/great_shelf/rakan_rockbreaker/rakan_rockbreaker002.mp3", "", "", 2334563481, 118587127, Spawn)
  48. AddConversationOption(conversation, "What are glimmer visors?", "Quest1Chat_2")
  49. AddConversationOption(conversation, "I'll deliver the supplies for you.", "Quest1Chat_3")
  50. AddConversationOption(conversation, "I'm busy at the moment. Goodbye.")
  51. StartConversation(conversation, NPC, Spawn, "Reforged weapons for the soldiers, and glimmer visors for the archers.")
  52. end
  53. function Quest1Chat_2(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. conversation = CreateConversation()
  56. PlayFlavor(NPC, "rakan_rockbreaker/halas/great_shelf/rakan_rockbreaker/rakan_rockbreaker003.mp3", "", "", 2462675267, 3917758225, Spawn)
  57. AddConversationOption(conversation, "I'll deliver the supplies for you.", "Quest1Chat_3")
  58. AddConversationOption(conversation, "I'm busy at the moment. Goodbye.")
  59. StartConversation(conversation, NPC, Spawn, "The visors allow our archers to see the Ry'Gorr orcs that have been camouflaged by a snow glimmer. Otherwise they'll get through and flank our forces.")
  60. end
  61. function Quest1Chat_3(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. conversation = CreateConversation()
  64. PlayFlavor(NPC, "rakan_rockbreaker/halas/great_shelf/rakan_rockbreaker/rakan_rockbreaker004.mp3", "", "", 3607684996, 3048983099, Spawn)
  65. AddConversationOption(conversation, "I'll do just that.", "OfferDemandSupplies")
  66. AddConversationOption(conversation, "You can count on me.", "OfferDemandSupplies")
  67. StartConversation(conversation, NPC, Spawn, "Perfect. Bring these supplies to our defenders perched at the peak of Herga's Choke. The leaders will take the goods off your hands and distribute them to the coldain.")
  68. end
  69. function Quest1Chat_4(NPC, Spawn)
  70. SetStepComplete(Spawn, DemandSupplies, 3)
  71. FaceTarget(NPC, Spawn)
  72. conversation = CreateConversation()
  73. PlayFlavor(NPC, "rakan_rockbreaker/halas/great_shelf/rakan_rockbreaker/rakan_rockbreaker007.mp3", "", "", 84500025, 397416081, Spawn)
  74. AddConversationOption(conversation, "Was there something else you needed?", "Quest2Chat_1")
  75. AddConversationOption(conversation, "I'm afraid I must be going. Goodbye.")
  76. StartConversation(conversation, NPC, Spawn, "Phew! That's a relief. We just might be able to stop them for awhile longer.")
  77. end
  78. function Quest2Chat_1(NPC, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. conversation = CreateConversation()
  81. PlayFlavor(NPC, "rakan_rockbreaker/halas/great_shelf/rakan_rockbreaker/rakan_rockbreaker008.mp3", "", "", 3124701734, 1733764756, Spawn)
  82. AddConversationOption(conversation, "So you need me to deal with them?", "Quest2Chat_3")
  83. AddConversationOption(conversation, "This is too much for me to handle. Goodbye.")
  84. StartConversation(conversation, NPC, Spawn, "The Ry'Gorr have figured out a way to make themselves all but invisible, and are charging up the choke. ")
  85. end
  86. function Quest2Chat_2(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. conversation = CreateConversation()
  89. PlayFlavor(NPC, "rakan_rockbreaker/halas/great_shelf/rakan_rockbreaker/rakan_rockbreaker010.mp3", "", "", 3359211699, 295105343, Spawn)
  90. AddConversationOption(conversation, "Was there something else you needed?", "Quest2Chat_1")
  91. AddConversationOption(conversation, "I'm afraid I must be going. Goodbye.")
  92. StartConversation(conversation, NPC, Spawn, "Yer a fine sort fer delivering those supplies, " .. GetName(Spawn) .. ". Unfortunately, our troubles are far from over.")
  93. end
  94. function Quest2Chat_3(NPC, Spawn)
  95. FaceTarget(NPC, Spawn)
  96. conversation = CreateConversation()
  97. PlayFlavor(NPC, "rakan_rockbreaker/halas/great_shelf/rakan_rockbreaker/rakan_rockbreaker011.mp3", "", "", 268182012, 816884804, Spawn)
  98. AddConversationOption(conversation, "I'd be happy to try.", "OfferFoilingFlank")
  99. AddConversationOption(conversation, "This is too much for me to handle. Goodbye.")
  100. StartConversation(conversation, NPC, Spawn, "We need to deal with them, as well as the orcs that are maintaining the portal at the pinnacle of Herga's Choke. Our coldain forces are barely able to keep up with the unending onslaught, but perhaps ye can break the stalemate.")
  101. end
  102. function Quest2Chat_4(NPC, Spawn)
  103. SetStepComplete(Spawn, FoilingFlank, 3)
  104. FaceTarget(NPC, Spawn)
  105. conversation = CreateConversation()
  106. PlayFlavor(NPC, "rakan_rockbreaker/halas/great_shelf/rakan_rockbreaker/rakan_rockbreaker017.mp3", "", "", 101832850, 1600602204, Spawn)
  107. AddConversationOption(conversation, "Victory is certain.")
  108. AddConversationOption(conversation, "I'm happy to have helped.")
  109. StartConversation(conversation, NPC, Spawn, "I knew we could count on ye," .. GetName(Spawn) .. "! The battle for the portal is surely ours now.")
  110. end
  111. function OfferDemandSupplies(NPC, Spawn)
  112. OfferQuest(NPC, Spawn, DemandSupplies)
  113. end
  114. function OfferFoilingFlank(NPC, Spawn)
  115. OfferQuest(NPC, Spawn, FoilingFlank)
  116. end