TapsterBregun.lua 4.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. --[[
  2. Script Name : SpawnScripts/TheBaubbleshire/TapsterBregun.lua
  3. Script Purpose : Tapster Bregun <Bartender>
  4. Script Author : Dorbin
  5. Script Date : 2022.01.09
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local YolaPicnic = 5442
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 5, "InRange", "LeaveRange")
  11. ProvidesQuest(NPC, YolaPicnic)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. if not HasCompletedQuest(Spawn, YolaPicnic) and not HasQuest(Spawn, YolaPicnic) then
  18. PlayFlavor(NPC, "voiceover/english/tapster_bregun/qey_village06/100_tapster_bregun_multhail2_ccbdd67e.mp3", "Welcome to the Deepmug Tavern! I'm Bregun. Talk to me if you wanna lift a pint! Now, what are ya drinkin'?", "beckon", 2461588719, 573667497, Spawn)
  19. else
  20. PlayFlavor(NPC, "voiceover/english/tapster_bregun/qey_village06/100_tapster_bregun_bregun_first_1ee27a85.mp3", "Greetings, traveler. Is there something I can get ya today?", "hello", 3137139088, 2537693501, Spawn)
  21. end
  22. end
  23. function LeaveRange(NPC, Spawn)
  24. end
  25. function hailed(NPC, Spawn)
  26. FaceTarget(NPC, Spawn)
  27. if not HasCompletedQuest(Spawn, YolaPicnic) and not HasQuest(Spawn, YolaPicnic) then
  28. PlayFlavor(NPC, "voiceover/english/tapster_bregun/qey_village06/tapsterbregun000.mp3", "", "hello", 3026913164, 1235641856, Spawn)
  29. conversation = CreateConversation()
  30. AddConversationOption(conversation, "I'm looking for work.", "DoorDash")
  31. StartConversation(conversation, NPC, Spawn, "Greetings, traveler. Is there something I can get ya today?")
  32. elseif HasQuest(Spawn, YolaPicnic) then
  33. FaceTarget(NPC, Spawn)
  34. conversation = CreateConversation()
  35. if GetQuestStep(Spawn, YolaPicnic) == 2 then
  36. AddConversationOption(conversation, "I've delievered the picnic basket to Yola.", "DoorDashDone")
  37. end
  38. AddConversationOption(conversation, "Working on it!")
  39. StartConversation(conversation, NPC, Spawn, "Did you make that delievery yet?")
  40. else
  41. local choice = math.random(1,5)
  42. if choice == 1 then
  43. PlayFlavor(NPC, "", "Might I interest you in some meat and cheese to go with that tall glass of ale?", "shrug", 1689589577, 4560189, Spawn)
  44. elseif choice == 2 then
  45. PlayFlavor(NPC, "", "The best part about this job is all the extra coin I get.", "wink", 1689589577, 4560189, Spawn)
  46. elseif choice == 3 then
  47. PlayFlavor(NPC, "voiceover/english/tapster_bregun/qey_village06/100_tapster_bregun_multhail2_ccbdd67e.mp3", "Welcome to the Deepmug Tavern! I'm Bregun. Talk to me if you wanna lift a pint! Now, what are ya drinkin'?", "", 2461588719, 573667497, Spawn)
  48. elseif choice == 4 then
  49. PlayFlavor(NPC, "voiceover/english/tapster_bregun/qey_village06/100_tapster_bregun_bregun_first_1ee27a85.mp3", "Greetings, traveler. Is there something I can get ya today?", "hello", 3137139088, 2537693501, Spawn)
  50. elseif choice == 5 then
  51. PlayFlavor(NPC, "", "What can I get for ya?", "nod", 1689589577, 4560189, Spawn)
  52. end
  53. end
  54. function DoorDash(NPC, Spawn)
  55. conversation = CreateConversation()
  56. PlayFlavor(NPC, "voiceover/english/tapster_bregun/qey_village06/tapsterbregun001.mp3", "", "", 1259014993, 3905164382, Spawn)
  57. AddConversationOption(conversation, "Delievered where?", "DoorDash2")
  58. StartConversation(conversation, NPC, Spawn, "Is that so... Well then why don't you do me a favor. Those look like some nimble feet you got. You can deliever a basket of food for me.")
  59. end
  60. function DoorDash2(NPC, Spawn)
  61. conversation = CreateConversation()
  62. PlayFlavor(NPC,"voiceover/english/tapster_bregun/qey_village06/tapsterbregun002.mp3","","chuckle",895648320,2977770410,Spawn)
  63. AddConversationOption(conversation, "I can take Yola's order to her.", "DoorDashQuest")
  64. StartConversation(conversation, NPC, Spawn, "I've prepared a picnic basket for Yola, and I need it delieverd to her at the little lake. You'll find her at the lunch spot. I'll spot you a few coin if you're quick on your toes.")
  65. end
  66. function DoorDashQuest (NPC, Spawn)
  67. FaceTarget(NPC, Spawn)
  68. OfferQuest(NPC, Spawn, YolaPicnic)
  69. end
  70. function DoorDashDone(NPC, Spawn)
  71. conversation = CreateConversation()
  72. PlayFlavor(NPC,"voiceover/english/tapster_bregun/qey_village06/tapsterbregun003.mp3","","thank",1121129450,2689540838,Spawn)
  73. AddConversationOption(conversation, "Thanks, Bregun", "QuestComplete")
  74. StartConversation(conversation, NPC, Spawn, "Well, so ya have. I hope she enjoys her lunch. I gave her my best breads and cheeses! Ooooh makes me hungry just thinking about it! Ha! Oh, as promised, here's your coin.")
  75. end
  76. function QuestComplete(NPC, Spawn)
  77. SetStepComplete(Spawn, YolaPicnic, 2)
  78. end
  79. end