ablackguard.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 spawn(NPC)
  9. SetAggroRadius(NPC, 20, true)
  10. end
  11. function death(NPC, Spawn)
  12. -- BELOW CHECKS IF ALL BLACKGUARDS IN ROOM IS DEAD, OPENS SECRET DOOR AND CALL FUNCTIONS IN GHI'ZARD WORG MASTER'S SCRIPT
  13. local zone = GetZone(Spawn)
  14. local blackguard1 = GetSpawnByLocationID(zone, 404841)
  15. local blackguard2 = GetSpawnByLocationID(zone, 404844)
  16. local blackguard3 = GetSpawnByLocationID(zone, 133769612)
  17. local blackguard4 = GetSpawnByLocationID(zone, 133769613)
  18. if not IsAlive(blackguard1) and not IsAlive(blackguard2) and not IsAlive(blackguard3) and not IsAlive(blackguard4) then
  19. local door = GetSpawn(NPC, 2580104)
  20. OpenDoor(door)
  21. local zone = GetZone(Spawn)
  22. local WorgMaster = GetSpawnByLocationID(zone, 404870)
  23. if WorgMaster ~= nil then
  24. AddTimer(WorgMaster, 3000, "WorgMaster")
  25. local Worg = GetSpawnByLocationID(zone, 404852)
  26. if Worg ~= nil then
  27. AddTimer(Worg, 3000, "FollowMaster")
  28. end
  29. end
  30. end
  31. end
  32. function respawn(NPC)
  33. spawn(NPC)
  34. end