9
3

CoercerZlith.lua 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. --[[
  2. Script Name : SpawnScripts/OutpostoftheOverlord/CoercerZlith.lua
  3. Script Purpose : Coercer Zlith
  4. Script Author : vo1d
  5. Script Date : 2019.10.04
  6. Script Notes :
  7. Script Issues : Missing PlayFlavor for Quest Step 5
  8. --]]
  9. -- Quest ID's
  10. local DisruptionForDistraction = 366
  11. function spawn(NPC)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. end
  19. function LeaveRange(NPC, Spawn)
  20. end
  21. function hailed(NPC, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. Conversation = CreateConversation()
  24. if HasCompletedQuest(Spawn, DisruptionForDistraction) then
  25. FaceTarget(NPC, Spawn)
  26. Conversation = CreateConversation()
  27. AddConversationOption(Conversation, "Goodbye.")
  28. StartConversation(Conversation, NPC, Spawn, "You've done well, " .. GetName(Spawn).. ". The horse sentriesss were spotted moving into the Wilderwood from the north. The Qeynosian forces are thinning.")
  29. elseif HasQuest(Spawn, DisruptionForDistraction) then
  30. if GetQuestStep(Spawn, DisruptionForDistraction) == 1 then
  31. FaceTarget(NPC, Spawn)
  32. Conversation = CreateConversation()
  33. AddConversationOption(Conversation, "And you want me to...?", "dlg_2")
  34. AddConversationOption(Conversation, "Not right now.")
  35. StartConversation(Conversation, NPC, Spawn, "Sssso Filer, ready for a little sabotage? The mine is inside the Wilderwood in the far eastern corner.")
  36. elseif GetQuestStep(Spawn, DisruptionForDistraction) == 2 or GetQuestStep(Spawn, DisruptionForDistraction) == 3 then
  37. FaceTarget(NPC, Spawn)
  38. Conversation = CreateConversation()
  39. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/coercer_zlith/tutorial_island02_evil_revamp/quests/citizenship/coercerzlith/coercerzlith003.mp3", "", "", 3347143195, 3837286784, Spawn)
  40. AddConversationOption(Conversation, "Okay, I'll be back.")
  41. StartConversation(Conversation, NPC, Spawn, "The mine is north up the ssslope into the Wilderwood and then eassst. This should definitely cause the disstraction we need for our final attack.")
  42. elseif GetQuestStep(Spawn, DisruptionForDistraction) == 4 then
  43. FaceTarget(NPC, Spawn)
  44. Conversation = CreateConversation()
  45. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/coercer_zlith/tutorial_island02_evil_revamp/quests/citizenship/coercerzlith/coercerzlith004.mp3", "", "", 2084380659, 1533880588, Spawn)
  46. AddConversationOption(Conversation, "Yes, those horse sentries have been a thorn in my side.", "dlg_3")
  47. AddConversationOption(Conversation, "Not now.")
  48. StartConversation(Conversation, NPC, Spawn, "Nice work! As you probably noticed, there are additional Tunarian horse sentriesss being sssent into the Wilderwood to check on the mine. We need another distraction to thin out the Qeynosian forces even more. It's time to deal with those meddling sentriesss once and for all.")
  49. elseif GetQuestStep(Spawn, DisruptionForDistraction) == 5 then
  50. FaceTarget(NPC, Spawn)
  51. Conversation = CreateConversation()
  52. -- Missing PlayFlavor!
  53. AddConversationOption(Conversation, "Okay, I'll keep looking.")
  54. StartConversation(Conversation, NPC, Spawn, "The Tunarian horse sentriesss should be patrolling around the Wilderwood to the north. Return to me when you have dealt with them.")
  55. elseif GetQuestStep(Spawn, DisruptionForDistraction) == 6 then
  56. SetStepComplete(Spawn, DisruptionForDistraction, 6)
  57. FaceTarget(NPC, Spawn)
  58. Conversation = CreateConversation()
  59. AddConversationOption(Conversation, "I won't.")
  60. StartConversation(Conversation, NPC, Spawn, "You have done enough, " .. GetName(Spawn).. ". Tunarian reinforcementsss are on their way to the Wilderwood. Our time for attack is now! Tayil will be glad to hear of your work. Speaking of Tayil, take these sssealed orders. She sssent them for you, and if I were you I would not ignore them.")
  61. end
  62. end
  63. if CanReceiveQuest(Spawn, DisruptionForDistraction) then
  64. NotReady(NPC, Spawn)
  65. end
  66. end
  67. function dlg_2(NPC, Spawn)
  68. SetStepComplete(Spawn, DisruptionForDistraction, 1)
  69. FaceTarget(NPC, Spawn)
  70. Conversation = CreateConversation()
  71. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/coercer_zlith/tutorial_island02_evil_revamp/quests/citizenship/coercerzlith/coercerzlith002.mp3", "", "", 3880132810, 2976839399, Spawn)
  72. AddConversationOption(Conversation, "Consider it done!")
  73. StartConversation(Conversation, NPC, Spawn, "Head in there and sstir up the hornet's nest. Take out sssome of their miners, and while you're at it, grab some of the loose ore around the mine. Tayil wants to know what it is that they're mining.")
  74. end
  75. function dlg_3(NPC, Spawn)
  76. SetStepComplete(Spawn, DisruptionForDistraction, 4)
  77. FaceTarget(NPC, Spawn)
  78. Conversation = CreateConversation()
  79. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/coercer_zlith/tutorial_island02_evil_revamp/quests/citizenship/coercerzlith/coercerzlith005.mp3", "", "", 1181638962, 936080191, Spawn)
  80. AddConversationOption(Conversation, "Very well, I'm heading back in.")
  81. StartConversation(Conversation, NPC, Spawn, "Head back into the Wilderwood and take out sssome of these horse sentries. The more you slay, the more Qeynosians will be sent to investigate, which will provide our chance to attack. Return to me when the deed is done. By the way, I'll take those ore samples and make ssssure they find their way to Tayil.")
  82. end
  83. function NotReady(NPC, Spawn)
  84. FaceTarget(NPC, Spawn)
  85. Conversation = CreateConversation()
  86. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/coercer_zlith/tutorial_island02_evil_revamp/quests/citizenship/coercerzlith/coercerzlith009.mp3", "", "", 2204153066, 1989322276, Spawn)
  87. AddConversationOption(Conversation, "Very well.", "dlg_3_1")
  88. StartConversation(Conversation, NPC, Spawn, "You are not yet ready to take on the tasks I will offer you. Return to Tayil N'Velex outside Sythor's Spire if you are unsure how to prepare yourself.")
  89. end