9
3

WeleLyoli.lua 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. --[[
  2. Script Name : SpawnScripts/TheRuins_Classic/WeleLyoli.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.07.06 04:07:19
  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 FairyCheck(NPC)
  34. local zone = GetZone(NPC)
  35. if GetSpawnByLocationID(zone, 133785614)==nil then
  36. SpawnByLocationID(zone,133785614)
  37. end
  38. if GetSpawnByLocationID(zone, 133785615)==nil then
  39. SpawnByLocationID(zone,133785615)
  40. end
  41. end
  42. function ResetTimer(NPC) -- 7 SECOND PAUSE BETWEEN VOs
  43. SetTempVariable(NPC, "CalloutTimer", "false")
  44. end
  45. function respawn(NPC)
  46. spawn(NPC)
  47. end
  48. function waypoints(NPC)
  49. MovementLoopAddLocation(NPC, -203.24, 2.59, 63.08, 2, 0)
  50. MovementLoopAddLocation(NPC, -200.15, 2.59, 76, 2, 0)
  51. MovementLoopAddLocation(NPC, -198.86, 2.59, 86.53, 2, 6)
  52. MovementLoopAddLocation(NPC, -185.98, 2.59, 90.34, 2, 0)
  53. MovementLoopAddLocation(NPC, -171.48, 2.59, 88.34, 2, 6)
  54. MovementLoopAddLocation(NPC, -168.28, 2.59, 89.38, 2, 0)
  55. MovementLoopAddLocation(NPC, -175.75, 2.59, 91.57, 2, 0)
  56. MovementLoopAddLocation(NPC, -189.95, 2.59, 84.36, 2, 0)
  57. MovementLoopAddLocation(NPC, -196.7, 2.59, 75.38, 2, 6)
  58. MovementLoopAddLocation(NPC, -195.57, 2.59, 67.68, 2, 0)
  59. MovementLoopAddLocation(NPC, -191.87, 2.59, 81.86, 2, 0)
  60. MovementLoopAddLocation(NPC, -184.04, 2.59, 90.04, 2, 0)
  61. MovementLoopAddLocation(NPC, -179.26, 2.59, 89.89, 2, 6)
  62. MovementLoopAddLocation(NPC, -158.33, 15.17, 83.6, 2, 0)
  63. MovementLoopAddLocation(NPC, -141.24, 15.17, 80.33, 2, 0)
  64. MovementLoopAddLocation(NPC, -129, 5.53, 76.78, 2, 0)
  65. MovementLoopAddLocation(NPC, -121.93, 5.53, 73.06, 2, 0)
  66. MovementLoopAddLocation(NPC, -106.21, 1.83, 74.89, 2, 6)
  67. MovementLoopAddLocation(NPC, -92.12, 12.85, 72.3, 2, 0)
  68. MovementLoopAddLocation(NPC, -68.79, 6.91, 64.16, 2, 0)
  69. MovementLoopAddLocation(NPC, -59.8, 4.07, 60.3, 2, 0)
  70. MovementLoopAddLocation(NPC, -57.28, 3.07, 58.01, 2, 6)
  71. MovementLoopAddLocation(NPC, -59.54, 3.07, 73.13, 2, 6)
  72. MovementLoopAddLocation(NPC, -69.72, 3.07, 75.28, 2, 6)
  73. MovementLoopAddLocation(NPC, -76.06, 3.07, 68.34, 2, 0)
  74. MovementLoopAddLocation(NPC, -74.85, 4.07, 63.2, 2, 0)
  75. MovementLoopAddLocation(NPC, -70.43, 3.75, 60.1, 2, 6)
  76. MovementLoopAddLocation(NPC, -74.95, 13.34, 63.96, 2, 0)
  77. MovementLoopAddLocation(NPC, -97.21, 4.67, 74.03, 2, 0)
  78. MovementLoopAddLocation(NPC, -113.88, 4.25, 75.31, 2, 0)
  79. MovementLoopAddLocation(NPC, -117.32, 1.65, 71.43, 2, 6)
  80. MovementLoopAddLocation(NPC, -125.82, 4.25, 75.49, 2, 0)
  81. MovementLoopAddLocation(NPC, -137.05, 9.46, 79.24, 2, 0)
  82. MovementLoopAddLocation(NPC, -158.24, 14.83, 76.67, 2, 0)
  83. MovementLoopAddLocation(NPC, -164.35, 5.73, 87.24, 2, 0)
  84. MovementLoopAddLocation(NPC, -169.29, 0.11, 86.26, 2, 6)
  85. MovementLoopAddLocation(NPC, -185.62, 0.11, 88.17, 2, 0)
  86. MovementLoopAddLocation(NPC, -195.9, 0.11, 88.74, 2, 0)
  87. MovementLoopAddLocation(NPC, -198.53, 0.11, 81.75, 2, 0)
  88. MovementLoopAddLocation(NPC, -201.85, 8.92, 64.78, 2, 0)
  89. MovementLoopAddLocation(NPC, -201.79, 16.45, 44.64, 2, 2)
  90. MovementLoopAddLocation(NPC, -201.79, 16.45, 44.64, 2, 0,"Despawning")
  91. end
  92. function Despawning(NPC)
  93. Despawn(NPC)
  94. end