WatcherCurmoglielKarthal.lua 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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", 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 Prove(NPC, Spawn)
  71. conversation = CreateConversation()
  72. FaceTarget(NPC, Spawn)
  73. PlayFlavor(NPC, "voiceover/english/watcher_curmogliel_kar_thal/qey_village03/watchercurmogliel002.mp3","","agree",1937849354,1911529851,Spawn)
  74. AddConversationOption(conversation, "I will prove myself. I will be back.","Prove2")
  75. AddConversationOption(conversation, "I don't need faith telling me what to do.","NoFaith")
  76. StartConversation(conversation, NPC, Spawn, "Then seek out the catacombs! You must slay the Bloodsabers in the caverns. May your faith in the righteous bring you victory, or welcome you in the afterlife. The gods are watching!")
  77. end
  78. function Prove2(NPC,Spawn)
  79. OfferQuest(NPC,Spawn, Rats)
  80. end
  81. function Finished(NPC, Spawn)
  82. conversation = CreateConversation()
  83. FaceTarget(NPC, Spawn)
  84. PlayFlavor(NPC, "voiceover/english/watcher_curmogliel_kar_thal/qey_village03/watchercurmogliel003.mp3","","thank",2058282306,1196487776,Spawn)
  85. AddConversationOption(conversation, "Thank you.","Finished2")
  86. StartConversation(conversation, NPC, Spawn, "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.")
  87. end
  88. function Finished2(NPC,Spawn)
  89. SetStepComplete(Spawn,Rats,2)
  90. end