circle_clockwise_small_02.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. --[[
  2. Spawn Template
  3. Script Name : circle_clockwise_small_02.lua
  4. Script Purpose : Makes the spawn do a small circle in a 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. These are just suggested functions to get you started. Edit as needed.
  9. --]]
  10. function spawn(NPC)
  11. x = GetX(NPC)
  12. y = GetY(NPC)
  13. z = GetZ(NPC)
  14. MovementLoopAddLocation(NPC, x + 2 , y, z - 8 , 2, math.random(5, 15))
  15. MovementLoopAddLocation(NPC, x - 7 , y, z - 5 , 2, math.random(5, 15))
  16. MovementLoopAddLocation(NPC, x , y, z + 6 , 2, math.random(5, 15))
  17. MovementLoopAddLocation(NPC, x + 9 , y, z + 1 , 2, math.random(5, 15))
  18. end
  19. function respawn(NPC)
  20. spawn(NPC)
  21. end
  22. function hailed(NPC, Spawn)
  23. FaceTarget(NPC, Spawn)
  24. end
  25. --[[
  26. PlayFlavor(NPC, "", "Wha... what happened? I should get back to the colony!", "", 1689589577, 4560189)
  27. PlayFlavor(NPC, "", "Whe... where am I? I should get back to the colony!", "", 1689589577, 4560189)
  28. PlayFlavor(NPC, "", "Whew, thank you! I couldn't hold on much longer.", "", 1689589577, 4560189)
  29. PlayFlavor(NPC, "", "Ahhhhh! I must escape!", "", 1689589577, 4560189)
  30. --]]