9
3

afilamentstrangler.lua 759 B

123456789101112131415161718192021222324252627282930
  1. --[[
  2. Script Name : <script-name>
  3. Script Purpose : <purpose>
  4. Script Author : <author-name>
  5. Script Date : <date>
  6. Script Notes : <special-instructions>
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 10, "InRange")
  10. end
  11. function hailed(NPC, Spawn)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. Monitor = GetSpawn(NPC, 2630070)
  18. if Monitor ~= nil and GetDistance(NPC, Monitor) <= 10 then
  19. Emote(NPC, "moves slightly as filaments emerge from the ground, gripping its target.")
  20. SpawnMob(GetZone(NPC), 2630682, false, GetX(Monitor), GetY(Monitor), GetZ(Monitor), GetHeading(Monitor))
  21. Despawn(Monitor)
  22. FilamentMonitor = GetSpawn(NPC, 2630682)
  23. Despawn(FilamentMonitor, 60000)
  24. end
  25. end