9
3

Bulurg.lua 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. local FarSea372 = 5887
  13. local FarSea436 = 5888
  14. function spawn(NPC)
  15. ProvidesQuest(NPC,Water)
  16. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function InRange (NPC,Spawn)
  22. if GetFactionAmount(Spawn,11) <0 then
  23. FactionChecking(NPC, Spawn, faction)
  24. else
  25. if math.random(1, 100) <= 70 then
  26. if not HasCompletedQuest(Spawn, Water) then
  27. 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)
  28. end
  29. else
  30. 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)
  31. end
  32. end
  33. end
  34. function hailed(NPC, Spawn)
  35. if GetFactionAmount(Spawn,11) <0 then
  36. FactionChecking(NPC, Spawn, faction)
  37. else
  38. -- if not HasCompletedQuest(Spawn, Water) then
  39. QuestStart(NPC, Spawn,conversation)
  40. --[[ else
  41. FaceTarget(NPC, Spawn)
  42. local choice = math.random(1,4)
  43. if choice == 1 then
  44. 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)
  45. elseif choice == 2 then
  46. 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)
  47. elseif choice == 3 then
  48. 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)
  49. elseif choice == 4 then
  50. 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)
  51. end
  52. end--]]
  53. end
  54. end
  55. function QuestStart(NPC, Spawn, conversation)
  56. FaceTarget(NPC, Spawn)
  57. Dialog.New(NPC, Spawn)
  58. 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!")
  59. Dialog.AddVoiceover("voiceover/english/bartender_bulurg/qey_village04/bartenderbulurg000.mp3", 1246934802, 3942849521)
  60. if not HasQuest (Spawn, Water) and not HasCompletedQuest(Spawn, Water) then
  61. Dialog.AddOption( "Have anything... less swampy?", "Swampy")
  62. Dialog.AddOption( "Do the locals drink your bog spirits?", "Swampy")
  63. end
  64. if HasQuest (Spawn, Water) and GetQuestStep(Spawn, Water) == 2 then
  65. Dialog.AddOption("Here is a full jug of water from the Oakmyst falls.", "FullJug")
  66. end
  67. if HasQuest (Spawn, FarSea372) and GetQuestStep(Spawn, FarSea372) == 4 or HasQuest(Spawn,FarSea436) and GetQuestStep(Spawn,FarSea436) == 4 then
  68. Dialog.AddOption("I've completed a Far Seas requisition for you.", "CompleteFarSea")
  69. end
  70. Dialog.AddOption("I'm good for now, thanks.")
  71. Dialog.Start()
  72. end
  73. function Swampy(NPC, Spawn)
  74. FaceTarget(NPC, Spawn)
  75. Dialog.New(NPC, Spawn)
  76. 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.")
  77. Dialog.AddVoiceover("voiceover/english/bartender_bulurg/qey_village04/bartenderbulurg001.mp3",3151049449,2885168239)
  78. PlayFlavor(NPC, "", "", "ponder", 0,0 , Spawn)
  79. Dialog.AddOption("I could fetch some water for you.", "TakeJug")
  80. Dialog.AddOption("Unfortunately, I don't have time to help.")
  81. Dialog.Start()
  82. end
  83. function FullJug(NPC, Spawn)
  84. SetStepComplete(Spawn, Water, 2)
  85. FaceTarget(NPC, Spawn)
  86. Dialog.New(NPC, Spawn)
  87. 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.")
  88. Dialog.AddVoiceover("voiceover/english/bartender_bulurg/qey_village04/bartenderbulurg003.mp3",2084504638, 1586575604)
  89. PlayFlavor(NPC, "", "", "happy", 0,0 , Spawn)
  90. Dialog.AddOption("Glad I could help.")
  91. Dialog.Start()
  92. end
  93. function TakeJug (NPC, Spawn)
  94. FaceTarget(NPC, Spawn)
  95. OfferQuest(NPC, Spawn, Water)
  96. end
  97. function CompleteFarSea(NPC, Spawn)
  98. if HasQuest (Spawn, FarSea372) and GetQuestStep(Spawn, FarSea372) == 4 then
  99. SetStepComplete(Spawn, FarSea372, 4)
  100. end
  101. if HasQuest (Spawn, FarSea436) and GetQuestStep(Spawn, FarSea436) == 4 then
  102. SetStepComplete(Spawn, FarSea436, 4)
  103. end
  104. FaceTarget(NPC, Spawn)
  105. Dialog.New(NPC, Spawn)
  106. Dialog.AddDialog("I bet you have some stories, eh? Adventuring must be an exciting life!")
  107. Dialog.AddVoiceover("voiceover/english/froglok_eco_good_1/ft/service/bartender/froglok_bartender_service_good_1_hail_gf_ce733912.mp3",1840731743,2065794369)
  108. PlayFlavor(NPC, "", "", "thank", 0,0 , Spawn)
  109. Dialog.AddOption("Thanks for the coin!")
  110. Dialog.AddOption("More than I'd like to admit. Thanks.")
  111. Dialog.Start()
  112. end