9
3

NormDUnnar.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. --[[
  2. Script Name : SpawnScripts/Freeport/NormDUnnar.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.07.19 10:07:00
  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, 146.07, -9.21, 107.67, 2)
  14. MoveToLocation(NPC, 152.40, -9.21, 101.21, 2)
  15. MoveToLocation(NPC, 175.39, -7.52, 123.94, 2)
  16. MoveToLocation(NPC, 163.34, -7.52, 136.86, 2, "heading")
  17. end
  18. function heading(NPC)
  19. SetHeading(NPC, 135.48)
  20. AddTimer(NPC, 7000, "movement_loop_continue", 1)
  21. end
  22. function movement_loop_continue(NPC)
  23. MoveToLocation(NPC, 175.39, -7.52, 123.94, 2)
  24. MoveToLocation(NPC, 152.40, -9.21, 101.21, 2)
  25. MoveToLocation(NPC, 146.07, -9.21, 107.67, 2)
  26. MoveToLocation(NPC, 144.61, -8.96, 106.11, 2, "heading2")
  27. end
  28. function heading2(NPC)
  29. SetHeading(NPC, 40.66)
  30. AddTimer(NPC, 7000, "movement_loop_start", 1)
  31. end
  32. function hailed(NPC, Spawn)
  33. FaceTarget(NPC, Spawn)
  34. GenericGuardHail(NPC, Spawn, Faction)
  35. local choice = MakeRandomInt(1, 2)
  36. if choice == 1 then
  37. AddTimer(NPC, 7000, "movement_loop_continue", 1)
  38. else
  39. AddTimer(NPC, 7000, "movement_loop_start", 1)
  40. end
  41. end
  42. function respawn(NPC)
  43. spawn(NPC)
  44. end