9
3

aFreeportdenizen55672.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aFreeportdenizen55672.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.03 09:05:02
  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, -144.42, -52.97, -274.36, 2)
  13. MoveToLocation(NPC, -122.38, -45.85, -267.94, 2)
  14. MoveToLocation(NPC, -105.71, -42.63, -303.44, 2)
  15. MoveToLocation(NPC, -106.99, -34.63, -350.79, 2)
  16. MoveToLocation(NPC, -109.79, -34.63, -351.12, 2, "heading")
  17. end
  18. function heading(NPC)
  19. SetHeading(NPC, 98.85)
  20. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  21. end
  22. function movement_loop_continue(NPC)
  23. MoveToLocation(NPC, -106.99, -34.63, -350.79, 2)
  24. MoveToLocation(NPC, -105.71, -42.63, -303.44, 2)
  25. MoveToLocation(NPC, -122.38, -45.85, -267.94, 2)
  26. MoveToLocation(NPC, -144.42, -52.97, -274.36, 2)
  27. MoveToLocation(NPC, -165.42, -52.84, -284.11, 2, "heading2")
  28. end
  29. function heading2(NPC)
  30. SetHeading(NPC, 80.13)
  31. AddTimer(NPC, 10000, "movement_loop_start", 1)
  32. end
  33. function hailed(NPC, Spawn)
  34. FaceTarget(NPC, Spawn)
  35. local choice = MakeRandomInt(1, 2)
  36. if choice == 1 then
  37. AddTimer(NPC, 10000, "movement_loop_start", 1)
  38. else
  39. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  40. end
  41. end
  42. function respawn(NPC)
  43. spawn(NPC)
  44. end