KaldinDeeppockets.lua 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. --[[
  2. Script Name : SpawnScripts/TheBaubbleshire/KaldinDeeppockets.lua
  3. Script Purpose : Kaldin Deeppockets <General Goods>
  4. Script Author : Dorbin
  5. Script Date : 2022.01.09
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local Delivery = 5444
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  11. ProvidesQuest(NPC, Delivery)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function LeaveRange(NPC, Spawn)
  17. end
  18. function spawn(NPC)
  19. SetPlayerProximityFunction(NPC, 5, "InRange", "LeaveRange")
  20. ProvidesQuest(NPC, Delivery)
  21. end
  22. function InRange(NPC, Spawn) --Quest Callout Flavor
  23. if math.random(1, 100) <= 75 then
  24. if not HasCompletedQuest (Spawn, Delivery) and not HasQuest (Spawn, Delivery) then
  25. choice = math.random(1,2)
  26. if choice ==1 then
  27. PlayFlavor(NPC, "", "", "frustrated", 0, 0, Spawn)
  28. else
  29. PlayFlavor(NPC, "", "", "grumble", 0, 0, Spawn)
  30. end
  31. else
  32. FaceTarget(NPC, Spawn)
  33. if choice ==1 then
  34. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  35. else
  36. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  37. end
  38. end
  39. end
  40. end
  41. function hailed(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. if not HasCompletedQuest (Spawn, Delivery) and not HasQuest (Spawn, Delivery) then
  44. PlayFlavor(NPC, "voiceover/english/barkeep_kaldin_deeppockets/qey_village06/barkeepdeeppockets000.mp3", "", "frustrated", 107874926, 2254072034, Spawn)
  45. conversation = CreateConversation()
  46. AddConversationOption(conversation, "I'm actually looking for work.", "Job1")
  47. AddConversationOption(conversation, "Actually, I'll speak to Bregun about a drink. Thanks.")
  48. StartConversation(conversation, NPC, Spawn, "What's all this madness?! Are Deeppockets working for someone else? What's become of us!? Enough of my woes. What's your order? Be quick with it.")
  49. elseif not HasCompletedQuest (Spawn, Delivery) and HasQuest (Spawn, Delivery) then
  50. FaceTarget(NPC, Spawn)
  51. conversation = CreateConversation()
  52. if GetQuestStep (Spawn, Delivery) == 2 then
  53. AddConversationOption(conversation, "I delievered the lager to Coppershot. He wanted me to give you this old stein.", "Delivered")
  54. end
  55. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1006.mp3","","hello",0,0,Spawn)
  56. AddConversationOption(conversation, "I'm still heading to Graystone Yard. I'll be back.")
  57. StartConversation(conversation, NPC, Spawn, "Did Coppershot appreciate our latest batch?")
  58. else
  59. choice = math.random(1,4)
  60. if choice == 1 then
  61. PlayFlavor(NPC, "voiceover/english/barkeep_kaldin_deeppockets/qey_village06/100_barkeep_deeppockets_multhail1_b497dcb7.mp3", "My name is Deeppockets. Pleased to meet you, I am! Perhaps we'll talk again some day!", "", 3221951518, 4136363260, Spawn)
  62. -- PlayFlavor(NPC, "", "Might I interest you in some meat and cheese to go with that tall glass of ale?", "shrug", 1689589577, 4560189, Spawn)
  63. elseif choice == 2 then
  64. PlayFlavor(NPC, "voiceover/english/barkeep_kaldin_deeppockets/qey_village06/100_barkeep_deeppockets_multhail1_b497dcb7.mp3", "My name is Deeppockets. Pleased to meet you, I am! Perhaps we'll talk again some day!", "", 3221951518, 4136363260, Spawn)
  65. elseif choice == 3 then
  66. PlayFlavor(NPC, "voiceover/english/barkeep_kaldin_deeppockets/qey_village06/100_barkeep_deeppockets_callout_d2d77b95.mp3", "Come over and meet one of the most famous brewmasters in Qeynos!", "", 2446853968, 3962612908, Spawn)
  67. --PlayFlavor(NPC, "", "The best part about this job is all the extra coin I get.", "wink", 1689589577, 4560189, Spawn)
  68. elseif choice == 4 then
  69. PlayFlavor(NPC, "voiceover/english/barkeep_kaldin_deeppockets/qey_village06/100_barkeep_deeppockets_callout_d2d77b95.mp3", "Come over and meet one of the most famous brewmasters in Qeynos!", "", 2446853968, 3962612908, Spawn)
  70. end
  71. end
  72. function respawn(NPC)
  73. spawn(NPC)
  74. end
  75. function Job1(NPC, Spawn)
  76. PlayFlavor(NPC, "voiceover/english/barkeep_kaldin_deeppockets/qey_village06/barkeepdeeppockets001.mp3", "", "agree", 635967568, 2169058204, Spawn)
  77. conversation = CreateConversation()
  78. AddConversationOption(conversation, "I'll take any job you have.", "Job2")
  79. AddConversationOption(conversation, "Actually, I'll speak to Bregun about a drink. Thanks.")
  80. StartConversation(conversation, NPC, Spawn, "Its no shame to be out of work in these tough times. Keep your chin up, friend. In fact, if you're looking to make some coin, I could use your help right now!")
  81. end
  82. function Job2(NPC, Spawn)
  83. PlayFlavor(NPC, "voiceover/english/barkeep_kaldin_deeppockets/qey_village06/barkeepdeeppockets002.mp3", "", "happy", 273979806, 1884621205, Spawn)
  84. conversation = CreateConversation()
  85. AddConversationOption(conversation, "Sure, sounds like as good a job as any.", "QuestBegin")
  86. AddConversationOption(conversation, "Actually, I'll speak to Bregun about a drink. Thanks.")
  87. StartConversation(conversation, NPC, Spawn, "That's the spirit! See this jug of Lendel's Grand Lager? I need someone to deliever it to bartender Coppershot at the Frozen Tundra Tavern in Graystone Yard. Would you take it to him?")
  88. end
  89. function QuestBegin (NPC, Spawn)
  90. FaceTarget(NPC, Spawn)
  91. OfferQuest(NPC, Spawn, Delivery)
  92. end
  93. function Delivered(NPC, Spawn)
  94. PlayFlavor(NPC, "voiceover/english/barkeep_kaldin_deeppockets/qey_village06/barkeepdeeppockets003.mp3", "", "boggle", 1808434879, 1588622317, Spawn)
  95. conversation = CreateConversation()
  96. AddConversationOption(conversation, "Enjoy the stein! Glad I could help.", "Reward")
  97. StartConversation(conversation, NPC, Spawn, "A stein from the Fool's Gold Tavern?! This is rare, indeed! That ancient tavern disappeared long ago! Oh, this cheers my heart! Here, please accept this coin I promised to you.")
  98. end
  99. function Reward(NPC, Spawn)
  100. SetStepComplete(Spawn, Delivery, 2)
  101. end
  102. end