9
3

ZentomaronCroosinaden.lua 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. SetInfoStructString(NPC, "action_state", "mood_angry")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. if GetFactionAmount(Spawn,11)<0 then
  19. else
  20. if not HasQuest(Spawn, 5604) and not HasCompletedQuest(Spawn,5604)then
  21. local chance = math.random(0, 100)
  22. if chance <= 80 then
  23. FaceTarget(NPC, Spawn)
  24. local choice = MakeRandomInt(1,2)
  25. if choice == 1 then
  26. 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)
  27. elseif choice == 2 then
  28. 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)
  29. end
  30. end
  31. end
  32. end
  33. end
  34. function hailed(NPC, Spawn)
  35. FaceTarget(NPC, Spawn)
  36. if GetFactionAmount(Spawn,11)<0 then
  37. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  38. else
  39. if HasCompletedQuest(Spawn,5604)then
  40. 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)
  41. else
  42. Dialog1(NPC, Spawn)
  43. end
  44. end
  45. end
  46. function Dialog1(NPC, Spawn)
  47. FaceTarget(NPC, Spawn)
  48. Dialog.New(NPC, Spawn)
  49. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  50. Dialog.AddDialog("Is it not apparent that I am engaged at the momment discussing important matters with Farnsbey here?")
  51. Dialog.AddVoiceover("voiceover/english/zentomaron_croosinaden/qey_village02/zentomaroncroosinaden.mp3", 2680006055, 3138388390)
  52. if not HasCompletedQuest (Spawn, 5604) and not HasQuest (Spawn, 5604) then
  53. Dialog.AddOption("What could Farnsbey have done to make you so concerned?","Dialog2")
  54. end
  55. if GetQuestStep (Spawn, 5604)==2 then
  56. 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")
  57. end
  58. Dialog.AddOption("Sorry. I was just passing through.")
  59. Dialog.Start()
  60. end
  61. function Dialog2(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. Dialog.New(NPC, Spawn)
  64. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  65. 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!")
  66. Dialog.AddVoiceover("voiceover/english/zentomaron_croosinaden/qey_village02/zentomaroncroosinaden000.mp3", 1712159485, 1929661255)
  67. Dialog.AddOption("If it would help, I could go check the shop in Nettleville for you.", "QuestBegin")
  68. Dialog.AddOption("That does sounds unfortunate. Sorry, I can't be of any help.")
  69. Dialog.Start()
  70. end
  71. function QuestBegin (NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. OfferQuest(NPC, Spawn, 5604)
  74. end
  75. function Delivered(NPC, Spawn)
  76. FaceTarget(NPC, Spawn)
  77. Dialog.New(NPC, Spawn)
  78. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  79. Dialog.AddDialog("How dare he! I know he's lying- wait. You didn't give him my name, did you?")
  80. Dialog.AddVoiceover("voiceover/english/zentomaron_croosinaden/qey_village02/zentomaroncroosinaden002.mp3", 2909174434, 3369055337)
  81. Dialog.AddOption("...You told me to tell him the demands were directly from you.","Delivered2")
  82. Dialog.Start()
  83. end
  84. function Delivered2(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. Dialog.New(NPC, Spawn)
  87. SetStepComplete(Spawn, 5604, 2)
  88. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  89. Dialog.AddDialog("Oh... I suppose I did. Well, take this bit of coin for your efforts. We may yet get Farnsby to talk. Especially if we apply him with enough ale.")
  90. Dialog.AddVoiceover("voiceover/english/zentomaron_croosinaden/qey_village02/zentomaroncroosinaden003.mp3", 2350120795, 405544925)
  91. Dialog.AddOption("Thanks. Best of luck with all that.")
  92. Dialog.Start()
  93. end