9
3

asprintingRyGorrgatecaller.lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --[[
  2. Script Name : SpawnScripts/asprintingRyGorrgatecaller.lua
  3. Script Purpose : for the sprinting gatecallers near the Great Shelf
  4. Script Author : theFoof
  5. Script Date : 2013.6.2
  6. Script Notes :
  7. --]]
  8. function spawn(NPC)
  9. local X = GetX(NPC)
  10. local Y = GetY(NPC)
  11. local Z = GetZ(NPC)
  12. MovementLoopAddLocation(NPC, X, Y, Z, 5, math.random(0,3))
  13. MovementLoopAddLocation(NPC, 665.67 + math.random(-7,7), 21.28, -250.8 + math.random(-7,7), 5, 0)
  14. MovementLoopAddLocation(NPC, 648.25 + math.random(-7,7), 25.98, -272.83 + math.random(-7,7), 5, 0)
  15. MovementLoopAddLocation(NPC, 638.87 + math.random(-7,7), 33.15, -301.59 + math.random(-7,7), 5, 0, "death_timer")
  16. MovementLoopAddLocation(NPC, 644.30 + math.random(-7,7), 52.16, -344.42 + math.random(-7,7), 5, 0)
  17. MovementLoopAddLocation(NPC, 661.05 + math.random(-7,7), 74.74, -399.58 + math.random(-7,7), 5, 0)
  18. MovementLoopAddLocation(NPC, 668.04 + math.random(-7,7), 85.46, -435.57 + math.random(-7,7), 5, 0)
  19. end
  20. function hailed(NPC, Spawn)
  21. FacetTarget(NPC, Spawn)
  22. end
  23. function respawn(NPC)
  24. spawn(NPC)
  25. end
  26. function death_timer(NPC)
  27. AddTimer(NPC, math.random(2000, 23000), "die") -- sets the delay before death after NPC hits the ramp
  28. end
  29. function die(NPC) -- this makes the closest "a vigilant gauntlet defender" kill the NPC
  30. KillSpawn(NPC, GetSpawn(NPC, 4700076), 1)
  31. end