9
3

Flores.lua 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. --[[
  2. Script Name : SpawnScripts/Antonica/Flores.lua
  3. Script Purpose : Flores
  4. Script Author : Jabantiz, premierio015,Dorbin
  5. Script Date : 08/29/2019
  6. Script Notes : Updated Dialog Module - Dorbin 05/11/2023
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local DeliveriesForFlores = 5333 -- Deliveries For Flores Quest
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, DeliveriesForFlores)
  12. SetPlayerProximityFunction(NPC, 13, "InRange", "LeaveRange")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. if GetFactionAmount(Spawn,11)<0 then
  19. FaceTarget(NPC, Spawn)
  20. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  21. elseif CanReceiveQuest(Spawn,DeliveriesForFlores) then
  22. PlayFlavor(NPC, "", "", "wave", 0, 0, Spawn)
  23. FaceTarget(NPC, Spawn)
  24. end
  25. end
  26. function hailed(NPC, Spawn)
  27. FaceTarget(NPC, Spawn)
  28. Dialog.New(NPC, Spawn)
  29. Dialog.AddDialog("Step right up! My wares stand up to any found in the city! Made by the finest Qeynosian crafters, they are!")
  30. Dialog.AddVoiceover("voiceover/english/merchant_flores/antonica/merchantflores000.mp3", 149465216, 3128258097)
  31. PlayFlavor(NPC, "", "", "beckon", 0, 0, Spawn)
  32. if CanReceiveQuest(Spawn, DeliveriesForFlores) then
  33. Dialog.AddOption("I'm looking for work. Do you have any tasks that need done? ", "Option1")
  34. elseif GetQuestStep(Spawn, DeliveriesForFlores) == 3 then
  35. Dialog.AddOption("I'm back with the pouches.", "Option2")
  36. end
  37. Dialog.AddOption("I don't need anything right now, thanks.")
  38. Dialog.Start()
  39. end
  40. function Option1(NPC, Spawn)
  41. FaceTarget(NPC, Spawn)
  42. Dialog.New(NPC, Spawn)
  43. Dialog.AddDialog("I certainly do. I need to deliver supplies to a couple of my merchants out in the far reaches of Antonica. Business is so good right now that I hate to close up shop. How would you like to deliver their supplies?")
  44. Dialog.AddVoiceover("voiceover/english/merchant_flores/antonica/merchantflores001.mp3", 4230827236, 573418930)
  45. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  46. Dialog.AddOption("Does it pay well? Sounds like a pretty decent hike.", "offer")
  47. Dialog.AddOption("No thanks. The far reaches sounds further than I'm willing to go.")
  48. Dialog.Start()
  49. end
  50. function Option2(NPC, Spawn)
  51. FaceTarget(NPC, Spawn)
  52. Dialog.New(NPC, Spawn)
  53. Dialog.AddDialog("So you are! Well done. Let me take a look at those pouches, and I'll see how much I can afford to pay you.")
  54. Dialog.AddVoiceover("voiceover/english/merchant_flores/antonica/merchantflores003.mp3", 741997082, 1076579882)
  55. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  56. Dialog.AddOption("Here you are. ", "Option3")
  57. Dialog.Start()end
  58. function Option3(NPC, Spawn)
  59. SetStepComplete(Spawn, DeliveriesForFlores, 3)
  60. FaceTarget(NPC, Spawn)
  61. Dialog.New(NPC, Spawn)
  62. PlayFlavor(NPC, "", "", "thanks", 0, 0, Spawn)
  63. Dialog.AddDialog("Splendid! The merchants are doing very well. Here's your share. Now, why don't you use your reward to buy my fine merchandise?")
  64. Dialog.AddVoiceover("voiceover/english/merchant_flores/antonica/merchantflores004.mp3", 2648431364, 4291369549)
  65. Dialog.AddOption("Not at the moment thanks. Perhaps I'll return later to see if you need any further assistance. ")
  66. Dialog.Start()
  67. end
  68. function offer(NPC, Spawn)
  69. OfferQuest(NPC, Spawn, DeliveriesForFlores)
  70. end