arat.lua 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --[[
  2. Script Name : SpawnScripts/FarJourneyFreeport/arat.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.08.04 12:08:53
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/CombatModule"
  9. function spawn(NPC, Spawn)
  10. combatModule(NPC, Spawn)
  11. waypoints(NPC)
  12. end
  13. function hailed(NPC, Spawn)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function death(NPC,Spawn)
  19. local zone = GetZone(NPC)
  20. local rat1 = GetSpawnByLocationID(zone,1586105)
  21. local rat2 = GetSpawnByLocationID(zone,1586106)
  22. if not IsAlive(rat1) and not IsAlive(rat2) then
  23. SetPlayerLevel(Spawn,2)
  24. end
  25. end
  26. function waypoints(NPC)
  27. if GetSpawnLocationID(NPC)== 1586106 then
  28. MovementLoopAddLocation(NPC, 2.31, -2.07, -4.95, 1, math.random(6,10))
  29. MovementLoopAddLocation(NPC, 2.11, -2.07, -6.55, 1, math.random(6,10))
  30. MovementLoopAddLocation(NPC, 2.74, -2.07, -6.01, 1, math.random(6,10))
  31. MovementLoopAddLocation(NPC, 0.07, -2.07, -3.85, 1, math.random(6,10))
  32. MovementLoopAddLocation(NPC, 0.72, -2.07, -6.06, 1, math.random(6,10))
  33. MovementLoopAddLocation(NPC, 2.38, -2.07, -5.3, 1, math.random(6,10))
  34. elseif GetSpawnLocationID(NPC)== 1586105 then
  35. MovementLoopAddLocation(NPC, -0.83, -2.07, 3.03, 1, math.random(6,10))
  36. MovementLoopAddLocation(NPC, -1.84, -2.07, 4.51, 1, math.random(6,10))
  37. MovementLoopAddLocation(NPC, 0.4, -2.07, 2.09, 1, math.random(6,10))
  38. MovementLoopAddLocation(NPC, -0.34, -2.07, 3.74, 1, math.random(6,10))
  39. MovementLoopAddLocation(NPC, -1.33, -2.07, 2.02, 1, math.random(6,10))
  40. end
  41. end