TabiththeHag.lua 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/TabiththeHag.lua
  3. Script Purpose : Tabith the Hag
  4. Script Author : Dorbin
  5. Script Date : 2023.11.18
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local FIGHTER = 1
  9. local WARRIOR =2
  10. local GUARDIAN= 3
  11. local BERSERKER = 4
  12. local BRAWLER = 5
  13. local MONK = 6
  14. local BRUISER= 7
  15. local CRUSADER = 8
  16. local SHADOWKNIGHT = 9
  17. local PALADIN = 10
  18. local PRIEST = 11
  19. local CLERIC = 12
  20. local TEMPLAR = 13
  21. local INQUISITOR = 14
  22. local DRUID = 15
  23. local WARDEN = 16
  24. local FURY = 17
  25. local SHAMAN = 18
  26. local MYSTIC = 19
  27. local DEFILER = 20
  28. local MAGE = 21
  29. local SORCERER = 22
  30. local WIZARD = 23
  31. local WARLOCK = 24
  32. local ENCHANTER = 25
  33. local ILLUSIONIST = 26
  34. local COERCER = 27
  35. local SUMMONER = 28
  36. local CONJUROR = 29
  37. local NECROMANCER = 30
  38. local SCOUT = 31
  39. local ROGUE = 32
  40. local SWASHBUCKLER = 33
  41. local BRIGAND = 34
  42. local BARD = 35
  43. local TROUBADOR = 36
  44. local DIRGE = 37
  45. local PREDATOR = 38
  46. local RANGER = 39
  47. local ASSASSIN = 40
  48. local ANIMALIST = 41
  49. local BEASTLORD = 42
  50. local SHAPER = 43
  51. local CHANNELER = 44
  52. function spawn(NPC)
  53. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  54. waypoints(NPC)
  55. end
  56. function hailed(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. Seer(NPC,Spawn)
  59. end
  60. function respawn(NPC)
  61. spawn(NPC)
  62. end
  63. local CalloutTimeCheck = false -- used to delay between callout uses
  64. function InRange(NPC, Spawn) --Quest Callout
  65. if CalloutTimeCheck == false then
  66. if math.random(1, 100) <= 20 then
  67. CalloutTimeCheck = true
  68. FaceTarget(NPC, Spawn)
  69. SeerShout(NPC, Spawn)
  70. AddTimer(NPC,50000,"ResetCalloutTimer")
  71. end
  72. end
  73. end
  74. function ResetCalloutTimer(NPC) -- resets callout timer after use
  75. CalloutTimeCheck = false
  76. end
  77. function Seer(NPC,Spawn)
  78. choice = math.random(1,2)
  79. FaceTarget(NPC, Spawn)
  80. if choice ==1 then
  81. PlayFlavor(NPC, "","", "ponder", 0, 0, Spawn)
  82. else
  83. if GetClass(Spawn)==SCOUT or GetClass(Spawn)==ROGUE or GetClass(Spawn)==SWASHBUCKLER or GetClass(Spawn)==BRIGAND or GetClass(Spawn)==BARD or GetClass(Spawn)==TROUBADOR or GetClass(Spawn)==DIRGE or GetClass(Spawn)==PREDATOR or GetClass(Spawn)==RANGER or GetClass(Spawn)==ASSASSIN or GetClass(Spawn)==ANIMALIST or GetClass(Spawn)==BEASTLORD then
  84. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seer/ft/eco/evil/human_eco_evil_seer_scout_gf_a250f41f.mp3", "Stealth, guile and bravado shall follow you on your path to greatness.", "", 1797841506, 2868715164, Spawn)
  85. elseif GetClass(Spawn)==MAGE or GetClass(Spawn)==SORCERER or GetClass(Spawn)==WIZARD or GetClass(Spawn)==WARLOCK or GetClass(Spawn)==ENCHANTER or GetClass(Spawn)==ILLUSIONIST or GetClass(Spawn)==COERCER or GetClass(Spawn)==SUMMONER or GetClass(Spawn)==CONJUROR or GetClass(Spawn)==NECROMANCER then
  86. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seer/ft/eco/evil/human_eco_evil_seer_mage_gf_f18445ae.mp3", "Clearly your intellect is your best asset. The world shall marvel at the wonders you control.", "", 2374480230, 2549502692, Spawn, 0)
  87. elseif GetClass(Spawn)==CLERIC or GetClass(Spawn)==TEMPLAR or GetClass(Spawn)==INQUISITOR or GetClass(Spawn)==DRUID or GetClass(Spawn)==WARDEN or GetClass(Spawn)==FURY or GetClass(Spawn)==SHAMAN or GetClass(Spawn)==MYSTIC or GetClass(Spawn)==DEFILER or GetClass(Spawn)==PRIEST or GetClass(Spawn)==SHAPER or GetClass(Spawn)==CHANNELER then
  88. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seer/ft/eco/evil/human_eco_evil_seer_priest_gf_5c80506d.mp3", "Your spirit is strong, as is your faith. You shall move more than mountains, you shall move souls.", "", 894403956, 265994277, Spawn)
  89. elseif GetClass(Spawn)==FIGHTER or GetClass(Spawn)==WARRIOR or GetClass(Spawn)==GUARDIAN or GetClass(Spawn)==BERSERKER or GetClass(Spawn)==BRAWLER or GetClass(Spawn)==MONK or GetClass(Spawn)==BRUISER or GetClass(Spawn)==CRUSADER or GetClass(Spawn)==SHADOWKNIGHT or GetClass(Spawn)==PALADIN then
  90. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seer/ft/eco/evil/human_eco_evil_seer_fighter_gf_544e4a58.mp3", "Epic battles await your future, but the strength of your arm shall tame them all!", "", 3412016143, 1212387502, Spawn, 0)
  91. end
  92. end
  93. end
  94. function SeerShout(NPC,Spawn)
  95. if GetClass(Spawn)==SCOUT or GetClass(Spawn)==ROGUE or GetClass(Spawn)==SWASHBUCKLER or GetClass(Spawn)==BRIGAND or GetClass(Spawn)==BARD or GetClass(Spawn)==TROUBADOR or GetClass(Spawn)==DIRGE or GetClass(Spawn)==PREDATOR or GetClass(Spawn)==RANGER or GetClass(Spawn)==ASSASSIN or GetClass(Spawn)==ANIMALIST or GetClass(Spawn)==BEASTLORD or GetClass(Spawn)==SHAPER or GetClass(Spawn)==CHANNELER then
  96. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seer/ft/eco/evil/human_eco_evil_seer_scout_gf_a250f41f.mp3", "Stealth, guile and bravado shall follow you on your path to greatness.", "", 1797841506, 2868715164)
  97. elseif GetClass(Spawn)==MAGE or GetClass(Spawn)==SORCERER or GetClass(Spawn)==WIZARD or GetClass(Spawn)==WARLOCK or GetClass(Spawn)==ENCHANTER or GetClass(Spawn)==ILLUSIONIST or GetClass(Spawn)==COERCER or GetClass(Spawn)==SUMMONER or GetClass(Spawn)==CONJUROR or GetClass(Spawn)==NECROMANCER then
  98. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seer/ft/eco/evil/human_eco_evil_seer_mage_gf_f18445ae.mp3", "Clearly your intellect is your best asset. The world shall marvel at the wonders you control.", "", 2374480230, 2549502692)
  99. elseif GetClass(Spawn)==CLERIC or GetClass(Spawn)==TEMPLAR or GetClass(Spawn)==INQUISITOR or GetClass(Spawn)==DRUID or GetClass(Spawn)==WARDEN or GetClass(Spawn)==FURY or GetClass(Spawn)==SHAMAN or GetClass(Spawn)==MYSTIC or GetClass(Spawn)==DEFILER or GetClass(Spawn)==PRIEST then
  100. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seer/ft/eco/evil/human_eco_evil_seer_priest_gf_5c80506d.mp3", "Your spirit is strong, as is your faith. You shall move more than mountains, you shall move souls.", "", 894403956, 265994277)
  101. elseif GetClass(Spawn)==FIGHTER or GetClass(Spawn)==WARRIOR or GetClass(Spawn)==GUARDIAN or GetClass(Spawn)==BERSERKER or GetClass(Spawn)==BRAWLER or GetClass(Spawn)==MONK or GetClass(Spawn)==BRUISER or GetClass(Spawn)==CRUSADER or GetClass(Spawn)==SHADOWKNIGHT or GetClass(Spawn)==PALADIN then
  102. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seer/ft/eco/evil/human_eco_evil_seer_fighter_gf_544e4a58.mp3", "Epic battles await your future, but the strength of your arm shall tame them all!", "", 3412016143, 1212387502)
  103. end
  104. end
  105. function respawn(NPC)
  106. spawn(NPC)
  107. end
  108. function RandomGreeting(NPC, Spawn)
  109. local choice = MakeRandomInt(1,2)
  110. if choice == 1 then
  111. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seer/ft/eco/evil/human_eco_evil_seer_fighter_gf_544e4a58.mp3", "Epic battles await your future, but the strength of your arm shall tame them all!", "", 3412016143, 1212387502, Spawn, 0)
  112. elseif choice == 2 then
  113. PlayFlavor(NPC, "voiceover/english/human_eco_evil_seer/ft/eco/evil/human_eco_evil_seer_mage_gf_f18445ae.mp3", "Clearly your intellect is your best asset. The world shall marvel at the wonders you control.", "", 2374480230, 2549502692, Spawn, 0)
  114. end
  115. end
  116. function waypoints(NPC)
  117. MovementLoopAddLocation(NPC, -32.49, -6.92, 83.09, 2, 0)
  118. MovementLoopAddLocation(NPC, -33.52, -6.92, 82.02, 2, 22)
  119. MovementLoopAddLocation(NPC, -29.41, -6.92, 80.82, 2, 0)
  120. MovementLoopAddLocation(NPC, -29.38, -6.92, 78.86, 2, 0)
  121. MovementLoopAddLocation(NPC, -32.89, -6.92, 72.32, 2, 0)
  122. MovementLoopAddLocation(NPC, -32.09, -6.92, 68.26, 2, 2,"Door1")
  123. MovementLoopAddLocation(NPC, -26.72, -7, 64.44, 2, 0,"Door1")
  124. MovementLoopAddLocation(NPC, -22.05, -7, 59.95, 2, 0)
  125. MovementLoopAddLocation(NPC, -17.5, -7, 57.1, 2, 0)
  126. MovementLoopAddLocation(NPC, -12.35, -7, 55.77, 2, 0)
  127. MovementLoopAddLocation(NPC, -1.99, -7, 58.68, 2, 0)
  128. MovementLoopAddLocation(NPC, -0.8, -7, 58.6, 2, 11)
  129. MovementLoopAddLocation(NPC, 1.83, -7, 56.13, 2, 0)
  130. MovementLoopAddLocation(NPC, 4.96, -7, 49.3, 2, 0)
  131. MovementLoopAddLocation(NPC, 5.51, -7, 48.25, 2, 11)
  132. MovementLoopAddLocation(NPC, -0.6, -7, 47.38, 2, 11)
  133. MovementLoopAddLocation(NPC, 2.69, -7, 51.56, 2, 0)
  134. MovementLoopAddLocation(NPC, 10.37, -7, 56.87, 2, 0)
  135. MovementLoopAddLocation(NPC, 13.27, -7, 60.05, 2, 11)
  136. MovementLoopAddLocation(NPC, 27.52, -6.42, 47.47, 2, 0)
  137. MovementLoopAddLocation(NPC, 32.31, -6, 44.9, 2, 0)
  138. MovementLoopAddLocation(NPC, 36.13, -6, 43.04, 2, 11)
  139. MovementLoopAddLocation(NPC, 36.69, -6, 43.78, 2, 0)
  140. MovementLoopAddLocation(NPC, 38.44, -6, 44.28, 2, 0)
  141. MovementLoopAddLocation(NPC, 39.48, -5.5, 42.01, 2, 0)
  142. MovementLoopAddLocation(NPC, 37.49, -5.25, 40.23, 2, 0)
  143. MovementLoopAddLocation(NPC, 34.72, -5.25, 38.62, 2, 0)
  144. MovementLoopAddLocation(NPC, 30.95, -5.25, 32.06, 2, 0)
  145. MovementLoopAddLocation(NPC, 31.83, -5.01, 26.61, 2, 0)
  146. MovementLoopAddLocation(NPC, 33.46, -5.01, 23.35, 2, 0)
  147. MovementLoopAddLocation(NPC, 36.1, -4.09, 22.99, 2, 0)
  148. MovementLoopAddLocation(NPC, 41.32, -1.41, 23.92, 2, 0)
  149. MovementLoopAddLocation(NPC, 48.08, 1.85, 25.05, 2, 0)
  150. MovementLoopAddLocation(NPC, 49.53, 1.95, 24.27, 2, 0)
  151. MovementLoopAddLocation(NPC, 49.38, 2, 21.86, 2, 0)
  152. MovementLoopAddLocation(NPC, 47.87, 2, 19.41, 2, 0)
  153. MovementLoopAddLocation(NPC, 46.79, 2, 14.88, 2, 0)
  154. MovementLoopAddLocation(NPC, 43.12, 2, 13.32, 2, 0)
  155. MovementLoopAddLocation(NPC, 38.22, 2, 10.97, 2, 11)
  156. MovementLoopAddLocation(NPC, 39.86, 2, 11.69, 2, 0)
  157. MovementLoopAddLocation(NPC, 40.52, 2.25, 10.02, 2, 0)
  158. MovementLoopAddLocation(NPC, 38.52, 2.6, 7.01, 2, 0)
  159. MovementLoopAddLocation(NPC, 34.64, 3.3, 4.66, 2, 0)
  160. MovementLoopAddLocation(NPC, 33.65, 3.5, 2.76, 2, 11)
  161. MovementLoopAddLocation(NPC, 32.82, 3.5, 1.17, 2, 0)
  162. MovementLoopAddLocation(NPC, 33.2, 3.5, -0.59, 2, 22)
  163. MovementLoopAddLocation(NPC, 31.73, 3.5, -1.6, 2, 0)
  164. MovementLoopAddLocation(NPC, 30.63, 5.25, -8.53, 2, 0)
  165. MovementLoopAddLocation(NPC, 34.64, 5.25, -12.61, 2, 0)
  166. MovementLoopAddLocation(NPC, 40.17, 5.25, -15.35, 2, 0)
  167. MovementLoopAddLocation(NPC, 44.68, 5.25, -16.87, 2, 0)
  168. MovementLoopAddLocation(NPC, 51.46, 5, -17.92, 2, 11)
  169. MovementLoopAddLocation(NPC, 57.21, 5, -15.93, 2, 11)
  170. MovementLoopAddLocation(NPC, 53.62, 5, -19.84, 2, 0)
  171. MovementLoopAddLocation(NPC, 47.13, 5.25, -25.42, 2, 11)
  172. MovementLoopAddLocation(NPC, 49.58, 5, -28.78, 2, 2,"Door2")
  173. MovementLoopAddLocation(NPC, 52.14, 5.01, -32.93, 2, 0,"Door2")
  174. MovementLoopAddLocation(NPC, 54.28, 5.05, -38.06, 2, 0)
  175. MovementLoopAddLocation(NPC, 57.4, 5.01, -45.59, 2, 22)
  176. MovementLoopAddLocation(NPC, 57.69, 5.04, -43.5, 2, 0)
  177. MovementLoopAddLocation(NPC, 57.67, 5.08, -37.28, 2, 22)
  178. MovementLoopAddLocation(NPC, 54.36, 5.01, -35.77, 2, 0)
  179. MovementLoopAddLocation(NPC, 52.59, 5.01, -33.19, 2, 2,"Door2")
  180. MovementLoopAddLocation(NPC, 49.8, 5, -28.11, 2, 0,"Door2")
  181. MovementLoopAddLocation(NPC, 49.65, 5, -22.79, 2, 0)
  182. MovementLoopAddLocation(NPC, 45.52, 5.25, -17.05, 2, 0)
  183. MovementLoopAddLocation(NPC, 41.52, 5.25, -16.15, 2, 0)
  184. MovementLoopAddLocation(NPC, 30.57, 5.25, -10.2, 2, 0)
  185. MovementLoopAddLocation(NPC, 26.9, 3.5, -0.02, 2, 0)
  186. MovementLoopAddLocation(NPC, 23.71, 3.5, 4.19, 2, 11)
  187. MovementLoopAddLocation(NPC, 20.65, 3.5, 0.41, 2, 0)
  188. MovementLoopAddLocation(NPC, 20.65, 3.5, 0.41, 2, 11)
  189. MovementLoopAddLocation(NPC, 19.2, 3.5, 5.5, 2, 11)
  190. MovementLoopAddLocation(NPC, 12.92, 3.37, 9.65, 2, 0)
  191. MovementLoopAddLocation(NPC, 2.96, 2, 9.64, 2, 0)
  192. MovementLoopAddLocation(NPC, 1.5, 2, 11.21, 2, 0)
  193. MovementLoopAddLocation(NPC, -0.87, 1.92, 15.45, 2, 0)
  194. MovementLoopAddLocation(NPC, -0.87, 1.92, 15.45, 2, 0) --Guard Stop
  195. MovementLoopAddLocation(NPC, -2.06, 1.92, 15.37, 2, 0)
  196. MovementLoopAddLocation(NPC, -9.84, -1.81, 12.71, 2, 0)
  197. MovementLoopAddLocation(NPC, -14.92, -4.99, 8.1, 2, 0)
  198. MovementLoopAddLocation(NPC, -15.64, -5.01, 10.49, 2, 0)
  199. MovementLoopAddLocation(NPC, -20.23, -5, 15.88, 2, 0)
  200. MovementLoopAddLocation(NPC, -25.49, -5, 19.16, 2, 0)
  201. MovementLoopAddLocation(NPC, -27.46, -5, 18.7, 2, 0)
  202. MovementLoopAddLocation(NPC, -28.87, -5.25, 19.17, 2, 0)
  203. MovementLoopAddLocation(NPC, -28.78, -5.5, 20.96, 2, 0)
  204. MovementLoopAddLocation(NPC, -26.8, -5.75, 22.98, 2, 0)
  205. MovementLoopAddLocation(NPC, -23.66, -6.25, 24.75, 2, 0)
  206. MovementLoopAddLocation(NPC, -19.31, -7, 24, 2, 11)
  207. MovementLoopAddLocation(NPC, -18.87, -7, 28.4, 2, 0)
  208. MovementLoopAddLocation(NPC, -18.52, -7, 31.62, 2, 0)
  209. MovementLoopAddLocation(NPC, -13.1, -6.75, 34.8, 2, 0)
  210. MovementLoopAddLocation(NPC, -8.02, -6.73, 39.82, 2, 0)
  211. MovementLoopAddLocation(NPC, -7.06, -7, 45.05, 2, 0)
  212. MovementLoopAddLocation(NPC, -6.03, -7, 51.61, 2, 0)
  213. MovementLoopAddLocation(NPC, -8.03, -7, 55.57, 2, 0)
  214. MovementLoopAddLocation(NPC, -14.2, -7, 58.52, 2, 0)
  215. MovementLoopAddLocation(NPC, -15.75, -7, 59.4, 2, 0)
  216. MovementLoopAddLocation(NPC, -16.61, -7, 64.52, 2, 11)
  217. MovementLoopAddLocation(NPC, -17.79, -7, 64.27, 2, 0)
  218. MovementLoopAddLocation(NPC, -29.98, -7, 62.42, 2, 11)
  219. MovementLoopAddLocation(NPC, -27.94, -7, 63.06, 2, 0)
  220. MovementLoopAddLocation(NPC, -27.29, -7, 65.09, 2, 2,"Door1")
  221. MovementLoopAddLocation(NPC, -32.43, -6.92, 68.37, 2, 0,"Door1")
  222. MovementLoopAddLocation(NPC, -31.21, -6.92, 70.95, 2, 0)
  223. MovementLoopAddLocation(NPC, -27.82, -6.92, 76.71, 2, 0)
  224. MovementLoopAddLocation(NPC, -26.17, -6.92, 80.89, 2, 11)
  225. MovementLoopAddLocation(NPC, -28.62, -6.92, 80.46, 2, 0)
  226. MovementLoopAddLocation(NPC, -30.08, -6.92, 82.29, 2, 0)
  227. end
  228. function Door1(NPC,Spawn)
  229. local door = GetSpawn(NPC, 1370082)
  230. UseWidget(door)
  231. end
  232. function Door2(NPC,Spawn)
  233. local door = GetSpawn(NPC, 1370078)
  234. UseWidget(door)
  235. end