aSeafurycorsair56855.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aSeafurycorsair56855.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.05 09:05:31
  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, -283.35, -57.94, 139.49, 2)
  13. MoveToLocation(NPC, -272.91, -57.94, 133.26, 2)
  14. MoveToLocation(NPC, -267.88, -57.94, 139.42, 2)
  15. MoveToLocation(NPC, -251.55, -57.94, 139.44, 2)
  16. MoveToLocation(NPC, -251.47, -57.94, 141.98, 2, "heading")
  17. end
  18. function heading(NPC)
  19. SetHeading(NPC, 177.73)
  20. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  21. end
  22. function movement_loop_continue(NPC)
  23. MoveToLocation(NPC, -251.55, -57.94, 139.44, 2)
  24. MoveToLocation(NPC, -267.88, -57.94, 139.42, 2)
  25. MoveToLocation(NPC, -272.91, -57.94, 133.26, 2)
  26. MoveToLocation(NPC, -283.35, -57.94, 139.49, 2)
  27. MoveToLocation(NPC, -303.30, -57.68, 139.74, 2, "heading2")
  28. end
  29. function heading2(NPC)
  30. SetHeading(NPC, 90)
  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