9
3

aFreeportvisitant56898.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --[[
  2. Script Name : SpawnScripts/Freeport/aFreeportvisitant56898.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.05.04 09:05: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, -245.53, -56.06, 67.14, 2)
  13. MoveToLocation(NPC, -288.00, -56.07, 67.79, 2)
  14. MoveToLocation(NPC, -302.16, -56.07, 82.60, 2)
  15. MoveToLocation(NPC, -303.83, -56.07, 84.26, 2, "heading")
  16. end
  17. function heading(NPC)
  18. SetHeading(NPC, 86.62)
  19. AddTimer(NPC, 10000, "movement_loop_continue", 1)
  20. end
  21. function heading2(NPC)
  22. SetHeading(NPC, 181.75)
  23. AddTimer(NPC, 10000, "movement_loop_start", 1)
  24. end
  25. function movement_loop_continue(NPC)
  26. MoveToLocation(NPC, -302.16, -56.07, 82.60, 2)
  27. MoveToLocation(NPC, -288.00, -56.07, 67.79, 2)
  28. MoveToLocation(NPC, -245.53, -56.06, 67.14, 2)
  29. MoveToLocation(NPC, -245.35, -56.06, 75.44, 2, "heading2")
  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