This doesn't work in script (causes errors and/or crashes when used).
SameFaction (returns Boolean/short)
Returns 1 if PC is in the faction of the calling object (NPC).
PCExpelled ["factionID"] (returns Boolean/short)
Returns 1 if PC has been expelled once from calling object's (NPC) Faction, or a faction can be defined to get a specific one. For an example script look below, PCClearExpelled function.