circle_clockwise_small_01.lua 782 B

12345678910111213141516171819202122232425
  1. --[[
  2. Script Name : SpawnScripts/Generic/circle_clockwise_small_01.lua
  3. Script Purpose : Makes the spawn do a small circle in a clockwise fashion.
  4. Script Author : Scatman
  5. Script Date : 2008-08-26
  6. Script Notes : If the coords are out of bounds then the spawn will still go there.
  7. --]]
  8. function spawn(NPC)
  9. x = GetX(NPC)
  10. y = GetY(NPC)
  11. z = GetZ(NPC)
  12. MovementLoopAddLocation(NPC, x + 7 , y, z - 8 , 2, math.random(5, 15))
  13. MovementLoopAddLocation(NPC, x - 5 , y, z - 10, 2, math.random(5, 15))
  14. MovementLoopAddLocation(NPC, x - 10, y, z + 9 , 2, math.random(5, 15))
  15. MovementLoopAddLocation(NPC, x + 5 , y, z + 8 , 2, math.random(5, 15))
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function hailed(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. end