9
3

WatcherKenjedeau.lua 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. --[[
  2. Script Name : SpawnScripts/SerpentSewer/WatcherKenjedeau.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.09.25 06:09:08
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Part2 = 5890
  10. local Part1 = 5889
  11. function spawn(NPC)
  12. end
  13. function hailed(NPC, Spawn)
  14. if HasQuest(Spawn,Part2) then
  15. Retry(NPC,Spawn)
  16. else
  17. Dialog1(NPC, Spawn)
  18. end
  19. end
  20. function respawn(NPC)
  21. spawn(NPC)
  22. end
  23. function Dialog1(NPC, Spawn)
  24. FaceTarget(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. Dialog.New(NPC, Spawn)
  27. Dialog.AddDialog("Blast these wretched sewers! Why do I have to lookout for alligators. I don't even know what an alligator LOOKS like!")
  28. Dialog.AddVoiceover("voiceover/english/watcher_kenjedeau/fprt_sewer02/watcher_kenjedeau001.mp3", 2265669441, 2172159195)
  29. PlayFlavor(NPC, "", "", "grumble", 0, 0, Spawn)
  30. if HasQuest(Spawn,Part1) or HasCompletedQuest(Spawn,Part1) then
  31. if GetLevel(Spawn)<18 and not HasQuest(Spawn,Part2) and not HasCompletedQuest(Spawn,Part2) then
  32. Dialog.AddOption("Nobility comes from personal sacrifice, friend.","Dialog2")
  33. elseif HasQuest(Spawn,Part2) and not HasCompletedQuest(Spawn,Part2) then
  34. Dialog.AddOption("I need to get to that meeting!","Retry")
  35. end
  36. end
  37. Dialog.AddOption("I have no time for this. Get out of the way!")
  38. Dialog.Start()
  39. end
  40. function Dialog2(NPC, Spawn)
  41. FaceTarget(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. Dialog.New(NPC, Spawn)
  44. Dialog.AddDialog("Shhh! Don't say that so loud! So... Stilus welcomed you into our fold. He has a good eye. You understand what joining us means, right? Treason. You can still back out before it's too late...")
  45. Dialog.AddVoiceover("voiceover/english/watcher_kenjedeau/fprt_sewer02/watcher_kenjedeau002.mp3", 1178065540, 4141402431)
  46. PlayFlavor(NPC, "", "", "wince", 0, 0, Spawn)
  47. Dialog.AddOption("I've come this far. Let's get on with it.","Dialog3")
  48. Dialog.AddOption("On second thought...")
  49. Dialog.Start()
  50. end
  51. function Dialog2_1(NPC, Spawn)
  52. FaceTarget(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. Dialog.New(NPC, Spawn)
  55. Dialog.AddDialog("I thought I smelled a coward. I want nothing to do with you until you come to your senses.")
  56. Dialog.AddVoiceover("voiceover/english/watcher_kenjedeau/fprt_sewer02/watcher_kenjedeau003.mp3", 1178065540, 4141402431)
  57. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  58. Dialog.AddOption("Fine.")
  59. Dialog.Start()
  60. end
  61. function Dialog3(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. FaceTarget(NPC, Spawn)
  64. Dialog.New(NPC, Spawn)
  65. Dialog.AddDialog("We need you to complete a task that the rest of us cannot. Before I continue, you must understand the consequences of what I am about to ask you. If you agree to help us, you can never show your face in Freeport again.")
  66. Dialog.AddVoiceover("voiceover/english/watcher_kenjedeau/fprt_sewer02/watcher_kenjedeau004.mp3", 3378912922, 919692772)
  67. Dialog.AddOption("Sound like something I'd be interested in.","Dialog4")
  68. Dialog.AddOption("I would much rather keep my head than be a traitor."," Dialog2_1")
  69. Dialog.Start()
  70. end
  71. function Dialog4(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. FaceTarget(NPC, Spawn)
  74. Dialog.New(NPC, Spawn)
  75. Dialog.AddDialog("Since we're asking you to commit treason, you must prove your loyalty. Your only reward is the satisfaction of doing a good deed in this corrupt city. If you live through this, I can only imagine the severity of your punishment. Ask yourself: Are you willing to throw away your evil nature to live a life of goodwill?")
  76. Dialog.AddVoiceover("voiceover/english/watcher_kenjedeau/fprt_sewer02/watcher_kenjedeau005.mp3", 21064502, 1853527280)
  77. Dialog.AddOption("Yes. This world needs all the help it can get.","Offer")
  78. Dialog.AddOption("Good will? ... err, he idea of it makes me sick.")
  79. Dialog.Start()
  80. end
  81. function Offer(NPC,Spawn)
  82. if GetLevel(Spawn) <18 then
  83. OfferQuest(NPC,Spawn,Part2)
  84. FaceTarget(NPC,Spawn)
  85. else
  86. CloseConversation(NPC,Spawn)
  87. SendPopUpMessage(Spawn,"You are too late! The meeting has already occured.",250,50,50)
  88. SendMessage(Spawn,"You are too late! The meeting has already occured.","red")
  89. PlaySound(Spawn,"sounds/ui/ui_warning.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  90. end
  91. end
  92. function Retry(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. Dialog.New(NPC, Spawn)
  95. Dialog.AddDialog("I'll cast a spell that will transport you to their meeting place. You must stop the official, using any means necessary. I think you know what you need to do.")
  96. Dialog.AddVoiceover("voiceover/english/watcher_kenjedeau/fprt_sewer02/watcher_kenjedeau007.mp3", 3532484695, 507238338)
  97. Dialog.AddOption("I'm ready.","Ready")
  98. Dialog.Start()
  99. end
  100. function Ready(NPC,Spawn)
  101. if GetLevel(Spawn) <18 then
  102. CastSpell(NPC,95,1,1,NPC)
  103. ApplySpellVisual(Spawn,73)
  104. AddTimer(NPC,2500,"Port",1,Spawn)
  105. else
  106. CloseConversation(NPC,Spawn)
  107. SendPopUpMessage(Spawn,"You are too late! The meeting has already occured.",250,50,50)
  108. SendMessage(Spawn,"You are too late! The meeting has already occured.","red")
  109. PlaySound(Spawn,"sounds/ui/ui_warning.wav", GetX(NPC), GetY(NPC), GetZ(NPC))
  110. if HasQuest(Spawn,5890) and GetQuestStep(Spawn,5890) ==1 then
  111. SetStepFailed(Spawn,5890,1)
  112. end
  113. end
  114. end
  115. function Port(NPC,Spawn)
  116. Betrayal = GetZone("FreeportBetrayal")
  117. Zone(Betrayal,Spawn,3.87, 0.33, 9.64, 44)
  118. end