adeaddeer1587605.lua 751 B

123456789101112131415161718192021222324252627282930
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/adeaddeer1587605.lua
  3. Script Author : Rylec
  4. Script Date : 2020.05.17 11:05:40
  5. Script Purpose : Deer despawns when the last of the two Sapswills die
  6. --]]
  7. function spawn(NPC)
  8. DeerDespawn(NPC, Spawn)
  9. end
  10. function hailed(NPC, Spawn)
  11. FaceTarget(NPC, Spawn)
  12. end
  13. function respawn(NPC)
  14. end
  15. function DeerDespawn(NPC, Spawn)
  16. Shout(NPC, "Working")
  17. local zone = GetZone(NPC)
  18. local newSpawn = GetSpawnByLocationID(zone, 1587596)
  19. local newSpawn2 = GetSpawnByLocationID(zone, 1587597)
  20. if newSpawn ~= nil and newSpawn2 ~= nil then
  21. -- if not IsAlive(newSpawn) and not IsAlive(newSpawn2) then
  22. Despawn(NPC)
  23. end
  24. end