9
3

FestusSeptimius.lua 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/FestusSeptimius.lua
  3. Script Purpose : Festus Septimius
  4. Script Author : torsten\\Dorbin
  5. Script Date : 2022.07.15
  6. Script Notes : Cleaned up script, added emotes/callouts/finish text - Dorbin
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local BottlesOfBeerInMyHand = 5649
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, BottlesOfBeerInMyHand)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. SetTempVariable(NPC,"CalloutTimer","false")
  14. SetInfoStructString(NPC, "action_state", "artificing_idle")
  15. end
  16. function InRange(NPC,Spawn)
  17. if CanReceiveQuest(Spawn,BottlesOfBeerInMyHand) and GetTempVariable(NPC,"CalloutTimer") ~= "true" then
  18. SetTempVariable(NPC,"CalloutTimer","true")
  19. FaceTarget(NPC,Spawn)
  20. PlayFlavor(NPC, "voiceover/english/festus_septimus/fprt_hood04/100_std_festus_septimius_hum_m_callout_bff82cf.mp3", "This is hand blown, custom made glass. You break it, and I'll break something of yours, got it?", "glare", 202406317, 1807424794, Spawn, 0)
  21. AddTimer(NPC,60000,"ResetCallout",1,Spawn)
  22. elseif HasCompletedQuest(Spawn,BottlesOfBeerInMyHand) and GetTempVariable(NPC,"CalloutTimer") ~= "true" then
  23. SetTempVariable(NPC,"CalloutTimer","true")
  24. FaceTarget(NPC,Spawn)
  25. PlayFlavor(NPC, "voiceover/english/festus_septimus/fprt_hood04/100_std_festus_septimius_hum_m_multhail4_73ae922d.mp3", "Leave before you break something. I no longer need your services.", "no", 266472789, 272800124, Spawn, 0)
  26. AddTimer(NPC,100000,"ResetCallout",1,Spawn)
  27. end
  28. end
  29. function ResetCallout(NPC,Spawn)
  30. SetTempVariable(NPC,"CalloutTimer","false")
  31. end
  32. function respawn(NPC)
  33. spawn(NPC)
  34. end
  35. function hailed(NPC, Spawn)
  36. Dialog1(NPC, Spawn)
  37. end
  38. function Offer(NPC, Spawn)
  39. OfferQuest(NPC, Spawn, BottlesOfBeerInMyHand)
  40. end
  41. function Dialog1(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. Dialog.New(NPC, Spawn)
  44. Dialog.AddDialog("This glass is all hand blown and custom made. If you break it, then I break something of yours, got it?")
  45. Dialog.AddVoiceover("voiceover/english/festus_septimus/fprt_hood04/std_festus_septimius.mp3", 692395193, 2329059486)
  46. if CanReceiveQuest(Spawn,BottlesOfBeerInMyHand) then
  47. Dialog.AddOption("What would you do if I broke all of them?", "Dialog2")
  48. elseif GetQuestStep(Spawn,BottlesOfBeerInMyHand) ==2 then
  49. Dialog.AddOption("I've got some of sand. Is this what you needed?", "Dialog3")
  50. end
  51. Dialog.AddOption("I'll be careful.")
  52. Dialog.Start()
  53. end
  54. function Dialog2(NPC, Spawn)
  55. FaceTarget(NPC, Spawn)
  56. Dialog.New(NPC, Spawn)
  57. Dialog.AddDialog("Ha ha! Good luck, buddy. I'd like to see you try and break my sturdy glassware! Now, instead of throwing back and forth useless threats, how 'bout I hire you? I need someone with your attitude. Are you willing to do some hunting?")
  58. Dialog.AddVoiceover("voiceover/english/festus_septimus/fprt_hood04/quests/festusseptimus/festus_x1_initial.mp3", 2997850121, 1619430784)
  59. PlayFlavor(NPC, "", "", "chuckle", 0, 0, Spawn, 0)
  60. Dialog.AddOption("What did you have in mind?", "Offer")
  61. Dialog.AddOption("No, I'm not.")
  62. Dialog.Start()
  63. end
  64. function Dialog3(NPC, Spawn)
  65. FaceTarget(NPC, Spawn)
  66. Dialog.New(NPC, Spawn)
  67. Dialog.AddDialog("Yeah, that's the stuff ... look at how gritty it is. Using this sand in my compound, I can make bottles that don't shatter. Who wants to be in a tavern brawl with a bottle that breaks into pieces? Yes, my bottles shall break with nice, jagged edges, perfect for gutting someone. Now, leave before you break something. I no longer need your services.")
  68. Dialog.AddVoiceover("voiceover/english/festus_septimus/fprt_hood04/quests/festusseptimus/festus_x1_finish.mp3", 1838584375, 682330236)
  69. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn, 0)
  70. Dialog.AddOption("I see. I'll think of you the next time I gut someone in a tavern.")
  71. Dialog.Start()
  72. SetStepComplete(Spawn,BottlesOfBeerInMyHand,2)
  73. end