aMilitiaguard555559.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aMilitiaguard555559.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.04.29 09:04:51
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. movement_loop_start(NPC)
  10. end
  11. function movement_loop_start(NPC)
  12. MoveToLocation(NPC, 186.73, -3.67, 96.10, 2)
  13. MoveToLocation(NPC, 188.48, -3.64, 101.79, 2)
  14. MoveToLocation(NPC, 200.94, -10.51, 115.77, 2)
  15. MoveToLocation(NPC, 194.95, -10.52, 122.10, 2)
  16. MoveToLocation(NPC, 167.96, -16.11, 97.72, 2, "heading")
  17. end
  18. function heading(NPC)
  19. SetHeading(NPC, 59.77)
  20. AddTimer(NPC, 7000, "movement_loop_continue", 1)
  21. end
  22. function movement_loop_continue(NPC)
  23. MoveToLocation(NPC, 194.95, -10.52, 122.10, 2)
  24. MoveToLocation(NPC, 200.94, -10.51, 115.77, 2)
  25. MoveToLocation(NPC, 188.48, -3.64, 101.79, 2)
  26. MoveToLocation(NPC, 186.73, -3.67, 96.10, 2, "heading2")
  27. end
  28. function heading2(NPC)
  29. SetHeading(NPC, 31.32)
  30. AddTimer(NPC, 7000, "movement_loop_start", 1)
  31. end
  32. function hailed(NPC, Spawn)
  33. FaceTarget(NPC, Spawn)
  34. local choice = MakeRandomInt(1, 2)
  35. if choice == 1 then
  36. AddTimer(NPC, 7000, "movement_loop_continue", 1)
  37. else
  38. AddTimer(NPC, 7000, "movement_loop_continue", 1)
  39. end
  40. end
  41. function respawn(NPC)
  42. spawn(NPC)
  43. end