9
3

Bulurg.lua 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. --dofile("SpawnScripts/Generic/GenericBartenderVoiceOvers.lua")
  10. local Water = 5456
  11. function spawn(NPC)
  12. ProvidesQuest(NPC,Water)
  13. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange (NPC,Spawn)
  19. if GetFactionAmount(Spawn,11) <0 then
  20. FactionChecking(NPC, Spawn, faction)
  21. else
  22. if math.random(1, 100) <= 70 then
  23. if not HasCompletedQuest(Spawn, Water) then
  24. 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)
  25. end
  26. else
  27. 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)
  28. end
  29. end
  30. end
  31. function hailed(NPC, Spawn)
  32. if GetFactionAmount(Spawn,11) <0 then
  33. FactionChecking(NPC, Spawn, faction)
  34. else
  35. if not HasCompletedQuest(Spawn, Water) then
  36. QuestStart(NPC, Spawn,conversation)
  37. else
  38. FaceTarget(NPC, Spawn)
  39. local choice = math.random(1,4)
  40. if choice == 1 then
  41. 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)
  42. elseif choice == 2 then
  43. 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)
  44. elseif choice == 3 then
  45. 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)
  46. elseif choice == 4 then
  47. 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)
  48. end
  49. end
  50. end
  51. end
  52. function QuestStart(NPC, Spawn, conversation)
  53. FaceTarget(NPC,Spawn)
  54. if not HasQuest (Spawn, Water) and not HasCompletedQuest(Spawn, Water) then
  55. conversation = CreateConversation()
  56. PlayFlavor(NPC, "voiceover/english/bartender_bulurg/qey_village04/bartenderbulurg000.mp3", "", "hello", 1246934802, 3942849521, Spawn)
  57. AddConversationOption(conversation, "Have anything... less swampy?", "Swampy")
  58. AddConversationOption(conversation, "Do you think elves enjoy swamp water?", "Swampy")
  59. AddConversationOption(conversation, "I'm good for now, thanks.")
  60. StartConversation(conversation, NPC, Spawn, "Good to see you found my Hole-in-the-Wall Tavern! Taste my brews made with real swamp water, now with more flies!")
  61. elseif HasQuest (Spawn, Water) then
  62. conversation = CreateConversation()
  63. if GetQuestStep(Spawn, Water) == 2 then
  64. AddConversationOption(conversation, "Here is a full jug of water from Oakmyst falls.", "FullJug")
  65. end
  66. AddConversationOption(conversation, "I'm still looking.")
  67. StartConversation(conversation, NPC, Spawn, "How goes searching for that water? The elves keep their nose too high amongst my normal libations.")
  68. end
  69. end
  70. function Swampy(NPC, Spawn)
  71. FaceTarget(NPC,Spawn)
  72. conversation = CreateConversation()
  73. PlayFlavor(NPC, "voiceover/english/bartender_bulurg/qey_village04/bartenderbulurg001.mp3", "", "ponder", 3151049449,2885168239, Spawn)
  74. AddConversationOption(conversation, "I could fetch some water for you.", "GetWater")
  75. AddConversationOption(conversation, "Unfortunately, I don't have time to help.")
  76. StartConversation(conversation, NPC, Spawn, "My fellow frogloks woulds't drink any other libation. Alas, I confess, the high elf pallet is most more finicky to such a natural intoxicant. I have been experimenting with a drink they perhaps prefer, but I need'st a jug of fall water for the first batch.")
  77. end
  78. function GetWater(NPC, Spawn)
  79. FaceTarget(NPC,Spawn)
  80. PlayFlavor(NPC, "voiceover/english/bartender_bulurg/qey_village04/bartenderbulurg002.mp3", "", "", 2371403827,3750341640, Spawn)
  81. conversation = CreateConversation()
  82. AddConversationOption(conversation, "Alright, I'll take the jug and head that way.", "TakeJug")
  83. AddConversationOption(conversation, "I prefer not to get wet. Sorry.")
  84. StartConversation(conversation, NPC, Spawn, "That would'st be most kind. Take this jug and then venture into the Oakmyst Forest. This is where thou will find a waterfall. Enter the waterfall and fill thyne jug with this fall water before touch'th the pond water.")
  85. end
  86. function FullJug(NPC, Spawn)
  87. FaceTarget(NPC,Spawn)
  88. conversation = CreateConversation()
  89. PlayFlavor(NPC, "voiceover/english/bartender_bulurg/qey_village04/bartenderbulurg003.mp3", "", "happy", 2084504638, 1586575604, Spawn)
  90. AddConversationOption(conversation, "Glad I could help.", "Reward")
  91. StartConversation(conversation, NPC, Spawn, "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.")
  92. end
  93. function TakeJug (NPC, Spawn)
  94. FaceTarget(NPC, Spawn)
  95. OfferQuest(NPC, Spawn, Water)
  96. end
  97. function Reward(NPC, Spawn)
  98. SetStepComplete(Spawn, Water, 2)
  99. end