ElowynEquitus.lua 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/ElowynEquitus.lua
  3. Script Purpose : Elowyn Equitus
  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. SetInfoStructString(NPC, "action_state", "drinking_idle")
  13. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  14. end
  15. function InRange(NPC, Spawn)
  16. if GetFactionAmount(Spawn,12) <0 then
  17. FaceTarget(NPC, Spawn)
  18. FactionChecking(NPC, Spawn, faction)
  19. else
  20. if MakeRandomInt(1, 100) <= 50 and CalloutTimeCheck == false then
  21. CalloutTimeCheck = true
  22. AddTimer(NPC,25000,"ResetCalloutTimer")
  23. if MakeRandomInt(1,2)==1 then
  24. FaceTarget(NPC, Spawn)
  25. Talk(NPC, Spawn)
  26. else
  27. zone = GetZone(NPC)
  28. Other = GetSpawnByLocationID(zone,402973)
  29. OtherTalk(Other,Spawn)
  30. end
  31. end
  32. end
  33. end
  34. function ResetTimer(NPC) -- resets hail timer after initial use
  35. TimeCheck = false
  36. end
  37. function ResetCalloutTimer(NPC) -- resets callout timer after use
  38. CalloutTimeCheck = false
  39. end
  40. function respawn(NPC)
  41. spawn(NPC)
  42. end
  43. function hailed(NPC, Spawn)
  44. if GetFactionAmount(Spawn,12) <0 then
  45. FaceTarget(NPC, Spawn)
  46. FactionChecking(NPC, Spawn, faction)
  47. else
  48. if TimeCheck == false then -- checks timer
  49. TimeCheck = true -- turns on timer to stop player spamming
  50. AddTimer(NPC,2500,"ResetTimer")
  51. FaceTarget(NPC, Spawn)
  52. Talk(NPC, Spawn)
  53. end
  54. end
  55. end
  56. function Talk(NPC, Spawn)
  57. local FP_ScoutFaction = GetFactionAmount(Spawn, 103)
  58. if FP_ScoutFaction >=10000 then
  59. local choice = MakeRandomInt(1, 3) --Adds faction praise callout 33% of the time when applicable.
  60. else
  61. local choice = MakeRandomInt(1, 2)
  62. if choice == 1 then
  63. BasicTalk(NPC,Spawn)
  64. elseif choice == 2 then
  65. BasicTalk(NPC,Spawn)
  66. elseif choice == 3 then
  67. FactionTalk(NPC,Spawn)
  68. end
  69. end
  70. end
  71. function BasicTalk(NPC,Spawn)
  72. local choice = MakeRandomInt(1, 5)
  73. if choice == 1 then
  74. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_hail_gm_ab3834b1.mp3", "The Dismal Rage is hideous I tell you. I always get the shivers when I pass by them.", "", 2064337459, 2051437235, Spawn, 0)
  75. elseif choice == 2 then
  76. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_hail_gm_86034332.mp3", "Dealing with the Coalition of Tradesfolke will only burn your plunder and empty your pockets.", "", 3159304235, 3282840818, Spawn, 0)
  77. elseif choice == 3 then
  78. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_hail_gm_475fe075.mp3", "Arcane Scientists couldn't navigate their way through shallow waters without a map if they tried.", "", 298409119, 3305039750, Spawn, 0)
  79. elseif choice == 4 then
  80. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_hail_gm_cf6319e5.mp3", "I don't trust the Freeport Militia. Neither should you, mate.", "", 3920018301, 2026151663, Spawn, 0)
  81. elseif choice == 5 then
  82. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_hail_gm_6b316487.mp3", "The Seafury Buccaneers dominate the high seas. There is no competition, matey.", "", 566560198, 3072439079, Spawn, 0)
  83. end
  84. end
  85. function FactionTalk(NPC,Spawn)
  86. local FP_ScoutFaction = GetFactionAmount(Spawn, 103)
  87. if FP_ScoutFaction >=40000 then
  88. FaceTarget(NPC, Spawn)
  89. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_40_gm_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.", "", 208759, 293786669, Spawn)
  90. elseif FP_ScoutFaction >=30000 then
  91. FaceTarget(NPC, Spawn)
  92. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_30_gm_e6790307.mp3", "Avast ye! I just wanted to thank you for the plunder you bring to the Seafury Buccaneers.", "", 2403558940, 3041491321, Spawn)
  93. elseif FP_ScoutFaction >=20000 then
  94. FaceTarget(NPC, Spawn)
  95. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_20_gm_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)
  96. elseif FP_ScoutFaction >=10000 then
  97. FaceTarget(NPC, Spawn)
  98. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seafurybuccaneers/ft/eco/evil/human_eco_evil_seafurybuccaneers_10_gm_e6790307.mp3", "The Seafury Buccaneers demand the most out of thier crew. Are you up to the task?", "", 2403558940, 3041491321, Spawn)
  99. end
  100. end
  101. function OtherTalk(Other, Spawn)
  102. local FP_ScoutFaction = GetFactionAmount(Spawn, 103)
  103. if FP_ScoutFaction >=10000 then
  104. local choice = MakeRandomInt(1, 3) --Adds faction praise callout 33% of the time when applicable.
  105. else
  106. local choice = MakeRandomInt(1, 2)
  107. if choice == 1 then
  108. OtherBasicTalk(Other,Spawn)
  109. elseif choice == 2 then
  110. OtherBasicTalk(Other,Spawn)
  111. elseif choice == 3 then
  112. FactionTalk(Other,Spawn)
  113. end
  114. end
  115. end
  116. function OtherBasicTalk(Other,Spawn)
  117. local choice = MakeRandomInt(1, 5)
  118. if choice == 1 then
  119. PlayFlavor(Other, "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)
  120. elseif choice == 2 then
  121. PlayFlavor(Other, "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)
  122. elseif choice == 3 then
  123. PlayFlavor(Other, "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)
  124. elseif choice == 4 then
  125. PlayFlavor(Other, "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)
  126. elseif choice == 5 then
  127. PlayFlavor(Other, "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)
  128. end
  129. end
  130. function FactionTalk(Other,Spawn)
  131. local FP_ScoutFaction = GetFactionAmount(Spawn, 103)
  132. if FP_ScoutFaction >=40000 then
  133. FaceTarget(Other, Spawn)
  134. PlayFlavor(Other, "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)
  135. elseif FP_ScoutFaction >=30000 then
  136. FaceTarget(Other, Spawn)
  137. PlayFlavor(Other, "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)
  138. elseif FP_ScoutFaction >=20000 then
  139. FaceTarget(Other, Spawn)
  140. PlayFlavor(Other, "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)
  141. elseif FP_ScoutFaction >=10000 then
  142. FaceTarget(Other, Spawn)
  143. PlayFlavor(Other, "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)
  144. end
  145. end