9
3

GilrielCypria.lua 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/GilrielCypria.lua
  3. Script Purpose : Gilriel Cypria
  4. Script Author : Dorbin
  5. Script Date : 2022.07.18
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. local TimeCheck = false -- used to delay between hail uses
  10. local CalloutTimeCheck = false -- used to delay between callout uses
  11. function spawn(NPC)
  12. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  13. end
  14. function InRange(NPC, Spawn)
  15. if GetFactionAmount(Spawn,12) <0 then
  16. FaceTarget(NPC, Spawn)
  17. FactionChecking(NPC, Spawn, faction)
  18. else
  19. if MakeRandomInt(1, 100) <= 50 and CalloutTimeCheck == false then
  20. CalloutTimeCheck = true
  21. FaceTarget(NPC, Spawn)
  22. AddTimer(NPC,25000,"ResetCalloutTimer")
  23. Talk(NPC, Spawn)
  24. end
  25. end
  26. end
  27. function ResetTimer(NPC) -- resets hail timer after initial use
  28. TimeCheck = false
  29. end
  30. function ResetCalloutTimer(NPC) -- resets callout timer after use
  31. CalloutTimeCheck = false
  32. end
  33. function respawn(NPC)
  34. spawn(NPC)
  35. end
  36. function hailed(NPC, Spawn)
  37. if GetFactionAmount(Spawn,12) <0 then
  38. FaceTarget(NPC, Spawn)
  39. FactionChecking(NPC, Spawn, faction)
  40. else
  41. if TimeCheck == false then -- checks timer
  42. TimeCheck = true -- turns on timer to stop player spamming
  43. AddTimer(NPC,2500,"ResetTimer")
  44. FaceTarget(NPC, Spawn)
  45. Talk(NPC, Spawn)
  46. end
  47. end
  48. end
  49. function Talk(NPC, Spawn)
  50. local FP_ScoutFaction = GetFactionAmount(Spawn, 103)
  51. if FP_ScoutFaction >=10000 then
  52. local choice = MakeRandomInt(1, 3) --Adds faction praise callout 33% of the time when applicable.
  53. else
  54. local choice = MakeRandomInt(1, 2)
  55. if choice == 1 then
  56. BasicTalk(NPC,Spawn)
  57. elseif choice == 2 then
  58. BasicTalk(NPC,Spawn)
  59. elseif choice == 3 then
  60. FactionTalk(NPC,Spawn)
  61. end
  62. end
  63. end
  64. function BasicTalk(NPC,Spawn)
  65. local choice = MakeRandomInt(1, 5)
  66. if choice == 1 then
  67. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_hail_gf_8d7c7902.mp3", "I'd rather be stranded overboard than be converted by the dark beliefs that Dismal Rage preaches.", "", 398195151, 3450382472, Spawn, 0)
  68. elseif choice == 2 then
  69. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_hail_gf_cf6319e5.mp3", "I don't trust the Freeport Militia. Neither should you, mate.", "", 841757214, 1711434021, Spawn, 0)
  70. elseif choice == 3 then
  71. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_hail_gf_a6172442.mp3", "You might as well hand your loot to the Coalition of Tradesfolke if you ever decide to work for them.", "", 3500427050, 3119081965, Spawn, 0)
  72. elseif choice == 4 then
  73. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_hail_gf_1606a6dc.mp3", "It's weak to rely on magic for everything. If ye have the same weakness, the Academy of Arcane Sciences is for you.", "", 582247664, 3802790481, Spawn, 0)
  74. elseif choice == 5 then
  75. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_hail_gf_b1479083.mp3", "The Seafury Buccaneers are feared by all others on the open sea. They show no mercy to the dogs that try to sail the sea unprotected.", "", 1087502675, 64319081, Spawn, 0)
  76. end
  77. end
  78. function FactionTalk(NPC,Spawn)
  79. local FP_ScoutFaction = GetFactionAmount(Spawn, 103)
  80. if FP_ScoutFaction >=40000 then
  81. FaceTarget(NPC, Spawn)
  82. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_40_gf_844f23c4.mp3", "You're no longer just a Seafury Buccaneer with us, matey. If port space weren't such a problem, we'd let you captain your own ship.", "", 2955148126, 830655827, Spawn)
  83. elseif FP_ScoutFaction >=30000 then
  84. FaceTarget(NPC, Spawn)
  85. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_30_gf_e6790307.mp3", "Avast ye! I just wanted to thank you for the plunder you bring to the Seafury Buccaneers.", "", 2403558940, 3041491321, Spawn)
  86. elseif FP_ScoutFaction >=20000 then
  87. FaceTarget(NPC, Spawn)
  88. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_20_gf_e6790307.mp3", "A landlubber be interested in working for the Seafury Buccaneers? I'm not saying it's impossible, but I'll keep steady eyes on you, mate.", "", 2403558940, 3041491321, Spawn)
  89. elseif FP_ScoutFaction >=10000 then
  90. FaceTarget(NPC, Spawn)
  91. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_10_gf_e6790307.mp3", "The Seafury Buccaneers demand the most out of thier crew. Are you up to the task?", "", 2403558940, 3041491321, Spawn)
  92. end
  93. end