aFreeportdenizen55659.lua 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aFreeportdenizen55659.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.06 08:05:49
  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, -162.09, -46.74, 205.00, 2)
  13. MoveToLocation(NPC, -151.24, -35.20, 172.48, 2)
  14. MoveToLocation(NPC, -142.75, -35.20, 174.01, 2)
  15. MoveToLocation(NPC, -148.86, -30.49, 209.21, 2)
  16. MoveToLocation(NPC, -154.25, -30.25, 229.99, 2)
  17. MoveToLocation(NPC, -162.06, -30.25, 229.15, 2)
  18. MoveToLocation(NPC, -170.19, -28.97, 225.48, 2, "heading")
  19. end
  20. function heading(NPC, Spawn)
  21. SetHeading(NPC, 48.73)
  22. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  23. end
  24. function movement_loop_continue(NPC)
  25. MoveToLocation(NPC, -162.06, -30.25, 229.15, 2)
  26. MoveToLocation(NPC, -154.25, -30.25, 229.99, 2)
  27. MoveToLocation(NPC, -148.86, -30.49, 209.21, 2)
  28. MoveToLocation(NPC, -142.75, -35.20, 174.01, 2)
  29. MoveToLocation(NPC, -151.24, -35.20, 172.48, 2)
  30. MoveToLocation(NPC, -162.09, -46.74, 205.00, 2)
  31. MoveToLocation(NPC, -170.61, -46.78, 204.42, 2, "heading2")
  32. end
  33. function heading2(NPC, Spawn)
  34. SetHeading(NPC, 92.45)
  35. AddTimer(NPC, 10000, "movement_loop_start", 1)
  36. end
  37. function hailed(NPC, Spawn)
  38. FaceTarget(NPC, Spawn)
  39. local choice = MakeRandomInt(1, 2)
  40. if choice == 1 then
  41. AddTimer(NPC, 10000, "movement_loop_start", 1)
  42. else
  43. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  44. end
  45. end
  46. function respawn(NPC)
  47. spawn(NPC)
  48. end