9
3

aFreeportconscript56692.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aFreeportconscript56692.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.04 09:05:24
  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, -283.99, -56.07, 76.54, 2)
  13. MoveToLocation(NPC, -276.56, -56.16, 92.08, 2)
  14. MoveToLocation(NPC, -231.85, -55.71, 90.52, 2)
  15. MoveToLocation(NPC, -231.72, -55.71, 88.54, 2, "heading")
  16. end
  17. function heading(NPC)
  18. SetHeading(NPC, 358.23)
  19. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  20. end
  21. function movement_loop_continue(NPC)
  22. MoveToLocation(NPC, -231.85, -55.71, 90.52, 2)
  23. MoveToLocation(NPC, -276.56, -56.16, 92.08, 2)
  24. MoveToLocation(NPC, -283.99, -56.07, 76.54, 2)
  25. MoveToLocation(NPC, -298.52, -55.81, 58.52, 2, "heading2")
  26. end
  27. function heading2(NPC)
  28. SetHeading(NPC, 0.015)
  29. AddTimer(NPC, 10000, "movement_loop_start", 1)
  30. end
  31. function hailed(NPC, Spawn)
  32. FaceTarget(NPC, Spawn)
  33. local choice = MakeRandomInt(1, 2)
  34. if choice == 1 then
  35. AddTimer(NPC, 10000, "movement_loop_start", 1)
  36. else
  37. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  38. end
  39. end
  40. function respawn(NPC)
  41. spawn(NPC)
  42. end