9
3

aMilitiaofficer55623.lua 997 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aMilitiaofficer55623.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.04.24 07:04:30
  5. Script Purpose :
  6. Script Notes :
  7. --]]
  8. function spawn(NPC)
  9. movement_loop_start(NPC) -- Starts a Movement Loop
  10. end
  11. function movement_loop_start(NPC)
  12. MoveToLocation(NPC, 208.92, -3.58, -68.60, 2, "heading")
  13. end
  14. function heading(NPC) -- Changes heading and add delay
  15. SetHeading(NPC, 71.69)
  16. AddTimer(NPC, 10000, "waypoint", 1)
  17. end
  18. function waypoint(NPC, Spawn)
  19. MoveToLocation(NPC, 264.28, -3.52, -46.55, 2, "waypoint_delay")
  20. end
  21. function waypoint_delay(NPC)
  22. SetHeading(NPC, 315.86)
  23. AddTimer(NPC, 5000, "point", 1) -- delay before animation
  24. end
  25. function point(NPC)
  26. PlayAnimation(NPC, 12028)
  27. AddTimer(NPC, 10000, "movement_loop_start")
  28. end
  29. function hailed(NPC, Spawn)
  30. FaceTarget(NPC, Spawn)
  31. AddTimer(NPC, 3000, "waypoint", 1, Spawn)
  32. end
  33. function respawn(NPC)
  34. spawn(NPC)
  35. end