You can look for the current behavior of the NextBot.
The boomer has a couple of behaviors you can check:
BoomerRetreatToCover (I'm exposed and my vomit is recharging)
BoomerAttack (Victim is close, attack!)
etc.
use "nb_debug BEHAVIOR" to see the current behavior stack and changes to it in real time.
As for getting the data from a plugin I know that "Mutant Tanks" does this sort of check for the TankIdle behavior
here.
I also have some code that does something similar that I can dig up if you want more reference.