Caveats

There is no avatar whose llDetectedType is equal to 1(AGENT) since there is no avatar who doesn't require the physical calculation, even if they are just standing. Standing agent's type will be equal to 3(AGENT|ACTIVE). Sitting agent's type will be equal to 5(AGENT|PASSIVE).