9
3

NezzkaSTai.lua 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. --[[
  2. Script Name : SpawnScripts/LongshadowAlley/NezzkaSTai.lua
  3. Script Purpose : Nezzka S`Tai
  4. Script Author : torsten
  5. Script Date : 2022.07.20
  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. waypoints(NPC)
  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) <= 30 and CalloutTimeCheck == false then
  21. CalloutTimeCheck = true
  22. FaceTarget(NPC, Spawn)
  23. AddTimer(NPC,60000,"ResetCalloutTimer")
  24. Talk(NPC, Spawn)
  25. end
  26. end
  27. end
  28. function ResetTimer(NPC) -- resets hail timer after initial use
  29. TimeCheck = false
  30. end
  31. function ResetCalloutTimer(NPC) -- resets callout timer after use
  32. CalloutTimeCheck = false
  33. end
  34. function respawn(NPC)
  35. spawn(NPC)
  36. end
  37. function hailed(NPC, Spawn)
  38. if GetFactionAmount(Spawn,12) <0 then
  39. FaceTarget(NPC, Spawn)
  40. FactionChecking(NPC, Spawn, faction)
  41. else
  42. if TimeCheck == false then -- checks timer
  43. TimeCheck = true -- turns on timer to stop player spamming
  44. AddTimer(NPC,2500,"ResetTimer")
  45. FaceTarget(NPC, Spawn)
  46. Talk(NPC, Spawn)
  47. end
  48. end
  49. end
  50. function Talk(NPC, Spawn)
  51. local FP_PriestFaction = GetFactionAmount(Spawn, 105 )
  52. if FP_PriestFaction >=10000 then
  53. local choice = MakeRandomInt(1, 3) --Adds faction praise callout 33% of the time when applicable.
  54. else
  55. local choice = MakeRandomInt(1, 2)
  56. if choice == 1 then
  57. BasicTalk(NPC,Spawn)
  58. elseif choice == 2 then
  59. BasicTalk(NPC,Spawn)
  60. elseif choice == 3 then
  61. FactionTalk(NPC,Spawn)
  62. end
  63. end
  64. end
  65. function BasicTalk(NPC,Spawn)
  66. local choice = MakeRandomInt(1, 5)
  67. if choice == 1 then
  68. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_dismalrage/ft/eco/evil/darkelf_female_eco_evil_dismalrage_hail_gf_b9254acf.mp3", "The words preached by the Dismal Rage bring spiritual enlightenment to the weak.", "", 116806204, 1893451787, Spawn, 0)
  69. elseif choice == 2 then
  70. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_dismalrage/ft/eco/evil/darkelf_female_eco_evil_dismalrage_hail_gf_f7ca6051.mp3", "I find it vile that our great city has entrusted its protection to a group of degenerates such as the Freeport Militia.", "", 1175835727, 2628271838, Spawn, 0)
  71. elseif choice == 3 then
  72. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_dismalrage/ft/eco/evil/darkelf_female_eco_evil_dismalrage_hail_gf_5a9793ef.mp3", "The Coalition of Tradesfolke aren't capable of serving anyone other than to serve its own greed.", "", 3353210602, 2809554948, Spawn)
  73. elseif choice == 4 then
  74. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_dismalrage/ft/eco/evil/darkelf_female_eco_evil_dismalrage_hail_gf_7abc3066.mp3", "Too often the Arcane Scientists at the academy dedicate themselves to useless knowledge that is of no use to our city.", "", 1261386119, 1368644822, Spawn)
  75. elseif choice == 5 then
  76. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_dismalrage/ft/eco/evil/darkelf_female_eco_evil_dismalrage_hail_gf_7d78cf9d.mp3", "The weak souls of the Seafury Buccaneers only cry, running to a priest when facing certain death.", "", 683812929, 1852419614, Spawn)
  77. end
  78. end
  79. function FactionTalk(NPC,Spawn)
  80. local FP_PriestFaction = GetFactionAmount(Spawn, 105 )
  81. if FP_PriestFaction >=40000 then
  82. FaceTarget(NPC, Spawn)
  83. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_arcanescientists/ft/eco/evil/darkelf_female_eco_evil_arcanescientists_40_gf_c38c736.mp3", "To aid the Dismal Rage is to worship the One True God for power that binds us to this realm!", "cheer", 0, 0, Spawn)
  84. elseif FP_PriestFaction >=30000 then
  85. FaceTarget(NPC, Spawn)
  86. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_dismalrage/ft/eco/evil/darkelf_female_eco_evil_dismalrage_30_gf_350ac522.mp3", "To realize your full potential you must drive all empathy and pity from your heart.", "", 2475957665, 3294345346, Spawn, 0)
  87. elseif FP_PriestFaction >=20000 then
  88. FaceTarget(NPC, Spawn)
  89. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_arcanescientists/ft/eco/evil/darkelf_female_eco_evil_arcanescientists_20_gf_7b836853.mp3", "The ritualistic power of Dismal Rage is what gives spiritual strength to us all.", "", 0, 0, Spawn)
  90. elseif FP_PriestFaction >=10000 then
  91. FaceTarget(NPC, Spawn)
  92. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_dismalrage/ft/eco/evil/darkelf_female_eco_evil_dismalrage_10_gf_1a36b724.mp3", "You must learn to release the chaos and destruction of your power.", "", 1739074440, 1700879521, Spawn)
  93. end
  94. end
  95. function waypoints(NPC)
  96. MovementLoopAddLocation(NPC, -17.58, 4, 48.42, 2, 0)
  97. MovementLoopAddLocation(NPC, -19.27, 4, 51.76, 2, 1)
  98. MovementLoopAddLocation(NPC, -19.27, 4, 51.76, 2, MakeRandomInt(25,30),"EcologyEmotes")
  99. MovementLoopAddLocation(NPC, -17.97, 4, 50.82, 2, 0)
  100. MovementLoopAddLocation(NPC, -16.6, 4, 47.44, 2, 0)
  101. MovementLoopAddLocation(NPC, -16.5, 4, 45.05, 2, 0)
  102. MovementLoopAddLocation(NPC, -20.18, 4, 42.36, 2, 0)
  103. MovementLoopAddLocation(NPC, -23.89, 4, 37.68, 2, 2,"Door1")
  104. MovementLoopAddLocation(NPC, -20.86, 4, 32.15, 2, 0)
  105. MovementLoopAddLocation(NPC, -19.16, 3.85, 30.42, 2, 0)
  106. MovementLoopAddLocation(NPC, -10.69, 3.32, 30.94, 2, 0)
  107. MovementLoopAddLocation(NPC, -4.73, 2.98, 31.6, 2, 0)
  108. MovementLoopAddLocation(NPC, 7.51, 2.82, 27.83, 2, 0)
  109. MovementLoopAddLocation(NPC, 10.64, 2.37, 26.7, 2, 0)
  110. MovementLoopAddLocation(NPC, 21.69, 2, 25.67, 2, 1)
  111. MovementLoopAddLocation(NPC, 21.69, 2, 25.67, 2, 25)
  112. MovementLoopAddLocation(NPC, 19.78, 1.94, 24.69, 2, 0)
  113. MovementLoopAddLocation(NPC, 14.65, 1.93, 21.71, 2, 0)
  114. MovementLoopAddLocation(NPC, 12.3, 1.61, 18.97, 2, 0)
  115. MovementLoopAddLocation(NPC, 8.98, 0.21, 13.52, 2, 0)
  116. MovementLoopAddLocation(NPC, 7.78, 0, 11.63, 2, 0)
  117. MovementLoopAddLocation(NPC, 8.94, 0, 9.95, 2, 0)
  118. MovementLoopAddLocation(NPC, 9.91, 0, 4.58, 2, 0)
  119. MovementLoopAddLocation(NPC, 9.9, 0, -0.06, 2, 0)
  120. MovementLoopAddLocation(NPC, 7.86, 0, -6.42, 2, 0)
  121. MovementLoopAddLocation(NPC, 5.81, 0, -9.03, 2, 0)
  122. MovementLoopAddLocation(NPC, 4.98, 0.04, -17.83, 2, 0)
  123. MovementLoopAddLocation(NPC, 4.77, 0, -19.96, 2, 0)
  124. MovementLoopAddLocation(NPC, 1.62, 0.01, -23.17, 2, 2,"Door2")
  125. MovementLoopAddLocation(NPC, 1.35, 0.07, -26.6, 2, 0)
  126. MovementLoopAddLocation(NPC, 1.87, 0, -29.56, 2, 0)
  127. MovementLoopAddLocation(NPC, 2.75, 0.5, -34.66, 2, 1)
  128. MovementLoopAddLocation(NPC, 2.75, 0.5, -34.66, 2, MakeRandomInt(25,30),"EcologyEmotes")
  129. MovementLoopAddLocation(NPC, 2.75, 0.5, -34.66, 2, MakeRandomInt(25,30),"EcologyEmotes")
  130. MovementLoopAddLocation(NPC, 1.97, 0.5, -33.56, 2, 0)
  131. MovementLoopAddLocation(NPC, 1.91, 0, -28.8, 2, 2,"Door2")
  132. MovementLoopAddLocation(NPC, 1.1, 0.02, -23.2, 2, 0)
  133. MovementLoopAddLocation(NPC, 1.44, 0, -20.46, 2, 0)
  134. MovementLoopAddLocation(NPC, -0.15, 0, -13.64, 2, 0)
  135. MovementLoopAddLocation(NPC, -5.55, 0.06, -9.1, 2, 0)
  136. MovementLoopAddLocation(NPC, -9.98, 0, -2.89, 2, 0)
  137. MovementLoopAddLocation(NPC, -12.2, 0, 3.45, 2, 0)
  138. MovementLoopAddLocation(NPC, -9.07, 0, 8.46, 2, 0)
  139. MovementLoopAddLocation(NPC, -6.32, 0, 9.62, 2, 0)
  140. MovementLoopAddLocation(NPC, 2.27, 0, 16.46, 2, 1)
  141. MovementLoopAddLocation(NPC, 2.27, 0, 16.46, 2, MakeRandomInt(25,30),"EcologyEmotes")
  142. MovementLoopAddLocation(NPC, 2.78, 0, 14.67, 2, 0)
  143. MovementLoopAddLocation(NPC, 7.04, 0, 11.89, 2, 0)
  144. MovementLoopAddLocation(NPC, 8.92, 0, 12.92, 2, 0)
  145. MovementLoopAddLocation(NPC, 12, 1.29, 17.65, 2, 0)
  146. MovementLoopAddLocation(NPC, 16, 1.89, 22.81, 2, 0)
  147. MovementLoopAddLocation(NPC, 18.33, 2, 26.69, 2, 2,"Door3")
  148. MovementLoopAddLocation(NPC, 21.06, 2, 31.22, 2, 0)
  149. MovementLoopAddLocation(NPC, 20.32, 2, 35.2, 2, 0)
  150. MovementLoopAddLocation(NPC, 23, 2, 39.13, 2, 0)
  151. MovementLoopAddLocation(NPC, 31.78, 2, 41.93, 2, 1)
  152. MovementLoopAddLocation(NPC, 31.78, 2, 41.93, 2, MakeRandomInt(45,50),"EcologyEmotes")
  153. MovementLoopAddLocation(NPC, 28.44, 2, 40.49, 2, 0)
  154. MovementLoopAddLocation(NPC, 22.3, 2.01, 37.85, 2, 0)
  155. MovementLoopAddLocation(NPC, 20.22, 2, 35.71, 2, 0)
  156. MovementLoopAddLocation(NPC, 20.85, 2, 31.38, 2, 2,"Door3")
  157. MovementLoopAddLocation(NPC, 17.58, 1.95, 25.93, 2, 0)
  158. MovementLoopAddLocation(NPC, 10.41, 2.44, 28.9, 2, 0)
  159. MovementLoopAddLocation(NPC, -4.01, 2.98, 33.42, 2, 0)
  160. MovementLoopAddLocation(NPC, -11.76, 3.31, 33.18, 2, 0)
  161. MovementLoopAddLocation(NPC, -18.85, 3.88, 31.26, 2, 0)
  162. MovementLoopAddLocation(NPC, -20.07, 3.99, 31.85, 2, 2,"Door1")
  163. MovementLoopAddLocation(NPC, -24.17, 4, 37.47, 2, 0)
  164. MovementLoopAddLocation(NPC, -23.56, 4, 38.14, 2, 0)
  165. MovementLoopAddLocation(NPC, -19.03, 4, 40.77, 2, 0)
  166. MovementLoopAddLocation(NPC, -15.73, 4, 43.98, 2, 0)
  167. end
  168. function Door1(NPC,Spawn)
  169. local door = GetSpawn(NPC, 1380077)
  170. UseWidget(door)
  171. end
  172. function Door2(NPC,Spawn)
  173. local door = GetSpawn(NPC, 1380085)
  174. UseWidget(door)
  175. end
  176. function Door3(NPC,Spawn)
  177. local door = GetSpawn(NPC, 1380075)
  178. UseWidget(door)
  179. end