9
3

XelFyara.lua 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. --[[
  2. Script Name : SpawnScripts/TheRuins_Classic/XelFyara.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.07.06 05:07:54
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetTempVariable(NPC, "CalloutTimer", "false")
  10. SetTempVariable(NPC, "Timer1", "false")
  11. SetTempVariable(NPC, "Timer2", "false")
  12. AddTimer(NPC,500,"FairyCheck")
  13. AddTimer(NPC,2000,"waypoints")
  14. AddTimer(NPC,900000,"Depsawning")
  15. end
  16. function hailed(NPC, Spawn)
  17. if GetTempVariable(NPC, "CalloutTimer")== "false"then
  18. SetTempVariable(NPC, "CalloutTimer", "true")
  19. AddTimer(NPC,3000,"ResetTimer",1,Spawn)
  20. if GetTempVariable(NPC, "Timer1")== "false"then
  21. PlayFlavor(NPC, "", "We were tricked! It must be found.", "", 0, 0, Spawn, 0)
  22. SetTempVariable(NPC, "Timer1", "true")
  23. elseif GetTempVariable(NPC, "Timer2")== "false"then
  24. PlayFlavor(NPC, "", "Where is he? Where is Gurb?", "", 0, 0, Spawn, 0)
  25. SetTempVariable(NPC, "Timer2", "true")
  26. else
  27. SetTempVariable(NPC, "Timer1", "false")
  28. SetTempVariable(NPC, "Timer2", "false")
  29. PlayFlavor(NPC, "", "It was stolen from us! It must be returned home.", "", 0, 0, Spawn, 0)
  30. end
  31. end
  32. end
  33. function ResetTimer(NPC) -- 7 SECOND PAUSE BETWEEN VOs
  34. SetTempVariable(NPC, "CalloutTimer", "false")
  35. end
  36. function respawn(NPC)
  37. spawn(NPC)
  38. end
  39. function FairyCheck(NPC)
  40. local zone = GetZone(NPC)
  41. if GetSpawnByLocationID(zone, 133785610)==nil then
  42. SpawnByLocationID(zone,133785610)
  43. end
  44. if GetSpawnByLocationID(zone, 133785611)==nil then
  45. SpawnByLocationID(zone,133785611)
  46. end
  47. end
  48. function waypoints(NPC)
  49. MovementLoopAddLocation(NPC, -117.14, 4.73, 154.48, 2, 0)
  50. MovementLoopAddLocation(NPC, -116.49, 5.21, 143.58, 2, 8)
  51. MovementLoopAddLocation(NPC, -132.87, 5.21, 118.47, 2, 8)
  52. MovementLoopAddLocation(NPC, -113.29, 5.21, 120.03, 2, 8)
  53. MovementLoopAddLocation(NPC, -126.4, 5.21, 137.95, 2, 8)
  54. MovementLoopAddLocation(NPC, -147, 5.21, 143.27, 2, 3)
  55. MovementLoopAddLocation(NPC, -154.03, 5.21, 152.55, 2, 0)
  56. MovementLoopAddLocation(NPC, -156.28, 5.21, 164.66, 2, 8)
  57. MovementLoopAddLocation(NPC, -168.02, 5.21, 153.82, 2, 8)
  58. MovementLoopAddLocation(NPC, -152.85, 5.21, 143.18, 2, 0)
  59. MovementLoopAddLocation(NPC, -146.98, 5.21, 129.89, 2, 8)
  60. MovementLoopAddLocation(NPC, -141.51, 5.68, 144.41, 2, 8)
  61. MovementLoopAddLocation(NPC, -129.9, 8.25, 125.66, 2, 4)
  62. MovementLoopAddLocation(NPC, -124.19, 8.25, 108.35, 2, 0)
  63. MovementLoopAddLocation(NPC, -117.19, 0.52, 95, 2, 8)
  64. MovementLoopAddLocation(NPC, -124.18, 0.52, 90.06, 2, 0)
  65. MovementLoopAddLocation(NPC, -131.15, 8.42, 85.15, 2, 0)
  66. MovementLoopAddLocation(NPC, -162.17, 12.23, 83.36, 2, 4)
  67. MovementLoopAddLocation(NPC, -167.15, 7.23, 71.97, 2, 0)
  68. MovementLoopAddLocation(NPC, -165.57, 0.76, 69.65, 2, 5)
  69. MovementLoopAddLocation(NPC, -176.42, 0.76, 72.76, 2, 8)
  70. MovementLoopAddLocation(NPC, -185.12, 0.76, 69.26, 2, 5)
  71. MovementLoopAddLocation(NPC, -190.26, 0.76, 78.94, 2, 8)
  72. MovementLoopAddLocation(NPC, -194.95, 0.76, 66.54, 2, 4)
  73. MovementLoopAddLocation(NPC, -195.66, 5.62, 63.77, 2, 0)
  74. MovementLoopAddLocation(NPC, -200.06, 14.32, 44.62, 2, 2)
  75. MovementLoopAddLocation(NPC, -200.06, 14.32, 44.62, 2, 0,"Despawning")
  76. end
  77. function Despawning(NPC)
  78. Despawn(NPC)
  79. end