aFreeportdweller56778.lua 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aFreeportdweller56778.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.04.29 08:04:45
  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, 299.95, -3.66, 24.88, 2)
  13. MoveToLocation(NPC, 305.75, -3.55, 25.86, 2)
  14. MoveToLocation(NPC, 302.51, -3.89, 45.14, 2)
  15. MoveToLocation(NPC, 284.80, -3.78, 79.59, 2)
  16. MoveToLocation(NPC, 295.74, -3.48, 89.77, 2)
  17. MoveToLocation(NPC, 296.99, -4.27, 100.77, 2)
  18. MoveToLocation(NPC, 295.85, -4.39, 105.04, 2, "heading")
  19. end
  20. function heading(NPC)
  21. SetHeading(NPC, 69.30)
  22. AddTimer(NPC, 7000, "movement_loop_continue", 1)
  23. end
  24. function heading2(NPC)
  25. SetHeading(NPC, 51.70)
  26. AddTimer(NPC, 7000, "movement_loop_start", 1)
  27. end
  28. function movement_loop_continue(NPC)
  29. MoveToLocation(NPC, 296.99, -4.27, 100.77, 2)
  30. MoveToLocation(NPC, 295.74, -3.48, 89.77, 2)
  31. MoveToLocation(NPC, 284.80, -3.78, 79.59, 2)
  32. MoveToLocation(NPC, 302.51, -3.89, 45.14, 2)
  33. MoveToLocation(NPC, 305.75, -3.55, 25.86, 2)
  34. MoveToLocation(NPC, 299.95, -3.66, 24.88, 2, "heading2")
  35. end
  36. function hailed(NPC, Spawn)
  37. FaceTarget(NPC, Spawn)
  38. if choice == 1 then
  39. AddTimer(NPC, 7000, "movement_loop_continue", 1)
  40. else
  41. AddTimer(NPC, 7000, "movement_loop_continue", 1)
  42. end
  43. end
  44. function respawn(NPC)
  45. spawn(NPC)
  46. end