LozoriaShinkicker.lua 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. --[[
  2. Script Name : SpawnScripts/TheBaubbleshire/LozoriaShinkicker.lua
  3. Script Purpose : Lozoria Shinkicker
  4. Script Author : Dorbin
  5. Script Date : 2022.01.08
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. Notes : Updated using dialog module & added callout. 2022.08.20 Dorbin
  8. --]]
  9. require "SpawnScripts/Generic/DialogModule"
  10. local PieThief = 5437
  11. local OroRoots = 5438
  12. function spawn(NPC)
  13. SetPlayerProximityFunction(NPC, 4, "InRange", "LeaveRange")
  14. ProvidesQuest(NPC, OroRoots)
  15. SetInfoStructString(NPC, "action_state", "drinking_idle")
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function InRange(NPC, Spawn)
  21. if not HasQuest(Spawn, OroRoots) and not HasCompletedQuest(Spawn, OroRoots)then
  22. FaceTarget(NPC, Spawn)
  23. local choice = MakeRandomInt(1,3)
  24. if choice == 1 then
  25. PlayFlavor(NPC, "voiceover/english/lozoria_shinkicker/qey_village06/100_lozoria_shinkicker_lozoria_first_a433e906.mp3", "Ahh, there's nothing like a nice pint to tide you over till the next one! Greetings, traveler! Won't you join me for an ale?", "", 908545867, 693626511, Spawn)
  26. elseif choice == 2 then
  27. PlayFlavor(NPC, "voiceover/english/lozoria_shinkicker/qey_village06/100_lozoria_shinkicker_multhail2_c18b6ff4.mp3", "Bring me another pint, Bregun! Mine's almost empty! What brings you into my papa's fine establishment, friend?", "", 1585254591, 550642986, Spawn)
  28. elseif choice == 3 then
  29. PlayFlavor(NPC, "voiceover/english/lozoria_shinkicker/qey_village06/100_lozoria_shinkicker_callout_7d9f1c7c.mp3", "Ahh ... nothing like a pint to tide you over till the next one. Greetings, traveler! Won't you join me for an ale?", "", 2310344859, 4256384860, Spawn)
  30. end
  31. end
  32. end
  33. function LeaveRange(NPC, Spawn)
  34. end
  35. function hailed(NPC, Spawn)
  36. if GetFactionAmount(Spawn,11)<0 then
  37. PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn)
  38. else
  39. FaceTarget(NPC, Spawn)
  40. Dialog.New(NPC, Spawn)
  41. if CanReceiveQuest(Spawn,OroRoots) then
  42. Dialog.AddDialog("Bring me another pint, Bregun! Mine's almost empty! Well, hello there! What brings you into my Papa's fine establishment?")
  43. Dialog.AddVoiceover("voiceover/english/lozoria_shinkicker/qey_village06/lozoriashinkicker000.mp3", 1408955306, 2441116246)
  44. -- Dialog.AddRequirement(REQ_QUEST_DOESNT_HAVE_QUEST, OroRoots)
  45. elseif HasQuest(Spawn,OroRoots) then
  46. Dialog.AddDialog("Well hello, friend. I do hate rushin' ya, but I must have that oro root! Bregun's itchin' to make the next batch of brew!")
  47. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_1_1006.mp3", 0, 0)
  48. -- Dialog.AddRequirement(REQ_QUEST_HAS_QUEST, OroRoots)
  49. else
  50. Dialog.AddDialog("Bring me another pint, Bregun! Mine's almost empty! Well, hello there! What brings you into my Papa's fine establishment?")
  51. Dialog.AddVoiceover("voiceover/english/lozoria_shinkicker/qey_village06/lozoriashinkicker000.mp3", 1408955306, 2441116246)
  52. end
  53. Dialog.AddOption("I smell that pie! You were the one that took it from Nyla's window!", "Guilty")
  54. Dialog.AddOptionRequirement(REQ_QUEST_HAS_QUEST, PieThief)
  55. Dialog.AddOptionRequirement(REQ_QUEST_ON_STEP, PieThief ,4)
  56. if CanReceiveQuest(Spawn,OroRoots) then
  57. Dialog.AddOption("I'm actually looking for work. Have any jobs that need doing?", "OroStart")
  58. Dialog.AddOptionRequirement(REQ_QUEST_DOESNT_HAVE_QUEST, OroRoots)
  59. Dialog.AddOptionRequirement(REQ_QUEST_NOT_HAS_COMPLETED_QUEST, OroRoots)
  60. end
  61. Dialog.AddOption("I've found your Oro roots. Here you go.", "FoundRoots")
  62. Dialog.AddOptionRequirement(REQ_QUEST_ON_STEP, OroRoots , 2)
  63. Dialog.AddOption("I'm still gathering those roots for you.")
  64. Dialog.AddOptionRequirement(REQ_QUEST_HAS_QUEST, OroRoots)
  65. Dialog.AddOptionRequirement(REQ_QUEST_BEFORE_STEP, OroRoots, 2)
  66. Dialog.AddOption("Nothing right now. Enjoy your pint.")
  67. Dialog.Start()
  68. end
  69. end
  70. function OroStart(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. Dialog.New(NPC, Spawn)
  73. Dialog.AddDialog("Oh you are, are ya? Well I'll tell ya what - if ya do something for me, I'll get you a pint on the house and pay ya as well.")
  74. Dialog.AddVoiceover("voiceover/english/lozoria_shinkicker/qey_village06/lozoriashinkicker001.mp3", 297007289,1280253281)
  75. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  76. -- Dialog.AddEmote("ponder")
  77. Dialog.AddOption("I could go for a pint. What do you need?", "TheJob")
  78. Dialog.Start()
  79. end
  80. function TheJob(NPC, Spawn)
  81. FaceTarget(NPC, Spawn)
  82. Dialog.New(NPC, Spawn)
  83. Dialog.AddDialog("BREGUN! Fetch this one a pint! Now, let me tell you what I'd like ya to do. You know about the Oakmyst forest of course, everyone does. You see, ever since we halflings were removed from the vale, we've been unable to get a hold of any jum jum. Fortunately, the dryads make a halfway decent replacement.")
  84. Dialog.AddVoiceover("voiceover/english/lozoria_shinkicker/qey_village06/lozoriashinkicker002.mp3", 1470439081, 2268467194)
  85. PlayFlavor(NPC, "", "", "chuckle", 0, 0, Spawn)
  86. -- Dialog.AddEmote("chuckle")
  87. Dialog.AddOption("Get on with it. What's the job?", "TheJob2")
  88. Dialog.AddOption("That is quite a bit different! So, do you need me to look into that?", "patience")
  89. Dialog.Start()
  90. end
  91. function TheJob2(NPC, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. Dialog.New(NPC, Spawn)
  94. Dialog.AddDialog("Patience, patience! We do things slowly 'round here -- don't confuse us halflings with the gnomes! Now, where was I?")
  95. Dialog.AddVoiceover("voiceover/english/lozoria_shinkicker/qey_village06/lozoriashinkicker003.mp3", 3414180428, 3979244034)
  96. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  97. -- Dialog.AddEmote("no")
  98. Dialog.AddOption("Alright, well, what do you need?", "patience")
  99. Dialog.Start()
  100. end
  101. function patience(NPC, Spawn)
  102. FaceTarget(NPC, Spawn)
  103. Dialog.New(NPC, Spawn)
  104. Dialog.AddDialog("Oh yes! The dryads seeded the forest with a jum jum replacement. My pop calls it a darn poor substitution, but I think he's a wee bit bitter about the whole ordeal. At any rate, why don't you forage around and see if you can find any of the oro root they're growing? I could use some for the tavern's next batch. ")
  105. Dialog.AddVoiceover("voiceover/english/lozoria_shinkicker/qey_village06/lozoriashinkicker004.mp3", 2659331601, 3561367931)
  106. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  107. -- Dialog.AddEmote("nod")
  108. Dialog.AddOption("I'll go find your Oro roots. Save a drink for me!", "OfferQuest1")
  109. Dialog.Start()
  110. end
  111. function OfferQuest1(NPC, Spawn)
  112. FaceTarget(NPC, Spawn)
  113. OfferQuest(NPC, Spawn, OroRoots)
  114. end
  115. function Guilty(NPC, Spawn)
  116. FaceTarget(NPC, Spawn)
  117. Dialog.New(NPC, Spawn)
  118. Dialog.AddDialog("Good knows! You caught me! But the pie is gone. I just couldn't resist! She'll have to come by later for an ale on the house.")
  119. Dialog.AddVoiceover("voiceover/english/lozoria_shinkicker/qey_village06/lozoriashinkicker006.mp3", 171584737, 1896068208)
  120. PlayFlavor(NPC, "", "", "wince", 0, 0, Spawn)
  121. -- Dialog.AddEmote("wince")
  122. Dialog.AddOption("I'll have to let Nyla know. She may have a few words for you.", "UpdateThief")
  123. Dialog.Start()
  124. end
  125. function UpdateThief(NPC, Spawn)
  126. SetStepComplete(Spawn, PieThief, 4)
  127. end
  128. function FoundRoots (NPC, Spawn)
  129. SetStepComplete(Spawn, OroRoots, 2)
  130. FaceTarget(NPC, Spawn)
  131. Dialog.New(NPC, Spawn)
  132. Dialog.AddDialog("Fine indeed! I'll get Bregun working on this next batch. Here, let me pay you. I did say I would, didn't I? Thank goodness ol' Pelle was an adventurer and can afford to run this tavern at a loss! Oh Breeeee-gunnnnn... time for another pint!")
  133. Dialog.AddVoiceover("voiceover/english/lozoria_shinkicker/qey_village06/lozoriashinkicker005.mp3", 3396930954, 3615323112)
  134. PlayFlavor(NPC, "", "", "happy", 0, 0, Spawn)
  135. -- Dialog.AddEmote("happy")
  136. Dialog.AddOption("Good luck on the next batch.")
  137. Dialog.Start()
  138. end