9
3

ablackguard.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : SpawnScripts/WailingCaves/ablackguard.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.06.30 09:06:49
  5. Script Purpose :
  6. :
  7. --]]
  8. function prespawn(NPC)
  9. SetSpawnAnimation(NPC, 13016)
  10. end
  11. function spawn(NPC)
  12. SetAggroRadius(NPC, 20, true)
  13. end
  14. function death(NPC, Spawn)
  15. -- BELOW CHECKS IF ALL BLACKGUARDS IN ROOM IS DEAD, OPENS SECRET DOOR AND CALL FUNCTIONS IN GHI'ZARD WORG MASTER'S SCRIPT
  16. local zone = GetZone(Spawn)
  17. local blackguard1 = GetSpawnByLocationID(zone, 404841)
  18. local blackguard2 = GetSpawnByLocationID(zone, 404844)
  19. local blackguard3 = GetSpawnByLocationID(zone, 133769612)
  20. local blackguard4 = GetSpawnByLocationID(zone, 133769613)
  21. if not IsAlive(blackguard1) and not IsAlive(blackguard2) and not IsAlive(blackguard3) and not IsAlive(blackguard4) then
  22. local door = GetSpawn(NPC, 2580104)
  23. OpenDoor(door)
  24. local zone = GetZone(Spawn)
  25. local WorgMaster = GetSpawnByLocationID(zone, 404870)
  26. if WorgMaster ~= nil then
  27. AddTimer(WorgMaster, 3000, "WorgMaster")
  28. end
  29. end
  30. end
  31. function respawn(NPC)
  32. spawn(NPC)
  33. end