9
3

afrozensentinel.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --[[
  2. Script Name : SpawnScripts/DrayeksChamber/afrozensentinel.lua
  3. Script Author : Neveruary
  4. Script Date : 2022.07.17 09:07:02
  5. Script Purpose : Governs the behavior of a frozen sentinel in Drayek's Chamber.
  6. Script Notes : Spell collects are pending. The frozen mobs all check themselves when they die and send a timer to Drayek to send in the wolves.
  7. --]]
  8. function spawn(NPC)
  9. end
  10. function death(NPC, Spawn)
  11. local zone = GetZone(NPC)
  12. local add1 = GetSpawnByLocationID(zone, 351396)
  13. local add2 = GetSpawnByLocationID(zone, 351398)
  14. local add3 = GetSpawnByLocationID(zone, 351399)
  15. if IsAlive(add1) == true then
  16. elseif IsAlive(add2) == true then
  17. elseif IsAlive(add3) == true then
  18. else
  19. AddTimer(NPC, 500, "frozencheck", 1, Spawn)
  20. end
  21. end
  22. function frozencheck(NPC, Spawn)
  23. local drayek = GetSpawn(NPC, 1930003)
  24. local zone = GetZone(NPC)
  25. local add1 = GetSpawnByLocationID(zone, 351401)
  26. local add2 = GetSpawnByLocationID(zone, 351404)
  27. local add3 = GetSpawnByLocationID(zone, 351405)
  28. if IsAlive(add1) == true then
  29. elseif IsAlive(add2) == true then
  30. elseif IsAlive(add3) == true then
  31. else
  32. SetTempVariable(drayek, "addsphase", "1")
  33. AddTimer(drayek, 10000, "addsSpawn", 1, Spawn)
  34. end
  35. end
  36. function respawn(NPC)
  37. spawn(NPC)
  38. end