LuciusVulso.lua 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/LuciusVulso.lua
  3. Script Purpose : Lucius Vulso
  4. Script Author : torsten\\Dorbin
  5. Script Date : 2022.07.15
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local CasingtheJoint = 5652
  10. local IntoTheSewersForLucius = 5653
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, CasingtheJoint)
  13. ProvidesQuest(NPC, IntoTheSewersForLucius)
  14. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  15. SetTempVariable(NPC,"CalloutTimer","false")
  16. SetTempVariable(NPC, "CalloutTimer1", "false")
  17. SetTempVariable(NPC, "CalloutTimer2", "false")
  18. end
  19. function InRange(NPC,Spawn)
  20. if GetFactionAmount(Spawn,12) <0 then
  21. FaceTarget(NPC, Spawn)
  22. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  23. else
  24. if CanReceiveQuest(Spawn, CasingtheJoint) or CanReceiveQuest(Spawn, IntoTheSewersForLucius) then
  25. if GetTempVariable(NPC, "CalloutTimer")== "false"then
  26. SetTempVariable(NPC, "CalloutTimer", "true")
  27. AddTimer(NPC,25000,"ResetTimer",1,Spawn)
  28. FaceTarget(NPC, Spawn)
  29. if GetTempVariable(NPC, "CalloutTimer1")== "false"then
  30. PlayFlavor(NPC, "voiceover/english/lucius_vulso/fprt_hood04/100_std_lucius_vulso_hum_m_callout1_96f04ea2.mp3", "What do you need? I've no time for small talk.", "no", 1224233, 3736016050, Spawn, 0)
  31. SetTempVariable(NPC, "CalloutTimer1", "true")
  32. elseif GetTempVariable(NPC, "CalloutTimer1")== "true" and GetTempVariable(NPC, "CalloutTimer2")== "false" then
  33. PlayFlavor(NPC, "voiceover/english/lucius_vulso/fprt_hood04/100_std_lucius_vulso_hum_m_multhail1_18444fa9.mp3", "I'm in the middle of a deal. I'll talk to you later.", "sniff", 4080304669, 3804087598, Spawn, 0)
  34. SetTempVariable(NPC, "CalloutTimer2", "true")
  35. elseif GetTempVariable(NPC, "CalloutTimer1")== "true" and GetTempVariable(NPC, "CalloutTimer2")== "true" then
  36. PlayFlavor(NPC, "voiceover/english/lucius_vulso/fprt_hood04/100_std_lucius_vulso_hum_m_multhail2_3c417282.mp3", "I'm in the middle of a deal. What do you need?", "nod", 1601702374, 1327844746, Spawn, 0)
  37. SetTempVariable(NPC, "CalloutTimer1", "false")
  38. SetTempVariable(NPC, "CalloutTimer2", "false")
  39. end
  40. end
  41. else
  42. end
  43. end
  44. end
  45. function ResetCallout(NPC,Spawn)
  46. SetTempVariable(NPC,"CalloutTimer","false")
  47. end
  48. function respawn(NPC)
  49. spawn(NPC)
  50. end
  51. function hailed(NPC, Spawn)
  52. if GetFactionAmount(Spawn,12) <0 then
  53. FaceTarget(NPC, Spawn)
  54. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  55. elseif CanReceiveQuest(Spawn,CasingtheJoint) then
  56. Dialog1(NPC, Spawn)
  57. elseif GetQuestStep(Spawn, CasingtheJoint)==1 then
  58. FaceTarget(NPC, Spawn)
  59. PlayFlavor(NPC, "","I'm still waiting to hear about the bank... Are you up to this job or not? Get out to Stonestair Byway and find me some information!","tapfoot",0,0, Spawn)
  60. elseif CanReceiveQuest(Spawn,IntoTheSewersForLucius) then
  61. Dialog4(NPC, Spawn)
  62. elseif GetQuestStep(Spawn, IntoTheSewersForLucius)==1 then
  63. FaceTarget(NPC, Spawn)
  64. 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)
  65. else
  66. Dialog1(NPC, Spawn)
  67. end
  68. end
  69. function Offer1(NPC, Spawn)
  70. OfferQuest(NPC, Spawn, CasingtheJoint)
  71. end
  72. function Dialog1(NPC, Spawn)
  73. FaceTarget(NPC, Spawn)
  74. Dialog.New(NPC, Spawn)
  75. Dialog.AddDialog("I'm in the middle of a deal. I'll talk to you later.")
  76. Dialog.AddVoiceover("voiceover/english/lucius_vulso/fprt_hood04/std_lucius_vulso.mp3", 2804190422, 1062724591)
  77. if CanReceiveQuest(Spawn,CasingtheJoint) then
  78. Dialog.AddOption("A deal? Have any work I can do?", "Dialog2")
  79. elseif GetQuestStep(Spawn,CasingtheJoint) ==2 then
  80. Dialog.AddOption("There's a rumor running around that the vault can be tunneled into through the sewers.", "Dialog3")
  81. else
  82. end
  83. Dialog.AddOption("Alright.")
  84. Dialog.Start()
  85. end
  86. function Dialog2(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. Dialog.New(NPC, Spawn)
  89. Dialog.AddDialog("What do I look like, a goodwill ambassador? Well ... actually, I might just need your help ... Yes. I do have a job, and it pays well. Interested?")
  90. Dialog.AddVoiceover("voiceover/english/lucius_vulso/fprt_hood04/quests/luciusvulso/lucius_x1_initial.mp3", 23416108, 1883932119)
  91. PlayFlavor(NPC, "", "", "boggle", 0, 0, Spawn, 0)
  92. Dialog.AddOption("Sure. What's the job?", "Offer1")
  93. Dialog.AddOption("Wait, nevermind.")
  94. Dialog.Start()
  95. end
  96. function Dialog3(NPC, Spawn)
  97. FaceTarget(NPC, Spawn)
  98. Dialog.New(NPC, Spawn)
  99. Dialog.AddDialog("Oh really??? Hmmm ... I never thought of that. That just might work ... hmmm ... Why are you still here? Oh yeah ... you want money. Well, here's your coin. Thanks for helping me ... ")
  100. Dialog.AddVoiceover("voiceover/english/lucius_vulso/fprt_hood04/quests/luciusvulso/lucius_x1_finish.mp3", 1554547629, 3981882396)
  101. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn, 0)
  102. Dialog.AddOption("Sure. Good luck on that 'deal'.")
  103. Dialog.Start()
  104. SetStepComplete(Spawn,CasingtheJoint,2)
  105. end
  106. --Quest2
  107. function Offer2(NPC, Spawn)
  108. OfferQuest(NPC, Spawn, IntoTheSewersForLucius)
  109. end
  110. function Dialog4(NPC, Spawn)
  111. FaceTarget(NPC, Spawn)
  112. Dialog.New(NPC, Spawn)
  113. Dialog.AddDialog("I'm in the middle of a deal. What do you need?")
  114. Dialog.AddVoiceover("voiceover/english/lucius_vulso/fprt_hood04/100_std_lucius_vulso_hum_m_multhail2_3c417282.mp3",1601702374, 1327844746)
  115. if CanReceiveQuest(Spawn,IntoTheSewersForLucius) then
  116. Dialog.AddOption("Have you broken into the bank yet?", "Dialog5")
  117. elseif GetQuestStep(Spawn,IntoTheSewersForLucius) ==2 then
  118. Dialog.AddOption("I've collected the slime from the frogs.", "Dialog6")
  119. else
  120. Dialog.AddOption("Alright.")
  121. end
  122. Dialog.Start()
  123. end
  124. function Dialog5(NPC, Spawn)
  125. FaceTarget(NPC, Spawn)
  126. Dialog.New(NPC, Spawn)
  127. Dialog.AddDialog("Shhh ... Keep it down! Don't broadcast my plan - someone might run off with my brilliant, moneymaking scheme and rob the bank! I need a few things before my plan is complete. Are you interested in earning more coin?")
  128. PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn, 0)
  129. Dialog.AddOption("I might regret this.", "Offer2")
  130. Dialog.AddOption("A heist? No, not right now.")
  131. Dialog.Start()
  132. end
  133. function Dialog6(NPC, Spawn)
  134. FaceTarget(NPC, Spawn)
  135. Dialog.New(NPC, Spawn)
  136. Dialog.AddDialog("Great! It doesn't smell too bad. When I dig into their home, I bet I'll fit right in with those frogs. Here, take this coin, friend. If I pull off this robbery, we'll be famous. Fortunately, I'll have enough money to buy a boat and escape. You best start saving for a boat as well. Good luck...")
  137. PlayFlavor(NPC, "", "", "yes", 0, 0, Spawn, 0)
  138. Dialog.AddOption("I knew I would regret this.")
  139. Dialog.Start()
  140. SetStepComplete(Spawn,IntoTheSewersForLucius,2)
  141. end