9
3

aFreeportresident55999.lua 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aFreeportresident55999.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.02 05:05:21
  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, -92.76, -34.59, -269.72, 2)
  13. MoveToLocation(NPC, -100.26, -33.51, -272.97, 2)
  14. MoveToLocation(NPC, -99.54, -33.51, -277.09, 2)
  15. MoveToLocation(NPC, -90.72, -33.51, -275.36, 2)
  16. MoveToLocation(NPC, -83.10, -33.51, -302.81, 2)
  17. MoveToLocation(NPC, -81.70, -33.51, -330.80, 2)
  18. MoveToLocation(NPC, -85.34, -33.51, -330.74, 2)
  19. MoveToLocation(NPC, -85.51, -33.51, -335.13, 2, "heading")
  20. end
  21. function heading(NPC)
  22. SetHeading(NPC, 30.53)
  23. AddTimer(NPC, 15000, "movement_loop_continue", 1)
  24. end
  25. function movement_loop_continue(NPC)
  26. MoveToLocation(NPC, -85.34, -33.51, -330.74, 2)
  27. MoveToLocation(NPC, -81.70, -33.51, -330.80, 2)
  28. MoveToLocation(NPC, -83.10, -33.51, -302.81, 2)
  29. MoveToLocation(NPC, -90.72, -33.51, -275.36, 2)
  30. MoveToLocation(NPC, -99.54, -33.51, -277.09, 2)
  31. MoveToLocation(NPC, -100.26, -33.51, -272.97, 2)
  32. MoveToLocation(NPC, -92.76, -34.59, -269.72, 2)
  33. MoveToLocation(NPC, -94.50, -34.58, -264.63, 2, "heading2")
  34. end
  35. function heading2(NPC)
  36. SetHeading(NPC, 148.40)
  37. AddTimer(NPC, 15000, "movement_loop_start", 1)
  38. end
  39. function hailed(NPC, Spawn)
  40. FaceTarget(NPC, Spawn)
  41. local choice = MakeRandomInt(1, 2)
  42. if choice == 1 then
  43. AddTimer(NPC, 10000, "movement_loop_start", 1)
  44. else
  45. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  46. end
  47. end
  48. function respawn(NPC)
  49. spawn(NPC)
  50. end