WatcherCurmoglielKarthal.lua 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. --[[
  2. Script Name : SpawnScripts/Graystone/WatcherCurmoglielKarthal.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.03.09
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Rats = 5503
  10. function spawn(NPC)
  11. ProvidesQuest(NPC,Rats)
  12. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  13. end
  14. function InRange(NPC, Spawn)
  15. if math.random(1, 100) <= 70 then
  16. if not HasCompletedQuest (Spawn, Rats) and not HasQuest (Spawn, Rats) and GetLevel(Spawn) >=6 then
  17. FaceTarget(NPC, Spawn)
  18. PlayFlavor(NPC, "voiceover/english/watcher_curmogliel_kar_thal/qey_village03/100_customer_highelf_watcher_karthal_callout_b1652e76.mp3", "Step forward citizen! Prove your faith to the Celestial Watch.", "nod", 131916429, 83798577, Spawn)
  19. end
  20. end
  21. end
  22. function hailed(NPC, Spawn)
  23. if GetFactionAmount(Spawn,11)<0 then
  24. FaceTarget(NPC, Spawn)
  25. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  26. else
  27. Dialog1(NPC, Spawn)
  28. AddTimer(NPC,30000,"RemoveTarget",1,Spawn)
  29. end
  30. end
  31. function Dialog1(NPC, Spawn)
  32. FaceTarget(NPC, Spawn)
  33. Dialog.New(NPC, Spawn)
  34. Dialog.AddDialog("The Celestial Watch is ever vigilant. Rest will come only after the tyranny of evil can be undone.")
  35. Dialog.AddVoiceover("voiceover/english/watcher_curmogliel_kar_thal/qey_village03/watchercurmogliel000.mp3", 1545523898, 2801793023)
  36. if not HasCompletedQuest (Spawn, Rats) and not HasQuest (Spawn, Rats) and GetLevel(Spawn) >=6 then
  37. Dialog.AddOption("Haven't the gods been quiet since The Shattering?", "Gods")
  38. end
  39. if GetQuestStep (Spawn, Rats)==2 then
  40. Dialog.AddOption("I have slain the Bloodsabers. Is that proof enough?", "Finished")
  41. end
  42. Dialog.AddOption("Good to know. Good day to you.")
  43. if not HasCompletedQuest (Spawn, Rats) and not HasQuest (Spawn, Rats) then
  44. Dialog.AddOption( "I don't need faith telling me what to do.","NoFaith")
  45. end
  46. Dialog.Start()
  47. end
  48. function RemoveTarget(NPC,Spawn)
  49. if GetTarget(NPC)==Spawn then
  50. SetTarget(NPC,nil)
  51. end
  52. end
  53. function NoFaith(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. Dialog.New(NPC, Spawn)
  56. Dialog.AddDialog("Faith is all that can save us. I am sorry you cannot see this. This fight is not yours. But someday, you shall find your way.")
  57. Dialog.AddVoiceover("voiceover/english/watcher_curmogliel_kar_thal/qey_village03/watchercurmogliel004.mp3", 3442673353, 215479191)
  58. Dialog.AddOption("Perhaps.")
  59. Dialog.Start()
  60. end
  61. function Gods(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. Dialog.New(NPC, Spawn)
  64. Dialog.AddDialog("The Celestial Watch is the bearer of faith in this near faithless world. The powers that be have been silenced for ages, and far too many have lost faith. Now is the time for all to prove their faith.")
  65. Dialog.AddVoiceover("voiceover/english/watcher_curmogliel_kar_thal/qey_village03/watchercurmogliel001.mp3", 2796372523, 2339729936)
  66. Dialog.AddOption("How can I prove my faith?","Prove2")
  67. Dialog.AddOption("I don't need faith telling me what to do.","NoFaith")
  68. Dialog.Start()
  69. end
  70. function Prove2(NPC,Spawn)
  71. OfferQuest(NPC,Spawn, Rats)
  72. end
  73. function Finished(NPC, Spawn)
  74. FaceTarget(NPC, Spawn)
  75. Dialog.New(NPC, Spawn)
  76. Dialog.AddDialog("You've done well. The Celestial Watch salutes you! Take this reward for our gratitude. Use it wisely so that you may aid those in need. You'll be in our prayers. Should your adventures take you to the Temple of Light in Qeynos, please visit us fair traveler. Farewell.")
  77. Dialog.AddVoiceover("voiceover/english/watcher_curmogliel_kar_thal/qey_village03/watchercurmogliel003.mp3", 2058282306,1196487776)
  78. Dialog.AddOption("Thank you.")
  79. SetStepComplete(Spawn,Rats,2)
  80. Dialog.Start()
  81. end