afrozensentinel.lua 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. require "SpawnScripts/Generic/NPCModule"
  9. function spawn(NPC, Spawn)
  10. --NPCModule(NPC, Spawn)
  11. end
  12. function death(NPC, Spawn)
  13. local zone = GetZone(NPC)
  14. local add1 = GetSpawnByLocationID(zone, 351396)
  15. local add2 = GetSpawnByLocationID(zone, 351398)
  16. local add3 = GetSpawnByLocationID(zone, 351399)
  17. if IsAlive(add1) == true then
  18. elseif IsAlive(add2) == true then
  19. elseif IsAlive(add3) == true then
  20. else
  21. AddTimer(NPC, 500, "frozencheck", 1, Spawn)
  22. end
  23. end
  24. function frozencheck(NPC, Spawn)
  25. local drayek = GetSpawn(NPC, 1930003)
  26. local zone = GetZone(NPC)
  27. local add1 = GetSpawnByLocationID(zone, 351401)
  28. local add2 = GetSpawnByLocationID(zone, 351404)
  29. local add3 = GetSpawnByLocationID(zone, 351405)
  30. if IsAlive(add1) == true then
  31. elseif IsAlive(add2) == true then
  32. elseif IsAlive(add3) == true then
  33. else
  34. SetTempVariable(drayek, "addsphase", "1")
  35. AddTimer(drayek, 10000, "addsSpawn", 1, Spawn)
  36. end
  37. end
  38. function respawn(NPC)
  39. spawn(NPC)
  40. end