aFreeportdweller55771.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aFreeportdweller55771.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.04 08:05:00
  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, -207.81, -56.07, 93.64, 2)
  13. MoveToLocation(NPC, -213.14, -56.10, 69.60, 2)
  14. MoveToLocation(NPC, -263.67, -56.07, 68.09, 2)
  15. MoveToLocation(NPC, -263.63, -56.07, 58.46, 2, "heading")
  16. end
  17. function heading(NPC)
  18. SetHeading(NPC, 359.46)
  19. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  20. end
  21. function movement_loop_continue(NPC)
  22. MoveToLocation(NPC, -263.67, -56.07, 68.09, 2)
  23. MoveToLocation(NPC, -213.14, -56.10, 69.60, 2)
  24. MoveToLocation(NPC, -207.81, -56.07, 93.64, 2)
  25. MoveToLocation(NPC, -200.53, -55.81, 93.87, 2, "heading2")
  26. end
  27. function heading2(NPC)
  28. SetHeading(NPC, 269.14)
  29. AddTimer(NPC, 10000, "movement_loop_start", 1)
  30. end
  31. function hailed(NPC, Spawn)
  32. FaceTarget(NPC, Spawn)
  33. local choice = MakeRandomInt(1, 2)
  34. if choice == 1 then
  35. AddTimer(NPC, 10000, "movement_loop_start", 1)
  36. else
  37. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  38. end
  39. end
  40. function respawn(NPC)
  41. spawn(NPC)
  42. end