9
3

aFreeportgladiator55630.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aFreeportgladiator55630.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.04.29 09:04:46
  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, 176.04, -3.53, -22.35, 2)
  13. MoveToLocation(NPC, 166.63, -3.53, -11.70, 2)
  14. MoveToLocation(NPC, 164.38, -3.53, 45.97, 2)
  15. MoveToLocation(NPC, 168.38, -3.53, 44.84, 2, "heading")
  16. end
  17. function heading(NPC)
  18. SetHeading(NPC, 275.51)
  19. AddTimer(NPC, 7000, "movement_loop_continue", 1)
  20. end
  21. function movement_loop_continue(NPC)
  22. MoveToLocation(NPC, 164.38, -3.53, 45.97, 2)
  23. MoveToLocation(NPC, 166.63, -3.53, -11.70, 2)
  24. MoveToLocation(NPC, 176.04, -3.53, -22.35, 2, "heading2")
  25. end
  26. function heading2(NPC)
  27. SetHeading(NPC, 117.31)
  28. AddTimer(NPC, 7000, "movement_loop_start", 1)
  29. end
  30. function hailed(NPC, Spawn)
  31. FaceTarget(NPC, Spawn)
  32. local choice = MakeRandomInt(1, 2)
  33. if choice == 1 then
  34. AddTimer(NPC, 7000, "movement_loop_start", 1)
  35. else
  36. AddTimer(NPC, 7000, "movement_loop_continue", 1)
  37. end
  38. end
  39. function respawn(NPC)
  40. spawn(NPC)
  41. end