CalidiusSellic.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --[[
  2. Script Name : SpawnScripts/Freeport/CalidiusSellic.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.07.18 09:07:15
  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, 145.17, -26.15, 128.27, 2)
  14. MoveToLocation(NPC, 143.22, -26.15, 130.12, 2, "heading")
  15. end
  16. function heading(NPC)
  17. SetHeading(NPC, 132.62)
  18. AddTimer(NPC, 6000, "movement_loop_continue", 1)
  19. end
  20. function movement_loop_continue(NPC)
  21. MoveToLocation(NPC, 145.17, -26.15, 128.27, 2)
  22. MoveToLocation(NPC, 172.32, -26.15, 155.78, 2)
  23. MoveToLocation(NPC, 69.74, -26.15, 158.45, 2, "heading2")
  24. end
  25. function heading2(NPC)
  26. SetHeading(NPC, 134.47)
  27. AddTimer(NPC, 6000, "movement_loop_start, 1")
  28. end
  29. function hailed(NPC, Spawn)
  30. FaceTarget(NPC, Spawn)
  31. GenericGuardHail(NPC, Spawn, Faction)
  32. local choice = MakeRandomInt(1, 2)
  33. if choice == 1 then
  34. AddTimer(NPC, 7000, "movement_loop_continue", 1)
  35. else
  36. AddTimer(NPC, 7000, "movement_loop_start", 1)
  37. end
  38. end
  39. function respawn(NPC)
  40. spawn(NPC)
  41. end