The integer constant AGENT_ATTACHMENTS has the value 0x0002
integer AGENT_ATTACHMENTS = 0x0002;
// This is a code fragment only
if (!(llGetAgentInfo(llGetOwner()) & AGENT_ATTACHMENTS))
{
llSay(0, "My attachments have fallen off");
}