9
3

AntiusVedrix.lua 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/AntiusVedrix.lua
  3. Script Purpose : Antius Vedrix
  4. Script Author : torsten\\Dorbin
  5. Script Date : 2022.07.15
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local AntiusPackage = 5651
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, AntiusPackage)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. SetTempVariable(NPC,"CalloutTimer","false")
  14. SetTempVariable(NPC, "CalloutTimer1", "false")
  15. end
  16. function InRange(NPC,Spawn)
  17. if GetFactionAmount(Spawn,12) <0 then
  18. FaceTarget(NPC, Spawn)
  19. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  20. else
  21. if CanReceiveQuest(Spawn, AntiusPackage) then
  22. if GetTempVariable(NPC, "CalloutTimer")== "false"then
  23. SetTempVariable(NPC, "CalloutTimer", "true")
  24. AddTimer(NPC,10000,"ResetTimer",1,Spawn)
  25. FaceTarget(NPC, Spawn)
  26. if GetTempVariable(NPC, "CalloutTimer1")== "false"then
  27. PlayFlavor(NPC, "voiceover/english/antius_vedrix/fprt_hood04/100_std_antius_vedrix_hum_m_callout_ad73c4ec.mp3", "Halt, traveler! What brings you to Beggar's Court?", "", 2768553746, 584609282, Spawn, 0)
  28. SetTempVariable(NPC, "CalloutTimer1", "true")
  29. elseif GetTempVariable(NPC, "CalloutTimer1")== "true"then
  30. PlayFlavor(NPC, "voiceover/english/antius_vedrix/fprt_hood04/100_std_antius_vedrix_hum_m_multhail1_cd2636f5.mp3", "Who are you? You're not the new guy! Get out of here!", "stare", 3883094832, 1572266881, Spawn, 0)
  31. SetTempVariable(NPC, "CalloutTimer1", "false")
  32. end
  33. end
  34. else
  35. PlayFlavor(NPC, "", "", "tapfoot", 0, 0, Spawn, 0)
  36. end
  37. end
  38. end
  39. function ResetCallout(NPC,Spawn)
  40. SetTempVariable(NPC,"CalloutTimer","false")
  41. end
  42. function respawn(NPC)
  43. spawn(NPC)
  44. end
  45. function hailed(NPC, Spawn)
  46. if GetFactionAmount(Spawn,12) <0 then
  47. FaceTarget(NPC, Spawn)
  48. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  49. elseif GetQuestStep(Spawn, AntiusPackage)==1 then
  50. FaceTarget(NPC, Spawn)
  51. PlayFlavor(NPC, "","Hmmm ... maybe you're not the new guy. You did have the password, but you didn't deliver Mirini's package. Deliver it now, or I'll have you arrested!","glare",0,0, Spawn)
  52. else
  53. Dialog1(NPC, Spawn)
  54. end
  55. end
  56. function Offer(NPC, Spawn)
  57. OfferQuest(NPC, Spawn, AntiusPackage)
  58. end
  59. function Dialog1(NPC, Spawn)
  60. FaceTarget(NPC, Spawn)
  61. Dialog.New(NPC, Spawn)
  62. Dialog.AddDialog("You're the new guy, eh? You don't look like someone they'd send.")
  63. Dialog.AddVoiceover("voiceover/english/antius_vedrix/fprt_hood04/std_antius_vedrix.mp3", 3589010304, 1953824103)
  64. if CanReceiveQuest(Spawn,AntiusPackage) then
  65. Dialog.AddOption("I could break your face just for looking at me, fool!", "DialogFail")
  66. Dialog.AddOption("[Lie] Looks can be deceiving... What is going on?", "Dialog2")
  67. Dialog.AddOption("What are you going on about?", "Dialog2")
  68. Dialog.AddOption("I'm not. Bye.")
  69. elseif GetQuestStep(Spawn,AntiusPackage) ==2 then
  70. Dialog.AddOption("Mirin said that it's getting bigger and that he needs more hooks. WHAT IS GOING ON?!", "Dialog3")
  71. else
  72. Dialog.AddOption("Nope. Not today.")
  73. end
  74. Dialog.Start()
  75. end
  76. function DialogFail(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. Dialog.New(NPC, Spawn)
  79. Dialog.AddDialog("Who are you? You're not the new guy! Get out of here!")
  80. Dialog.AddVoiceover("voiceover/english/antius_vedrix/fprt_hood04/100_std_antius_vedrix_hum_m_multhail1_cd2636f5.mp3", 3883094832, 1572266881)
  81. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  82. Dialog.AddOption("...")
  83. Dialog.Start()
  84. end
  85. function Dialog2(NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. Dialog.New(NPC, Spawn)
  88. Dialog.AddDialog("Good, good, you know the password. All right, so you are the new guy. Okay, I tied up the package nice and tight like Mirini wanted ... it even has flowers on it. Go ahead, do your thing, and make sure Mirini gets it!")
  89. Dialog.AddVoiceover("voiceover/english/antius_vedrix/fprt_hood04/quests/antiusvedrix/antius_x1_initial.mp3", 3222236480, 2970401654)
  90. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn, 0)
  91. Dialog.AddOption("No, really. What is going on here!?", "Offer")
  92. Dialog.AddOption("This whole thing is a mixup. I'm leaving!")
  93. Dialog.Start()
  94. end
  95. function Dialog3(NPC, Spawn)
  96. FaceTarget(NPC, Spawn)
  97. Dialog.New(NPC, Spawn)
  98. Dialog.AddDialog("Haha! Good one, sir, good one. Okay, I'll set up the hooks. It was an honor working with you. Here's the payment as promised. Every coin is there.")
  99. Dialog.AddVoiceover("voiceover/english/antius_vedrix/fprt_hood04/quests/antiusvedrix/antius_x1_finish.mp3", 90111985, 3240949963)
  100. PlayFlavor(NPC, "", "", "chuckle", 0, 0, Spawn, 0)
  101. Dialog.AddOption("Thanks...")
  102. Dialog.AddOption("[Lie] Thanks.")
  103. Dialog.AddOption("I still have no idea what is happening...")
  104. Dialog.Start()
  105. SetStepComplete(Spawn,AntiusPackage,2)
  106. end
  107. function respawn(NPC)
  108. spawn(NPC)
  109. end