9
3

Bulurg.lua 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. --[[
  2. Script Name : SpawnScripts/Castleview/Bulurg.lua
  3. Script Purpose : Bulurg <Bartender>
  4. Script Author : Dorbin
  5. Script Date : 2022.01.25
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  10. --dofile("SpawnScripts/Generic/GenericBartenderVoiceOvers.lua")
  11. local Water = 5456
  12. function spawn(NPC)
  13. ProvidesQuest(NPC,Water)
  14. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function InRange (NPC,Spawn)
  20. if GetFactionAmount(Spawn,11) <0 then
  21. FactionChecking(NPC, Spawn, faction)
  22. else
  23. if math.random(1, 100) <= 70 then
  24. if not HasCompletedQuest(Spawn, Water) then
  25. PlayFlavor(NPC, "voiceover/english/bartender_bulurg/qey_village04/100_bartender_bulurg_callout_a4a7c4a8.mp3", "Oh dear. Oh dear! The elven libation is dry! Only if all the locals would drink my bog-spirits.", "frustrated", 731296695, 1004786482, Spawn)
  26. end
  27. else
  28. PlayFlavor(NPC, "voiceover/english/bartender_bulurg/qey_village04/100_bartender_bulurg_multhail2_756404e8.mp3", "I spy that thou'st might enjoy a taste of my brews with real swamp water! Would'st this be the case?", "hello", 1254546536, 617051761, Spawn)
  29. end
  30. end
  31. end
  32. function hailed(NPC, Spawn)
  33. if GetFactionAmount(Spawn,11) <0 then
  34. FactionChecking(NPC, Spawn, faction)
  35. else
  36. if not HasCompletedQuest(Spawn, Water) then
  37. QuestStart(NPC, Spawn,conversation)
  38. else
  39. FaceTarget(NPC, Spawn)
  40. local choice = math.random(1,4)
  41. if choice == 1 then
  42. PlayFlavor(NPC, "voiceover/english/froglok_eco_good_1/ft/service/bartender/froglok_bartender_service_good_1_hail_gf_ce733912.mp3", "I bet you have some stories, eh? Adventuring must be an exciting life!", "", 1840731743, 2065794369, Spawn)
  43. elseif choice == 2 then
  44. PlayFlavor(NPC, "voiceover/english/froglok_eco_good_1/ft/service/bartender/froglok_bartender_service_good_1_hail_gf_ce1f039f.mp3", "Might I interest you in some meat and cheese to go with that tall glass of ale?", "", 2337190060, 175840912, Spawn)
  45. elseif choice == 3 then
  46. PlayFlavor(NPC, "voiceover/english/froglok_eco_good_1/ft/service/bartender/froglok_bartender_service_good_1_hail_gf_41d55b0d.mp3", "The best part about this job is all the extra coin I get.", "", 2888286231, 967545209, Spawn)
  47. elseif choice == 4 then
  48. PlayFlavor(NPC, "voiceover/english/bartender_bulurg/qey_village04/bartenderbulurg000.mp3", "Good to see you found my Hole-in-the-Wall Tavern! Taste my brews made with real swamp water, now with more flies!", "hello", 1246934802, 3942849521, Spawn)
  49. end
  50. end
  51. end
  52. end
  53. function QuestStart(NPC, Spawn, conversation)
  54. FaceTarget(NPC, Spawn)
  55. Dialog.New(NPC, Spawn)
  56. Dialog.AddDialog("Good to see you found my Hole-in-the-Wall Tavern! Taste my brews made with real swamp water, now with more flies!")
  57. Dialog.AddVoiceover("voiceover/english/bartender_bulurg/qey_village04/bartenderbulurg000.mp3", 1246934802, 3942849521)
  58. if not HasQuest (Spawn, Water) and not HasCompletedQuest(Spawn, Water) then
  59. Dialog.AddOption( "Have anything... less swampy?", "Swampy")
  60. Dialog.AddOption( "Do the locals drink your bog spirits?", "Swampy")
  61. end
  62. if HasQuest (Spawn, Water) and GetQuestStep(Spawn, Water) == 2 then
  63. Dialog.AddOption("Here is a full jug of water from the Oakmyst falls.", "FullJug")
  64. end
  65. Dialog.AddOption("I'm good for now, thanks.")
  66. Dialog.Start()
  67. end
  68. function Swampy(NPC, Spawn)
  69. FaceTarget(NPC, Spawn)
  70. Dialog.New(NPC, Spawn)
  71. Dialog.AddDialog("Mine fellow Frogloks wouldst not drink any other libation. Alas, I confess, the high elf palate is most finicky for such a natural intoxication. I'th been experimenting with a drink they may perhaps prefer, but I needst a jug of fall water for the first batch.")
  72. Dialog.AddVoiceover("voiceover/english/bartender_bulurg/qey_village04/bartenderbulurg001.mp3",3151049449,2885168239)
  73. PlayFlavor(NPC, "", "", "ponder", 0,0 , Spawn)
  74. Dialog.AddOption("I could fetch some water for you.", "TakeJug")
  75. Dialog.AddOption("Unfortunately, I don't have time to help.")
  76. Dialog.Start()
  77. end
  78. function FullJug(NPC, Spawn)
  79. SetStepComplete(Spawn, Water, 2)
  80. FaceTarget(NPC, Spawn)
  81. Dialog.New(NPC, Spawn)
  82. Dialog.AddDialog("Oh! Excellent work! Now I can create Tunare's Finest. It is taken from a recipe I purchased from a traveling merchant. With such a noble name, I cannot forsee the high elves resisting its sweet nectar.")
  83. Dialog.AddVoiceover("voiceover/english/bartender_bulurg/qey_village04/bartenderbulurg003.mp3",2084504638, 1586575604)
  84. PlayFlavor(NPC, "", "", "happy", 0,0 , Spawn)
  85. Dialog.AddOption("Glad I could help.")
  86. Dialog.Start()
  87. end
  88. function TakeJug (NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. OfferQuest(NPC, Spawn, Water)
  91. end