DecimusEonus.lua 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. --[[
  2. Script Name : SpawnScripts/Freeport/DecimusEonus.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.07.19 10:07:57
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
  9. function spawn(NPC)
  10. movement_loop_start(NPC)
  11. end
  12. function movement_loop_start(NPC)
  13. MoveToLocation(NPC, -160.03, -30.24, 251.79, 2)
  14. MoveToLocation(NPC, -147.96, -30.24, 244.01, 2)
  15. MoveToLocation(NPC, -144.88, -30.24, 237.96, 2)
  16. MoveToLocation(NPC, -152.04, -30.30, 224.31, 2)
  17. MoveToLocation(NPC, -141.78, -35.20, 174.48, 2)
  18. MoveToLocation(NPC, -148.05, -35.20, 170.02, 2)
  19. MoveToLocation(NPC, -154.36, -35.20, 168.85, 2, "heading")
  20. end
  21. function heading(NPC)
  22. SetHeading(NPC, 85.99)
  23. AddTimer(NPC, 11000, "movement_loop_continue", 1)
  24. end
  25. function movement_loop_continue(NPC)
  26. MoveToLocation(NPC, -148.05, -35.20, 170.02, 2)
  27. MoveToLocation(NPC, -141.78, -35.20, 174.48, 2)
  28. MoveToLocation(NPC, -152.04, -30.30, 224.31, 2)
  29. MoveToLocation(NPC, -144.88, -30.24, 237.96, 2)
  30. MoveToLocation(NPC, -147.96, -30.24, 244.01, 2)
  31. MoveToLocation(NPC, -160.03, -30.24, 251.79, 2, "heading2")
  32. end
  33. function heading2(NPC)
  34. SetHeading(NPC, 172.81)
  35. AddTimer(NPC, 11000, "movement_loop_start", 1)
  36. end
  37. function hailed(NPC, Spawn)
  38. FaceTarget(NPC, Spawn)
  39. GenericGuardHail(NPC, Spawn, Faction)
  40. local choice = MakeRandomInt(1, 2)
  41. if choice == 1 then
  42. AddTimer(NPC, 100000, "movement_loop_start", 1)
  43. else
  44. AddTimer(NPC, 100000, "movement_loop_continue", 1)
  45. end
  46. end
  47. function respawn(NPC)
  48. spawn(NPC)
  49. end