or you could extend gotrex's code to check to see if all mobs on the map have been killed before the boss is spawned.
[@ONMOBKILL(bossguard)]
#IF
CHECKREALMONMAP mapname 1
#ACT
MONGENEX mapname 147 125 mobname 1
break
then just have the guard mobs in the room... or run the onmobkill for every mob type in that is spawned in the room