Bermo.lua 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/Bermo.lua
  3. Script Purpose : Bermo <Bartender>
  4. Script Author : John Adams
  5. Script Date : 2008.09.23
  6. Script Notes : Restructed entire script using new format - Dorbin 06.26.2022
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. -- Quest ID's
  10. local GATHERING_GLOWMYST = 244 -- was 36
  11. local BlackburrowStout = 5594
  12. function spawn(NPC)
  13. ProvidesQuest(NPC, GATHERING_GLOWMYST)
  14. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function targeted(NPC, Spawn)
  20. hailed(NPC, Spawn)
  21. end
  22. function InRange(NPC, Spawn)
  23. if GetFactionAmount(Spawn,11)<0 then
  24. FaceTarget(NPC, Spawn)
  25. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  26. else
  27. if HasCompletedQuest(Spawn,GATHERING_GLOWMYST)then
  28. local chance = math.random(0, 100)
  29. if chance <= 70 then
  30. FaceTarget(NPC, Spawn)
  31. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn, 0)
  32. end
  33. elseif not HasQuest(Spawn, GATHERING_GLOWMYST) and not HasCompletedQuest(Spawn,GATHERING_GLOWMYST)then
  34. local chance = math.random(0, 100)
  35. if chance <= 80 then
  36. local choice = math.random(1,2)
  37. if choice == 1 then
  38. FaceTarget(NPC, Spawn)
  39. PlayFlavor(NPC, "voiceover/english/bartender_bermo/qey_village02/100_bartender_bermo_callout_2f0743af.mp3", "Now, how can I get enough Glowmyst for tonight? I just can't run out! Y-you there! Perhaps you'd get me some of my patented Glowmyst?", "ponder", 552829775, 1518682030, Spawn)
  40. elseif choice == 2 then
  41. PlayFlavor(NPC, "voiceover/english/bartender_bermo/qey_village02/100_bartender_bermo_multhail4_bd869670.mp3", "I must have my Glowmyst! My customers won't settle for anything other than that glowing concoction!", "agree", 2103292434, 2123107577, Spawn)
  42. end
  43. end
  44. end
  45. end
  46. end
  47. ---------------------------------------------------------------------------------------------------------------------
  48. -- QUEST 1
  49. ---------------------------------------------------------------------------------------------------------------------
  50. function OfferQuest1(NPC, Spawn)
  51. OfferQuest(NPC, Spawn, GATHERING_GLOWMYST)
  52. end
  53. function hailed(NPC, Spawn)
  54. if GetFactionAmount(Spawn,11)<0 then
  55. PlayFlavor(NPC,"","","heckno",0,0,Spawn)
  56. else
  57. FaceTarget(NPC, Spawn)
  58. Dialog.New(NPC, Spawn)
  59. PlayFlavor(NPC,"","","hello",0,0,Spawn)
  60. Dialog.AddDialog("All manner of fermented beverages available here, all with my special Glowmyst juice added!")
  61. Dialog.AddVoiceover("voiceover/english/bartender_bermo/qey_village02/bartenderbermo.mp3", 861640330, 2606733244)
  62. if GetQuestStep(Spawn,GATHERING_GLOWMYST)==2 then
  63. Dialog.AddOption("I've brought back the glowmyst juice you needed!", "Turnin")
  64. end
  65. if not HasQuest(Spawn, GATHERING_GLOWMYST) and not HasCompletedQuest(Spawn,GATHERING_GLOWMYST)then
  66. Dialog.AddOption("Glowmyst juice? What's that? ", "Dialog2")
  67. end
  68. if GetQuestStep(Spawn,BlackburrowStout)==1 then
  69. Dialog.AddOption("I found this barrel in Nettleville's back alleys. It has some gnollish on it, but it mentions Starcrest. Do you know anything about this?", "Dialog5")
  70. end
  71. Dialog.AddOption("No thanks.")
  72. Dialog.Start()
  73. end
  74. end
  75. function Dialog2(NPC, Spawn)
  76. FaceTarget(NPC, Spawn)
  77. Dialog.New(NPC, Spawn)
  78. PlayFlavor(NPC,"","","nod",0,0,Spawn)
  79. Dialog.AddDialog("It's a special juice I squeeze from the glowmyst beetles and I'm running short on the stuff; my customers love it. Hey, you're a stout one, would you mind squeezing me some?")
  80. Dialog.AddVoiceover("voiceover/english/bartender_bermo/qey_village02/bartenderbermo000.mp3", 2271463066, 2768575441)
  81. Dialog.AddOption("Sure, why not?", "Dialog4")
  82. Dialog.AddOption("I don't think I'm cut out for that.")
  83. Dialog.Start()
  84. end
  85. function Dialog3(NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. Dialog.New(NPC, Spawn)
  88. Dialog.AddDialog("All manner of fermented beverages available here, all with my special Glowmyst juice added!")
  89. Dialog.AddVoiceover("voiceover/english/bartender_bermo/qey_village02/bartenderbermo.mp3", 861640330, 2606733244)
  90. Dialog.AddOption("Glowmyst juice? What's that? ", "Dialog2")
  91. Dialog.AddOption("No thanks.")
  92. Dialog.Start()
  93. end
  94. function Dialog4(NPC, Spawn)
  95. FaceTarget(NPC, Spawn)
  96. Dialog.New(NPC, Spawn)
  97. Dialog.AddDialog("You must go to the Oakymyst forest and harvest the beetles. I'll need at least a handful of the beetles -- their juice doesn't add to or take away from the flavor of my drinks, but it gives them a slight, radiant glow.")
  98. Dialog.AddVoiceover("voiceover/english/bartender_bermo/qey_village02/bartenderbermo001.mp3", 1349632986, 1200312116)
  99. Dialog.AddOption("I'll get you some.", "OfferQuest1")
  100. Dialog.Start()
  101. end
  102. function Turnin(NPC, Spawn)
  103. FaceTarget(NPC, Spawn)
  104. Dialog.New(NPC, Spawn)
  105. SetStepComplete(Spawn, GATHERING_GLOWMYST, 2)
  106. PlayFlavor(NPC,"","","smile",0,0,Spawn)
  107. Dialog.AddDialog("Great! This will last at least a week! If you wait just a minute...Ahh, here we are! Take some money for your troubles. I insist!")
  108. Dialog.AddVoiceover("voiceover/english/bartender_bermo/qey_village02/bartenderbermo002.mp3", 999124662, 431133752)
  109. Dialog.AddOption("Thanks Bermo!")
  110. Dialog.Start()
  111. end
  112. function Dialog5(NPC, Spawn) --MISSING ACTUAL DIALOG/VO
  113. FaceTarget(NPC, Spawn)
  114. Dialog.New(NPC, Spawn)
  115. PlayFlavor(NPC,"","","boggle",0,0,Spawn)
  116. Dialog.AddDialog("W-what?! Keep your voice down! I'd already chalked up that shipment as a loss and blamed those blasted gnolls for it... Tell you what. I'll take that off your hands and I'll give ya my own ring to keep this between us.")
  117. Dialog.AddVoiceover("voiceover/english/bartender_bermo/qey_village02/bartenderbermo003.mp3", 1349632986, 1200312116)
  118. Dialog.AddOption("That sounds fair enough.","Kegturnin")
  119. Dialog.Start()
  120. end
  121. function Kegturnin(NPC, Spawn)
  122. SetStepComplete(Spawn, BlackburrowStout, 1)
  123. PlayFlavor(NPC,"","","wink",0,0,Spawn)
  124. end