Possible work-around..
You could make a pseudo onSpawn event, by using an onThink event.
Basically you'd have to go through every monster manually, adding the onThink event, so it's registered.. and then anytime you want to register stuff to every monster, like you normally would with onSpawn, you'd throw it into the onThink event.
xml monster
XML:
<script>
<event name="registerOnSpawnEvents_onThink"/>
</script>
lua monster
LUA:
monster.events = {
"registerOnSpawnEvents_onThink"
}
onThink event
LUA:
local creatureevent = CreatureEvent("registerOnSpawnEvents_onThink")
function creatureevent.onThink(creature, interval)
-- register all your other stuff here.
if creature:getName():lower() ~= "rat" then
-- register to every monster, except rat
end
creature:registerEvent("onHealthChange_damageIncrease") -- example
creature:unregisterEvent("registerOnSpawnEvents_onThink") -- so that it only runs once
return true
end
creatureevent:register()