fogcubespell.lua 724 B

12345678910111213141516171819202122232425262728293031
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/fogcubespell.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.08.22 06:08:35
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 15, "InRange", "LeaveRange")
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function InRange(NPC)
  15. local zone = GetZone(NPC)
  16. local Puppeteer = GetSpawnByLocationID(zone, 430289)
  17. if Puppeteer ~= nil then
  18. if IsAlive(Puppeteer)== true then
  19. PlayAnimation(NPC, 4012)
  20. AddTimer(NPC, 7000, "InRange")
  21. end
  22. end
  23. end
  24. function LeaveRange(NPC)
  25. PlayAnimation(NPC, 4011)
  26. end