circle_air_clockwise_small.lua 873 B

12345678910111213141516171819202122232425
  1. --[[
  2. Spawn Template
  3. Script Name : circle_air_clockwise_small_01.lua
  4. Script Purpose : Makes the spawn do a small circle in a counter-clockwise fashion.
  5. Script Author : Scatman
  6. Script Date : 2008-08-26
  7. Script Notes : If the coords are out of bounds then the spawn will still go there.
  8. ONLY for flying spawns!!!
  9. These are just suggested functions to get you started. Edit as needed.
  10. --]]
  11. function spawn(NPC)
  12. x = GetX(NPC)
  13. y = GetY(NPC)
  14. z = GetZ(NPC)
  15. MovementLoopAddLocation(NPC, x - 7 , 0, z + 8 , 2, math.random(5, 45))
  16. MovementLoopAddLocation(NPC, x + 5 , 0, z + 10, 2, math.random(5, 45))
  17. MovementLoopAddLocation(NPC, x + 10, 0, z - 9 , 2, math.random(5, 45))
  18. MovementLoopAddLocation(NPC, x - 5 , 0, z - 8 , 2, math.random(5, 45))
  19. end
  20. function hailed(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. end