9
3

BarmaidLollaCotgrove.lua 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. local Delivery = 5446
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  11. ProvidesQuest(NPC, Delivery)
  12. end
  13. function InRange(NPC, Spawn) --Quest Callout
  14. if math.random(1, 100) <= 30 then
  15. if not HasCompletedQuest (Spawn, Delivery) and not HasQuest (Spawn, Delivery) then
  16. 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)
  17. else
  18. choice = math.random(1,2)
  19. if choice ==1 then
  20. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  21. else
  22. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  23. end
  24. end
  25. end
  26. end
  27. function respawn(NPC)
  28. spawn(NPC)
  29. end
  30. function hailed(NPC, Spawn)
  31. FaceTarget(NPC, Spawn)
  32. if not HasCompletedQuest (Spawn, Delivery) and not HasQuest (Spawn, Delivery) then
  33. conversation = CreateConversation()
  34. PlayFlavor(NPC, "voiceover/english/barmaid_lolla_cotgrove/qey_village01/qey_village01_barmaid_lolla_cotgrove_multhail1_ec6e0398.mp3", "", "no", 370156187, 590443744, Spawn)
  35. AddConversationOption(conversation, "It appears you could use a hand. Need any help?", "Helping")
  36. AddConversationOption(conversation, "Sorry, I'll get out of your way.")
  37. StartConversation(conversation, NPC, Spawn, "Can't you see I'm busy? I've no time for small talk!")
  38. elseif not HasCompletedQuest (Spawn, Delivery) and HasQuest (Spawn, Delivery) then
  39. FaceTarget(NPC, Spawn)
  40. conversation = CreateConversation()
  41. if GetQuestStep (Spawn, Delivery) == 2 then
  42. FaceTarget(NPC, Spawn)
  43. AddConversationOption(conversation, "Your keg order should be on schedule.", "Delivered")
  44. end
  45. PlayFlavor(NPC, "voiceover/english/barmaid_lolla_cotgrove/qey_village01/qey_village01_barmaid_lolla_cotgrove_callout_a2de4d52.mp3", "", "ponder", 2609682603, 931995827, Spawn)
  46. AddConversationOption(conversation, "I'm still checking on your keg order.")
  47. StartConversation(conversation, NPC, Spawn, "...And that will go over here and the kegs go there... Yeah. Yeah. Yeah. What do you need?")
  48. else
  49. PlayFlavor(NPC, "voiceover/english/barmaid_lolla_cotgrove/qey_village01/qey_village01_barmaid_lolla_cotgrove_callout_a2de4d52.mp3", "", "hello", 2609682603, 931995827, Spawn)
  50. AddConversationOption(conversation, "Just saying hello and hope your tavern is coming along!")
  51. StartConversation(conversation, NPC, Spawn, "...And that will go over here and the kegs go there... Yeah. Yeah. Yeah. What do you need?")
  52. end
  53. function Helping(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. conversation = CreateConversation()
  56. AddConversationOption(conversation, "What is the job?", "Helping2")
  57. AddConversationOption(conversation, "A tavern? We don't need more of those here! Goodbye.")
  58. StartConversation(conversation, NPC, Spawn, "I'm very busy setting up a tavern, but I could use your help.")
  59. end
  60. function Helping2(NPC, Spawn)
  61. FaceTarget(NPC, Spawn)
  62. conversation = CreateConversation()
  63. AddConversationOption(conversation, "I'll go check on your kegs for you.", "QuestBegin")
  64. AddConversationOption(conversation, "On second thought, nevermind.")
  65. StartConversation(conversation, NPC, Spawn, "I placed an order of kegs that are cooled by some new gnomish invention. Zipiff Clamorclang in the Baubbleshire was working on them but I'm worried they won't be ready in time. I would check on the order myself but I'm just too busy here.")
  66. end
  67. function QuestBegin (NPC, Spawn)
  68. FaceTarget(NPC, Spawn)
  69. OfferQuest(NPC, Spawn, Delivery)
  70. end
  71. function Delivered(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. conversation = CreateConversation()
  74. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  75. AddConversationOption(conversation, "It was not a problem.", "Reward")
  76. StartConversation(conversation, NPC, Spawn, "Oh, you don't know how much this means to me. Thank you for getting me those kegs. Have one of my drinks on the house.")
  77. end
  78. function Reward(NPC, Spawn)
  79. SetStepComplete(Spawn, Delivery, 2)
  80. end
  81. end