Without a loop? Yes, its possible, but not good code. In germany we call it spaghetti code.
So, I changed the function a bit, so it should do what you want it to do:
<function name="checktrigger"><![CDATA[
nrNPC = 6
counter = 0
maxfate = 0
maxobj = null
foreach (obj, AllObjects()) {
x = HasAttribute ( obj , "fatetrigger" )
if ( x ) {
if (GetBoolean (obj , "fatetrigger" )) {
counter = counter+1
}
else {
if (obj.fate>=maxfate) {
maxfate = obj.fate
maxobj = obj
}
}
}
}
if ( not null = maxobj ){
msg("Here is a message")
maxobj.fatetrigger = true
}
if (counter=nrNPC) {
finish
}
]]></function>