public LSL_List llGetAttachedList(string id)
{
m_host.AddScriptLPS(1);
ScenePresence av = World.GetScenePresence((UUID)id);
if (av == null || av.IsDeleted)
return new LSL_List("NOT_FOUND");
if (av.IsChildAgent || av.IsInTransit)
return new LSL_List("NOT_ON_REGION");
LSL_List AttachmentsList = new LSL_List();
List<SceneObjectGroup> Attachments;
Attachments = av.GetAttachments();
foreach (SceneObjectGroup Attachment in Attachments)
{
if(Attachment.HasPrivateAttachmentPoint)
continue;
AttachmentsList.Add(new LSL_Key(Attachment.UUID.ToString()));
}
return AttachmentsList;
}