aSeafurycorsair56857.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aSeafurycorsair56857.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.04 09:05:11
  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, -208.98, -56.07, -56.44, 2)
  13. MoveToLocation(NPC, -212.10, -56.07, -56.47, 2, "heading")
  14. end
  15. function heading(NPC)
  16. SetHeading(NPC, 89.39)
  17. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  18. end
  19. function movement_loop_continue(NPC)
  20. MoveToLocation(NPC, -208.98, -56.07, -56.44, 2)
  21. MoveToLocation(NPC, -208.43, -56.07, 9.66, 2)
  22. MoveToLocation(NPC, -210.44, -56.07, 10.31, 2, "heading2")
  23. end
  24. function heading2(NPC)
  25. SetHeading(NPC, 103.61)
  26. AddTimer(NPC, 10000, "movement_loop_start", 1)
  27. end
  28. function hailed(NPC, Spawn)
  29. FaceTarget(NPC, Spawn)
  30. local choice = MakeRandomInt(1, 2)
  31. if choice == 1 then
  32. AddTimer(NPC, 10000, "movement_loop_start", 1)
  33. else
  34. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  35. end
  36. end
  37. function respawn(NPC)
  38. spawn(NPC)
  39. end