That's a close start Aibo. However that will spam the raid window with rapid fire %'s. In under 2 seconds the entire chat window backscroll will be filled with it. You need to check that the targets HP has changed since the last loop before reannouncing.
Make sure you have a target before running this
Code:
Sub Main
/declare i int local ${Target.PctHPs}
/declare j int local ${Target.ID}
/if (!${Target.ID}) {
/echo Select a target before running
/squelch /end
}
/echo Announcing health of --${Target.CleanName}--
:loop
/if (${j}!=${Target.ID}) /goto :loop
/if (${i}>${Target.PctHPs} && ${j}==${Target.ID}) {
/rs ${Target.CleanName} - ${Target.PctHPs}%
/varset i ${Target.PctHPs}
}
/if (${Spawn[${j}].Type.Equal[corpse]}) {
/echo Mob is dead
/squelch endmacro
}
/goto :loop
/squelch /end