aFreeportresident56715.lua 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aFreeportresident56715.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.09 07:05:12
  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, -97.38, -18.02, 271.73, 2)
  13. MoveToLocation(NPC, -114.80, -18.02, 261.90, 2)
  14. MoveToLocation(NPC, -119.00, -18.02, 245.77, 2)
  15. MoveToLocation(NPC, -112.55, -25.01, 224.20, 2)
  16. MoveToLocation(NPC, -146.78, -30.44, 213.19, 2)
  17. MoveToLocation(NPC, -151.59, -30.28, 226.77, 2)
  18. MoveToLocation(NPC, -139.19, -30.24, 244.67, 2, "heading")
  19. end
  20. function heading(NPC, Spawn)
  21. SetHeading(NPC, 207.86)
  22. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  23. end
  24. function heading2(NPC, Spawn)
  25. SetHeading(NPC, 291.4)
  26. AddTimer(NPC, 10000, "movement_loop_start", 1)
  27. end
  28. function movement_loop_continue(NPC)
  29. MoveToLocation(NPC, -151.59, -30.28, 226.77, 2)
  30. MoveToLocation(NPC, -146.78, -30.44, 213.19, 2)
  31. MoveToLocation(NPC, -112.55, -25.01, 224.20, 2)
  32. MoveToLocation(NPC, -119.00, -18.02, 245.77, 2)
  33. MoveToLocation(NPC, -114.80, -18.02, 261.90, 2)
  34. MoveToLocation(NPC, -97.38, -18.02, 271.73, 2)
  35. MoveToLocation(NPC, -92.85, -18.02, 267.56, 2, "heading2")
  36. end
  37. function respawn(NPC)
  38. spawn(NPC)
  39. end
  40. function hailed(NPC, Spawn)
  41. FaceTarget(NPC, Spawn)
  42. local choice = MakeRandomInt(1, 2)
  43. if choice == 1 then
  44. AddTimer(NPC, 10000, "movement_loop_start", 1)
  45. else
  46. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  47. end
  48. end