9
3

MarcusCantarius.lua 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/MarcusCantarius.lua
  3. Script Purpose : Marcus Cantarius
  4. Script Author : torsten\\Dorbin
  5. Script Date : 2022.07.16
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local MarcusMonumentalHatred = 5659
  10. local DeliverHelptoJanusFieri = 5660
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, MarcusMonumentalHatred)
  13. ProvidesQuest(NPC, DeliverHelptoJanusFieri)
  14. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  15. SetTempVariable(NPC,"CalloutTimer","false")
  16. SetTempVariable(NPC, "CalloutTimer1", "false")
  17. end
  18. function InRange(NPC,Spawn)
  19. if GetFactionAmount(Spawn,12) <0 then
  20. FaceTarget(NPC, Spawn)
  21. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  22. else
  23. if not HasCompletedQuest(Spawn, MarcusMonumentalHatred) then
  24. if GetTempVariable(NPC, "CalloutTimer")== "false"then
  25. SetTempVariable(NPC, "CalloutTimer", "true")
  26. AddTimer(NPC,40000,"ResetTimer",1,Spawn)
  27. FaceTarget(NPC, Spawn)
  28. PlayFlavor(NPC, "voiceover/english/marcus_cantarius/fprt_hood04/qst_marcus_cantarius_aoicallout01_fece1813.mp3", "Death to the dervish thugs! Who's with me?!", "fient", 1434684372, 2320572215, Spawn, 0)
  29. end
  30. end
  31. end
  32. end
  33. function ResetCallout(NPC,Spawn)
  34. SetTempVariable(NPC,"CalloutTimer","false")
  35. end
  36. function respawn(NPC)
  37. spawn(NPC)
  38. end
  39. function hailed(NPC, Spawn)
  40. Dialog1(NPC, Spawn)
  41. end
  42. function Dialog1(NPC, Spawn)
  43. FaceTarget(NPC, Spawn)
  44. Dialog.New(NPC, Spawn)
  45. Dialog.AddDialog("I've dedicated my life to eradicating the dervishes.")
  46. Dialog.AddVoiceover("voiceover/english/marcus_cantarius/fprt_hood04/quests/marcuscantarius/marcuscantarius001.mp3", 1085537039, 2873606329)
  47. if CanReceiveQuest(Spawn, MarcusMonumentalHatred) then
  48. Dialog.AddOption("I would gladly slay some dervish thugs!","Dialog2")
  49. end
  50. if CanReceiveQuest(Spawn, DeliverHelptoJanusFieri) then
  51. Dialog.AddOption("That must keep you busy. Have anything I can do?","Dialog4")
  52. end
  53. if GetQuestStep(Spawn, MarcusMonumentalHatred) == 2 then
  54. Dialog.AddOption("Here are the dervish scalps. They got what they deserved.","Dialog3")
  55. end
  56. Dialog.AddOption("I'll keep that in mind.")
  57. Dialog.Start()
  58. end
  59. function Dialog2(NPC, Spawn)
  60. FaceTarget(NPC, Spawn)
  61. Dialog.New(NPC, Spawn)
  62. Dialog.AddDialog("Very well then. You had better be prepared for battle!")
  63. Dialog.AddVoiceover("voiceover/english/marcus_cantarius/fprt_hood04/quests/marcuscantarius/marcuscantarius002.mp3", 2375491986, 3205126535)
  64. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn, 0)
  65. Dialog.AddOption("I am more than ready for bloodshed.", "Offer1")
  66. Dialog.AddOption("Wait, nevermind...")
  67. Dialog.Start()
  68. end
  69. function Offer1(NPC, Spawn)
  70. OfferQuest(NPC, Spawn, MarcusMonumentalHatred)
  71. end
  72. function Dialog3(NPC, Spawn)
  73. FaceTarget(NPC, Spawn)
  74. Dialog.New(NPC, Spawn)
  75. Dialog.AddDialog("Ha HA! Yes! These will do nicely on my wall! Well done on ending the lives of these dervish filth! I hope you made them squirm during their last breath. Please, take one of the as a sign of my thanks for helping the cause.")
  76. Dialog.AddVoiceover("voiceover/english/marcus_cantarius/fprt_hood04/quests/marcuscantarius/marcuscantarius004.mp3", 0, 0) --NO KEYS
  77. PlayFlavor(NPC, "", "", "happy", 0, 0, Spawn, 0)
  78. Dialog.AddOption("Thanks. The only good dervish is a dead one.")
  79. Dialog.Start()
  80. SetStepComplete(Spawn,MarcusMonumentalHatred,2)
  81. end
  82. function Dialog4(NPC, Spawn)
  83. FaceTarget(NPC, Spawn)
  84. Dialog.New(NPC, Spawn)
  85. Dialog.AddDialog("Perhaps. Want to do me a favor?")
  86. Dialog.AddVoiceover("voiceover/english/marcus_cantarius/fprt_hood04/quests/marcuscantarius/marcus_cantarius2_000.mp3", 3613294861, 4212596636)
  87. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn, 0)
  88. Dialog.AddOption("What do you need?","Dialog5")
  89. Dialog.AddOption("No. I don't do favors, fool.")
  90. Dialog.Start()
  91. end
  92. function Dialog5 (NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. Dialog.New(NPC, Spawn)
  95. Dialog.AddDialog("Nothing too big and there's a reward in it for you. I need to send a note to my friend Janus Fieri out in the Crossroads. He's working on a murder investigation. I have a lead for him.")
  96. Dialog.AddVoiceover("voiceover/english/marcus_cantarius/fprt_hood04/quests/marcuscantarius/marcus_cantarius2_001.mp3", 3005578740, 3392739960)
  97. Dialog.AddOption("If there is pay... Where is Janus?","Dialog6")
  98. Dialog.AddOption("Nope. Find someone else.")
  99. Dialog.Start()
  100. end
  101. function Dialog6 (NPC, Spawn)
  102. FaceTarget(NPC, Spawn)
  103. Dialog.New(NPC, Spawn)
  104. Dialog.AddDialog("Out in the Commonlands. It's a fairly safe location, considering what's out in the wilds. Delivering this note to him will speed up his investigation. Maybe you could even do some detective work for me. What do you say?")
  105. Dialog.AddVoiceover("voiceover/english/marcus_cantarius/fprt_hood04/quests/marcuscantarius/marcus_cantarius2_002.mp3", 3250398674, 3776310471)
  106. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn, 0)
  107. Dialog.AddOption("Okay, I'll take the note.","Offer2")
  108. Dialog.AddOption("I've got better things to do than poke around.")
  109. Dialog.Start()
  110. end
  111. function Offer2(NPC, Spawn)
  112. OfferQuest(NPC, Spawn, DeliverHelptoJanusFieri)
  113. end