/* 
This addon script creates a button  "Clone Me" that will save your appearance as an NPC notecard inside the SFposer object.

First, add this line to your .SFconfig:

Button=Clone Me=CloneMe

Then add this addon script in the sfposer

*/


default
{
    link_message(integer s, integer v, string m, key id)
    {
        list tk = llParseStringKeepNulls(m, ["|"], []);
        
        if ( llList2String(tk, 0) == "CloneMe")
        {
            key u = llList2Key(tk, 1);
            if (u != NULL_KEY)
            {
                string nm = ".NPC00A "+llKey2Name(u);
                llSay(0, "Saving appearance to notecard "+nm);
                osAgentSaveAppearance(u, nm);
            }
        }
    }
}