BarmaidLollaCotgrove.lua 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/BarmaidLollaCotgrove.lua
  3. Script Purpose : Barmaid Lolla Cotgrove <Provisioner>
  4. Script Author : Dorbin
  5. Script Date : 2022.01.21
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Delivery = 5446
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 12, "InRange", "LeaveRange")
  12. ProvidesQuest(NPC, Delivery)
  13. waypoints(NPC)
  14. end
  15. function InRange(NPC, Spawn) --Quest Callout
  16. if GetFactionAmount(Spawn,11)<0 then
  17. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. else
  20. if math.random(1, 100) <= 85 then
  21. if not HasCompletedQuest (Spawn, Delivery) and not HasQuest (Spawn, Delivery) then
  22. FaceTarget(NPC, Spawn)
  23. choice = math.random(1,3)
  24. if choice ==1 then
  25. PlayFlavor(NPC, "voiceover/english/barmaid_lolla_cotgrove/qey_village01/qey_village01_barmaid_lolla_cotgrove_callout_a2de4d52.mp3", "...and that will go over here and the kegs go there... Yeah. Yeah. Yeah. What do you need?", "point", 2609682603, 931995827, Spawn)
  26. elseif choice ==2 then
  27. PlayFlavor(NPC, "voiceover/english/barmaid_lolla_cotgrove/qey_village01/qey_village01_barmaid_lolla_cotgrove_multhail1_ec6e0398.mp3", "Can't you see I'm busy? I've no time for small talk!", "no", 370156187, 590443744, Spawn)
  28. elseif choice ==3 then
  29. PlayFlavor(NPC, "voiceover/english/barmaid_lolla_cotgrove/qey_village01/qey_village01_barmaid_lolla_cotgrove_multhail2_81a9cfd7.mp3", "I'm very busy organizing the tavern, but could use your help.", "", 986260554, 42964603, Spawn)
  30. end
  31. else
  32. choice = math.random(1,2)
  33. if choice ==1 then
  34. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  35. else
  36. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  37. end
  38. end
  39. end
  40. end
  41. end
  42. function waypoints(NPC)
  43. MovementLoopAddLocation(NPC, 673.24, -24.7, 365.85, 2, 1)
  44. MovementLoopAddLocation(NPC, 673.24, -24.7, 365.85, 2, 18,"Action")
  45. MovementLoopAddLocation(NPC, 673.24, -24.7, 365.85, 2, 18,"Action")
  46. MovementLoopAddLocation(NPC, 672.02, -24.67, 366.48, 2, 0)
  47. MovementLoopAddLocation(NPC, 674.01, -24.73, 363.75, 2, 0)
  48. MovementLoopAddLocation(NPC, 676.9, -24.82, 363.13, 2, 1)
  49. MovementLoopAddLocation(NPC, 676.9, -24.82, 363.13, 2, 18,"Action")
  50. MovementLoopAddLocation(NPC, 676.9, -24.82, 363.13, 2, 18,"Action")
  51. MovementLoopAddLocation(NPC, 677.91, -24.83, 362.92, 2, 0)
  52. MovementLoopAddLocation(NPC, 674.72, -24.75, 363.89, 2, 0)
  53. end
  54. function respawn(NPC)
  55. spawn(NPC)
  56. end
  57. function hailed(NPC, Spawn)
  58. if GetFactionAmount(Spawn,11)<0 then
  59. FaceTarget(NPC, Spawn)
  60. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  61. else
  62. if HasCompletedQuest (Spawn, Delivery) then
  63. FaceTarget(NPC, Spawn)
  64. PlayFlavor(NPC, "voiceover/english/barmaid_lolla_cotgrove/qey_village01/qey_village01_barmaid_lolla_cotgrove_multhail3_8addc849.mp3", "Ah, you don't know how much this means to me. Thank you for getting me those kegs.", "nod", 452140070, 1937005581, Spawn)
  65. else
  66. FaceTarget(NPC, Spawn)
  67. Dialog.New(NPC, Spawn)
  68. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  69. Dialog.AddDialog("Yeah yeah, I'll get to you in a minute")
  70. Dialog.AddVoiceover("voiceover/english/lolla_cotgrove/qey_village01/lollacotgrove000.mp3", 1360234697, 1758143417)
  71. if not HasCompletedQuest (Spawn, Delivery) and not HasQuest (Spawn, Delivery) then
  72. Dialog.AddOption("You seem to have your hands full. Need any help?", "Helping")
  73. end
  74. if GetQuestStep (Spawn, Delivery)==2 then
  75. Dialog.AddOption("Your keg order should be on schedule.","Delivered")
  76. end
  77. if HasQuest (Spawn, Delivery) then
  78. Dialog.AddOption("I'm still checking on your keg order.")
  79. end
  80. Dialog.AddOption("Sorry, I'll get out of your way.")
  81. Dialog.Start()
  82. end
  83. end
  84. end
  85. function Helping(NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. Dialog.New(NPC, Spawn)
  88. Dialog.AddDialog("I apologize for my rude behaviour, friend. I'm wound up tighter than an ogre's bootstraps because the tavern isn't built yet! Until construction is complete, I'm stuck outside. S-say, would you help me? I need to check on a order I placed for some special gnome kegs.")
  89. Dialog.AddVoiceover("voiceover/english/lolla_cotgrove/qey_village01/lollacotgrove001.mp3", 1554521756, 1693439173)
  90. Dialog.AddOption("I'm guessing a gnome has the order?", "Helping2")
  91. Dialog.AddOption("Sorry, I can't help right now.")
  92. Dialog.Start()
  93. end
  94. function Helping2(NPC, Spawn)
  95. FaceTarget(NPC, Spawn)
  96. Dialog.New(NPC, Spawn)
  97. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  98. Dialog.AddDialog("Ah, that is correct! Zipiff Clamorclang is working on the kegs. Please find him and see how his tinkering is going.")
  99. Dialog.AddVoiceover("voiceover/english/lolla_cotgrove/qey_village01/lollacotgrove002.mp3", 3379420617, 1543278520)
  100. Dialog.AddOption("I would be happy to go check on your order.", "QuestBegin")
  101. Dialog.AddOption("Sorry, I can't help right now.")
  102. Dialog.Start()
  103. end
  104. function QuestBegin (NPC, Spawn)
  105. FaceTarget(NPC, Spawn)
  106. OfferQuest(NPC, Spawn, Delivery)
  107. end
  108. function Delivered(NPC, Spawn)
  109. FaceTarget(NPC, Spawn)
  110. Dialog.New(NPC, Spawn)
  111. SetStepComplete(Spawn, Delivery, 2)
  112. PlayFlavor(NPC, "", "", "happy", 0, 0, Spawn)
  113. Dialog.AddDialog("Oh! That's excellent news, and a load off my mind- Oh, please take this coin for your troubles.")
  114. Dialog.AddVoiceover("voiceover/english/lolla_cotgrove/qey_village01/lollacotgrove003.mp3", 180239321, 1024907724)
  115. Dialog.AddOption("Glad I could help!")
  116. Dialog.AddOption("I'm looking forward to seeing your tavern. Take care.")
  117. Dialog.Start()
  118. end
  119. function Action(NPC)
  120. local choice = MakeRandomInt(1, 3)
  121. if choice == 1 then
  122. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  123. elseif choice == 2 then
  124. PlayFlavor(NPC, "", "", "confused", 0, 0, Spawn)
  125. elseif choice == 3 then
  126. PlayFlavor(NPC, "", "", "doh", 0, 0, Spawn)
  127. end
  128. end