GetMaster

The   NWScript command returns the master of a given creature (an object). This usually has meaning only for associates, but will also return the Dungeon Master's avatar if the given creature is possessed by one.

Definition
Returns OBJECT_INVALID if the given object has no master.