/if (${Me.AltAbilityReady[blessing of resurrection]} && ${BattleRez} && ${SpawnCount[corpse Guild zradius 50 radius 110]} && !${Me.Song[Touch Of the Divine].ID}) /call battlerez
Sub BattleRez
/varset MacroState BattleRez
/declare i int local
/if (${SpawnCount[pccorpse raid zradius 75 radius 110 class cleric]} && ${Raid.Members}) {
/for i 1 to ${SpawnCount[pccorpse raid zradius 75 radius 110 class cleric]}
/if (!${corpsetimer${NearestSpawn[${i},pccorpse raid zradius 75 radius 110 class cleric].ID}}) {
/varset RezID ${NearestSpawn[${i},pccorpse raid zradius 75 radius 110 class cleric].ID}
/if (${DivineRezCleric} && ${Me.AltAbilityReady[Divine Resurrection]}) {
/if (${AnnounceRez}) /${RezChannel} Rezzing ${Spawn[${RezID}].DisplayName}
/call RezTarget ${RezID} "Divine Resurrection"
} else {
/if (${AnnounceRez}) /${RezChannel} Rezzing ${Spawn[${RezID}].DisplayName}
/call RezTarget ${RezID} "Blessing of Resurrection"
}
/return
}
/next i
}
/if (${SpawnCount[pccorpse raid zradius 75 radius 110 class tank]} && ${Raid.Members}) {
/for i 1 to ${SpawnCount[pccorpse raid zradius 75 radius 110 class tank]}
/if (!${corpsetimer${NearestSpawn[${i},pccorpse raid zradius 75 radius 110 class tank].ID}}) {
/varset RezID ${NearestSpawn[${i},pccorpse raid zradius 75 radius 110 class tank].ID}
/if (${AnnounceRez}) /${RezChannel} Rezzing ${Spawn[${RezID}].DisplayName}
/call RezTarget ${RezID} "Blessing of Resurrection"
/return
}
/next i
}
/if (${SpawnCount[pccorpse raid zradius 75 radius 110]} && ${Raid.Members}) {
/for i 1 to ${SpawnCount[pccorpse raid zradius 75 radius 110]}
/if (!${corpsetimer${NearestSpawn[${i},pccorpse raid zradius 75 radius 110].ID}}) {
/varset RezID ${NearestSpawn[${i},pccorpse raid zradius 75 radius 110].ID}
/if (${AnnounceRez}) /${RezChannel} Rezzing ${Spawn[${RezID}].DisplayName}
/call RezTarget ${RezID} "Blessing of Resurrection"
/return
}
/next i
}
/if (${SpawnCount[pccorpse guild zradius 75 radius 110]} && !${Raid.Members}) {
/for i 1 to ${SpawnCount[pccorpse Guild zradius 75 radius 110]}
/if (!${corpsetimer${NearestSpawn[${i}, pccorpse Guild zradius 75 radius 110].ID}}) {
/varset RezID ${NearestSpawn[${i}, pccorpse Guild zradius 75 radius 110].ID}
/if (${AnnounceRez}) /${RezChannel} Rezzing ${Spawn[${RezID}].DisplayName}
/call RezTarget ${RezID} "Blessing of Resurrection"
/return
}
/next i
}
/return