aFreeportgladiator56128.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aFreeportgladiator56128.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.04.29 07:04:44
  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, 213.02, -3.49, 72.82, 2)
  13. MoveToLocation(NPC, 220.31, -4.06, 82.20, 2)
  14. MoveToLocation(NPC, 240.09, -4.10, 85.27, 2)
  15. MoveToLocation(NPC, 255.37, -3.70, 81.80, 2)
  16. MoveToLocation(NPC, 272.10, -3.81, 77.44, 2)
  17. MoveToLocation(NPC, 277.01, -3.65, 71.94, 2, "heading")
  18. end
  19. function heading(NPC)
  20. SetHeading(NPC, 313.74)
  21. AddTimer(NPC, 7000, "movement_loop_continue", 1)
  22. end
  23. function movement_loop_continue(NPC)
  24. MoveToLocation(NPC, 272.10, -3.81, 77.44, 2)
  25. MoveToLocation(NPC, 255.37, -3.70, 81.80, 2)
  26. MoveToLocation(NPC, 240.09, -4.10, 85.27, 2)
  27. MoveToLocation(NPC, 220.31, -4.06, 82.20, 2)
  28. MoveToLocation(NPC, 213.02, -3.49, 72.82, 2, "heading2")
  29. end
  30. function heading2(NPC)
  31. SetHeading(NPC, 72.98)
  32. AddTimer(NPC, 7000, "movement_loop_start", 1)
  33. end
  34. function hailed(NPC, Spawn)
  35. FaceTarget(NPC, Spawn)
  36. local choice = MakeRandomInt(1, 2)
  37. if choice == 1 then
  38. AddTimer(NPC, 7000, "movement_loop_start", 1)
  39. else
  40. AddTimer(NPC, 7000, "movement_loop_continue", 1)
  41. end
  42. end
  43. function respawn(NPC)
  44. spawn(NPC)
  45. end