1. How to do a background check on the NPC?
     
  2. Code:
    bool isNPC( BaseEntity e ){
          return e is BaseNPC;
    }
     
  3. How about this?
    PHP:
    BasePlayer player
     
  4. Thats simple. It generates random userID for each HumanNPC by this:
    Code:
    var userId = (ulong) UnityEngine.Random.Range(0, 2147483647);
    It tests against real humans like this:
    Code:
            void KillNpc(BasePlayer player)
            {
                if (player.userID >= 76560000000000000L || player.userID <= 0L || player.isDestroyed) return;
                cache.Remove(player.userID);
                player.KillMessage();
            }
     
  5. Code:
    bool isNPC(ulong _id)
    {
       if (_id < 76560000000000000L) return true;
       else return false;
    }
     
  6. Code:
    static bool isNPC(ulong id) => id < 76560000000000000L;
    :p