ZentomaronCroosinaden.lua 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/ZentomaronCroosinaden.lua
  3. Script Purpose : Zentomaron Croosinaden
  4. Script Author : Dorbin
  5. Script Date : 07.03.2022
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  11. ProvidesQuest(NPC,5604)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. if GetFactionAmount(Spawn,11)<0 then
  18. else
  19. if not HasQuest(Spawn, 5604) and not HasCompletedQuest(Spawn,5604)then
  20. local chance = math.random(0, 100)
  21. if chance <= 80 then
  22. FaceTarget(NPC, Spawn)
  23. local choice = MakeRandomInt(1,2)
  24. if choice == 1 then
  25. PlayFlavor(NPC, "voiceover/english/zentomaron_croosinaden/qey_village02/100_tavernpatron_erud_m_callout_4b9d4e4a.mp3", "Adventurer! Come and help settle this dispute!", "beckon", 2771038017, 2425816337, Spawn)
  26. elseif choice == 2 then
  27. PlayFlavor(NPC, "voiceover/english/optional4/zentomaron_croosinaden/zentomaron_multhail1-mp3.mp3", "Hmm ... you appear no more knowledgeable than this silly human we've collared. Oh well.", "", 4235005010, 394337117, Spawn)
  28. end
  29. end
  30. end
  31. end
  32. end
  33. function hailed(NPC, Spawn)
  34. FaceTarget(NPC, Spawn)
  35. if GetFactionAmount(Spawn,11)<0 then
  36. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  37. else
  38. if HasCompletedQuest(Spawn,5604)then
  39. PlayFlavor(NPC, "voiceover/english/optional4/zentomaron_croosinaden/zentomaron_multhail1-mp3.mp3", "Hmm ... you appear no more knowledgeable than this silly human we've collared. Oh well.", "", 4235005010, 394337117, Spawn)
  40. else
  41. Dialog1(NPC, Spawn)
  42. end
  43. end
  44. end
  45. function Dialog1(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. Dialog.New(NPC, Spawn)
  48. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  49. Dialog.AddDialog("Is it not apparent that I am engaged at the momment discussing important matters with Farnsbey here?")
  50. Dialog.AddVoiceover("voiceover/english/zentomaron_croosinaden/qey_village02/zentomaroncroosinaden.mp3", 2680006055, 3138388390)
  51. if not HasCompletedQuest (Spawn, 5604) and not HasQuest (Spawn, 5604) then
  52. Dialog.AddOption("What could Farnsbey have done to make you so concerned?","Dialog2")
  53. end
  54. if GetQuestStep (Spawn, 5604)==2 then
  55. Dialog.AddOption("Varion said he knows of the scroll you're looking for but he doesn't have it. He also said to lay off his nephew.","Delivered")
  56. end
  57. Dialog.AddOption("Sorry. I was just passing through.")
  58. Dialog.Start()
  59. end
  60. function Dialog2(NPC, Spawn)
  61. FaceTarget(NPC, Spawn)
  62. Dialog.New(NPC, Spawn)
  63. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  64. Dialog.AddDialog("Farnsbey has the audacity to deny the academic community the whereabouts of a scroll that posesses lore long pursued by our people! The sage Varion in Nettleville had denied me further access to shop where the scroll possibly lay!")
  65. Dialog.AddVoiceover("voiceover/english/zentomaron_croosinaden/qey_village02/zentomaroncroosinaden000.mp3", 1712159485, 1929661255)
  66. Dialog.AddOption("If it would help, I could go check the shop in Nettleville for you.", "QuestBegin")
  67. Dialog.AddOption("That does sounds unfortunate. Sorry, I can't be of any help.")
  68. Dialog.Start()
  69. end
  70. function QuestBegin (NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. OfferQuest(NPC, Spawn, 5604)
  73. end
  74. function Delivered(NPC, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. Dialog.New(NPC, Spawn)
  77. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  78. Dialog.AddDialog("How dare he! I know he's lying- wait. You didn't give him my name, did you?")
  79. Dialog.AddVoiceover("voiceover/english/zentomaron_croosinaden/qey_village02/zentomaroncroosinaden002.mp3", 2909174434, 3369055337)
  80. Dialog.AddOption("...You told me to tell him the demands were directly from you.","Delivered2")
  81. Dialog.Start()
  82. end
  83. function Delivered2(NPC, Spawn)
  84. FaceTarget(NPC, Spawn)
  85. Dialog.New(NPC, Spawn)
  86. SetStepComplete(Spawn, 5604, 2)
  87. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  88. Dialog.AddDialog("Oh... I suppose I did. Well, take this bit of coin for your efforts. We may yet get Farnsbey to talk. Especially if we apply him with enough ale.")
  89. Dialog.AddVoiceover("voiceover/english/zentomaron_croosinaden/qey_village02/zentomaroncroosinaden003.mp3", 2350120795, 405544925)
  90. Dialog.AddOption("Thanks. Best of luck with all that.")
  91. Dialog.Start()
  92. end