9
3

AerisLightwind.lua 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. --[[
  2. Script Name : SpawnScripts/QeynosHarbor/AerisLightwind.lua
  3. Script Purpose : Aeris Lightwind <Provisioner>
  4. Script Author : Dorbin
  5. Script Date : 2022.05.25
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local fishy = 5564
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. if GetFactionAmount(Spawn,11) <0 then
  18. choice = math.random(1,2)
  19. FaceTarget(NPC, Spawn)
  20. if choice == 1 then
  21. PlayFlavor(NPC, "", "", "shakefist", 2088886924, 3736631596, Spawn)
  22. elseif choice == 2 then
  23. PlayFlavor(NPC, "", "", "heckno", 1584866727, 581589457, Spawn)
  24. end
  25. else
  26. if math.random(1,100)<60 then
  27. choice = math.random(1,2)
  28. FaceTarget(NPC, Spawn)
  29. if choice == 1 then
  30. PlayFlavor(NPC, "", "", "wave", 2088886924, 3736631596, Spawn)
  31. elseif choice == 2 then
  32. PlayFlavor(NPC, "", "", "hello", 1584866727, 581589457, Spawn)
  33. end
  34. end
  35. end
  36. end
  37. function LeaveRange(NPC, Spawn)
  38. end
  39. function hailed(NPC, Spawn)
  40. if GetFactionAmount(Spawn,11) <0 then
  41. choice = math.random(1,2)
  42. if choice == 1 then
  43. PlayFlavor(NPC, "", "", "shakefist", 2088886924, 3736631596, Spawn)
  44. elseif choice == 2 then
  45. PlayFlavor(NPC, "", "", "heckno", 1584866727, 581589457, Spawn)
  46. end
  47. else
  48. Dialog1(NPC, Spawn)
  49. end
  50. end
  51. function Dialog1(NPC, Spawn)
  52. FaceTarget(NPC, Spawn)
  53. Dialog.New(NPC, Spawn)
  54. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  55. Dialog.AddDialog("Look around! Freshest catch on the docks.")
  56. Dialog.AddVoiceover("voiceover/english/merchant_aeris_lightwind/qey_harbor/aerislightwind000.mp3", 2050407066, 4101070387)
  57. if not QuestStepIsComplete(Spawn,fishy,2) and HasQuest(Spawn,fishy) then
  58. Dialog.AddOption("Galsway is looking for the best price for fish on the market. Might you have a deal for him?","FishQuestion")
  59. end
  60. Dialog.AddOption("Not right now, thanks.")
  61. Dialog.Start()
  62. end
  63. function FishQuestion(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. conversation = CreateConversation()
  66. PlayFlavor(NPC, "voiceover/english/merchant_umli_grayfist/qey_harbor/umligrayfist001.mp3", "", "ponder", 4032126743, 224777324, Spawn)
  67. AddConversationOption(conversation, "Fair enough. I'll let him know about your offer. Thanks!", "ThankYou")
  68. StartConversation(conversation, NPC, Spawn, "My best price, eh? So the old grubber is shopping for a deal. Hmm, he does run a big place... and I really need to sell this stock! Okay, you tell Galsway I'll give him a five percent break- but the deal's off if he tells anyone how generous I am!")
  69. end
  70. function FishQuestion(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. Dialog.New(NPC, Spawn)
  73. PlayFlavor(NPC, "", "", "scold", 0, 0, Spawn)
  74. Dialog.AddDialog("I sell the ocean's finest, and at reasonable prices I might add! If Galsway wants cheaper fish then he should try another merchant.")
  75. Dialog.AddVoiceover("voiceover/english/merchant_aeris_lightwind/qey_harbor/aerislightwind001.mp3", 2174225040, 2177070403)
  76. Dialog.AddOption("Alright then! I'll just ... be going.","FishDone")
  77. Dialog.AddOption("Noted. I'll be sure he knows.","FishDone")
  78. Dialog.Start()
  79. end
  80. function FishDone(NPC,Spawn)
  81. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  82. FaceTarget(NPC, Spawn)
  83. SetStepComplete(Spawn,fishy, 2)
  84. end