9
3

aFreeportresident55824.lua 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aFreeportresident55824.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.03 07:05:05
  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, -146.96, -43.40, -167.62, 2)
  13. MoveToLocation(NPC, -145.85, -46.08, -175.91, 2)
  14. MoveToLocation(NPC, -142.79, -46.08, -182.24, 2)
  15. MoveToLocation(NPC, -136.87, -46.08, -185.39, 2)
  16. MoveToLocation(NPC, -123.51, -46.07, -183.66, 2)
  17. MoveToLocation(NPC, -105.34, -46.04, -196.39, 2)
  18. MoveToLocation(NPC, -125.85, -40.33, -206.69, 2)
  19. MoveToLocation(NPC, -116.61, -40.33, -238.42, 2)
  20. MoveToLocation(NPC, -101.61, -40.33, -243.77, 2)
  21. MoveToLocation(NPC, -99.86, -40.35, -248.10, 2, "heading")
  22. end
  23. function heading(NPC)
  24. SetHeading(NPC, 337.93)
  25. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  26. end
  27. function movement_loop_continue(NPC)
  28. MoveToLocation(NPC, -101.61, -40.33, -243.77, 2)
  29. MoveToLocation(NPC, -116.61, -40.33, -238.42, 2)
  30. MoveToLocation(NPC, -125.85, -40.33, -206.69, 2)
  31. MoveToLocation(NPC, -105.34, -46.04, -196.39, 2)
  32. MoveToLocation(NPC, -123.51, -46.07, -183.66, 2)
  33. MoveToLocation(NPC, -136.87, -46.08, -185.39, 2)
  34. MoveToLocation(NPC, -142.79, -46.08, -182.24, 2)
  35. MoveToLocation(NPC, -145.85, -46.08, -175.91, 2)
  36. MoveToLocation(NPC, -146.96, -43.40, -167.62, 2)
  37. MoveToLocation(NPC, -140.90, -41.22, -161.42, 2, "heading2")
  38. end
  39. function heading2(NPC)
  40. SetHeading(NPC, 224.38)
  41. AddTimer(NPC, 10000, "movement_loop_start", 1)
  42. end
  43. function hailed(NPC, Spawn)
  44. FaceTarget(NPC, Spawn)
  45. local choice = MakeRandomInt(1, 2)
  46. if choice == 1 then
  47. AddTimer(NPC, 10000, "movement_loop_start", 1)
  48. else
  49. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  50. end
  51. end
  52. function respawn(NPC)
  53. spawn(NPC)
  54. end