Do you not get the CharacterIsPlayer events for your player characters? You could catch those, add them to a database and every character that's not in that database must be an NPC.