9
3

aFreeportvisitant56893lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aFreeportvisitant56893lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.05 09:05:15
  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, -278.78, -56.17, 205.11, 2)
  13. MoveToLocation(NPC, -250.06, -56.07, 204.01, 2)
  14. MoveToLocation(NPC, -250.04, -56.07, 201.55, 2, "heading")
  15. end
  16. function heading(NPC)
  17. SetHeading(NPC, 358.76)
  18. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  19. end
  20. function movement_loop_continue(NPC)
  21. MoveToLocation(NPC, -250.06, -56.07, 204.01, 2)
  22. MoveToLocation(NPC, -278.78, -56.17, 205.11, 2)
  23. MoveToLocation(NPC, -299.40, -58.94, 202.41, 2, "heading2")
  24. end
  25. function heading2(NPC)
  26. SetHeading(NPC, 116.35)
  27. AddTimer(NPC, 10000, "movement_loop_start", 1)
  28. end
  29. function hailed(NPC, Spawn)
  30. FaceTarget(NPC, Spawn)
  31. local choice = MakeRandomInt(1, 2)
  32. if choice == 1 then
  33. AddTimer(NPC, 10000, "movement_loop_start", 1)
  34. else
  35. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  36. end
  37. end
  38. function respawn(NPC)
  39. spawn(NPC)
  40. end