9
3

BakerVoleen.lua 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. --[[
  2. Script Name : SpawnScripts/NorthQeynos/BakerVoleen.lua
  3. Script Purpose : Baker Voleen <Provisioner>
  4. Script Author : Dorbin
  5. Script Date : 2022.01.11
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Fhara = 5540
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 3, "InRange", "LeaveRange")
  12. ProvidesQuest(NPC,Fhara)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. if GetFactionAmount(Spawn,11)<0 then
  19. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/service/baker/halfling_baker_service_good_1_hail_gf_3d1ca473.mp3", "", "scold", 1646021457, 4149179615, Spawn)
  20. else
  21. if not HasQuest(Spawn,Fhara) and not HasCompletedQuest(Spawn,Fhara) then
  22. local choice = math.random(1,2)
  23. if math.random (1,100) <= 50 then
  24. FaceTarget(NPC, Spawn)
  25. if choice == 1 then
  26. PlayFlavor(NPC, "voiceover/english/baker_voleen/qey_north/100_merchant_voleen_baker_g4_multhail_f259c855.mp3", "Unless you want to buy a treat, be on your way, friend.", "", 403489438, 3022554581, Spawn)
  27. elseif choice == 2 then
  28. PlayFlavor(NPC, "voiceover/english/baker_voleen/qey_north/100_merchant_voleen_baker_g4_callout1_f0c00044.mp3", "Ahh, good day! The smell of freshly baked bread- is there anything like it? To be honest, it is why I got into this business in the first place. Take a look around! I'm sure you'll find a tasty treat that suits your fancy.", "happy", 730679601, 108591942, Spawn)
  29. end
  30. end
  31. else
  32. if math.random (1,100) <= 60 then
  33. FaceTarget(NPC, Spawn)
  34. local choice = math.random(1,4)
  35. if choice == 1 then
  36. PlayFlavor(NPC, "voiceover/english/baker_voleen/qey_north/100_merchant_voleen_baker_g4_multhail_f259c855.mp3", "Unless you want to buy a treat, be on your way, friend.", "", 403489438, 3022554581, Spawn)
  37. elseif choice == 2 then
  38. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/service/baker/halfling_baker_service_good_1_hail_gf_1e9a743c.mp3", "Please mind the plates, they're very hot.", "scold", 1075794847, 2019936086, Spawn)
  39. elseif choice == 3 then
  40. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/service/baker/halfling_baker_service_good_1_hail_gf_3d1ca473.mp3", "Tell me, do you prefer Halfling or Elven cuisine? I myself have a hard time deciding between the two.", "confused", 1646021457, 4149179615, Spawn)
  41. elseif choice == 4 then
  42. PlayFlavor(NPC, "voiceover/english/halfling_eco_good_1/ft/service/baker/halfling_baker_service_good_1_hail_gf_9db280de.mp3", "I love the smell of fresh bread in the oven!", "sigh", 1048257184, 2248522628, Spawn)
  43. elseif choice == 5 then
  44. PlayFlavor(NPC, "voiceover/english/baker_voleen/qey_north/100_merchant_voleen_baker_g4_callout1_f0c00044.mp3", "Ahh, good day! The smell of freshly baked bread- is there anything like it? To be honest, it is why I got into this business in the first place. Take a look around! I'm sure you'll find a tasty treat that suits your fancy.", "happy", 730679601, 108591942, Spawn)
  45. end
  46. end
  47. end
  48. end
  49. end
  50. function LeaveRange(NPC, Spawn)
  51. end
  52. function Dialog1(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. Dialog.New(NPC, Spawn)
  55. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  56. Dialog.AddDialog("I see you enjoying my pastries. Perhaps you can do me a small favor in exchange for a treat?")
  57. Dialog.AddVoiceover("voiceover/english/baker_voleen/qey_north/mer_bakervoleen.mp3", 1488479390, 237480726)
  58. if not HasQuest(Spawn,Fhara) and not HasCompletedQuest(Spawn,Fhara) then
  59. Dialog.AddOption("Sure, that sounds great. What can I help you with?","Dialog2")
  60. end
  61. if GetQuestStep(Spawn,Fhara)==2 then
  62. Dialog.AddOption("Fhara wanted to let you know that she loved the pastries!","Dialog3")
  63. end
  64. Dialog.AddOption("Sorry, just taking in the free smells.")
  65. Dialog.Start()
  66. end
  67. function hailed(NPC, Spawn)
  68. FaceTarget(NPC, Spawn)
  69. if GetFactionAmount(Spawn,11)<0 then
  70. PlayFlavor(NPC, "", "", "noway", 0, 0, Spawn)
  71. else
  72. Dialog1(NPC, Spawn)
  73. end
  74. end
  75. function Dialog2(NPC, Spawn)
  76. FaceTarget(NPC, Spawn)
  77. Dialog.New(NPC, Spawn)
  78. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  79. Dialog.AddDialog("How kind of you. I need someone to bring Fhara her morning order. If you have the time, I would appreciate you bringing it to her.")
  80. Dialog.AddVoiceover("voiceover/english/baker_voleen/qey_north/quests/bakervoleen/voleen_x1_initial.mp3", 4128977050, 2819913920)
  81. Dialog.AddOption("Sure, I'd be happy to!","Offer")
  82. Dialog.AddOption("Actually, I don't think I have the time. Sorry.")
  83. Dialog.Start()
  84. end
  85. function Offer(NPC, Spawn)
  86. OfferQuest(NPC,Spawn, Fhara)
  87. FaceTarget(NPC, Spawn)
  88. end
  89. function Dialog3(NPC, Spawn)
  90. FaceTarget(NPC, Spawn)
  91. Dialog.New(NPC, Spawn)
  92. PlayFlavor(NPC, "", "", "happy", 0, 0, Spawn)
  93. Dialog.AddDialog("I knew she would! For your troubles, please accept a few loaves of fresh baked bread.")
  94. Dialog.AddVoiceover("voiceover/english/baker_voleen/qey_north/quests/bakervoleen/voleen_x1_finish.mp3", 1749869048, 2865084547)
  95. Dialog.AddOption("Gladly!","Finish")
  96. Dialog.Start()
  97. end
  98. function Finish(NPC, Spawn)
  99. SetStepComplete(Spawn,Fhara, 2)
  100. FaceTarget(NPC, Spawn)
  101. end