<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Clarknova+Helvetic</id>
	<title>Second Life Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Clarknova+Helvetic"/>
	<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/wiki/Special:Contributions/Clarknova_Helvetic"/>
	<updated>2026-04-08T14:11:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=93650</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=93650"/>
		<updated>2008-09-29T18:02:52Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* BUGS */ recessive fexibility&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;31&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts using [[llSetPrimitiveParams|llSetPrimitiveParams([])]] and [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
[[User:Anylyn_Hax#SetPrimitiveParams-Example|This project by Anyln_Hax]] does something similar, but is human readable rather than compiler readable.&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt; ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                   CLONE PRIMITIVE  v 2.31&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
 &lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
 &lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot;\n\n\t];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;\tllSetPrimitiveParams(params);\n\tparams = [];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n\t// &amp;quot; + c ); }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/// On with the show...&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
 &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
 &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n\tstate_entry()\n\t{\n\tlist params;\n\t\n\n\t// If you are cutting code out to paste into custon functions\n\t// Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n\tparams =&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
 &lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
 &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
 &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
 &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
 &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
 &lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n\tPRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
 &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[ \n \n \t&amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;\t// It&#039;s probably not a god idea to have your new prim jump to the old one\n\t// &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
 &lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.\n\t&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n\t// during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n\t// Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
 &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n\n\t];&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
            say(&amp;quot;\tPRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n\t// If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
 &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
 &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n\t// Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n\t// The default value is 1 (distorted).\n\t// if you are metamorphing an object that already had planar mapping (rare)\n\t// uncomment those 0 lines.\n\t// This may not seem like much savings\n\t//  but if your script is trying to metamorph between as many as five objects\n\t// those few bytes saved might come in handy at the end.\n\n\t// If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;\t// PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;\tPRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\tllSetPrimitiveParams(params);\tparams = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\n\t// If you were cut/pasting this code into a custom transform function\n\t// end your cut above this comment.\n\t// Otherwise ignore this.\n\n\tllSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n\tllSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\tllRemoveInventory(llGetScriptName());\n\t}\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
        {&lt;br /&gt;
         list params;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
         // If you are cutting code out to paste into custon functions&lt;br /&gt;
         // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
&lt;br /&gt;
         params =&lt;br /&gt;
&lt;br /&gt;
         [&lt;br /&gt;
         PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
         PRIM_MATERIAL,2 , &lt;br /&gt;
         PRIM_PHYSICS,0 , &lt;br /&gt;
         PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
         PRIM_PHANTOM,2 , &lt;br /&gt;
         // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
        // PRIM_POSITION,&amp;lt;84.270088, 36.444294, 231.487076&amp;gt; ] + (params = []) +&lt;br /&gt;
         PRIM_ROTATION,&amp;lt;-0.363768, 0.720439, 0.134244, 0.574995&amp;gt; , &lt;br /&gt;
         PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
        ];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // Set all of the above paramaters as a group.&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
       // Please vote to fix it. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This prim has 3 faces.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
        PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
       // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
      // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
      [&lt;br /&gt;
&lt;br /&gt;
         PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
         PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
         // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
 &lt;br /&gt;
       // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
        // The default value is 1 (distorted).&lt;br /&gt;
       // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
       // uncomment those 0 lines.&lt;br /&gt;
       // This may not seem like much savings&lt;br /&gt;
       //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
       // those few bytes saved might come in handy at the end.&lt;br /&gt;
&lt;br /&gt;
       // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
         // PRIM_TEXGEN,0,0 , &lt;br /&gt;
         // PRIM_TEXGEN,1,0 , &lt;br /&gt;
         // PRIM_TEXGEN,2,0 , &lt;br /&gt;
         PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
         // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
         // end your cut above this comment.&lt;br /&gt;
         // Otherwise ignore this.&lt;br /&gt;
&lt;br /&gt;
        llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
 &lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Increase the &#039;&#039;pause&#039;&#039; variable at the top of the script and try again.  If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Supports sculpties.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;shape_1()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_2()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                      &lt;br /&gt;
shape_3()&lt;br /&gt;
{&lt;br /&gt;
     // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_4()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                                               &lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
      on_rez(integer p) { llResetScript(); }&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
         do&lt;br /&gt;
         {&lt;br /&gt;
           shape_1();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_2();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_3();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
&lt;br /&gt;
           shape_4();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
       }while (1);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
If you find a bug, or want to make a change, please do so on the [[User talk:Clarknova Helvetic/Clone Primitive v2.0 | Discussion]] page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Code Block Limit&#039;&#039;&#039; ===&lt;br /&gt;
 &lt;br /&gt;
In its current form this prim cycling script above can run stably with 10 complete output blocks, but 11 == Stack-Heap.  Instead of crashing right away, it crashes after three or so iterations.  &lt;br /&gt;
&lt;br /&gt;
Can anyone tell me why?  It compiles, it can go through more than three, the rules list is cleared at the end of each transformation.  Less than 11 and it&#039;s stable.  &lt;br /&gt;
&lt;br /&gt;
llGetFreeMemeory() at each iteration shows no leak.  &lt;br /&gt;
&lt;br /&gt;
Any ideas?&lt;br /&gt;
&lt;br /&gt;
(Yes, I know that if I change only the parameters relevant I could go through thirty objects or more.  The script above is just to test overall efficiency of the output code.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;PRIM_TEXGEN&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
aka &#039;&#039;Planar Mapping&#039;&#039; flags are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wonky, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Attributes that won&#039;t copy&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Some prim attributes are persistent independent of scripts, but cannot be set or read by ll*etPrimitiveParams([]).&lt;br /&gt;
&lt;br /&gt;
* Right click default action&lt;br /&gt;
* Texture animations&lt;br /&gt;
* Particles&lt;br /&gt;
* Sit Targets&lt;br /&gt;
* For Sale flag and price&lt;br /&gt;
* Group/Owner/Creator info (duh)&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Havok4&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
In Havok4 PRIM_CAST_SHADOWS seems depreciated.  Neither llGet nor llSet consider it a valid flag.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;UV Map Keys&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
It looks like llGet won&#039;t retrieve the key of a map you don&#039;t have perms for, even if you have full perms for the prim it&#039;s applied to.  Trying it returns [[NULL_KEY]].  The same isn&#039;t true for normal textures.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Recessive Fexibility&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Sometimes [[llGetPrimitiveParams|llGetPrimitiveParams()]] will find that a prim is flexible, even if isn&#039;t.  When you clone, suddenly your object is all floppy.  &lt;br /&gt;
&lt;br /&gt;
If the prim was made flexible at one point, changed to a torus or tube, then changed back the flexibility becomes latent. [[PRIM_FLEXIBLE]] is still TRUE, but SL won&#039;t treat it as such.  &lt;br /&gt;
&lt;br /&gt;
Obviously there are two variables storing this param server-side. Both have to be TRUE for the prim to be flexible.  The client editor and LsL will toggle them both, but changing the prim to a tube/torus only toggles one.  &lt;br /&gt;
&lt;br /&gt;
It&#039;s almost as if flexibility is a recessive trait :D&lt;br /&gt;
&lt;br /&gt;
Thanks to [[User:Lac_Boram|Lac Boram]] for finding this one.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=93534</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=93534"/>
		<updated>2008-09-28T22:17:16Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* BUGS */ PRIM_FLEXIBLE and the prim previously known as &amp;quot;Torus&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;31&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts using [[llSetPrimitiveParams|llSetPrimitiveParams([])]] and [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
[[User:Anylyn_Hax#SetPrimitiveParams-Example|This project by Anyln_Hax]] does something similar, but is human readable rather than compiler readable.&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt; ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                   CLONE PRIMITIVE  v 2.31&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
 &lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
 &lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot;\n\n\t];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;\tllSetPrimitiveParams(params);\n\tparams = [];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n\t// &amp;quot; + c ); }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/// On with the show...&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
 &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
 &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n\tstate_entry()\n\t{\n\tlist params;\n\t\n\n\t// If you are cutting code out to paste into custon functions\n\t// Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n\tparams =&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
 &lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
 &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
 &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
 &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
 &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
 &lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n\tPRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
 &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[ \n \n \t&amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;\t// It&#039;s probably not a god idea to have your new prim jump to the old one\n\t// &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
 &lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.\n\t&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n\t// during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n\t// Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
 &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n\n\t];&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
            say(&amp;quot;\tPRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n\t// If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
 &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
 &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n\t// Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n\t// The default value is 1 (distorted).\n\t// if you are metamorphing an object that already had planar mapping (rare)\n\t// uncomment those 0 lines.\n\t// This may not seem like much savings\n\t//  but if your script is trying to metamorph between as many as five objects\n\t// those few bytes saved might come in handy at the end.\n\n\t// If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;\t// PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;\tPRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\tllSetPrimitiveParams(params);\tparams = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\n\t// If you were cut/pasting this code into a custom transform function\n\t// end your cut above this comment.\n\t// Otherwise ignore this.\n\n\tllSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n\tllSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\tllRemoveInventory(llGetScriptName());\n\t}\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
        {&lt;br /&gt;
         list params;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
         // If you are cutting code out to paste into custon functions&lt;br /&gt;
         // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
&lt;br /&gt;
         params =&lt;br /&gt;
&lt;br /&gt;
         [&lt;br /&gt;
         PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
         PRIM_MATERIAL,2 , &lt;br /&gt;
         PRIM_PHYSICS,0 , &lt;br /&gt;
         PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
         PRIM_PHANTOM,2 , &lt;br /&gt;
         // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
        // PRIM_POSITION,&amp;lt;84.270088, 36.444294, 231.487076&amp;gt; ] + (params = []) +&lt;br /&gt;
         PRIM_ROTATION,&amp;lt;-0.363768, 0.720439, 0.134244, 0.574995&amp;gt; , &lt;br /&gt;
         PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
        ];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // Set all of the above paramaters as a group.&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
       // Please vote to fix it. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This prim has 3 faces.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
        PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
       // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
      // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
      [&lt;br /&gt;
&lt;br /&gt;
         PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
         PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
         // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
 &lt;br /&gt;
       // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
        // The default value is 1 (distorted).&lt;br /&gt;
       // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
       // uncomment those 0 lines.&lt;br /&gt;
       // This may not seem like much savings&lt;br /&gt;
       //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
       // those few bytes saved might come in handy at the end.&lt;br /&gt;
&lt;br /&gt;
       // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
         // PRIM_TEXGEN,0,0 , &lt;br /&gt;
         // PRIM_TEXGEN,1,0 , &lt;br /&gt;
         // PRIM_TEXGEN,2,0 , &lt;br /&gt;
         PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
         // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
         // end your cut above this comment.&lt;br /&gt;
         // Otherwise ignore this.&lt;br /&gt;
&lt;br /&gt;
        llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
 &lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Increase the &#039;&#039;pause&#039;&#039; variable at the top of the script and try again.  If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Supports sculpties.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;shape_1()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_2()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                      &lt;br /&gt;
shape_3()&lt;br /&gt;
{&lt;br /&gt;
     // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_4()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                                               &lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
      on_rez(integer p) { llResetScript(); }&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
         do&lt;br /&gt;
         {&lt;br /&gt;
           shape_1();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_2();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_3();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
&lt;br /&gt;
           shape_4();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
       }while (1);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
If you find a bug, or want to make a change, please do so on the [[User talk:Clarknova Helvetic/Clone Primitive v2.0 | Discussion]] page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Code Block Limit&#039;&#039;&#039; ===&lt;br /&gt;
 &lt;br /&gt;
In its current form this prim cycling script above can run stably with 10 complete output blocks, but 11 == Stack-Heap.  Instead of crashing right away, it crashes after three or so iterations.  &lt;br /&gt;
&lt;br /&gt;
Can anyone tell me why?  It compiles, it can go through more than three, the rules list is cleared at the end of each transformation.  Less than 11 and it&#039;s stable.  &lt;br /&gt;
&lt;br /&gt;
llGetFreeMemeory() at each iteration shows no leak.  &lt;br /&gt;
&lt;br /&gt;
Any ideas?&lt;br /&gt;
&lt;br /&gt;
(Yes, I know that if I change only the parameters relevant I could go through thirty objects or more.  The script above is just to test overall efficiency of the output code.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;PRIM_TEXGEN&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
aka &#039;&#039;Planar Mapping&#039;&#039; flags are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wonky, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Attributes that won&#039;t copy&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Some prim attributes are persistent independent of scripts, but cannot be set or read by ll*etPrimitiveParams([]).&lt;br /&gt;
&lt;br /&gt;
* Right click default action&lt;br /&gt;
* Texture animations&lt;br /&gt;
* Particles&lt;br /&gt;
* Sit Targets&lt;br /&gt;
* For Sale flag and price&lt;br /&gt;
* Group/Owner/Creator info (duh)&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Havok4&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
In Havok4 PRIM_CAST_SHADOWS seems depreciated.  Neither llGet nor llSet consider it a valid flag.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;UV Map Keys&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
It looks like llGet won&#039;t retrieve the key of a map you don&#039;t have perms for, even if you have full perms for the prim it&#039;s applied to.  Trying it returns [[NULL_KEY]].  The same isn&#039;t true for normal textures.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;PRIM_FLEXIBLE and the primitive previously known as &amp;quot;Torus&amp;quot;&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Sometimes llGetPrimitiveParams() will find that a prim is flexible, even if it isn&#039;t in the client editor.  When you clone, suddenly your object is all floppy.  &lt;br /&gt;
&lt;br /&gt;
This will happen if the prim was made flexible at one point, switched to a torus or tube, then switched back to a prim that supports flexibility.  Since toroids and tubes can&#039;t be flexible they&#039;re simply not rendered Flexi.  When you change them back to boxes PRIM_FLEXIBLE is still TRUE, but for some reason SL won&#039;t treat them as such.  &lt;br /&gt;
&lt;br /&gt;
This suggests that there are two variables storing this parameter server-side.  Both have to be TRUE for the prim to be flexible.  The client and LsL will toggle them both, but changing the prim to a tube or torus only toggles one.  &lt;br /&gt;
&lt;br /&gt;
It&#039;s almost as if flexibility is a recessive trait!&lt;br /&gt;
Thanks to [[User:Lac_Boram|Lac Boram]] for finding this one.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=51568</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=51568"/>
		<updated>2008-01-28T23:07:16Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* &amp;#039;&amp;#039;&amp;#039;UV Map Keys&amp;#039;&amp;#039;&amp;#039;&amp;#039; */  returns null_key instead&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;31&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts using [[llSetPrimitiveParams|llSetPrimitiveParams([])]] and [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
[[User:Anylyn_Hax#SetPrimitiveParams-Example|This project by Anyln_Hax]] does something similar, but is human readable rather than compiler readable.&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt; ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                   CLONE PRIMITIVE  v 2.31&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
 &lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
 &lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot;\n\n\t];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;\tllSetPrimitiveParams(params);\n\tparams = [];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n\t// &amp;quot; + c ); }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/// On with the show...&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
 &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
 &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n\tstate_entry()\n\t{\n\tlist params;\n\t\n\n\t// If you are cutting code out to paste into custon functions\n\t// Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n\tparams =&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
 &lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
 &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
 &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
 &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
 &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
 &lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n\tPRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
 &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[ \n \n \t&amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;\t// It&#039;s probably not a god idea to have your new prim jump to the old one\n\t// &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
 &lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.\n\t&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n\t// during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n\t// Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
 &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n\n\t];&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
            say(&amp;quot;\tPRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n\t// If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
 &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
 &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n\t// Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n\t// The default value is 1 (distorted).\n\t// if you are metamorphing an object that already had planar mapping (rare)\n\t// uncomment those 0 lines.\n\t// This may not seem like much savings\n\t//  but if your script is trying to metamorph between as many as five objects\n\t// those few bytes saved might come in handy at the end.\n\n\t// If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;\t// PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;\tPRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\tllSetPrimitiveParams(params);\tparams = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\n\t// If you were cut/pasting this code into a custom transform function\n\t// end your cut above this comment.\n\t// Otherwise ignore this.\n\n\tllSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n\tllSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\tllRemoveInventory(llGetScriptName());\n\t}\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
        {&lt;br /&gt;
         list params;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
         // If you are cutting code out to paste into custon functions&lt;br /&gt;
         // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
&lt;br /&gt;
         params =&lt;br /&gt;
&lt;br /&gt;
         [&lt;br /&gt;
         PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
         PRIM_MATERIAL,2 , &lt;br /&gt;
         PRIM_PHYSICS,0 , &lt;br /&gt;
         PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
         PRIM_PHANTOM,2 , &lt;br /&gt;
         // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
        // PRIM_POSITION,&amp;lt;84.270088, 36.444294, 231.487076&amp;gt; ] + (params = []) +&lt;br /&gt;
         PRIM_ROTATION,&amp;lt;-0.363768, 0.720439, 0.134244, 0.574995&amp;gt; , &lt;br /&gt;
         PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
        ];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // Set all of the above paramaters as a group.&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
       // Please vote to fix it. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This prim has 3 faces.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
        PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
       // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
      // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
      [&lt;br /&gt;
&lt;br /&gt;
         PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
         PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
         // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
 &lt;br /&gt;
       // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
        // The default value is 1 (distorted).&lt;br /&gt;
       // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
       // uncomment those 0 lines.&lt;br /&gt;
       // This may not seem like much savings&lt;br /&gt;
       //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
       // those few bytes saved might come in handy at the end.&lt;br /&gt;
&lt;br /&gt;
       // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
         // PRIM_TEXGEN,0,0 , &lt;br /&gt;
         // PRIM_TEXGEN,1,0 , &lt;br /&gt;
         // PRIM_TEXGEN,2,0 , &lt;br /&gt;
         PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
         // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
         // end your cut above this comment.&lt;br /&gt;
         // Otherwise ignore this.&lt;br /&gt;
&lt;br /&gt;
        llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
 &lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Increase the &#039;&#039;pause&#039;&#039; variable at the top of the script and try again.  If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Supports sculpties.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;shape_1()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_2()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                      &lt;br /&gt;
shape_3()&lt;br /&gt;
{&lt;br /&gt;
     // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_4()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                                               &lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
      on_rez(integer p) { llResetScript(); }&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
         do&lt;br /&gt;
         {&lt;br /&gt;
           shape_1();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_2();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_3();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
&lt;br /&gt;
           shape_4();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
       }while (1);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
If you find a bug, or want to make a change, please do so on the [[User talk:Clarknova Helvetic/Clone Primitive v2.0 | Discussion]] page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Code Block Limit&#039;&#039;&#039; ===&lt;br /&gt;
 &lt;br /&gt;
In its current form this prim cycling script above can run stably with 10 complete output blocks, but 11 == Stack-Heap.  Instead of crashing right away, it crashes after three or so iterations.  &lt;br /&gt;
&lt;br /&gt;
Can anyone tell me why?  It compiles, it can go through more than three, the rules list is cleared at the end of each transformation.  Less than 11 and it&#039;s stable.  &lt;br /&gt;
&lt;br /&gt;
llGetFreeMemeory() at each iteration shows no leak.  &lt;br /&gt;
&lt;br /&gt;
Any ideas?&lt;br /&gt;
&lt;br /&gt;
(Yes, I know that if I change only the parameters relevant I could go through thirty objects or more.  The script above is just to test overall efficiency of the output code.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;PRIM_TEXGEN&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
aka &#039;&#039;Planar Mapping&#039;&#039; flags are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wonky, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Attributes that won&#039;t copy&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Some prim attributes are persistent independent of scripts, but cannot be set or read by ll*etPrimitiveParams([]).&lt;br /&gt;
&lt;br /&gt;
* Right click default action&lt;br /&gt;
* Texture animations&lt;br /&gt;
* Particles&lt;br /&gt;
* Sit Targets&lt;br /&gt;
* For Sale flag and price&lt;br /&gt;
* Group/Owner/Creator info (duh)&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Havok4&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
In Havok4 PRIM_CAST_SHADOWS seems depreciated.  Neither llGet nor llSet consider it a valid flag.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;UV Map Keys&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
It looks like llGet won&#039;t retrieve the key of a map you don&#039;t have perms for, even if you have full perms for the prim it&#039;s applied to.  Trying it returns [[NULL_KEY]].  The same isn&#039;t true for normal textures.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=51566</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=51566"/>
		<updated>2008-01-28T22:58:19Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* What&amp;#039;s it for? */  link to User:Anylyn_Hax&amp;#039;s project&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;31&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts using [[llSetPrimitiveParams|llSetPrimitiveParams([])]] and [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
[[User:Anylyn_Hax#SetPrimitiveParams-Example|This project by Anyln_Hax]] does something similar, but is human readable rather than compiler readable.&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt; ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                   CLONE PRIMITIVE  v 2.31&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
 &lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
 &lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot;\n\n\t];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;\tllSetPrimitiveParams(params);\n\tparams = [];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n\t// &amp;quot; + c ); }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/// On with the show...&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
 &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
 &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n\tstate_entry()\n\t{\n\tlist params;\n\t\n\n\t// If you are cutting code out to paste into custon functions\n\t// Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n\tparams =&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
 &lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
 &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
 &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
 &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
 &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
 &lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n\tPRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
 &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[ \n \n \t&amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;\t// It&#039;s probably not a god idea to have your new prim jump to the old one\n\t// &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
 &lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.\n\t&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n\t// during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n\t// Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
 &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n\n\t];&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
            say(&amp;quot;\tPRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n\t// If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
 &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
 &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n\t// Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n\t// The default value is 1 (distorted).\n\t// if you are metamorphing an object that already had planar mapping (rare)\n\t// uncomment those 0 lines.\n\t// This may not seem like much savings\n\t//  but if your script is trying to metamorph between as many as five objects\n\t// those few bytes saved might come in handy at the end.\n\n\t// If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;\t// PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;\tPRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\tllSetPrimitiveParams(params);\tparams = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\n\t// If you were cut/pasting this code into a custom transform function\n\t// end your cut above this comment.\n\t// Otherwise ignore this.\n\n\tllSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n\tllSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\tllRemoveInventory(llGetScriptName());\n\t}\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
        {&lt;br /&gt;
         list params;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
         // If you are cutting code out to paste into custon functions&lt;br /&gt;
         // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
&lt;br /&gt;
         params =&lt;br /&gt;
&lt;br /&gt;
         [&lt;br /&gt;
         PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
         PRIM_MATERIAL,2 , &lt;br /&gt;
         PRIM_PHYSICS,0 , &lt;br /&gt;
         PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
         PRIM_PHANTOM,2 , &lt;br /&gt;
         // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
        // PRIM_POSITION,&amp;lt;84.270088, 36.444294, 231.487076&amp;gt; ] + (params = []) +&lt;br /&gt;
         PRIM_ROTATION,&amp;lt;-0.363768, 0.720439, 0.134244, 0.574995&amp;gt; , &lt;br /&gt;
         PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
        ];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // Set all of the above paramaters as a group.&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
       // Please vote to fix it. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This prim has 3 faces.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
        PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
       // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
      // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
      [&lt;br /&gt;
&lt;br /&gt;
         PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
         PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
         // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
 &lt;br /&gt;
       // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
        // The default value is 1 (distorted).&lt;br /&gt;
       // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
       // uncomment those 0 lines.&lt;br /&gt;
       // This may not seem like much savings&lt;br /&gt;
       //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
       // those few bytes saved might come in handy at the end.&lt;br /&gt;
&lt;br /&gt;
       // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
         // PRIM_TEXGEN,0,0 , &lt;br /&gt;
         // PRIM_TEXGEN,1,0 , &lt;br /&gt;
         // PRIM_TEXGEN,2,0 , &lt;br /&gt;
         PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
         // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
         // end your cut above this comment.&lt;br /&gt;
         // Otherwise ignore this.&lt;br /&gt;
&lt;br /&gt;
        llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
 &lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Increase the &#039;&#039;pause&#039;&#039; variable at the top of the script and try again.  If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Supports sculpties.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;shape_1()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_2()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                      &lt;br /&gt;
shape_3()&lt;br /&gt;
{&lt;br /&gt;
     // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_4()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                                               &lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
      on_rez(integer p) { llResetScript(); }&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
         do&lt;br /&gt;
         {&lt;br /&gt;
           shape_1();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_2();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_3();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
&lt;br /&gt;
           shape_4();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
       }while (1);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
If you find a bug, or want to make a change, please do so on the [[User talk:Clarknova Helvetic/Clone Primitive v2.0 | Discussion]] page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Code Block Limit&#039;&#039;&#039; ===&lt;br /&gt;
 &lt;br /&gt;
In its current form this prim cycling script above can run stably with 10 complete output blocks, but 11 == Stack-Heap.  Instead of crashing right away, it crashes after three or so iterations.  &lt;br /&gt;
&lt;br /&gt;
Can anyone tell me why?  It compiles, it can go through more than three, the rules list is cleared at the end of each transformation.  Less than 11 and it&#039;s stable.  &lt;br /&gt;
&lt;br /&gt;
llGetFreeMemeory() at each iteration shows no leak.  &lt;br /&gt;
&lt;br /&gt;
Any ideas?&lt;br /&gt;
&lt;br /&gt;
(Yes, I know that if I change only the parameters relevant I could go through thirty objects or more.  The script above is just to test overall efficiency of the output code.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;PRIM_TEXGEN&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
aka &#039;&#039;Planar Mapping&#039;&#039; flags are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wonky, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Attributes that won&#039;t copy&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Some prim attributes are persistent independent of scripts, but cannot be set or read by ll*etPrimitiveParams([]).&lt;br /&gt;
&lt;br /&gt;
* Right click default action&lt;br /&gt;
* Texture animations&lt;br /&gt;
* Particles&lt;br /&gt;
* Sit Targets&lt;br /&gt;
* For Sale flag and price&lt;br /&gt;
* Group/Owner/Creator info (duh)&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Havok4&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
In Havok4 PRIM_CAST_SHADOWS seems depreciated.  Neither llGet nor llSet consider it a valid flag.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;UV Map Keys&#039;&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
It looks like llGet can&#039;t retrieve the Sculpt Map key of a texture that you don&#039;t have perms for, even if you have full perms for the prim it&#039;s applied to.  The same isn&#039;t true for normal textures.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=51554</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=51554"/>
		<updated>2008-01-28T22:29:17Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* BUGS */  H4   &amp;amp; Sculptie keys&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;31&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts using [[llSetPrimitiveParams|llSetPrimitiveParams([])]] and [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt; ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                   CLONE PRIMITIVE  v 2.31&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
 &lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
 &lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot;\n\n\t];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;\tllSetPrimitiveParams(params);\n\tparams = [];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n\t// &amp;quot; + c ); }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/// On with the show...&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
 &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
 &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n\tstate_entry()\n\t{\n\tlist params;\n\t\n\n\t// If you are cutting code out to paste into custon functions\n\t// Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n\tparams =&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
 &lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
 &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
 &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
 &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
 &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
 &lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n\tPRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
 &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[ \n \n \t&amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;\t// It&#039;s probably not a god idea to have your new prim jump to the old one\n\t// &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
 &lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.\n\t&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n\t// during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n\t// Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
 &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n\n\t];&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
            say(&amp;quot;\tPRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n\t// If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
 &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
 &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n\t// Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n\t// The default value is 1 (distorted).\n\t// if you are metamorphing an object that already had planar mapping (rare)\n\t// uncomment those 0 lines.\n\t// This may not seem like much savings\n\t//  but if your script is trying to metamorph between as many as five objects\n\t// those few bytes saved might come in handy at the end.\n\n\t// If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;\t// PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;\tPRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\tllSetPrimitiveParams(params);\tparams = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\n\t// If you were cut/pasting this code into a custom transform function\n\t// end your cut above this comment.\n\t// Otherwise ignore this.\n\n\tllSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n\tllSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\tllRemoveInventory(llGetScriptName());\n\t}\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
        {&lt;br /&gt;
         list params;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
         // If you are cutting code out to paste into custon functions&lt;br /&gt;
         // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
&lt;br /&gt;
         params =&lt;br /&gt;
&lt;br /&gt;
         [&lt;br /&gt;
         PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
         PRIM_MATERIAL,2 , &lt;br /&gt;
         PRIM_PHYSICS,0 , &lt;br /&gt;
         PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
         PRIM_PHANTOM,2 , &lt;br /&gt;
         // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
        // PRIM_POSITION,&amp;lt;84.270088, 36.444294, 231.487076&amp;gt; ] + (params = []) +&lt;br /&gt;
         PRIM_ROTATION,&amp;lt;-0.363768, 0.720439, 0.134244, 0.574995&amp;gt; , &lt;br /&gt;
         PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
        ];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // Set all of the above paramaters as a group.&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
       // Please vote to fix it. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This prim has 3 faces.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
        PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
       // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
      // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
      [&lt;br /&gt;
&lt;br /&gt;
         PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
         PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
         // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
 &lt;br /&gt;
       // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
        // The default value is 1 (distorted).&lt;br /&gt;
       // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
       // uncomment those 0 lines.&lt;br /&gt;
       // This may not seem like much savings&lt;br /&gt;
       //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
       // those few bytes saved might come in handy at the end.&lt;br /&gt;
&lt;br /&gt;
       // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
         // PRIM_TEXGEN,0,0 , &lt;br /&gt;
         // PRIM_TEXGEN,1,0 , &lt;br /&gt;
         // PRIM_TEXGEN,2,0 , &lt;br /&gt;
         PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
         // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
         // end your cut above this comment.&lt;br /&gt;
         // Otherwise ignore this.&lt;br /&gt;
&lt;br /&gt;
        llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
 &lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Increase the &#039;&#039;pause&#039;&#039; variable at the top of the script and try again.  If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Supports sculpties.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;shape_1()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_2()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                      &lt;br /&gt;
shape_3()&lt;br /&gt;
{&lt;br /&gt;
     // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_4()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                                               &lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
      on_rez(integer p) { llResetScript(); }&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
         do&lt;br /&gt;
         {&lt;br /&gt;
           shape_1();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_2();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_3();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
&lt;br /&gt;
           shape_4();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
       }while (1);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
If you find a bug, or want to make a change, please do so on the [[User talk:Clarknova Helvetic/Clone Primitive v2.0 | Discussion]] page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Code Block Limit&#039;&#039;&#039; ===&lt;br /&gt;
 &lt;br /&gt;
In its current form this prim cycling script above can run stably with 10 complete output blocks, but 11 == Stack-Heap.  Instead of crashing right away, it crashes after three or so iterations.  &lt;br /&gt;
&lt;br /&gt;
Can anyone tell me why?  It compiles, it can go through more than three, the rules list is cleared at the end of each transformation.  Less than 11 and it&#039;s stable.  &lt;br /&gt;
&lt;br /&gt;
llGetFreeMemeory() at each iteration shows no leak.  &lt;br /&gt;
&lt;br /&gt;
Any ideas?&lt;br /&gt;
&lt;br /&gt;
(Yes, I know that if I change only the parameters relevant I could go through thirty objects or more.  The script above is just to test overall efficiency of the output code.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;PRIM_TEXGEN&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
aka &#039;&#039;Planar Mapping&#039;&#039; flags are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wonky, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Attributes that won&#039;t copy&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Some prim attributes are persistent independent of scripts, but cannot be set or read by ll*etPrimitiveParams([]).&lt;br /&gt;
&lt;br /&gt;
* Right click default action&lt;br /&gt;
* Texture animations&lt;br /&gt;
* Particles&lt;br /&gt;
* Sit Targets&lt;br /&gt;
* For Sale flag and price&lt;br /&gt;
* Group/Owner/Creator info (duh)&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Havok4&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
In Havok4 PRIM_CAST_SHADOWS seems depreciated.  Neither llGet nor llSet consider it a valid flag.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;UV Map Keys&#039;&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
It looks like llGet can&#039;t retrieve the Sculpt Map key of a texture that you don&#039;t have perms for, even if you have full perms for the prim it&#039;s applied to.  The same isn&#039;t true for normal textures.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=51505</id>
		<title>User:Clarknova Helvetic</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=51505"/>
		<updated>2008-01-28T18:45:29Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* Jiras I&amp;#039;m watching */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you were linked from the SL forums you&#039;re probably looking for [[User:Clarknova Helvetic/Clone Primitive  v2.0|Clone Primitive]].&lt;br /&gt;
&lt;br /&gt;
== About Moi ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Snapshot Tornado.jpg|thumb|right|256px| Someone&#039;s got to clean up around here.]]&lt;br /&gt;
&lt;br /&gt;
I like to script and build and also ponies.&lt;br /&gt;
&lt;br /&gt;
Three days younger than [[User:Arcadia Asylum|Arcadia Asylum]].&lt;br /&gt;
&lt;br /&gt;
Started SL on 2006/23/10.  Soon stopped because I couldn&#039;t stand client crashes.  Came back a year later when I had a decent video card and found that everyone I&#039;d met.. this is their job now.&lt;br /&gt;
&lt;br /&gt;
I make and sell gidgets [http://slexchange.com/modules.php?name=Marketplace&amp;amp;MerchantID=91584| on SLX] and [http://slurl.com/secondlife/Valis/85/37/232| in-world].  About half are freebies.  &lt;br /&gt;
&lt;br /&gt;
One of my most popular items was my first real project: The Builder&#039;s Sky Platform.  There are about 2500 users with one in their inventory.  One of the features I would change now is that it drops a half-kilometer halo of particles when the user falls off.  I&#039;m really surprised no one (+1) has ever complained.  &lt;br /&gt;
&lt;br /&gt;
Personally, I&#039;d hang me for it.&lt;br /&gt;
&lt;br /&gt;
If you care you can usually find me at [http://slurl.com/secondlife/Combat%20(sandbox)%20Rausch/177/159/24| The Rausch], or at [http://slurl.com/secondlife/Valis/85/37/232| My Shop] in Valis. &lt;br /&gt;
&lt;br /&gt;
== Scripts &amp;amp; tools ==&lt;br /&gt;
&lt;br /&gt;
I drag &#039;n drop these scripts into objects when I need to know something about them, or to set a quick parameter:&amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Clarknova Helvetic/Say This &amp;amp; That Widgets|Say This &amp;amp; That]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Clarknova Helvetic/Set Param Widgets|Set Param Widgets]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Clarknova Helvetic/Clear Param Widgets|Clear Param Widgets]]&amp;lt;br&amp;gt;&lt;br /&gt;
They do their job then delete from object inventory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Gen Chan|Gen Chan]] is a snippet that allows for &#039;&#039;very&#039;&#039; private object-to-object communication.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Sit TP Positioner|Sit TP Positioner]] is a sweet little tool for setting sit targets; created by [[User:Clarknova Helvetic/Lex Neva|Lex Neva]] and upgraded to teleport-worthiness by moi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jiras I&#039;m watching ==&lt;br /&gt;
&lt;br /&gt;
[http://jira.secondlife.com/browse/SVC-1243 Make prims at least 20m in H4]&lt;br /&gt;
&lt;br /&gt;
[http://jira.secondlife.com/browse/SVC-1146 old Havok1 llSetPrimitiveParams workaround failing it in Havok4]&lt;br /&gt;
&lt;br /&gt;
[http://jira.secondlife.com/browse/SVC-1307 PRIM_CAST_SHADOWS depreciated(?) in H4]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[https://jira.secondlife.com/secure/IssueNavigator.jspa?reset=true&amp;amp;reporterSelect=specificuser&amp;amp;reporter=Clarknova+Helvetic All My Jiras]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Interesting stuff ==&lt;br /&gt;
&lt;br /&gt;
[http://www.openlifegrid.com/ Run your own sim!]&lt;br /&gt;
&lt;br /&gt;
[http://nicholaz-beresford.blogspot.com/ Nicholaz patched viewer]&lt;br /&gt;
&lt;br /&gt;
[https://lists.secondlife.com/pipermail/secondlifescripters/2006-November/000180.html  RSA in LsL]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=Gy9hQDT6fhI ell oh ell]&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=51504</id>
		<title>User:Clarknova Helvetic</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=51504"/>
		<updated>2008-01-28T18:41:14Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* Jiras I&amp;#039;m watching */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you were linked from the SL forums you&#039;re probably looking for [[User:Clarknova Helvetic/Clone Primitive  v2.0|Clone Primitive]].&lt;br /&gt;
&lt;br /&gt;
== About Moi ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Snapshot Tornado.jpg|thumb|right|256px| Someone&#039;s got to clean up around here.]]&lt;br /&gt;
&lt;br /&gt;
I like to script and build and also ponies.&lt;br /&gt;
&lt;br /&gt;
Three days younger than [[User:Arcadia Asylum|Arcadia Asylum]].&lt;br /&gt;
&lt;br /&gt;
Started SL on 2006/23/10.  Soon stopped because I couldn&#039;t stand client crashes.  Came back a year later when I had a decent video card and found that everyone I&#039;d met.. this is their job now.&lt;br /&gt;
&lt;br /&gt;
I make and sell gidgets [http://slexchange.com/modules.php?name=Marketplace&amp;amp;MerchantID=91584| on SLX] and [http://slurl.com/secondlife/Valis/85/37/232| in-world].  About half are freebies.  &lt;br /&gt;
&lt;br /&gt;
One of my most popular items was my first real project: The Builder&#039;s Sky Platform.  There are about 2500 users with one in their inventory.  One of the features I would change now is that it drops a half-kilometer halo of particles when the user falls off.  I&#039;m really surprised no one (+1) has ever complained.  &lt;br /&gt;
&lt;br /&gt;
Personally, I&#039;d hang me for it.&lt;br /&gt;
&lt;br /&gt;
If you care you can usually find me at [http://slurl.com/secondlife/Combat%20(sandbox)%20Rausch/177/159/24| The Rausch], or at [http://slurl.com/secondlife/Valis/85/37/232| My Shop] in Valis. &lt;br /&gt;
&lt;br /&gt;
== Scripts &amp;amp; tools ==&lt;br /&gt;
&lt;br /&gt;
I drag &#039;n drop these scripts into objects when I need to know something about them, or to set a quick parameter:&amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Clarknova Helvetic/Say This &amp;amp; That Widgets|Say This &amp;amp; That]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Clarknova Helvetic/Set Param Widgets|Set Param Widgets]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Clarknova Helvetic/Clear Param Widgets|Clear Param Widgets]]&amp;lt;br&amp;gt;&lt;br /&gt;
They do their job then delete from object inventory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Gen Chan|Gen Chan]] is a snippet that allows for &#039;&#039;very&#039;&#039; private object-to-object communication.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Sit TP Positioner|Sit TP Positioner]] is a sweet little tool for setting sit targets; created by [[User:Clarknova Helvetic/Lex Neva|Lex Neva]] and upgraded to teleport-worthiness by moi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jiras I&#039;m watching ==&lt;br /&gt;
&lt;br /&gt;
[http://jira.secondlife.com/browse/SVC-1243 Make prims at least 20m in H4]&lt;br /&gt;
&lt;br /&gt;
[http://jira.secondlife.com/browse/SVC-1146 old Havok1 llSetPrimitiveParams workaround failing it in Havok4]&lt;br /&gt;
&lt;br /&gt;
[http://jira.secondlife.com/browse/SVC-1307 PRIM_CAST_SHADOWS depreciated(?) in H4]&lt;br /&gt;
&lt;br /&gt;
== Interesting stuff ==&lt;br /&gt;
&lt;br /&gt;
[http://www.openlifegrid.com/ Run your own sim!]&lt;br /&gt;
&lt;br /&gt;
[http://nicholaz-beresford.blogspot.com/ Nicholaz patched viewer]&lt;br /&gt;
&lt;br /&gt;
[https://lists.secondlife.com/pipermail/secondlifescripters/2006-November/000180.html  RSA in LsL]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=Gy9hQDT6fhI ell oh ell]&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=51502</id>
		<title>User:Clarknova Helvetic</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=51502"/>
		<updated>2008-01-28T18:40:27Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* Jiras worth voting for */ changed name, added two jiras&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you were linked from the SL forums you&#039;re probably looking for [[User:Clarknova Helvetic/Clone Primitive  v2.0|Clone Primitive]].&lt;br /&gt;
&lt;br /&gt;
== About Moi ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Snapshot Tornado.jpg|thumb|right|256px| Someone&#039;s got to clean up around here.]]&lt;br /&gt;
&lt;br /&gt;
I like to script and build and also ponies.&lt;br /&gt;
&lt;br /&gt;
Three days younger than [[User:Arcadia Asylum|Arcadia Asylum]].&lt;br /&gt;
&lt;br /&gt;
Started SL on 2006/23/10.  Soon stopped because I couldn&#039;t stand client crashes.  Came back a year later when I had a decent video card and found that everyone I&#039;d met.. this is their job now.&lt;br /&gt;
&lt;br /&gt;
I make and sell gidgets [http://slexchange.com/modules.php?name=Marketplace&amp;amp;MerchantID=91584| on SLX] and [http://slurl.com/secondlife/Valis/85/37/232| in-world].  About half are freebies.  &lt;br /&gt;
&lt;br /&gt;
One of my most popular items was my first real project: The Builder&#039;s Sky Platform.  There are about 2500 users with one in their inventory.  One of the features I would change now is that it drops a half-kilometer halo of particles when the user falls off.  I&#039;m really surprised no one (+1) has ever complained.  &lt;br /&gt;
&lt;br /&gt;
Personally, I&#039;d hang me for it.&lt;br /&gt;
&lt;br /&gt;
If you care you can usually find me at [http://slurl.com/secondlife/Combat%20(sandbox)%20Rausch/177/159/24| The Rausch], or at [http://slurl.com/secondlife/Valis/85/37/232| My Shop] in Valis. &lt;br /&gt;
&lt;br /&gt;
== Scripts &amp;amp; tools ==&lt;br /&gt;
&lt;br /&gt;
I drag &#039;n drop these scripts into objects when I need to know something about them, or to set a quick parameter:&amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Clarknova Helvetic/Say This &amp;amp; That Widgets|Say This &amp;amp; That]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Clarknova Helvetic/Set Param Widgets|Set Param Widgets]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Clarknova Helvetic/Clear Param Widgets|Clear Param Widgets]]&amp;lt;br&amp;gt;&lt;br /&gt;
They do their job then delete from object inventory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Gen Chan|Gen Chan]] is a snippet that allows for &#039;&#039;very&#039;&#039; private object-to-object communication.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Sit TP Positioner|Sit TP Positioner]] is a sweet little tool for setting sit targets; created by [[User:Clarknova Helvetic/Lex Neva|Lex Neva]] and upgraded to teleport-worthiness by moi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jiras I&#039;m watching ==&lt;br /&gt;
&lt;br /&gt;
[http://jira.secondlife.com/browse/SVC-1243 Make prims at least 20m in H4]&lt;br /&gt;
&lt;br /&gt;
[http://jira.secondlife.com/browse/SVC-1146 H1 llSetPrimitiveParams failing it in H4]&lt;br /&gt;
&lt;br /&gt;
[http://jira.secondlife.com/browse/SVC-1307 PRIM_CAST_SHADOWS depreciated(?) in H4]&lt;br /&gt;
&lt;br /&gt;
== Interesting stuff ==&lt;br /&gt;
&lt;br /&gt;
[http://www.openlifegrid.com/ Run your own sim!]&lt;br /&gt;
&lt;br /&gt;
[http://nicholaz-beresford.blogspot.com/ Nicholaz patched viewer]&lt;br /&gt;
&lt;br /&gt;
[https://lists.secondlife.com/pipermail/secondlifescripters/2006-November/000180.html  RSA in LsL]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=Gy9hQDT6fhI ell oh ell]&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Gen_Chan&amp;diff=51264</id>
		<title>User:Clarknova Helvetic/Gen Chan</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Gen_Chan&amp;diff=51264"/>
		<updated>2008-01-26T08:04:15Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: article created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This &#039;&#039;&#039;genChan()&#039;&#039;&#039; function returns a large negative number based on a &#039;&#039;key&#039;&#039;, a &#039;&#039;modifier&#039;&#039;, and a &#039;&#039;pin&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
The number is within bounds for object-to-object chat channels, but out of range of the channel scanners currently on the market.&lt;br /&gt;
&lt;br /&gt;
If the key, modifier and pin are the same, the channel will be uniform regardless of the script.&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t randomness, and it&#039;s not encryption, but it&#039;s simple and quick, and good enough to make reverse engineering of the system communications in real time super duper impractical.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer secret_channel;&lt;br /&gt;
&lt;br /&gt;
//  Where k is the owner&#039;s key, mod is either 2 or 3, and pin is a number between 1 &amp;amp; 500,000&lt;br /&gt;
&lt;br /&gt;
integer genChannel(key k , integer mod, integer pin) &lt;br /&gt;
{  &lt;br /&gt;
    float a = (float)(&amp;quot;0x&amp;quot;+llGetSubString( (string)k, mod,-1));       &lt;br /&gt;
    integer b =  llRound( llFabs(a) - a*2 + pin );          &lt;br /&gt;
    return b;&lt;br /&gt;
} &amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can define the channel in state_entry() thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;secret_channel = genChan(llGetOwner() , 2 , 12345); &amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As long as the pin is secret your cooms will be too.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Sit_TP_Positioner&amp;diff=51115</id>
		<title>User:Clarknova Helvetic/Sit TP Positioner</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Sit_TP_Positioner&amp;diff=51115"/>
		<updated>2008-01-25T03:36:12Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: updated to add sensor fallback&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This set of scripts is for making perfect sit targets.  It was first written by Lex Neva and heavily abused by me to adapt it for 300m sit-teleport support.  You can use it for a sit target just 2cm away, or for from region corner to corner.&lt;br /&gt;
&lt;br /&gt;
== Behavior ==&lt;br /&gt;
&lt;br /&gt;
The sit target setter comes in two parts: the &#039;&#039;Helper&#039;&#039; object and the &#039;&#039;Setter&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; First you sit on the &#039;&#039;Helper&#039;&#039;.  If you have an animation to align, put the anim in the Helper before sitting. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; After moving the Helper so your avatar is aligned and rotated properly, Put the &#039;&#039;Setter&#039;&#039; script into your chair or teleport object. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; First the Setter broadcasts a region-wide message.  When the Helper replies, it sets the target.  The  Helper also draws a line of particles to the chair. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; If the Helper is too far away, the Setter warns you and tells you how many meters too far. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; If the Helper doesn&#039;t reply, the Setter script tries to find it by sensor instead.  This is useful if your teleport offset needs to be over no-script land. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; If the Setter can&#039;t find the Helper at all, it tells you and gives you a list of possible reasons. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An unlimited number of builders can use their own copy simultaneously.  They will never interfere.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are two flavors of Setter script: &#039;&#039;touch_start&#039;&#039; and &#039;&#039;drag &#039;n drop&#039;&#039;.  The touch_start sets a new sit target each time the chair is touched. You must remove this script manually.  The drag &#039;n drop Setter sets the sit target and then removes from object inventory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Helper script ==&lt;br /&gt;
&lt;br /&gt;
Drop this script into a new box prim.  It transforms the prim into the Helper.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;// Sit target system by Lex Neva. Please distribute willy-nilly.&lt;br /&gt;
// http://forums.secondlife.com/showthread.php?t=153278&amp;amp;highlight=target&lt;br /&gt;
&lt;br /&gt;
// Helper prim script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Support for Teleport-range setting shoehorned in by Clarknova Helvetic&lt;br /&gt;
// https://wiki.secondlife.com/wiki/User:Clarknova_Helvetic/Sit_TP_Positioner&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default {&lt;br /&gt;
    &lt;br /&gt;
    on_rez(integer p) { llResetScript(); }&lt;br /&gt;
    &lt;br /&gt;
    state_entry() {&lt;br /&gt;
        &lt;br /&gt;
        // This ugly part turns our prim into a purple ball with the right name.&lt;br /&gt;
        llSetPrimitiveParams([PRIM_TYPE,3,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt; , PRIM_POINT_LIGHT,0,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,1.000000,10.000000,0.750000 , PRIM_COLOR,0,&amp;lt;0.729412, 0.160784, 0.717647&amp;gt;,1.000000 , PRIM_BUMP_SHINY,0,1,0 ]);&lt;br /&gt;
        llSetPrimitiveParams([PRIM_ROTATION,&amp;lt;0.000000, 0.000000, 0.000000, 1.000000&amp;gt; , PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , PRIM_SIZE,&amp;lt;0.250000, 0.250000, 0.250000&amp;gt; ]);&lt;br /&gt;
        // Ugly all done :)&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        llParticleSystem([]);&lt;br /&gt;
        llSitTarget(&amp;lt;0,0,1&amp;gt;, ZERO_ROTATION);&lt;br /&gt;
&lt;br /&gt;
        llListen( -13374138 , &amp;quot;&amp;quot; , NULL_KEY , &amp;quot;Ping?&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    listen(integer chan , string name , key id , string msg )&lt;br /&gt;
    {&lt;br /&gt;
        &lt;br /&gt;
        if (llList2Key(llGetObjectDetails(id,[OBJECT_OWNER]),0) == llGetOwner() )&lt;br /&gt;
        {&lt;br /&gt;
        &lt;br /&gt;
        ////// Some neat particles to show the link line  :)&lt;br /&gt;
        //&lt;br /&gt;
        //  Calculate the lifespan of the particles so they don&#039;t move to fast&lt;br /&gt;
        vector start_scale = &amp;lt;.2,.4,.0&amp;gt;; vector end_scale = &amp;lt;.25,.45,.0&amp;gt;;&lt;br /&gt;
        float part_age =  .3 * (llVecDist(llList2Vector(llGetObjectDetails(id,[OBJECT_POS]),0),llGetPos()));&lt;br /&gt;
        if (part_age &amp;gt; 30.) { &lt;br /&gt;
        vector mod = &amp;lt; 0., (part_age / 30.), 0.&amp;gt;; part_age = 30.; start_scale = start_scale + mod; end_scale = end_scale + mod; }&lt;br /&gt;
        //  Generate the particles&lt;br /&gt;
        llParticleSystem([2,1.0,4,1.0,1,&amp;lt;0.847059, 0.301961, 0.835294&amp;gt;,3,&amp;lt;0.729412, 0.160784, 0.717647&amp;gt;,5,start_scale,6,end_scale,19,0.0,7,part_age,13,0.0,15,10,9,2,8,&amp;lt;75.0,0.0,0.0&amp;gt;,0,483,20,id]);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        //// Pong!&lt;br /&gt;
        llRegionSay(-13374137 , &amp;quot;Pong!&amp;quot;  ); &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    changed(integer change) {&lt;br /&gt;
        if (llAvatarOnSitTarget() != NULL_KEY)&lt;br /&gt;
            llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    run_time_permissions(integer perm) {&lt;br /&gt;
        string anim = llGetInventoryName(INVENTORY_ANIMATION, 0);&lt;br /&gt;
        if (anim != &amp;quot;&amp;quot;) {&lt;br /&gt;
            llStopAnimation(&amp;quot;sit&amp;quot;);&lt;br /&gt;
            llStopAnimation(&amp;quot;sit_generic&amp;quot;);&lt;br /&gt;
            llStopAnimation(&amp;quot;sit_female&amp;quot;);&lt;br /&gt;
            llStartAnimation(anim);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure you stick your animation in the helper prim before you sit.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Target Setter (on touch) ==&lt;br /&gt;
&lt;br /&gt;
Next drop this script into your chair or teleport pad or whatever.  Then touch.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;// Sit target system by Lex Neva. Please distribute willy-nilly.&lt;br /&gt;
// http://forums.secondlife.com/showthread.php?t=153278&amp;amp;highlight=target&lt;br /&gt;
 &lt;br /&gt;
// Sit target setting script.   Sets on touch.&lt;br /&gt;
 &lt;br /&gt;
// Support for Teleport-range setting shoehorned in by Clarknova Helvetic&lt;br /&gt;
// https://wiki.secondlife.com/wiki/User:Clarknova_Helvetic/Sit_TP_Positioner&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
key owner;&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
state_entry() { owner = llGetOwner(); }&lt;br /&gt;
&lt;br /&gt;
touch_start(integer total_number) {&lt;br /&gt;
 &lt;br /&gt;
integer i;&lt;br /&gt;
    for (i = 0 ; i &amp;lt; total_number ; ++i )&lt;br /&gt;
    {&lt;br /&gt;
        if (llDetectedKey(i) == llGetOwner())   &lt;br /&gt;
        {&lt;br /&gt;
            llOwnerSay(&amp;quot;Querying Sit Target Helper...&amp;quot;);&lt;br /&gt;
            llListen( -13374137 , &amp;quot;&amp;quot; , NULL_KEY , &amp;quot;Pong!&amp;quot;);&lt;br /&gt;
            llRegionSay(-13374138,&amp;quot;Ping?&amp;quot;);&lt;br /&gt;
            llSetTimerEvent( 10. );&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
listen(integer chan , string name , key id , string msg )&lt;br /&gt;
{&lt;br /&gt;
    &lt;br /&gt;
    list details = llGetObjectDetails(id,[OBJECT_OWNER,OBJECT_POS,OBJECT_ROT]);&lt;br /&gt;
    &lt;br /&gt;
    if ( llList2Key(details,0) == owner )&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    vector helper_pos = llList2Vector(details,1);&lt;br /&gt;
    rotation helper_rot = llList2Rot(details,2);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
    vector my_pos = llGetPos();&lt;br /&gt;
    rotation my_rot = llGetRot();&lt;br /&gt;
 &lt;br /&gt;
    float distance = llVecDist(my_pos,helper_pos);&lt;br /&gt;
 &lt;br /&gt;
    vector target_pos = ZERO_VECTOR;&lt;br /&gt;
 &lt;br /&gt;
    if ( distance &amp;gt; 300.) {&lt;br /&gt;
    llOwnerSay(&amp;quot;Sit target is &amp;quot; + (string)(distance - 300.) + &amp;quot;m too far away! \n( if you lost your Helper it&#039;s at &amp;quot; + (string)helper_pos +&amp;quot; )&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    else &lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    // calculate where the avatar actually is&lt;br /&gt;
    vector avatar_pos = helper_pos + &amp;lt;0,0,1&amp;gt; * helper_rot; // due to helper&#039;s sit target&lt;br /&gt;
    avatar_pos = avatar_pos - &amp;lt;0,0,0.186&amp;gt; + &amp;lt;0,0,0.4&amp;gt; * helper_rot; // correct for a bug in llSitTarget(), for helper sit target&lt;br /&gt;
 &lt;br /&gt;
    target_pos = (avatar_pos - my_pos) / my_rot;&lt;br /&gt;
    target_pos = target_pos + &amp;lt;0,0,0.186&amp;gt;/my_rot - &amp;lt;0,0,0.4&amp;gt;; // correct for the bug again, this time in my sit target&lt;br /&gt;
    rotation target_rot = helper_rot / my_rot;&lt;br /&gt;
 &lt;br /&gt;
    llSitTarget(target_pos, target_rot);&lt;br /&gt;
    llOwnerSay(&amp;quot;llSitTarget(&amp;quot; + (string)target_pos + &amp;quot;, &amp;quot; + (string)target_rot + &amp;quot;);&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    }&lt;br /&gt;
    llSetTimerEvent(0.);&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
changed(integer change) {&lt;br /&gt;
if (llAvatarOnSitTarget() != NULL_KEY)&lt;br /&gt;
llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
run_time_permissions(integer perm) {&lt;br /&gt;
string anim = llGetInventoryName(INVENTORY_ANIMATION, 0);&lt;br /&gt;
if (anim != &amp;quot;&amp;quot;) {&lt;br /&gt;
llStopAnimation(&amp;quot;sit&amp;quot;);&lt;br /&gt;
llStopAnimation(&amp;quot;sit_generic&amp;quot;);&lt;br /&gt;
llStopAnimation(&amp;quot;sit_female&amp;quot;);&lt;br /&gt;
llStartAnimation(anim);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
timer() { &lt;br /&gt;
    llOwnerSay(&amp;quot;Query timed out.  Now trying by sensor...&amp;quot;);  &lt;br /&gt;
    llSensor(&amp;quot;Sit Target/Teleport Helper&amp;quot;,NULL_KEY,SCRIPTED,96,PI);&lt;br /&gt;
}&lt;br /&gt;
sensor(integer num) {    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    integer i;&lt;br /&gt;
    for ( i = 0 ; i &amp;lt; num ; ++i)&lt;br /&gt;
    {&lt;br /&gt;
&lt;br /&gt;
    if ( llList2Key(llGetObjectDetails(llDetectedKey(i),[OBJECT_OWNER]),0) == owner ) &lt;br /&gt;
    {&lt;br /&gt;
    rotation helper_rot = llDetectedRot(i);&lt;br /&gt;
    vector helper_pos = llDetectedPos(i);&lt;br /&gt;
 &lt;br /&gt;
    vector my_pos = llGetPos();&lt;br /&gt;
    rotation my_rot = llGetRot();&lt;br /&gt;
 &lt;br /&gt;
    float distance = llVecDist(my_pos,helper_pos);&lt;br /&gt;
 &lt;br /&gt;
    vector target_pos = ZERO_VECTOR;&lt;br /&gt;
    &lt;br /&gt;
    // calculate where the avatar actually is&lt;br /&gt;
    vector avatar_pos = helper_pos + &amp;lt;0,0,1&amp;gt; * helper_rot; // due to helper&#039;s sit target&lt;br /&gt;
    avatar_pos = avatar_pos - &amp;lt;0,0,0.186&amp;gt; + &amp;lt;0,0,0.4&amp;gt; * helper_rot; // correct for a bug in llSitTarget(), for helper sit target&lt;br /&gt;
 &lt;br /&gt;
    target_pos = (avatar_pos - my_pos) / my_rot;&lt;br /&gt;
    target_pos = target_pos + &amp;lt;0,0,0.186&amp;gt;/my_rot - &amp;lt;0,0,0.4&amp;gt;; // correct for the bug again, this time in my sit target&lt;br /&gt;
    rotation target_rot = helper_rot / my_rot;&lt;br /&gt;
 &lt;br /&gt;
    llSitTarget(target_pos, target_rot);&lt;br /&gt;
    &lt;br /&gt;
    llOwnerSay(&amp;quot;Sit target set by sensor.  Helper&#039;s probbaly in a no-script parcel.\nllSitTarget(&amp;quot; + (string)target_pos + &amp;quot;, &amp;quot; + (string)target_rot + &amp;quot;);&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    }    &lt;br /&gt;
    llSetTimerEvent(0.);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
no_sensor() {&lt;br /&gt;
    llOwnerSay(&amp;quot;Can&#039;t find helper!  Problem could be:\nA) Helper&#039;s in no-script parcel and further away than 96m\nB) Helper&#039;s in another sim\nC) Laaaaaaaaaaag!\n\tAnyway, try again!&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    llSetTimerEvent(0.);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adjust and touch as many times as you need.  Remember to remove the script when done. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Target setter (drag &#039;n drop) ==&lt;br /&gt;
&lt;br /&gt;
This script does the same as the one above.  The difference is that once you drag the script in your chair it sets the target and deletes from prim inventory.  Fire and forget.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;// Sit target system by Lex Neva. Please distribute willy-nilly.&lt;br /&gt;
// http://forums.secondlife.com/showthread.php?t=153278&amp;amp;highlight=target&lt;br /&gt;
&lt;br /&gt;
// Sit target setting script.   Drag -n- drop version.&lt;br /&gt;
&lt;br /&gt;
// Support for Teleport-range setting shoehorned in by Clarknova Helvetic  &lt;br /&gt;
// Drag &#039;n drop adaptation also by CH.  I like doing things this way :)&lt;br /&gt;
// https://wiki.secondlife.com/wiki/User:Clarknova_Helvetic/Sit_TP_Positioner&lt;br /&gt;
&lt;br /&gt;
key owner;&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
state_entry() {&lt;br /&gt;
owner = llGetOwner();&lt;br /&gt;
llOwnerSay(&amp;quot;Querying Sit Target Helper...&amp;quot;);&lt;br /&gt;
llListen( -13374137 , &amp;quot;&amp;quot; , NULL_KEY , &amp;quot;Pong!&amp;quot;);&lt;br /&gt;
llRegionSay(-13374138,&amp;quot;Ping?&amp;quot;);&lt;br /&gt;
llSetTimerEvent( 10. );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
listen(integer chan , string name , key id , string msg )&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    list details = llGetObjectDetails(id,[OBJECT_OWNER,OBJECT_POS,OBJECT_ROT]);&lt;br /&gt;
    &lt;br /&gt;
    if ( llList2Key(details,0) == owner )&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
    vector helper_pos = llList2Vector(details,1);&lt;br /&gt;
    rotation helper_rot = llList2Rot(details,2);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
    vector my_pos = llGetPos();&lt;br /&gt;
    rotation my_rot = llGetRot();&lt;br /&gt;
 &lt;br /&gt;
    float distance = llVecDist(my_pos,helper_pos);&lt;br /&gt;
 &lt;br /&gt;
    vector target_pos = ZERO_VECTOR;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    if ( distance &amp;gt; 300.) {&lt;br /&gt;
    llOwnerSay(&amp;quot;Sit target is &amp;quot; + (string)(distance - 300.) + &amp;quot;m too far away! \n( if you lost your Helper it&#039;s at &amp;quot; + (string)helper_pos +&amp;quot; )&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    else {&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    // calculate where the avatar actually is&lt;br /&gt;
    vector avatar_pos = helper_pos + &amp;lt;0,0,1&amp;gt; * helper_rot; // due to helper&#039;s sit target&lt;br /&gt;
    avatar_pos = avatar_pos - &amp;lt;0,0,0.186&amp;gt; + &amp;lt;0,0,0.4&amp;gt; * helper_rot; // correct for a bug in llSitTarget(), for helper sit target&lt;br /&gt;
&lt;br /&gt;
    target_pos = (avatar_pos - my_pos) / my_rot;&lt;br /&gt;
    target_pos = target_pos + &amp;lt;0,0,0.186&amp;gt;/my_rot - &amp;lt;0,0,0.4&amp;gt;; // correct for the bug again, this time in my sit target&lt;br /&gt;
    rotation target_rot = helper_rot / my_rot;&lt;br /&gt;
    &lt;br /&gt;
    llSitTarget(target_pos, target_rot);&lt;br /&gt;
    llOwnerSay(&amp;quot;llSitTarget(&amp;quot; + (string)target_pos + &amp;quot;, &amp;quot; + (string)target_rot + &amp;quot;);&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    llRemoveInventory(llGetScriptName());&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
changed(integer change) {&lt;br /&gt;
if (llAvatarOnSitTarget() != NULL_KEY)&lt;br /&gt;
llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
run_time_permissions(integer perm) {&lt;br /&gt;
string anim = llGetInventoryName(INVENTORY_ANIMATION, 0);&lt;br /&gt;
if (anim != &amp;quot;&amp;quot;) {&lt;br /&gt;
llStopAnimation(&amp;quot;sit&amp;quot;);&lt;br /&gt;
llStopAnimation(&amp;quot;sit_generic&amp;quot;);&lt;br /&gt;
llStopAnimation(&amp;quot;sit_female&amp;quot;);&lt;br /&gt;
llStartAnimation(anim);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
timer() { &lt;br /&gt;
    llOwnerSay(&amp;quot;Query timed out.  Now trying by sensor...&amp;quot;);  &lt;br /&gt;
    llSensor(&amp;quot;Sit Target/Teleport Helper&amp;quot;,NULL_KEY,SCRIPTED,96,PI);&lt;br /&gt;
}&lt;br /&gt;
sensor(integer num) {    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    integer i;&lt;br /&gt;
    for ( i = 0 ; i &amp;lt; num ; ++i)&lt;br /&gt;
    {&lt;br /&gt;
&lt;br /&gt;
    if ( llList2Key(llGetObjectDetails(llDetectedKey(i),[OBJECT_OWNER]),0) == owner ) &lt;br /&gt;
    {&lt;br /&gt;
    rotation helper_rot = llDetectedRot(i);&lt;br /&gt;
    vector helper_pos = llDetectedPos(i);&lt;br /&gt;
 &lt;br /&gt;
    vector my_pos = llGetPos();&lt;br /&gt;
    rotation my_rot = llGetRot();&lt;br /&gt;
 &lt;br /&gt;
    float distance = llVecDist(my_pos,helper_pos);&lt;br /&gt;
 &lt;br /&gt;
    vector target_pos = ZERO_VECTOR;&lt;br /&gt;
    &lt;br /&gt;
    // calculate where the avatar actually is&lt;br /&gt;
    vector avatar_pos = helper_pos + &amp;lt;0,0,1&amp;gt; * helper_rot; // due to helper&#039;s sit target&lt;br /&gt;
    avatar_pos = avatar_pos - &amp;lt;0,0,0.186&amp;gt; + &amp;lt;0,0,0.4&amp;gt; * helper_rot; // correct for a bug in llSitTarget(), for helper sit target&lt;br /&gt;
 &lt;br /&gt;
    target_pos = (avatar_pos - my_pos) / my_rot;&lt;br /&gt;
    target_pos = target_pos + &amp;lt;0,0,0.186&amp;gt;/my_rot - &amp;lt;0,0,0.4&amp;gt;; // correct for the bug again, this time in my sit target&lt;br /&gt;
    rotation target_rot = helper_rot / my_rot;&lt;br /&gt;
 &lt;br /&gt;
    llSitTarget(target_pos, target_rot);&lt;br /&gt;
    &lt;br /&gt;
    llOwnerSay(&amp;quot;Sit target set by sensor.  Helper&#039;s probbaly in a no-script parcel.\nllSitTarget(&amp;quot; + (string)target_pos + &amp;quot;, &amp;quot; + (string)target_rot + &amp;quot;);&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    }    &lt;br /&gt;
    llRemoveInventory(llGetScriptName());&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
no_sensor() {&lt;br /&gt;
    llOwnerSay(&amp;quot;Can&#039;t find helper!  Problem could be:\nA) Helper&#039;s in no-script parcel and further away than 96m\nB) Helper&#039;s in another sim\nC) Laaaaaaaaaaag!\n\tAnyway, try again!&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    llRemoveInventory(llGetScriptName());&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=50852</id>
		<title>User:Clarknova Helvetic</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=50852"/>
		<updated>2008-01-24T08:49:11Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: jiras worth voting for&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you were linked from the SL forums you&#039;re probably looking for [[User:Clarknova Helvetic/Clone Primitive  v2.0|Clone Primitive]].&lt;br /&gt;
&lt;br /&gt;
== About Moi ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Snapshot Tornado.jpg|thumb|right|256px| Someone&#039;s got to clean up around here.]]&lt;br /&gt;
&lt;br /&gt;
I like to script and build and also ponies.&lt;br /&gt;
&lt;br /&gt;
Three days younger than [[User:Arcadia Asylum|Arcadia Asylum]].&lt;br /&gt;
&lt;br /&gt;
Started SL on 2006/23/10.  Soon stopped because I couldn&#039;t stand client crashes.  Came back a year later when I had a decent video card and found that everyone I&#039;d met.. this is their job now.&lt;br /&gt;
&lt;br /&gt;
I make and sell gidgets [http://slexchange.com/modules.php?name=Marketplace&amp;amp;MerchantID=91584| on SLX] and [http://slurl.com/secondlife/Valis/85/37/232| in-world].  About half are freebies.  &lt;br /&gt;
&lt;br /&gt;
One of my most popular items was my first real project: The Builder&#039;s Sky Platform.  There are about 2500 users with one in their inventory.  One of the features I would change now is that it drops a half-kilometer halo of particles when the user falls off.  I&#039;m really surprised no one (+1) has ever complained.  &lt;br /&gt;
&lt;br /&gt;
Personally, I&#039;d hang me for it.&lt;br /&gt;
&lt;br /&gt;
If you care you can usually find me at [http://slurl.com/secondlife/Combat%20(sandbox)%20Rausch/177/159/24| The Rausch], or at [http://slurl.com/secondlife/Valis/85/37/232| My Shop] in Valis. &lt;br /&gt;
&lt;br /&gt;
== Scripts &amp;amp; tools ==&lt;br /&gt;
&lt;br /&gt;
I drag &#039;n drop these scripts into objects when I need to know something about them, or to set a quick parameter:&amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Clarknova Helvetic/Say This &amp;amp; That Widgets|Say This &amp;amp; That]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Clarknova Helvetic/Set Param Widgets|Set Param Widgets]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Clarknova Helvetic/Clear Param Widgets|Clear Param Widgets]]&amp;lt;br&amp;gt;&lt;br /&gt;
They do their job then delete from object inventory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Gen Chan|Gen Chan]] is a snippet that allows for &#039;&#039;very&#039;&#039; private object-to-object communication.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Sit TP Positioner|Sit TP Positioner]] is a sweet little tool for setting sit targets; created by [[User:Clarknova Helvetic/Lex Neva|Lex Neva]] and upgraded to teleport-worthiness by moi.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jiras worth voting for ==&lt;br /&gt;
&lt;br /&gt;
[http://jira.secondlife.com/browse/SVC-1243 Make prims at least 20m in H4]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Interesting stuff ==&lt;br /&gt;
&lt;br /&gt;
[http://www.openlifegrid.com/ Run your own sim!]&lt;br /&gt;
&lt;br /&gt;
[http://nicholaz-beresford.blogspot.com/ Nicholaz patched viewer]&lt;br /&gt;
&lt;br /&gt;
[https://lists.secondlife.com/pipermail/secondlifescripters/2006-November/000180.html  RSA in LsL]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=Gy9hQDT6fhI ell oh ell]&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Sit_TP_Positioner&amp;diff=50846</id>
		<title>User:Clarknova Helvetic/Sit TP Positioner</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Sit_TP_Positioner&amp;diff=50846"/>
		<updated>2008-01-24T07:35:22Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* Target setter - drag &amp;#039;n drop */ asdf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This set of scripts is for making perfect sit targets.  It was first written by Lex Neva and heavily abused by me to adapt it for 300m sit-teleport support.  You can use it for a sit target just 2cm away, or for from one region corner to the other.&lt;br /&gt;
&lt;br /&gt;
== Helper script ==&lt;br /&gt;
&lt;br /&gt;
To get started drop the following script into a new prim.  It&#039;s your Helper prim.  You sit on it and edit it to where you want your av to be.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;// Sit target system by Lex Neva. Please distribute willy-nilly.&lt;br /&gt;
// http://forums.secondlife.com/showthread.php?t=153278&amp;amp;highlight=target&lt;br /&gt;
&lt;br /&gt;
// Helper prim script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Support for Teleport-range setting shoehorned in by Clarknova Helvetic&lt;br /&gt;
// https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Sit_TP_Positioner&amp;amp;action=submit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Generate a private chat channel based on key, JUSSSSSST in case  &lt;br /&gt;
// two people are using a sit positioner in the same sim.&lt;br /&gt;
integer channel;&lt;br /&gt;
integer genChannel(key k , integer mod, integer pin)&lt;br /&gt;
{  // NOTE : mod must = 1 or 2  ,  pin must be  &amp;gt;=  || &amp;lt; 500,000&lt;br /&gt;
    float a = (float)(&amp;quot;0x&amp;quot;+llGetSubString( (string)k, mod,-1));       &lt;br /&gt;
    integer b =  llRound( llFabs(a) - a*2 + pin );          &lt;br /&gt;
    return b;&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default {&lt;br /&gt;
    &lt;br /&gt;
    on_rez(integer p) { llResetScript(); }&lt;br /&gt;
    &lt;br /&gt;
    state_entry() {&lt;br /&gt;
        &lt;br /&gt;
        // This ugly part turns our prim into a purple ball.&lt;br /&gt;
        llSetPrimitiveParams([PRIM_TYPE,3,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt; , PRIM_POINT_LIGHT,0,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,1.000000,10.000000,0.750000 , PRIM_COLOR,0,&amp;lt;0.729412, 0.160784, 0.717647&amp;gt;,1.000000 , PRIM_BUMP_SHINY,0,1,0 ]);&lt;br /&gt;
        llSetPrimitiveParams([PRIM_ROTATION,&amp;lt;0.000000, 0.000000, 0.000000, 1.000000&amp;gt; , PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , PRIM_SIZE,&amp;lt;0.250000, 0.250000, 0.250000&amp;gt; ]);&lt;br /&gt;
        // Ugly all done :)&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        llParticleSystem([]);&lt;br /&gt;
        llSitTarget(&amp;lt;0,0,1&amp;gt;, ZERO_ROTATION);&lt;br /&gt;
        channel = genChannel(llGetOwner() , 2 , 300 );&lt;br /&gt;
        &lt;br /&gt;
        llListen( channel , &amp;quot;&amp;quot; , NULL_KEY , &amp;quot;Where are you?&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    listen(integer chan , string name , key id , string msg )&lt;br /&gt;
    {&lt;br /&gt;
        &lt;br /&gt;
        ////// Some neat particles to show the link line  :)&lt;br /&gt;
        //&lt;br /&gt;
        //  Calculate the lifespan of the particles so they don&#039;t move to fast&lt;br /&gt;
        vector start_scale = &amp;lt;.2,.4,.0&amp;gt;; vector end_scale = &amp;lt;.25,.45,.0&amp;gt;;&lt;br /&gt;
        float part_age =  .3 * (llVecDist(llList2Vector(llGetObjectDetails(id,[OBJECT_POS]),0),llGetPos()));&lt;br /&gt;
        if (part_age &amp;gt; 30.) { &lt;br /&gt;
        vector mod = &amp;lt; 0., (part_age / 30.), 0.&amp;gt;; part_age = 30.; start_scale = start_scale + mod; end_scale = end_scale + mod; }&lt;br /&gt;
        //  Generate the particles&lt;br /&gt;
        llParticleSystem([2,1.0,4,1.0,1,&amp;lt;0.847059, 0.301961, 0.835294&amp;gt;,3,&amp;lt;0.729412, 0.160784, 0.717647&amp;gt;,5,start_scale,6,end_scale,19,0.0,7,part_age,13,0.0,15,10,9,2,8,&amp;lt;75.0,0.0,0.0&amp;gt;,0,483,20,id]);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        //// Tell our object where we are&lt;br /&gt;
        llRegionSay(channel , (string)llGetRot() + &amp;quot;@&amp;quot; + (string)llGetPos()  ); &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    changed(integer change) {&lt;br /&gt;
        if (llAvatarOnSitTarget() != NULL_KEY)&lt;br /&gt;
            llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    run_time_permissions(integer perm) {&lt;br /&gt;
        string anim = llGetInventoryName(INVENTORY_ANIMATION, 0);&lt;br /&gt;
        if (anim != &amp;quot;&amp;quot;) {&lt;br /&gt;
            llStopAnimation(&amp;quot;sit&amp;quot;);&lt;br /&gt;
            llStopAnimation(&amp;quot;sit_generic&amp;quot;);&lt;br /&gt;
            llStopAnimation(&amp;quot;sit_female&amp;quot;);&lt;br /&gt;
            llStartAnimation(anim);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you actually read that you&#039;ll see that you can also stick an animation in the helper prim and it&#039;ll play it while you sit.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Target Setter (on touch) ==&lt;br /&gt;
&lt;br /&gt;
Next drop this script into your chair or teleport pad or whatever.  Then touch.  It sets the sit target of the prim to be exactly where your av is sitting on the helper.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;// Sit target system by Lex Neva. Please distribute willy-nilly.&lt;br /&gt;
// http://forums.secondlife.com/showthread.php?t=153278&amp;amp;highlight=target&lt;br /&gt;
&lt;br /&gt;
// Sit target setting script.   Sets on touch.&lt;br /&gt;
&lt;br /&gt;
// Support for Teleport-range setting shoehorned in by Clarknova Helvetic&lt;br /&gt;
// https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Sit_TP_Positioner&amp;amp;action=submit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Generate a private chat channel based on key, JUSSSSSST in case  &lt;br /&gt;
// two people are using a sit positioner in the same sim.&lt;br /&gt;
integer channel;&lt;br /&gt;
integer genChannel(key k , integer mod, integer pin)&lt;br /&gt;
{  // NOTE : mod must = 1 or 2  ,  pin must be  &amp;gt;= 1  or &amp;lt; 500,000&lt;br /&gt;
    float a = (float)(&amp;quot;0x&amp;quot;+llGetSubString( (string)k, mod,-1));       &lt;br /&gt;
    integer b =  llRound( llFabs(a) - a*2 + pin );          &lt;br /&gt;
    return b;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
touch_start(integer total_number) {&lt;br /&gt;
&lt;br /&gt;
integer i;&lt;br /&gt;
    for (i = 0 ; i &amp;lt; total_number ; ++i )&lt;br /&gt;
    {&lt;br /&gt;
        if (llDetectedKey(i) == llGetOwner())   &lt;br /&gt;
        {&lt;br /&gt;
            llOwnerSay(&amp;quot;Querying Sit Target Helper...&amp;quot;);&lt;br /&gt;
            channel = genChannel(llGetOwner() , 2 , 300 );&lt;br /&gt;
            llListen( channel , &amp;quot;&amp;quot; , NULL_KEY , &amp;quot;&amp;quot;);&lt;br /&gt;
            llRegionSay(channel,&amp;quot;Where are you?&amp;quot;);&lt;br /&gt;
            llSetTimerEvent( 10. );&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
listen(integer chan , string name , key id , string msg )&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    integer at = llSubStringIndex( msg, &amp;quot;@&amp;quot; );&lt;br /&gt;
    &lt;br /&gt;
    rotation helper_rot = (rotation)(llGetSubString(msg, 0, at - 1));&lt;br /&gt;
    vector helper_pos = (vector)(llGetSubString(msg, at + 1,-1));&lt;br /&gt;
&lt;br /&gt;
    vector my_pos = llGetPos();&lt;br /&gt;
    rotation my_rot = llGetRot();&lt;br /&gt;
    &lt;br /&gt;
    float distance = llVecDist(my_pos,helper_pos);&lt;br /&gt;
    &lt;br /&gt;
    vector target_pos = ZERO_VECTOR;&lt;br /&gt;
    &lt;br /&gt;
    if ( distance &amp;gt; 300.) {&lt;br /&gt;
    llOwnerSay(&amp;quot;Sit target is &amp;quot; + (string)(distance - 300.) + &amp;quot;m too far away! \n( if you lost your Helper it&#039;s at &amp;quot; + (string)helper_pos +&amp;quot; )&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    else {&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    // calculate where the avatar actually is&lt;br /&gt;
    vector avatar_pos = helper_pos + &amp;lt;0,0,1&amp;gt; * helper_rot; // due to helper&#039;s sit target&lt;br /&gt;
    avatar_pos = avatar_pos - &amp;lt;0,0,0.186&amp;gt; + &amp;lt;0,0,0.4&amp;gt; * helper_rot; // correct for a bug in llSitTarget(), for helper sit target&lt;br /&gt;
&lt;br /&gt;
    target_pos = (avatar_pos - my_pos) / my_rot;&lt;br /&gt;
    target_pos = target_pos + &amp;lt;0,0,0.186&amp;gt;/my_rot - &amp;lt;0,0,0.4&amp;gt;; // correct for the bug again, this time in my sit target&lt;br /&gt;
    rotation target_rot = helper_rot / my_rot;&lt;br /&gt;
    &lt;br /&gt;
    llSitTarget(target_pos, target_rot);&lt;br /&gt;
    llOwnerSay(&amp;quot;llSitTarget(&amp;quot; + (string)target_pos + &amp;quot;, &amp;quot; + (string)target_rot + &amp;quot;);&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
    llSetTimerEvent(0.);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
changed(integer change) {&lt;br /&gt;
if (llAvatarOnSitTarget() != NULL_KEY)&lt;br /&gt;
llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
run_time_permissions(integer perm) {&lt;br /&gt;
string anim = llGetInventoryName(INVENTORY_ANIMATION, 0);&lt;br /&gt;
if (anim != &amp;quot;&amp;quot;) {&lt;br /&gt;
llStopAnimation(&amp;quot;sit&amp;quot;);&lt;br /&gt;
llStopAnimation(&amp;quot;sit_generic&amp;quot;);&lt;br /&gt;
llStopAnimation(&amp;quot;sit_female&amp;quot;);&lt;br /&gt;
llStartAnimation(anim);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
    timer() { llOwnerSay(&amp;quot;Query timed out.  You sure your Helper is in the same sim? \n Anyway, try again.&amp;quot;);  }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If successful, particles will flow from your Helper to the chair prim.  If your target is too far away, or not in the same region, you&#039;ll be warned instead.&lt;br /&gt;
&lt;br /&gt;
Adjust and touch as many times as you need.  Remember to remove the script when done. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Target setter (drag &#039;n drop) ==&lt;br /&gt;
&lt;br /&gt;
This script does the same thing as the one above.  The difference is that once you drag the script in your chair it sets the target and deletes from prim inventory.  Fire and forget.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;// Sit target system by Lex Neva. Please distribute willy-nilly.&lt;br /&gt;
// http://forums.secondlife.com/showthread.php?t=153278&amp;amp;highlight=target&lt;br /&gt;
&lt;br /&gt;
// Sit target setting script.   Drag -n- drop version.&lt;br /&gt;
&lt;br /&gt;
// Support for Teleport-range setting shoehorned in by Clarknova Helvetic  &lt;br /&gt;
// Drag &#039;n drop adaptation also by CH.  I like doing things this way :)&lt;br /&gt;
// https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Sit_TP_Positioner&amp;amp;action=submit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Generate a private chat channel based on key, JUSSSSSST in case  &lt;br /&gt;
// two people are using a sit positioner in the same sim.&lt;br /&gt;
integer channel;&lt;br /&gt;
integer genChannel(key k , integer mod, integer pin)&lt;br /&gt;
{  // NOTE : mod must = 1 or 2  ,  pin must be  &amp;gt;= 1  or &amp;lt; 500,000&lt;br /&gt;
    float a = (float)(&amp;quot;0x&amp;quot;+llGetSubString( (string)k, mod,-1));       &lt;br /&gt;
    integer b =  llRound( llFabs(a) - a*2 + pin );          &lt;br /&gt;
    return b;&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
state_entry() {&lt;br /&gt;
llSitTarget(ZERO_VECTOR,ZERO_ROTATION);&lt;br /&gt;
llOwnerSay(&amp;quot;Querying Sit Target Helper...&amp;quot;);&lt;br /&gt;
channel = genChannel(llGetOwner() , 2 , 300 );&lt;br /&gt;
llListen( channel , &amp;quot;&amp;quot; , NULL_KEY , &amp;quot;&amp;quot;);&lt;br /&gt;
llRegionSay(channel,&amp;quot;Where are you?&amp;quot;);&lt;br /&gt;
llSetTimerEvent( 10. );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
listen(integer chan , string name , key id , string msg )&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    integer at = llSubStringIndex( msg, &amp;quot;@&amp;quot; );&lt;br /&gt;
    &lt;br /&gt;
    rotation helper_rot = (rotation)(llGetSubString(msg, 0, at - 1));&lt;br /&gt;
    vector helper_pos = (vector)(llGetSubString(msg, at + 1,-1));&lt;br /&gt;
&lt;br /&gt;
    vector my_pos = llGetPos();&lt;br /&gt;
    rotation my_rot = llGetRot();&lt;br /&gt;
    &lt;br /&gt;
    float distance = llVecDist(my_pos,helper_pos);&lt;br /&gt;
    &lt;br /&gt;
    vector target_pos = ZERO_VECTOR;&lt;br /&gt;
    &lt;br /&gt;
    if ( distance &amp;gt; 300.) {&lt;br /&gt;
    llOwnerSay(&amp;quot;Sit target is &amp;quot; + (string)(distance - 300.) + &amp;quot;m too far away! \n( if you lost your Helper it&#039;s at &amp;quot; + (string)helper_pos +&amp;quot; )&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    else {&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    // calculate where the avatar actually is&lt;br /&gt;
    vector avatar_pos = helper_pos + &amp;lt;0,0,1&amp;gt; * helper_rot; // due to helper&#039;s sit target&lt;br /&gt;
    avatar_pos = avatar_pos - &amp;lt;0,0,0.186&amp;gt; + &amp;lt;0,0,0.4&amp;gt; * helper_rot; // correct for a bug in llSitTarget(), for helper sit target&lt;br /&gt;
&lt;br /&gt;
    target_pos = (avatar_pos - my_pos) / my_rot;&lt;br /&gt;
    target_pos = target_pos + &amp;lt;0,0,0.186&amp;gt;/my_rot - &amp;lt;0,0,0.4&amp;gt;; // correct for the bug again, this time in my sit target&lt;br /&gt;
    rotation target_rot = helper_rot / my_rot;&lt;br /&gt;
    &lt;br /&gt;
    llSitTarget(target_pos, target_rot);&lt;br /&gt;
    llOwnerSay(&amp;quot;llSitTarget(&amp;quot; + (string)target_pos + &amp;quot;, &amp;quot; + (string)target_rot + &amp;quot;);&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    llRemoveInventory(llGetScriptName());&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
changed(integer change) {&lt;br /&gt;
if (llAvatarOnSitTarget() != NULL_KEY)&lt;br /&gt;
llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
run_time_permissions(integer perm) {&lt;br /&gt;
string anim = llGetInventoryName(INVENTORY_ANIMATION, 0);&lt;br /&gt;
if (anim != &amp;quot;&amp;quot;) {&lt;br /&gt;
llStopAnimation(&amp;quot;sit&amp;quot;);&lt;br /&gt;
llStopAnimation(&amp;quot;sit_generic&amp;quot;);&lt;br /&gt;
llStopAnimation(&amp;quot;sit_female&amp;quot;);&lt;br /&gt;
llStartAnimation(anim);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
    timer() { llOwnerSay(&amp;quot;Query timed out.  You sure your Helper is in the same sim? \n Anyway, try again.&amp;quot;); llRemoveInventory(llGetScriptName()); }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=50844</id>
		<title>User:Clarknova Helvetic</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=50844"/>
		<updated>2008-01-24T07:32:37Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* Scripting Widgets */  now scripts&amp;amp;tools&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you were linked from the SL forums you&#039;re probably looking for [[User:Clarknova Helvetic/Clone Primitive  v2.0|Clone Primitive]].&lt;br /&gt;
&lt;br /&gt;
== About Moi ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Snapshot Tornado.jpg|thumb|right|256px| Someone&#039;s got to clean up around here.]]&lt;br /&gt;
&lt;br /&gt;
I like to script and build and also ponies.&lt;br /&gt;
&lt;br /&gt;
Three days younger than [[User:Arcadia Asylum|Arcadia Asylum]].&lt;br /&gt;
&lt;br /&gt;
Started SL on 2006/23/10.  Soon stopped because I couldn&#039;t stand client crashes.  Came back a year later when I had a decent video card and found that everyone I&#039;d met.. this is their job now.&lt;br /&gt;
&lt;br /&gt;
I make and sell gidgets [http://slexchange.com/modules.php?name=Marketplace&amp;amp;MerchantID=91584| on SLX] and [http://slurl.com/secondlife/Valis/85/37/232| in-world].  About half are freebies.  &lt;br /&gt;
&lt;br /&gt;
One of my most popular items was my first real project: The Builder&#039;s Sky Platform.  There are about 2500 users with one in their inventory.  One of the features I would change now is that it drops a half-kilometer halo of particles when the user falls off.  I&#039;m really surprised no one (+1) has ever complained.  &lt;br /&gt;
&lt;br /&gt;
Personally, I&#039;d hang me for it.&lt;br /&gt;
&lt;br /&gt;
If you care you can usually find me at [http://slurl.com/secondlife/Combat%20(sandbox)%20Rausch/177/159/24| The Rausch], or at [http://slurl.com/secondlife/Valis/85/37/232| My Shop] in Valis. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scripts &amp;amp; tools ==&lt;br /&gt;
&lt;br /&gt;
I drag &#039;n drop these scripts into objects when I need to know something about them, or to set a quick parameter:&amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Clarknova Helvetic/Say This &amp;amp; That Widgets|Say This &amp;amp; That]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Clarknova Helvetic/Set Param Widgets|Set Param Widgets]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Clarknova Helvetic/Clear Param Widgets|Clear Param Widgets]]&amp;lt;br&amp;gt;&lt;br /&gt;
They do their job then delete from object inventory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Gen Chan|Gen Chan]] is a snippet that allows for &#039;&#039;very&#039;&#039; private object-to-object communication.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Sit TP Positioner|Sit TP Positioner]] is a sweet little tool for setting sit targets; created by [[User:Clarknova Helvetic/Lex Neva|Lex Neva]] and upgraded to teleport-worthiness by moi.&lt;br /&gt;
&lt;br /&gt;
== Interesting stuff ==&lt;br /&gt;
&lt;br /&gt;
[http://www.openlifegrid.com/ Run your own sim!]&lt;br /&gt;
&lt;br /&gt;
[http://nicholaz-beresford.blogspot.com/ Nicholaz patched viewer]&lt;br /&gt;
&lt;br /&gt;
[https://lists.secondlife.com/pipermail/secondlifescripters/2006-November/000180.html  RSA in LsL]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=Gy9hQDT6fhI ell oh ell]&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Sit_TP_Positioner&amp;diff=50835</id>
		<title>User:Clarknova Helvetic/Sit TP Positioner</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Sit_TP_Positioner&amp;diff=50835"/>
		<updated>2008-01-24T07:21:21Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: article created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This set of scripts is for making perfect sit targets.  It was first written by Lex Neva and heavily abused by me to adapt it for 300m sit-teleport support.  You can use it for a sit target just 2cm away, or for from one region corner to the other.&lt;br /&gt;
&lt;br /&gt;
== Helper script ==&lt;br /&gt;
&lt;br /&gt;
To get started drop the following script into a new prim.  It&#039;s your Helper prim.  You sit on it and edit it to where you want your av to be.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;// Sit target system by Lex Neva. Please distribute willy-nilly.&lt;br /&gt;
// http://forums.secondlife.com/showthread.php?t=153278&amp;amp;highlight=target&lt;br /&gt;
&lt;br /&gt;
// Helper prim script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Support for Teleport-range setting shoehorned in by Clarknova Helvetic&lt;br /&gt;
// https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Sit_TP_Positioner&amp;amp;action=submit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Generate a private chat channel based on key, JUSSSSSST in case  &lt;br /&gt;
// two people are using a sit positioner in the same sim.&lt;br /&gt;
integer channel;&lt;br /&gt;
integer genChannel(key k , integer mod, integer pin)&lt;br /&gt;
{  // NOTE : mod must = 1 or 2  ,  pin must be  &amp;gt;=  || &amp;lt; 500,000&lt;br /&gt;
    float a = (float)(&amp;quot;0x&amp;quot;+llGetSubString( (string)k, mod,-1));       &lt;br /&gt;
    integer b =  llRound( llFabs(a) - a*2 + pin );          &lt;br /&gt;
    return b;&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default {&lt;br /&gt;
    &lt;br /&gt;
    on_rez(integer p) { llResetScript(); }&lt;br /&gt;
    &lt;br /&gt;
    state_entry() {&lt;br /&gt;
        &lt;br /&gt;
        // This ugly part turns our prim into a purple ball.&lt;br /&gt;
        llSetPrimitiveParams([PRIM_TYPE,3,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt; , PRIM_POINT_LIGHT,0,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,1.000000,10.000000,0.750000 , PRIM_COLOR,0,&amp;lt;0.729412, 0.160784, 0.717647&amp;gt;,1.000000 , PRIM_BUMP_SHINY,0,1,0 ]);&lt;br /&gt;
        llSetPrimitiveParams([PRIM_ROTATION,&amp;lt;0.000000, 0.000000, 0.000000, 1.000000&amp;gt; , PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , PRIM_SIZE,&amp;lt;0.250000, 0.250000, 0.250000&amp;gt; ]);&lt;br /&gt;
        // Ugly all done :)&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        llParticleSystem([]);&lt;br /&gt;
        llSitTarget(&amp;lt;0,0,1&amp;gt;, ZERO_ROTATION);&lt;br /&gt;
        channel = genChannel(llGetOwner() , 2 , 300 );&lt;br /&gt;
        &lt;br /&gt;
        llListen( channel , &amp;quot;&amp;quot; , NULL_KEY , &amp;quot;Where are you?&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    listen(integer chan , string name , key id , string msg )&lt;br /&gt;
    {&lt;br /&gt;
        &lt;br /&gt;
        ////// Some neat particles to show the link line  :)&lt;br /&gt;
        //&lt;br /&gt;
        //  Calculate the lifespan of the particles so they don&#039;t move to fast&lt;br /&gt;
        vector start_scale = &amp;lt;.2,.4,.0&amp;gt;; vector end_scale = &amp;lt;.25,.45,.0&amp;gt;;&lt;br /&gt;
        float part_age =  .3 * (llVecDist(llList2Vector(llGetObjectDetails(id,[OBJECT_POS]),0),llGetPos()));&lt;br /&gt;
        if (part_age &amp;gt; 30.) { &lt;br /&gt;
        vector mod = &amp;lt; 0., (part_age / 30.), 0.&amp;gt;; part_age = 30.; start_scale = start_scale + mod; end_scale = end_scale + mod; }&lt;br /&gt;
        //  Generate the particles&lt;br /&gt;
        llParticleSystem([2,1.0,4,1.0,1,&amp;lt;0.847059, 0.301961, 0.835294&amp;gt;,3,&amp;lt;0.729412, 0.160784, 0.717647&amp;gt;,5,start_scale,6,end_scale,19,0.0,7,part_age,13,0.0,15,10,9,2,8,&amp;lt;75.0,0.0,0.0&amp;gt;,0,483,20,id]);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        //// Tell our object where we are&lt;br /&gt;
        llRegionSay(channel , (string)llGetRot() + &amp;quot;@&amp;quot; + (string)llGetPos()  ); &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    changed(integer change) {&lt;br /&gt;
        if (llAvatarOnSitTarget() != NULL_KEY)&lt;br /&gt;
            llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    run_time_permissions(integer perm) {&lt;br /&gt;
        string anim = llGetInventoryName(INVENTORY_ANIMATION, 0);&lt;br /&gt;
        if (anim != &amp;quot;&amp;quot;) {&lt;br /&gt;
            llStopAnimation(&amp;quot;sit&amp;quot;);&lt;br /&gt;
            llStopAnimation(&amp;quot;sit_generic&amp;quot;);&lt;br /&gt;
            llStopAnimation(&amp;quot;sit_female&amp;quot;);&lt;br /&gt;
            llStartAnimation(anim);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you actually read that you&#039;ll see that you can also stick an animation in the helper prim and it&#039;ll play it while you sit.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Target Setter (on touch) ==&lt;br /&gt;
&lt;br /&gt;
Next drop this script into your chair or teleport pad or whatever.  Then touch.  It sets the sit target of the prim to be exactly where your av is sitting on the helper.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;// Sit target system by Lex Neva. Please distribute willy-nilly.&lt;br /&gt;
// http://forums.secondlife.com/showthread.php?t=153278&amp;amp;highlight=target&lt;br /&gt;
&lt;br /&gt;
// Sit target setting script.   Sets on touch.&lt;br /&gt;
&lt;br /&gt;
// Support for Teleport-range setting shoehorned in by Clarknova Helvetic&lt;br /&gt;
// https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Sit_TP_Positioner&amp;amp;action=submit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Generate a private chat channel based on key, JUSSSSSST in case  &lt;br /&gt;
// two people are using a sit positioner in the same sim.&lt;br /&gt;
integer channel;&lt;br /&gt;
integer genChannel(key k , integer mod, integer pin)&lt;br /&gt;
{  // NOTE : mod must = 1 or 2  ,  pin must be  &amp;gt;= 1  or &amp;lt; 500,000&lt;br /&gt;
    float a = (float)(&amp;quot;0x&amp;quot;+llGetSubString( (string)k, mod,-1));       &lt;br /&gt;
    integer b =  llRound( llFabs(a) - a*2 + pin );          &lt;br /&gt;
    return b;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
touch_start(integer total_number) {&lt;br /&gt;
&lt;br /&gt;
integer i;&lt;br /&gt;
    for (i = 0 ; i &amp;lt; total_number ; ++i )&lt;br /&gt;
    {&lt;br /&gt;
        if (llDetectedKey(i) == llGetOwner())   &lt;br /&gt;
        {&lt;br /&gt;
            llOwnerSay(&amp;quot;Querying Sit Target Helper...&amp;quot;);&lt;br /&gt;
            channel = genChannel(llGetOwner() , 2 , 300 );&lt;br /&gt;
            llListen( channel , &amp;quot;&amp;quot; , NULL_KEY , &amp;quot;&amp;quot;);&lt;br /&gt;
            llRegionSay(channel,&amp;quot;Where are you?&amp;quot;);&lt;br /&gt;
            llSetTimerEvent( 10. );&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
listen(integer chan , string name , key id , string msg )&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    integer at = llSubStringIndex( msg, &amp;quot;@&amp;quot; );&lt;br /&gt;
    &lt;br /&gt;
    rotation helper_rot = (rotation)(llGetSubString(msg, 0, at - 1));&lt;br /&gt;
    vector helper_pos = (vector)(llGetSubString(msg, at + 1,-1));&lt;br /&gt;
&lt;br /&gt;
    vector my_pos = llGetPos();&lt;br /&gt;
    rotation my_rot = llGetRot();&lt;br /&gt;
    &lt;br /&gt;
    float distance = llVecDist(my_pos,helper_pos);&lt;br /&gt;
    &lt;br /&gt;
    vector target_pos = ZERO_VECTOR;&lt;br /&gt;
    &lt;br /&gt;
    if ( distance &amp;gt; 300.) {&lt;br /&gt;
    llOwnerSay(&amp;quot;Sit target is &amp;quot; + (string)(distance - 300.) + &amp;quot;m too far away! \n( if you lost your Helper it&#039;s at &amp;quot; + (string)helper_pos +&amp;quot; )&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    else {&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    // calculate where the avatar actually is&lt;br /&gt;
    vector avatar_pos = helper_pos + &amp;lt;0,0,1&amp;gt; * helper_rot; // due to helper&#039;s sit target&lt;br /&gt;
    avatar_pos = avatar_pos - &amp;lt;0,0,0.186&amp;gt; + &amp;lt;0,0,0.4&amp;gt; * helper_rot; // correct for a bug in llSitTarget(), for helper sit target&lt;br /&gt;
&lt;br /&gt;
    target_pos = (avatar_pos - my_pos) / my_rot;&lt;br /&gt;
    target_pos = target_pos + &amp;lt;0,0,0.186&amp;gt;/my_rot - &amp;lt;0,0,0.4&amp;gt;; // correct for the bug again, this time in my sit target&lt;br /&gt;
    rotation target_rot = helper_rot / my_rot;&lt;br /&gt;
    &lt;br /&gt;
    llSitTarget(target_pos, target_rot);&lt;br /&gt;
    llOwnerSay(&amp;quot;llSitTarget(&amp;quot; + (string)target_pos + &amp;quot;, &amp;quot; + (string)target_rot + &amp;quot;);&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
    llSetTimerEvent(0.);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
changed(integer change) {&lt;br /&gt;
if (llAvatarOnSitTarget() != NULL_KEY)&lt;br /&gt;
llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
run_time_permissions(integer perm) {&lt;br /&gt;
string anim = llGetInventoryName(INVENTORY_ANIMATION, 0);&lt;br /&gt;
if (anim != &amp;quot;&amp;quot;) {&lt;br /&gt;
llStopAnimation(&amp;quot;sit&amp;quot;);&lt;br /&gt;
llStopAnimation(&amp;quot;sit_generic&amp;quot;);&lt;br /&gt;
llStopAnimation(&amp;quot;sit_female&amp;quot;);&lt;br /&gt;
llStartAnimation(anim);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
    timer() { llOwnerSay(&amp;quot;Query timed out.  You sure your Helper is in the same sim? \n Anyway, try again.&amp;quot;);  }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If successful, particles will flow from your Helper to the chair prim.  If your target is too far away, or not in the same region, you&#039;ll be warned instead.&lt;br /&gt;
&lt;br /&gt;
Adjust and touch as many times as you need.  Remember to remove the script when done. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Target setter - drag &#039;n drop ==&lt;br /&gt;
&lt;br /&gt;
This script does the same thing as the one above.  The difference is that once you drag the script in your chair it sets the target and deletes from prim inventory.  Fire &#039;n forget.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;// Sit target system by Lex Neva. Please distribute willy-nilly.&lt;br /&gt;
// http://forums.secondlife.com/showthread.php?t=153278&amp;amp;highlight=target&lt;br /&gt;
&lt;br /&gt;
// Sit target setting script.   Drag -n- drop version.&lt;br /&gt;
&lt;br /&gt;
// Support for Teleport-range setting shoehorned in by Clarknova Helvetic  &lt;br /&gt;
// Drag &#039;n drop adaptation also by CH.  I like doing things this way :)&lt;br /&gt;
// https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Sit_TP_Positioner&amp;amp;action=submit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Generate a private chat channel based on key, JUSSSSSST in case  &lt;br /&gt;
// two people are using a sit positioner in the same sim.&lt;br /&gt;
integer channel;&lt;br /&gt;
integer genChannel(key k , integer mod, integer pin)&lt;br /&gt;
{  // NOTE : mod must = 1 or 2  ,  pin must be  &amp;gt;= 1  or &amp;lt; 500,000&lt;br /&gt;
    float a = (float)(&amp;quot;0x&amp;quot;+llGetSubString( (string)k, mod,-1));       &lt;br /&gt;
    integer b =  llRound( llFabs(a) - a*2 + pin );          &lt;br /&gt;
    return b;&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
state_entry() {&lt;br /&gt;
llSitTarget(ZERO_VECTOR,ZERO_ROTATION);&lt;br /&gt;
llOwnerSay(&amp;quot;Querying Sit Target Helper...&amp;quot;);&lt;br /&gt;
channel = genChannel(llGetOwner() , 2 , 300 );&lt;br /&gt;
llListen( channel , &amp;quot;&amp;quot; , NULL_KEY , &amp;quot;&amp;quot;);&lt;br /&gt;
llRegionSay(channel,&amp;quot;Where are you?&amp;quot;);&lt;br /&gt;
llSetTimerEvent( 10. );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
listen(integer chan , string name , key id , string msg )&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    integer at = llSubStringIndex( msg, &amp;quot;@&amp;quot; );&lt;br /&gt;
    &lt;br /&gt;
    rotation helper_rot = (rotation)(llGetSubString(msg, 0, at - 1));&lt;br /&gt;
    vector helper_pos = (vector)(llGetSubString(msg, at + 1,-1));&lt;br /&gt;
&lt;br /&gt;
    vector my_pos = llGetPos();&lt;br /&gt;
    rotation my_rot = llGetRot();&lt;br /&gt;
    &lt;br /&gt;
    float distance = llVecDist(my_pos,helper_pos);&lt;br /&gt;
    &lt;br /&gt;
    vector target_pos = ZERO_VECTOR;&lt;br /&gt;
    &lt;br /&gt;
    if ( distance &amp;gt; 300.) {&lt;br /&gt;
    llOwnerSay(&amp;quot;Sit target is &amp;quot; + (string)(distance - 300.) + &amp;quot;m too far away! \n( if you lost your Helper it&#039;s at &amp;quot; + (string)helper_pos +&amp;quot; )&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    else {&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    // calculate where the avatar actually is&lt;br /&gt;
    vector avatar_pos = helper_pos + &amp;lt;0,0,1&amp;gt; * helper_rot; // due to helper&#039;s sit target&lt;br /&gt;
    avatar_pos = avatar_pos - &amp;lt;0,0,0.186&amp;gt; + &amp;lt;0,0,0.4&amp;gt; * helper_rot; // correct for a bug in llSitTarget(), for helper sit target&lt;br /&gt;
&lt;br /&gt;
    target_pos = (avatar_pos - my_pos) / my_rot;&lt;br /&gt;
    target_pos = target_pos + &amp;lt;0,0,0.186&amp;gt;/my_rot - &amp;lt;0,0,0.4&amp;gt;; // correct for the bug again, this time in my sit target&lt;br /&gt;
    rotation target_rot = helper_rot / my_rot;&lt;br /&gt;
    &lt;br /&gt;
    llSitTarget(target_pos, target_rot);&lt;br /&gt;
    llOwnerSay(&amp;quot;llSitTarget(&amp;quot; + (string)target_pos + &amp;quot;, &amp;quot; + (string)target_rot + &amp;quot;);&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    llRemoveInventory(llGetScriptName());&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
changed(integer change) {&lt;br /&gt;
if (llAvatarOnSitTarget() != NULL_KEY)&lt;br /&gt;
llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
run_time_permissions(integer perm) {&lt;br /&gt;
string anim = llGetInventoryName(INVENTORY_ANIMATION, 0);&lt;br /&gt;
if (anim != &amp;quot;&amp;quot;) {&lt;br /&gt;
llStopAnimation(&amp;quot;sit&amp;quot;);&lt;br /&gt;
llStopAnimation(&amp;quot;sit_generic&amp;quot;);&lt;br /&gt;
llStopAnimation(&amp;quot;sit_female&amp;quot;);&lt;br /&gt;
llStartAnimation(anim);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
    timer() { llOwnerSay(&amp;quot;Query timed out.  You sure your Helper is in the same sim? \n Anyway, try again.&amp;quot;); llRemoveInventory(llGetScriptName()); }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=50817</id>
		<title>User:Clarknova Helvetic</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=50817"/>
		<updated>2008-01-24T02:08:24Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: threw in some bookmarks.  furhter changes pending&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you were linked from the SL forums you&#039;re probably looking for [[User:Clarknova Helvetic/Clone Primitive  v2.0|Clone Primitive]].&lt;br /&gt;
&lt;br /&gt;
== About Moi ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Snapshot Tornado.jpg|thumb|right|256px| Someone&#039;s got to clean up around here.]]&lt;br /&gt;
&lt;br /&gt;
I like to script and build and also ponies.&lt;br /&gt;
&lt;br /&gt;
Three days younger than [[User:Arcadia Asylum|Arcadia Asylum]].&lt;br /&gt;
&lt;br /&gt;
Started SL on 2006/23/10.  Soon stopped because I couldn&#039;t stand client crashes.  Came back a year later when I had a decent video card and found that everyone I&#039;d met.. this is their job now.&lt;br /&gt;
&lt;br /&gt;
I make and sell gidgets [http://slexchange.com/modules.php?name=Marketplace&amp;amp;MerchantID=91584| on SLX] and [http://slurl.com/secondlife/Valis/85/37/232| in-world].  About half are freebies.  &lt;br /&gt;
&lt;br /&gt;
One of my most popular items was my first real project: The Builder&#039;s Sky Platform.  There are about 2500 users with one in their inventory.  One of the features I would change now is that it drops a half-kilometer halo of particles when the user falls off.  I&#039;m really surprised no one (+1) has ever complained.  &lt;br /&gt;
&lt;br /&gt;
Personally, I&#039;d hang me for it.&lt;br /&gt;
&lt;br /&gt;
If you care you can usually find me at [http://slurl.com/secondlife/Combat%20(sandbox)%20Rausch/177/159/24| The Rausch], or at [http://slurl.com/secondlife/Valis/85/37/232| My Shop] in Valis. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scripting Widgets ==&lt;br /&gt;
&lt;br /&gt;
I drag &#039;n drop these scripts into objects when I need to know something about them, or to set a quick parameter.  They do their job then delete from object inventory.&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Say This &amp;amp; That Widgets|Say This &amp;amp; That]]&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Set Param Widgets|Set Param Widgets]]&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Clear Param Widgets|Clear Param Widgets]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a very sweet little tool for setting sit targets, created by ___  and upgraded to teleport-worthiness by moi.&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Sit TP Positioner|Sit TP Positioner]] &amp;lt;b&amp;gt;&amp;lt;nowiki&amp;gt;[[ COMING SOON! ]]&amp;lt;/nowiki&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interesting stuff ==&lt;br /&gt;
&lt;br /&gt;
[http://www.openlifegrid.com/ Run your own sim!]&lt;br /&gt;
&lt;br /&gt;
[http://nicholaz-beresford.blogspot.com/ Nicholaz patched viewer]&lt;br /&gt;
&lt;br /&gt;
[https://lists.secondlife.com/pipermail/secondlifescripters/2006-November/000180.html  RSA in LsL]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=Gy9hQDT6fhI ell oh ell]&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=49407</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=49407"/>
		<updated>2008-01-16T01:25:05Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* &amp;#039;&amp;#039;&amp;#039;Attributes that won&amp;#039;t copy&amp;#039;&amp;#039;&amp;#039; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;31&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts using [[llSetPrimitiveParams|llSetPrimitiveParams([])]] and [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt; ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                   CLONE PRIMITIVE  v 2.31&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
 &lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
 &lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot;\n\n\t];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;\tllSetPrimitiveParams(params);\n\tparams = [];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n\t// &amp;quot; + c ); }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/// On with the show...&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
 &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
 &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n\tstate_entry()\n\t{\n\tlist params;\n\t\n\n\t// If you are cutting code out to paste into custon functions\n\t// Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n\tparams =&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
 &lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
 &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
 &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
 &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
 &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
 &lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n\tPRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
 &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[ \n \n \t&amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;\t// It&#039;s probably not a god idea to have your new prim jump to the old one\n\t// &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
 &lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.\n\t&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n\t// during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n\t// Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
 &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n\n\t];&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
            say(&amp;quot;\tPRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n\t// If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
 &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
 &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n\t// Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n\t// The default value is 1 (distorted).\n\t// if you are metamorphing an object that already had planar mapping (rare)\n\t// uncomment those 0 lines.\n\t// This may not seem like much savings\n\t//  but if your script is trying to metamorph between as many as five objects\n\t// those few bytes saved might come in handy at the end.\n\n\t// If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;\t// PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;\tPRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\tllSetPrimitiveParams(params);\tparams = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\n\t// If you were cut/pasting this code into a custom transform function\n\t// end your cut above this comment.\n\t// Otherwise ignore this.\n\n\tllSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n\tllSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\tllRemoveInventory(llGetScriptName());\n\t}\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
        {&lt;br /&gt;
         list params;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
         // If you are cutting code out to paste into custon functions&lt;br /&gt;
         // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
&lt;br /&gt;
         params =&lt;br /&gt;
&lt;br /&gt;
         [&lt;br /&gt;
         PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
         PRIM_MATERIAL,2 , &lt;br /&gt;
         PRIM_PHYSICS,0 , &lt;br /&gt;
         PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
         PRIM_PHANTOM,2 , &lt;br /&gt;
         // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
        // PRIM_POSITION,&amp;lt;84.270088, 36.444294, 231.487076&amp;gt; ] + (params = []) +&lt;br /&gt;
         PRIM_ROTATION,&amp;lt;-0.363768, 0.720439, 0.134244, 0.574995&amp;gt; , &lt;br /&gt;
         PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
        ];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // Set all of the above paramaters as a group.&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
       // Please vote to fix it. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This prim has 3 faces.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
        PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
       // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
      // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
      [&lt;br /&gt;
&lt;br /&gt;
         PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
         PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
         // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
 &lt;br /&gt;
       // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
        // The default value is 1 (distorted).&lt;br /&gt;
       // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
       // uncomment those 0 lines.&lt;br /&gt;
       // This may not seem like much savings&lt;br /&gt;
       //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
       // those few bytes saved might come in handy at the end.&lt;br /&gt;
&lt;br /&gt;
       // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
         // PRIM_TEXGEN,0,0 , &lt;br /&gt;
         // PRIM_TEXGEN,1,0 , &lt;br /&gt;
         // PRIM_TEXGEN,2,0 , &lt;br /&gt;
         PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
         // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
         // end your cut above this comment.&lt;br /&gt;
         // Otherwise ignore this.&lt;br /&gt;
&lt;br /&gt;
        llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
 &lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Increase the &#039;&#039;pause&#039;&#039; variable at the top of the script and try again.  If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Supports sculpties.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;shape_1()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_2()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                      &lt;br /&gt;
shape_3()&lt;br /&gt;
{&lt;br /&gt;
     // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_4()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                                               &lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
      on_rez(integer p) { llResetScript(); }&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
         do&lt;br /&gt;
         {&lt;br /&gt;
           shape_1();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_2();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_3();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
&lt;br /&gt;
           shape_4();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
       }while (1);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
If you find a bug, or want to make a change, please do so on the [[User talk:Clarknova Helvetic/Clone Primitive v2.0 | Discussion]] page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Code Block Limit&#039;&#039;&#039; ===&lt;br /&gt;
 &lt;br /&gt;
In its current form this prim cycling script above can run stably with 10 complete output blocks, but 11 == Stack-Heap.  Instead of crashing right away, it crashes after three or so iterations.  &lt;br /&gt;
&lt;br /&gt;
Can anyone tell me why?  It compiles, it can go through more than three, the rules list is cleared at the end of each transformation.  Less than 11 and it&#039;s stable.  &lt;br /&gt;
&lt;br /&gt;
llGetFreeMemeory() at each iteration shows no leak.  &lt;br /&gt;
&lt;br /&gt;
Any ideas?&lt;br /&gt;
&lt;br /&gt;
(Yes, I know that if I change only the parameters relevant I could go through thirty objects or more.  The script above is just to test overall efficiency of the output code.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;PRIM_TEXGEN&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
aka &#039;&#039;Planar Mapping&#039;&#039; flags are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wonky, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Attributes that won&#039;t copy&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Some prim attributes are persistent independent of scripts, but cannot be set or read by ll*etPrimitiveParams([]).&lt;br /&gt;
&lt;br /&gt;
* Right click default action&lt;br /&gt;
* Texture animations&lt;br /&gt;
* Particles&lt;br /&gt;
* Sit Targets&lt;br /&gt;
* For Sale flag and price&lt;br /&gt;
* Group/Owner/Creator info (duh)&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Jana_Kamachi/RandomLinker&amp;diff=48553</id>
		<title>User:Jana Kamachi/RandomLinker</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Jana_Kamachi/RandomLinker&amp;diff=48553"/>
		<updated>2008-01-12T00:22:47Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: lsl markup instead of preformat tag&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Jana}}&lt;br /&gt;
Great fun, but also very useful.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
        timer()&lt;br /&gt;
        {&lt;br /&gt;
                llSetLinkPrimitiveParams(llGetNumberOfPrims(), [PRIM_POSITION,&amp;lt;llFrand(10),llFrand(10),llFrand(10)&amp;gt;,PRIM_ROTATION,&amp;lt;llFrand(15),llFrand(15),llFrand(15),llFrand(15)&amp;gt;]);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        touch_start(integer total_number)&lt;br /&gt;
        {&lt;br /&gt;
                llSetTimerEvent(0.001);&lt;br /&gt;
        }&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
                llSitTarget(&amp;lt;0.1,0.1,0.1&amp;gt;,&amp;lt;0,0,0,0&amp;gt;);&lt;br /&gt;
        }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=48405</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=48405"/>
		<updated>2008-01-11T05:03:43Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* The Script */ fixed escaped char leak&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;31&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts using [[llSetPrimitiveParams|llSetPrimitiveParams([])]] and [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt; ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                   CLONE PRIMITIVE  v 2.31&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
 &lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
 &lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot;\n\n\t];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;\tllSetPrimitiveParams(params);\n\tparams = [];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n\t// &amp;quot; + c ); }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/// On with the show...&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
 &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
 &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n\tstate_entry()\n\t{\n\tlist params;\n\t\n\n\t// If you are cutting code out to paste into custon functions\n\t// Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n\tparams =&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
 &lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
 &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
 &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
 &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
 &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
 &lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n\tPRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
 &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[ \n \n \t&amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;\t// It&#039;s probably not a god idea to have your new prim jump to the old one\n\t// &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
 &lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.\n\t&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n\t// during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n\t// Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
 &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n\n\t];&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
            say(&amp;quot;\tPRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n\t// If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
 &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
 &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n\t// Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n\t// The default value is 1 (distorted).\n\t// if you are metamorphing an object that already had planar mapping (rare)\n\t// uncomment those 0 lines.\n\t// This may not seem like much savings\n\t//  but if your script is trying to metamorph between as many as five objects\n\t// those few bytes saved might come in handy at the end.\n\n\t// If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;\t// PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;\tPRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\tllSetPrimitiveParams(params);\tparams = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\n\t// If you were cut/pasting this code into a custom transform function\n\t// end your cut above this comment.\n\t// Otherwise ignore this.\n\n\tllSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n\tllSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\tllRemoveInventory(llGetScriptName());\n\t}\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
        {&lt;br /&gt;
         list params;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
         // If you are cutting code out to paste into custon functions&lt;br /&gt;
         // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
&lt;br /&gt;
         params =&lt;br /&gt;
&lt;br /&gt;
         [&lt;br /&gt;
         PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
         PRIM_MATERIAL,2 , &lt;br /&gt;
         PRIM_PHYSICS,0 , &lt;br /&gt;
         PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
         PRIM_PHANTOM,2 , &lt;br /&gt;
         // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
        // PRIM_POSITION,&amp;lt;84.270088, 36.444294, 231.487076&amp;gt; ] + (params = []) +&lt;br /&gt;
         PRIM_ROTATION,&amp;lt;-0.363768, 0.720439, 0.134244, 0.574995&amp;gt; , &lt;br /&gt;
         PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
        ];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // Set all of the above paramaters as a group.&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
       // Please vote to fix it. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This prim has 3 faces.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
        PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
       // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
      // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
      [&lt;br /&gt;
&lt;br /&gt;
         PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
         PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
         // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
 &lt;br /&gt;
       // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
        // The default value is 1 (distorted).&lt;br /&gt;
       // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
       // uncomment those 0 lines.&lt;br /&gt;
       // This may not seem like much savings&lt;br /&gt;
       //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
       // those few bytes saved might come in handy at the end.&lt;br /&gt;
&lt;br /&gt;
       // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
         // PRIM_TEXGEN,0,0 , &lt;br /&gt;
         // PRIM_TEXGEN,1,0 , &lt;br /&gt;
         // PRIM_TEXGEN,2,0 , &lt;br /&gt;
         PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
         // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
         // end your cut above this comment.&lt;br /&gt;
         // Otherwise ignore this.&lt;br /&gt;
&lt;br /&gt;
        llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
 &lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Increase the &#039;&#039;pause&#039;&#039; variable at the top of the script and try again.  If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Supports sculpties.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;shape_1()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_2()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                      &lt;br /&gt;
shape_3()&lt;br /&gt;
{&lt;br /&gt;
     // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_4()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                                               &lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
      on_rez(integer p) { llResetScript(); }&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
         do&lt;br /&gt;
         {&lt;br /&gt;
           shape_1();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_2();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_3();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
&lt;br /&gt;
           shape_4();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
       }while (1);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
If you find a bug, or want to make a change, please do so on the [[User talk:Clarknova Helvetic/Clone Primitive v2.0 | Discussion]] page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Code Block Limit&#039;&#039;&#039; ===&lt;br /&gt;
 &lt;br /&gt;
In its current form this prim cycling script above can run stably with 10 complete output blocks, but 11 == Stack-Heap.  Instead of crashing right away, it crashes after three or so iterations.  &lt;br /&gt;
&lt;br /&gt;
Can anyone tell me why?  It compiles, it can go through more than three, the rules list is cleared at the end of each transformation.  Less than 11 and it&#039;s stable.  &lt;br /&gt;
&lt;br /&gt;
llGetFreeMemeory() at each iteration shows no leak.  &lt;br /&gt;
&lt;br /&gt;
Any ideas?&lt;br /&gt;
&lt;br /&gt;
(Yes, I know that if I change only the parameters relevant I could go through thirty objects or more.  The script above is just to test overall efficiency of the output code.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;PRIM_TEXGEN&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
aka &#039;&#039;Planar Mapping&#039;&#039; flags are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wonky, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Attributes that won&#039;t copy&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Some prim attributes are persistent independent of scripts, but cannot be set or read by ll*etPrimitiveParams([]).&lt;br /&gt;
&lt;br /&gt;
* Right click default action&lt;br /&gt;
* Texture animations&lt;br /&gt;
* Particles&lt;br /&gt;
* For Sale flag and price&lt;br /&gt;
* Group/Owner/Creator info (duh)&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User_talk:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=48400</id>
		<title>User talk:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User_talk:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=48400"/>
		<updated>2008-01-11T02:19:31Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: left a tab-indent escaped&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi.  There&#039;s no CVS or anything for this little project, so this is my attempt to deal with bug fixes and the like in a rational way.&lt;br /&gt;
&lt;br /&gt;
* Title your comments &amp;amp; announce changes with a &amp;lt;b&amp;gt;&amp;lt;nowiki&amp;gt;{{message}}&amp;lt;/nowiki&amp;gt;&amp;lt;/b&amp;gt; tag and put them in the comments section.&lt;br /&gt;
&lt;br /&gt;
* Make changes to the &#039;&#039;&#039;&#039;&#039;Beta Code&#039;&#039;&#039;&#039;&#039; block  at the bottom of the page.  That way we can track what lines have changed in the page history.  Make sure to add your name to the comments :)&lt;br /&gt;
&amp;amp;mdash;[[User:Clarknova Helvetic|Clarknova Helvetic]] 11:18, 8 January 2008 (PST)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Comments&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
{{message}}  Output code whitespace irregularities fixed and script name in comment header changed to &amp;quot;CLONE PRIMITIVE v 2.31&amp;quot;.  Migrating to main page. &amp;amp;mdash;[[User:Clarknova Helvetic|Clarknova Helvetic]] 19:04, 9 January 2008 (PST)&lt;br /&gt;
&lt;br /&gt;
{{message}} previous whitespace fix left a tab-indent escaped, which made the &amp;quot;\t&amp;quot; leak intot he output code.  fixed. migrated. &amp;amp;mdash;[[User:Clarknova Helvetic|Clarknova Helvetic]] 18:19, 10 January 2008 (PST)&lt;br /&gt;
&lt;br /&gt;
== Beta Code ==&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                   CLONE PRIMITIVE  v 2.31&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
 &lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
 &lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot;\n\n\t];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;\tllSetPrimitiveParams(params);\n\tparams = [];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n\t// &amp;quot; + c ); }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/// On with the show...&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
 &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
 &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n\tstate_entry()\n\t{\n\tlist params;\n\t\n\n\t// If you are cutting code out to paste into custon functions\n\t// Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n\tparams =&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
 &lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
 &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
 &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
 &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
 &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
 &lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n\tPRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
 &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[ \n \n \t&amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;\t// It&#039;s probably not a god idea to have your new prim jump to the old one\n\t// &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
 &lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.\n\t&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n\t// during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n\t// Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
 &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n\n\t];&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
            say(&amp;quot;\tPRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n\t// If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
 &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
 &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n\t// Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n\t// The default value is 1 (distorted).\n\t// if you are metamorphing an object that already had planar mapping (rare)\n\t// uncomment those 0 lines.\n\t// This may not seem like much savings\n\t//  but if your script is trying to metamorph between as many as five objects\n\t// those few bytes saved might come in handy at the end.\n\n\t// If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;\t// PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;\tPRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\tllSetPrimitiveParams(params);\tparams = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\n\t// If you were cut/pasting this code into a custom transform function\n\t// end your cut above this comment.\n\t// Otherwise ignore this.\n\n\tllSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n\tllSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\tllRemoveInventory(llGetScriptName());\n\t}\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=48200</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=48200"/>
		<updated>2008-01-10T03:10:36Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* &amp;#039;&amp;#039;&amp;#039;Attributes that won&amp;#039;t copy&amp;#039;&amp;#039;&amp;#039; */  + Particles&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;31&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts using [[llSetPrimitiveParams|llSetPrimitiveParams([])]] and [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt; ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                   CLONE PRIMITIVE  v 2.31&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
 &lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
 &lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot;\n\n\t];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;\tllSetPrimitiveParams(params);\n\tparams = [];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n\t// &amp;quot; + c ); }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/// On with the show...&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
 &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
 &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n\tstate_entry()\n\t{\n\tlist params;\n\t\n\n\t// If you are cutting code out to paste into custon functions\n\t// Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n\tparams =&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
 &lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
 &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
 &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
 &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
 &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
 &lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n\tPRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
 &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[ \n \n \t&amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;\t// It&#039;s probably not a god idea to have your new prim jump to the old one\n\t// &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
 &lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.\n\t&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n\t// during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n\t// Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
 &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n\n\t];&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
            say(&amp;quot;\tPRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n\t// If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
 &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
 &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n\t// Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n\t// The default value is 1 (distorted).\n\t// if you are metamorphing an object that already had planar mapping (rare)\n\t// uncomment those 0 lines.\n\t// This may not seem like much savings\n\t//  but if your script is trying to metamorph between as many as five objects\n\t// those few bytes saved might come in handy at the end.\n\n\t// If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;\t// PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;\tPRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\tllSetPrimitiveParams(params);\\tparams = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\n\t// If you were cut/pasting this code into a custom transform function\n\t// end your cut above this comment.\n\t// Otherwise ignore this.\n\n\tllSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n\tllSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\tllRemoveInventory(llGetScriptName());\n\t}\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
        {&lt;br /&gt;
         list params;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
         // If you are cutting code out to paste into custon functions&lt;br /&gt;
         // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
&lt;br /&gt;
         params =&lt;br /&gt;
&lt;br /&gt;
         [&lt;br /&gt;
         PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
         PRIM_MATERIAL,2 , &lt;br /&gt;
         PRIM_PHYSICS,0 , &lt;br /&gt;
         PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
         PRIM_PHANTOM,2 , &lt;br /&gt;
         // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
        // PRIM_POSITION,&amp;lt;84.270088, 36.444294, 231.487076&amp;gt; ] + (params = []) +&lt;br /&gt;
         PRIM_ROTATION,&amp;lt;-0.363768, 0.720439, 0.134244, 0.574995&amp;gt; , &lt;br /&gt;
         PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
        ];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // Set all of the above paramaters as a group.&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
       // Please vote to fix it. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This prim has 3 faces.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
        PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
       // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
      // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
      [&lt;br /&gt;
&lt;br /&gt;
         PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
         PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
         // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
 &lt;br /&gt;
       // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
        // The default value is 1 (distorted).&lt;br /&gt;
       // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
       // uncomment those 0 lines.&lt;br /&gt;
       // This may not seem like much savings&lt;br /&gt;
       //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
       // those few bytes saved might come in handy at the end.&lt;br /&gt;
&lt;br /&gt;
       // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
         // PRIM_TEXGEN,0,0 , &lt;br /&gt;
         // PRIM_TEXGEN,1,0 , &lt;br /&gt;
         // PRIM_TEXGEN,2,0 , &lt;br /&gt;
         PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
         // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
         // end your cut above this comment.&lt;br /&gt;
         // Otherwise ignore this.&lt;br /&gt;
&lt;br /&gt;
        llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
 &lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Increase the &#039;&#039;pause&#039;&#039; variable at the top of the script and try again.  If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Supports sculpties.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;shape_1()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_2()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                      &lt;br /&gt;
shape_3()&lt;br /&gt;
{&lt;br /&gt;
     // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_4()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                                               &lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
      on_rez(integer p) { llResetScript(); }&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
         do&lt;br /&gt;
         {&lt;br /&gt;
           shape_1();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_2();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_3();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
&lt;br /&gt;
           shape_4();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
       }while (1);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
If you find a bug, or want to make a change, please do so on the [[User talk:Clarknova Helvetic/Clone Primitive v2.0 | Discussion]] page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Code Block Limit&#039;&#039;&#039; ===&lt;br /&gt;
 &lt;br /&gt;
In its current form this prim cycling script above can run stably with 10 complete output blocks, but 11 == Stack-Heap.  Instead of crashing right away, it crashes after three or so iterations.  &lt;br /&gt;
&lt;br /&gt;
Can anyone tell me why?  It compiles, it can go through more than three, the rules list is cleared at the end of each transformation.  Less than 11 and it&#039;s stable.  &lt;br /&gt;
&lt;br /&gt;
llGetFreeMemeory() at each iteration shows no leak.  &lt;br /&gt;
&lt;br /&gt;
Any ideas?&lt;br /&gt;
&lt;br /&gt;
(Yes, I know that if I change only the parameters relevant I could go through thirty objects or more.  The script above is just to test overall efficiency of the output code.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;PRIM_TEXGEN&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
aka &#039;&#039;Planar Mapping&#039;&#039; flags are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wonky, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Attributes that won&#039;t copy&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Some prim attributes are persistent independent of scripts, but cannot be set or read by ll*etPrimitiveParams([]).&lt;br /&gt;
&lt;br /&gt;
* Right click default action&lt;br /&gt;
* Texture animations&lt;br /&gt;
* Particles&lt;br /&gt;
* For Sale flag and price&lt;br /&gt;
* Group/Owner/Creator info (duh)&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User_talk:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=48199</id>
		<title>User talk:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User_talk:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=48199"/>
		<updated>2008-01-10T03:06:31Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: wiki markup is arcane :)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi.  There&#039;s no CVS or anything for this little project, so this is my attempt to deal with bug fixes and the like in a rational way.&lt;br /&gt;
&lt;br /&gt;
* Title your comments &amp;amp; announce changes with a &amp;lt;b&amp;gt;&amp;lt;nowiki&amp;gt;{{message}}&amp;lt;/nowiki&amp;gt;&amp;lt;/b&amp;gt; tag and put them in the comments section.&lt;br /&gt;
&lt;br /&gt;
* Make changes to the &#039;&#039;&#039;&#039;&#039;Beta Code&#039;&#039;&#039;&#039;&#039; block  at the bottom of the page.  That way we can track what lines have changed in the page history.  Make sure to add your name to the comments :)&lt;br /&gt;
&amp;amp;mdash;[[User:Clarknova Helvetic|Clarknova Helvetic]] 11:18, 8 January 2008 (PST)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Comments&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
{{message}}  Output code whitespace irregularities fixed and script name in comment header changed to &amp;quot;CLONE PRIMITIVE v 2.31&amp;quot;.  Migrating to main page. &amp;amp;mdash;[[User:Clarknova Helvetic|Clarknova Helvetic]] 19:04, 9 January 2008 (PST)&lt;br /&gt;
&lt;br /&gt;
== Beta Code ==&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                   CLONE PRIMITIVE  v 2.31&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
 &lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
 &lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot;\n\n\t];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;\tllSetPrimitiveParams(params);\n\tparams = [];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n\t// &amp;quot; + c ); }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/// On with the show...&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
 &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
 &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n\tstate_entry()\n\t{\n\tlist params;\n\t\n\n\t// If you are cutting code out to paste into custon functions\n\t// Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n\tparams =&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
 &lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
 &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
 &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
 &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
 &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
 &lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n\tPRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
 &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[ \n \n \t&amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;\t// It&#039;s probably not a god idea to have your new prim jump to the old one\n\t// &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
 &lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.\n\t&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n\t// during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n\t// Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
 &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n\n\t];&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
            say(&amp;quot;\tPRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n\t// If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
 &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
 &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n\t// Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n\t// The default value is 1 (distorted).\n\t// if you are metamorphing an object that already had planar mapping (rare)\n\t// uncomment those 0 lines.\n\t// This may not seem like much savings\n\t//  but if your script is trying to metamorph between as many as five objects\n\t// those few bytes saved might come in handy at the end.\n\n\t// If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;\t// PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;\tPRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\tllSetPrimitiveParams(params);\\tparams = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\n\t// If you were cut/pasting this code into a custom transform function\n\t// end your cut above this comment.\n\t// Otherwise ignore this.\n\n\tllSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n\tllSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\tllRemoveInventory(llGetScriptName());\n\t}\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User_talk:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=48198</id>
		<title>User talk:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User_talk:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=48198"/>
		<updated>2008-01-10T03:04:18Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* &amp;#039;&amp;#039;&amp;#039;Comments&amp;#039;&amp;#039;&amp;#039; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi.  There&#039;s no CVS or anything for this little project, so this is my attempt to deal with bug fixes and the like in a rational way.&lt;br /&gt;
&lt;br /&gt;
* Title your comments &amp;amp; announce changes with a &amp;lt;nowiki&amp;gt;&amp;lt;b&amp;gt;{{message}}&amp;lt;/b&amp;gt;&amp;lt;/nowiki&amp;gt; tag and put them in the comments section.&lt;br /&gt;
&lt;br /&gt;
* Make changes to the &#039;&#039;&#039;&#039;&#039;Beta Code&#039;&#039;&#039;&#039;&#039; block  at the bottom of the page.  That way we can track what lines have changed in the page history.  Make sure to add your name to the comments :)&lt;br /&gt;
&amp;amp;mdash;[[User:Clarknova Helvetic|Clarknova Helvetic]] 11:18, 8 January 2008 (PST)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Comments&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
{{message}}  Output code whitespace irregularities fixed and script name in comment header changed to &amp;quot;CLONE PRIMITIVE v 2.31&amp;quot;.  Migrating to main page. &amp;amp;mdash;[[User:Clarknova Helvetic|Clarknova Helvetic]] 19:04, 9 January 2008 (PST)&lt;br /&gt;
&lt;br /&gt;
== Beta Code ==&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                   CLONE PRIMITIVE  v 2.31&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
 &lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
 &lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot;\n\n\t];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;\tllSetPrimitiveParams(params);\n\tparams = [];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n\t// &amp;quot; + c ); }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/// On with the show...&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
 &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
 &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n\tstate_entry()\n\t{\n\tlist params;\n\t\n\n\t// If you are cutting code out to paste into custon functions\n\t// Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n\tparams =&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
 &lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
 &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
 &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
 &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
 &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
 &lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n\tPRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
 &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[ \n \n \t&amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;\t// It&#039;s probably not a god idea to have your new prim jump to the old one\n\t// &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
 &lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.\n\t&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n\t// during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n\t// Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
 &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n\n\t];&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
            say(&amp;quot;\tPRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n\t// If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
 &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
 &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n\t// Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n\t// The default value is 1 (distorted).\n\t// if you are metamorphing an object that already had planar mapping (rare)\n\t// uncomment those 0 lines.\n\t// This may not seem like much savings\n\t//  but if your script is trying to metamorph between as many as five objects\n\t// those few bytes saved might come in handy at the end.\n\n\t// If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;\t// PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;\tPRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\tllSetPrimitiveParams(params);\\tparams = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\n\t// If you were cut/pasting this code into a custom transform function\n\t// end your cut above this comment.\n\t// Otherwise ignore this.\n\n\tllSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n\tllSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\tllRemoveInventory(llGetScriptName());\n\t}\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=48197</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=48197"/>
		<updated>2008-01-10T03:03:30Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* BUGS */  uncopyable attributes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;31&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts using [[llSetPrimitiveParams|llSetPrimitiveParams([])]] and [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt; ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                   CLONE PRIMITIVE  v 2.31&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
 &lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
 &lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot;\n\n\t];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;\tllSetPrimitiveParams(params);\n\tparams = [];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n\t// &amp;quot; + c ); }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/// On with the show...&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
 &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
 &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n\tstate_entry()\n\t{\n\tlist params;\n\t\n\n\t// If you are cutting code out to paste into custon functions\n\t// Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n\tparams =&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
 &lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
 &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
 &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
 &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
 &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
 &lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n\tPRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
 &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[ \n \n \t&amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;\t// It&#039;s probably not a god idea to have your new prim jump to the old one\n\t// &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
 &lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.\n\t&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n\t// during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n\t// Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
 &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n\n\t];&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
            say(&amp;quot;\tPRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n\t// If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
 &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
 &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n\t// Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n\t// The default value is 1 (distorted).\n\t// if you are metamorphing an object that already had planar mapping (rare)\n\t// uncomment those 0 lines.\n\t// This may not seem like much savings\n\t//  but if your script is trying to metamorph between as many as five objects\n\t// those few bytes saved might come in handy at the end.\n\n\t// If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;\t// PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;\tPRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\tllSetPrimitiveParams(params);\\tparams = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\n\t// If you were cut/pasting this code into a custom transform function\n\t// end your cut above this comment.\n\t// Otherwise ignore this.\n\n\tllSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n\tllSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\tllRemoveInventory(llGetScriptName());\n\t}\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
        {&lt;br /&gt;
         list params;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
         // If you are cutting code out to paste into custon functions&lt;br /&gt;
         // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
&lt;br /&gt;
         params =&lt;br /&gt;
&lt;br /&gt;
         [&lt;br /&gt;
         PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
         PRIM_MATERIAL,2 , &lt;br /&gt;
         PRIM_PHYSICS,0 , &lt;br /&gt;
         PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
         PRIM_PHANTOM,2 , &lt;br /&gt;
         // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
        // PRIM_POSITION,&amp;lt;84.270088, 36.444294, 231.487076&amp;gt; ] + (params = []) +&lt;br /&gt;
         PRIM_ROTATION,&amp;lt;-0.363768, 0.720439, 0.134244, 0.574995&amp;gt; , &lt;br /&gt;
         PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
        ];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // Set all of the above paramaters as a group.&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
       // Please vote to fix it. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This prim has 3 faces.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
        PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
       // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
      // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
      [&lt;br /&gt;
&lt;br /&gt;
         PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
         PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
         // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
 &lt;br /&gt;
       // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
        // The default value is 1 (distorted).&lt;br /&gt;
       // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
       // uncomment those 0 lines.&lt;br /&gt;
       // This may not seem like much savings&lt;br /&gt;
       //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
       // those few bytes saved might come in handy at the end.&lt;br /&gt;
&lt;br /&gt;
       // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
         // PRIM_TEXGEN,0,0 , &lt;br /&gt;
         // PRIM_TEXGEN,1,0 , &lt;br /&gt;
         // PRIM_TEXGEN,2,0 , &lt;br /&gt;
         PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
         // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
         // end your cut above this comment.&lt;br /&gt;
         // Otherwise ignore this.&lt;br /&gt;
&lt;br /&gt;
        llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
 &lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Increase the &#039;&#039;pause&#039;&#039; variable at the top of the script and try again.  If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Supports sculpties.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;shape_1()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_2()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                      &lt;br /&gt;
shape_3()&lt;br /&gt;
{&lt;br /&gt;
     // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_4()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                                               &lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
      on_rez(integer p) { llResetScript(); }&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
         do&lt;br /&gt;
         {&lt;br /&gt;
           shape_1();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_2();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_3();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
&lt;br /&gt;
           shape_4();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
       }while (1);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
If you find a bug, or want to make a change, please do so on the [[User talk:Clarknova Helvetic/Clone Primitive v2.0 | Discussion]] page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Code Block Limit&#039;&#039;&#039; ===&lt;br /&gt;
 &lt;br /&gt;
In its current form this prim cycling script above can run stably with 10 complete output blocks, but 11 == Stack-Heap.  Instead of crashing right away, it crashes after three or so iterations.  &lt;br /&gt;
&lt;br /&gt;
Can anyone tell me why?  It compiles, it can go through more than three, the rules list is cleared at the end of each transformation.  Less than 11 and it&#039;s stable.  &lt;br /&gt;
&lt;br /&gt;
llGetFreeMemeory() at each iteration shows no leak.  &lt;br /&gt;
&lt;br /&gt;
Any ideas?&lt;br /&gt;
&lt;br /&gt;
(Yes, I know that if I change only the parameters relevant I could go through thirty objects or more.  The script above is just to test overall efficiency of the output code.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;PRIM_TEXGEN&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
aka &#039;&#039;Planar Mapping&#039;&#039; flags are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wonky, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Attributes that won&#039;t copy&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Some prim attributes are persistent independent of scripts, but cannot be set or read by ll*etPrimitiveParams([]).&lt;br /&gt;
&lt;br /&gt;
* Right click default action&lt;br /&gt;
* Texture animations&lt;br /&gt;
* For Sale flag and price&lt;br /&gt;
* Group/Owner/Creator info (duh)&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=48108</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=48108"/>
		<updated>2008-01-09T21:25:02Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: whitespace irregularities fixed in v2.31&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;31&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts using [[llSetPrimitiveParams|llSetPrimitiveParams([])]] and [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt; ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                   CLONE PRIMITIVE  v 2.31&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
 &lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
 &lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot;\n\n\t];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;\tllSetPrimitiveParams(params);\n\tparams = [];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n\t// &amp;quot; + c ); }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/// On with the show...&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
 &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
 &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n\tstate_entry()\n\t{\n\tlist params;\n\t\n\n\t// If you are cutting code out to paste into custon functions\n\t// Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n\tparams =&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
 &lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
 &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
 &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
 &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
 &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
 &lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n\tPRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
 &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[ \n \n \t&amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;\t// It&#039;s probably not a god idea to have your new prim jump to the old one\n\t// &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
 &lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.\n\t&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n\t// during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n\t// Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
 &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n\n\t];&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
            say(&amp;quot;\tPRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n\t// If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
 &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
 &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n\t// Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n\t// The default value is 1 (distorted).\n\t// if you are metamorphing an object that already had planar mapping (rare)\n\t// uncomment those 0 lines.\n\t// This may not seem like much savings\n\t//  but if your script is trying to metamorph between as many as five objects\n\t// those few bytes saved might come in handy at the end.\n\n\t// If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;\t// PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;\tPRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\tllSetPrimitiveParams(params);\\tparams = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\n\t// If you were cut/pasting this code into a custom transform function\n\t// end your cut above this comment.\n\t// Otherwise ignore this.\n\n\tllSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n\tllSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\tllRemoveInventory(llGetScriptName());\n\t}\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
        {&lt;br /&gt;
         list params;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
         // If you are cutting code out to paste into custon functions&lt;br /&gt;
         // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
&lt;br /&gt;
         params =&lt;br /&gt;
&lt;br /&gt;
         [&lt;br /&gt;
         PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
         PRIM_MATERIAL,2 , &lt;br /&gt;
         PRIM_PHYSICS,0 , &lt;br /&gt;
         PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
         PRIM_PHANTOM,2 , &lt;br /&gt;
         // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
        // PRIM_POSITION,&amp;lt;84.270088, 36.444294, 231.487076&amp;gt; ] + (params = []) +&lt;br /&gt;
         PRIM_ROTATION,&amp;lt;-0.363768, 0.720439, 0.134244, 0.574995&amp;gt; , &lt;br /&gt;
         PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
        ];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // Set all of the above paramaters as a group.&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
       // Please vote to fix it. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This prim has 3 faces.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
        PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
       // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
      // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
      [&lt;br /&gt;
&lt;br /&gt;
         PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
         PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
         // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
 &lt;br /&gt;
       // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
        // The default value is 1 (distorted).&lt;br /&gt;
       // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
       // uncomment those 0 lines.&lt;br /&gt;
       // This may not seem like much savings&lt;br /&gt;
       //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
       // those few bytes saved might come in handy at the end.&lt;br /&gt;
&lt;br /&gt;
       // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
         // PRIM_TEXGEN,0,0 , &lt;br /&gt;
         // PRIM_TEXGEN,1,0 , &lt;br /&gt;
         // PRIM_TEXGEN,2,0 , &lt;br /&gt;
         PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
         // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
         // end your cut above this comment.&lt;br /&gt;
         // Otherwise ignore this.&lt;br /&gt;
&lt;br /&gt;
        llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
 &lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Increase the &#039;&#039;pause&#039;&#039; variable at the top of the script and try again.  If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Supports sculpties.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;shape_1()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_2()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                      &lt;br /&gt;
shape_3()&lt;br /&gt;
{&lt;br /&gt;
     // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_4()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                                               &lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
      on_rez(integer p) { llResetScript(); }&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
         do&lt;br /&gt;
         {&lt;br /&gt;
           shape_1();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_2();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_3();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
&lt;br /&gt;
           shape_4();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
       }while (1);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
If you find a bug, or want to make a change, please do so on the [[User talk:Clarknova Helvetic/Clone Primitive v2.0 | Discussion]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Code Block Limit&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In its current form this prim cycling script above can run stably with 10 complete output blocks, but 11 == Stack-Heap.  Instead of crashing right away, it crashes after six or iterations.  &lt;br /&gt;
&lt;br /&gt;
Can anyone tell me why?  It compiles, it can go through more than three, the rules list is cleared at the end of each transformation.  Less than 11 and it&#039;s stable.  &lt;br /&gt;
&lt;br /&gt;
llGetFreeMemeory() at each iteration shows no leak.  &lt;br /&gt;
&lt;br /&gt;
Any ideas?&lt;br /&gt;
&lt;br /&gt;
(Yes, I know that if I change only the parameters relevant I could go through thirty objects or more.  The script above is just to test overall efficiency of the output code.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PRIM_TEXGEN&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
aka &#039;&#039;Planar Mapping&#039;&#039; values are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wonky, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User_talk:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=48106</id>
		<title>User talk:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User_talk:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=48106"/>
		<updated>2008-01-09T21:21:53Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: whitespaces fixed.  page slightly reformatted&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi.  There&#039;s no CVS or anything for this little project, so this is my attempt to deal with bug fixes and the like in a rational way.&lt;br /&gt;
&lt;br /&gt;
* Title your comments &amp;amp; announce changes with a &amp;lt;nowiki&amp;gt;&amp;lt;b&amp;gt;{{message}}&amp;lt;/b&amp;gt;&amp;lt;/nowiki&amp;gt; tag and put them in the comments section.&lt;br /&gt;
&lt;br /&gt;
* Make changes to the &#039;&#039;&#039;&#039;&#039;Beta Code&#039;&#039;&#039;&#039;&#039; block  at the bottom of the page.  That way we can track what lines have changed in the page history.  Make sure to add your name to the comments :)&lt;br /&gt;
&amp;amp;mdash;[[User:Clarknova Helvetic|Clarknova Helvetic]] 11:18, 8 January 2008 (PST)&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Comments&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
{{message}}  Output code whitespace irregularities fixed and script name in comment header changed to &amp;quot;CLONE PRIMITIVE v 2.31&amp;quot;.  Migrating to main page.&lt;br /&gt;
&lt;br /&gt;
{{message}}  Both fixed, migrating to main page.&lt;br /&gt;
&lt;br /&gt;
== Beta Code ==&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                   CLONE PRIMITIVE  v 2.31&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
 &lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
 &lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;\t&amp;quot; + c + &amp;quot;\n\n\t];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;\tllSetPrimitiveParams(params);\n\tparams = [];&amp;quot;); }&lt;br /&gt;
 &lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n\t// &amp;quot; + c ); }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/// On with the show...&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
 &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
 &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n\tstate_entry()\n\t{\n\tlist params;\n\t\n\n\t// If you are cutting code out to paste into custon functions\n\t// Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n\tparams =&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
 &lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
 &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
 &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
 &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
 &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
 &lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n\tPRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
 &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[ \n \n \t&amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;\t// It&#039;s probably not a god idea to have your new prim jump to the old one\n\t// &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
 &lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.\n\t&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n\t// during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n\t// Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
 &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n\n\t];&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
            say(&amp;quot;\tPRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n\t// If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
 &lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
        say( &amp;quot;\tparams = \n\t[ \n \n &amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
 &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
 &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
 &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
 &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n\t// Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n\t// The default value is 1 (distorted).\n\t// if you are metamorphing an object that already had planar mapping (rare)\n\t// uncomment those 0 lines.\n\t// This may not seem like much savings\n\t//  but if your script is trying to metamorph between as many as five objects\n\t// those few bytes saved might come in handy at the end.\n\n\t// If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;\t// PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;\tPRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\tllSetPrimitiveParams(params);\\tparams = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\n\t// If you were cut/pasting this code into a custom transform function\n\t// end your cut above this comment.\n\t// Otherwise ignore this.\n\n\tllSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n\tllSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
 &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;\n\tllRemoveInventory(llGetScriptName());\n\t}\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
 &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Jana_Kamachi/tut_wprimz&amp;diff=48072</id>
		<title>User:Jana Kamachi/tut wprimz</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Jana_Kamachi/tut_wprimz&amp;diff=48072"/>
		<updated>2008-01-09T19:39:30Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: added your &amp;lt;lsl&amp;gt; syntax tags,  made the prim rescale and the script self-delete.  Thanks for releasing this discovery.   You pwn :)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First thing first, rez a prim.&lt;br /&gt;
&lt;br /&gt;
Now, make a new script, and stick this in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSetPrimitiveParams([PRIM_TYPE,4, 0, &amp;lt;0.000000, 1.000000, 0.000000&amp;gt;, 0.000000, &amp;lt;0.000000, 0.000000, 0.000000&amp;gt;, &amp;lt;1.000000, 0.150000, 0.000000&amp;gt;, &amp;lt;0.000000, 0.000000, 0.000000&amp;gt;, &amp;lt;0.000000, 1.000000, 0.000000&amp;gt;, &amp;lt;0.000000, 0.000000, 0.000000&amp;gt;, 4.000000, 0.000000, 0.800000, PRIM_SIZE, &amp;lt;.5,1.,1.&amp;gt;]);&lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save and run the script. You now have your shape. Try positioning it on yourself, around your waist, and see the effects. If it doesn&#039;t seem to be working, you may just be off a bit.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=47838</id>
		<title>User:Clarknova Helvetic</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=47838"/>
		<updated>2008-01-08T22:40:57Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: I can edit my page as much as I want!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you were linked from the SL forums you&#039;re probably looking for [[User:Clarknova Helvetic/Clone Primitive  v2.0|Clone Primitive]].&lt;br /&gt;
&lt;br /&gt;
== About Moi ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Snapshot Tornado.jpg|thumb|right|256px| Someone&#039;s got to clean up around here.]]&lt;br /&gt;
&lt;br /&gt;
I like to script and build and also ponies.&lt;br /&gt;
&lt;br /&gt;
Three days younger than [[User:Arcadia Asylum|Arcadia Asylum]].&lt;br /&gt;
&lt;br /&gt;
Started SL on 2006/23/10.  Soon stopped because I couldn&#039;t stand client crashes.  Came back a year later when I had a decent video card and found that everyone I&#039;d met.. this is their job now.&lt;br /&gt;
&lt;br /&gt;
I make and sell gidgets [http://slexchange.com/modules.php?name=Marketplace&amp;amp;MerchantID=91584| on SLX] and [http://slurl.com/secondlife/Valis/85/37/232| in-world].  About half are freebies.  &lt;br /&gt;
&lt;br /&gt;
One of my most popular items was my first real project: The Builder&#039;s Sky Platform.  There are about 2500 users with one in their inventory.  One of the features I would change now is that it drops a half-kilometer halo of particles when the user falls off.  I&#039;m really surprised no one (+1) has ever complained.  &lt;br /&gt;
&lt;br /&gt;
Personally, I&#039;d hang me for it.&lt;br /&gt;
&lt;br /&gt;
If you care you can usually find me at [http://slurl.com/secondlife/Combat%20(sandbox)%20Rausch/177/159/24| The Rausch], or at [http://slurl.com/secondlife/Valis/85/37/232| My Shop] in Valis. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scripting Widgets ==&lt;br /&gt;
&lt;br /&gt;
I drag &#039;n drop these scripts into objects when I need to know something about them, or to set a quick parameter.  They do their job then delete from object inventory.&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Say This &amp;amp; That Widgets|Say This &amp;amp; That]]&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Set Param Widgets|Set Param Widgets]]&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Clear Param Widgets|Clear Param Widgets]]&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clear_Param_Widgets&amp;diff=47833</id>
		<title>User:Clarknova Helvetic/Clear Param Widgets</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clear_Param_Widgets&amp;diff=47833"/>
		<updated>2008-01-08T22:09:52Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: no sit target&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;These Scripts clear a single param.  Drag &#039;n drop.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Just Die&#039;&#039;&#039; ==&lt;br /&gt;
Sometimes a prim jest don&#039;t die natural.&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
   state_entry()&lt;br /&gt;
   {&lt;br /&gt;
     llDie();&lt;br /&gt;
   }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Die in X Minutes&#039;&#039;&#039; ==&lt;br /&gt;
Enter minutes in whole numbers, then drop script into prim &lt;br /&gt;
&amp;lt;lsl&amp;gt;integer minutes = 20;  // Change this to the number of minutes for the object to live.&lt;br /&gt;
    &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     state_entry() { llSetTimerEvent((float)minutes*60.); }&lt;br /&gt;
     timer()&lt;br /&gt;
     {&lt;br /&gt;
         llInstantMessage(llGetOwner(),(string)llRound(minutes) + &amp;quot; minutes expired.  &amp;quot; + llGetObjectName() + &amp;quot; deleted.&amp;quot;);&lt;br /&gt;
         llDie();&lt;br /&gt;
      }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Clear Hover Text&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
         llSetText(&amp;quot;&amp;quot;,ZERO_VECTOR,0.);&lt;br /&gt;
         llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Clear Particles&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
          llParticleSystem([]);&lt;br /&gt;
          llRemoveInventory(llGetScriptName());&lt;br /&gt;
      }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Stop Sound&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
         llStopSound();&lt;br /&gt;
         llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== No Sit Target ==&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {   &lt;br /&gt;
        llSitTarget(&amp;lt;0.,0.,0.&amp;gt;,ZERO_ROTATION);&lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User_talk:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47827</id>
		<title>User talk:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User_talk:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47827"/>
		<updated>2008-01-08T20:52:12Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: Whoops!  left in the output code too.  Don&amp;#039;t need that here.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi.  There&#039;s no CVS or anything for this little project, so this is my attempt to deal with bug fixes and the like in a rational way.&lt;br /&gt;
&lt;br /&gt;
Title your comments with a &amp;lt;nowiki&amp;gt; ===  &amp;lt;/nowiki&amp;gt; &#039;&#039;&#039;Level 3 Headline&#039;&#039;&#039; &amp;lt;nowiki&amp;gt; ===  &amp;lt;/nowiki&amp;gt; and put them in the comments section.&lt;br /&gt;
&lt;br /&gt;
Make changes to the &#039;&#039;&#039;&#039;&#039;Beta Code&#039;&#039;&#039;&#039;&#039; block  at the bottom of the page.  That way we can track what lines have changed in the page history.  Make sure to add your name to the comments :)&lt;br /&gt;
&amp;amp;mdash;[[User:Clarknova Helvetic|Clarknova Helvetic]] 11:18, 8 January 2008 (PST)&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
&lt;br /&gt;
=== A Sample Comment ===&lt;br /&gt;
Delete me!&lt;br /&gt;
&lt;br /&gt;
== Beta Code ==&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//           END - TO - END PRIM CLONER  v 2.3&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
&lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
&lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot;\n        ];&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;        llSetPrimitiveParams(params);\n        params = [];&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n       // &amp;quot; + c ); }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/// On with the show...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
    &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
    &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n    state_entry()\n        {\n         list params;\n        \n\n         // If you are cutting code out to paste into custon functions\n         // Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n         params =\n&amp;quot;);&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
     &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
&lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
    &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
            &lt;br /&gt;
    &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
    &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
    &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
            &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
&lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n         PRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
                &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[\n         &amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;        // It&#039;s probably not a god idea to have your new prim jump to the old one\n        // &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
        &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
&lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
    &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n       // Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
                              &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
        &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
            &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n        ];&amp;quot;;&lt;br /&gt;
                        &lt;br /&gt;
            say(&amp;quot;       PRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
        &lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n      // If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
&lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
&lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
        say( &amp;quot;      params =\n      [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
    &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
        &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
        &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n        // The default value is 1 (distorted).\n       // if you are metamorphing an object that already had planar mapping (rare)\n       // uncomment those 0 lines.\n       // This may not seem like much savings\n       //  but if your script is trying to metamorph between as many as five objects\n       // those few bytes saved might come in handy at the end.\n\n       // If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;        // PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;        PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;        llSetPrimitiveParams(params);\        params = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
        &lt;br /&gt;
    say(&amp;quot;\n\n         // If you were cut/pasting this code into a custom transform function\n         // end your cut above this comment.\n         // Otherwise ignore this.\n\n        llSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n        llSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
    &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;\n        llRemoveInventory(llGetScriptName());\n     }\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
} &amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clear_Param_Widgets&amp;diff=47824</id>
		<title>User:Clarknova Helvetic/Clear Param Widgets</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clear_Param_Widgets&amp;diff=47824"/>
		<updated>2008-01-08T20:44:58Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: &amp;lt;lsl&amp;gt; tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;These Scripts clear a single param.  Drag &#039;n drop.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Just Die&#039;&#039;&#039; ==&lt;br /&gt;
Sometimes a prim jest don&#039;t die natural.&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
   state_entry()&lt;br /&gt;
   {&lt;br /&gt;
     llDie();&lt;br /&gt;
   }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Die in X Minutes&#039;&#039;&#039; ==&lt;br /&gt;
Enter minutes in whole numbers, then drop script into prim &lt;br /&gt;
&amp;lt;lsl&amp;gt;integer minutes = 20;  // Change this to the number of minutes for the object to live.&lt;br /&gt;
    &lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     state_entry() { llSetTimerEvent((float)minutes*60.); }&lt;br /&gt;
     timer()&lt;br /&gt;
     {&lt;br /&gt;
         llInstantMessage(llGetOwner(),(string)llRound(minutes) + &amp;quot; minutes expired.  &amp;quot; + llGetObjectName() + &amp;quot; deleted.&amp;quot;);&lt;br /&gt;
         llDie();&lt;br /&gt;
      }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Clear Hover Text&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
         llSetText(&amp;quot;&amp;quot;,ZERO_VECTOR,0.);&lt;br /&gt;
         llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Clear Particles&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
          llParticleSystem([]);&lt;br /&gt;
          llRemoveInventory(llGetScriptName());&lt;br /&gt;
      }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Stop Sound&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
         llStopSound();&lt;br /&gt;
         llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Set_Param_Widgets&amp;diff=47821</id>
		<title>User:Clarknova Helvetic/Set Param Widgets</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Set_Param_Widgets&amp;diff=47821"/>
		<updated>2008-01-08T20:37:09Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: &amp;lt;lsl&amp;gt; tags added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;These Scripts are for setting a quick param.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Disposable Sit Target&#039;&#039;&#039; ==&lt;br /&gt;
Drag &#039;n drop to have something to sit on&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {   &lt;br /&gt;
          llSitTarget(&amp;lt;0,0,0.5&amp;gt;;&lt;br /&gt;
          llRemoveInventory(llGetScriptName());&lt;br /&gt;
      }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Set Texture By Key&#039;&#039;&#039; ==&lt;br /&gt;
Enter key and side number, then drop script into prim&lt;br /&gt;
&amp;lt;lsl&amp;gt;key     texture =   &amp;quot;&amp;quot; ;&lt;br /&gt;
integer face    =   ALL_SIDES;  // or individual side number&lt;br /&gt;
&lt;br /&gt;
// Use CTRL ALT SHIFT T to get the number of the face you&#039;ve selected.&lt;br /&gt;
// Turn on admin options CTRL ALT V to get the key this way as well.&lt;br /&gt;
&lt;br /&gt;
//   Note that getting texure keys this way does not work in newer clients because&lt;br /&gt;
//   fasion designers are the worthless dregs of human culture and will be&lt;br /&gt;
//   shot dead in the former parking lots of thier studios which thier &lt;br /&gt;
//   forced labor will have converted into civic gardens after the revolution.&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
   {&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
       llSetTexture(texture,face);&lt;br /&gt;
       llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Set Hover Text&#039;&#039;&#039; ==&lt;br /&gt;
Enter text, color and alpha, then drop script into prim &lt;br /&gt;
&amp;lt;lsl&amp;gt;string  text =  &amp;quot;&amp;quot;;&lt;br /&gt;
vector  color = &amp;lt;1.,1.,1.&amp;gt;;&lt;br /&gt;
float   alpha = 1.0;&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
      {&lt;br /&gt;
         llSetText(text,color,alpha);&lt;br /&gt;
         llSetTimerEvent(5.*60);&lt;br /&gt;
      }&lt;br /&gt;
      touch_start(integer n)&lt;br /&gt;
      {&lt;br /&gt;
          llRemoveInventory(llGetScriptName());&lt;br /&gt;
      }&lt;br /&gt;
      timer() { llRemoveInventory(llGetScriptName()); }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Say_This_%26_That_Widgets&amp;diff=47806</id>
		<title>User:Clarknova Helvetic/Say This &amp; That Widgets</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Say_This_%26_That_Widgets&amp;diff=47806"/>
		<updated>2008-01-08T19:25:59Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: blocks wrapped in &amp;lt;lsl&amp;gt; tags&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== &#039;&#039;&#039;Say Own Pos&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
	llInstantMessage(llGetOwner(), &amp;quot;my pos is &amp;quot; + (string)llGetPos());&lt;br /&gt;
	llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }    &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Say Own Rotation&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{ &lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
	llInstantMessage(llGetOwner(), &amp;quot;my rotation is &amp;quot; + (string)llGetRot());&lt;br /&gt;
	llInstantMessage(llGetOwner(), &amp;quot;my rot euler is &amp;quot; + (string)llRot2Euler(llGetRot()));&lt;br /&gt;
     	llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }    &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Say Link Number&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default &lt;br /&gt;
    { &lt;br /&gt;
     state_entry() &lt;br /&gt;
     { &lt;br /&gt;
	// Link Order Number Constants:&lt;br /&gt;
	// LINK_ALL_OTHERS == -2&lt;br /&gt;
	// LINK_THIS == -4&lt;br /&gt;
	// LINK_SET == -1&lt;br /&gt;
	// LINK_THIS == -3&lt;br /&gt;
	// Unlike many other LsL numbering schemes, link numbers start at 1, not 0.  The link number is only 0 if there are no other links present, i.e. the object&#039;s a single prim.&lt;br /&gt;
            &lt;br /&gt;
	llOwnerSay((string)llGetLinkNumber()); &lt;br /&gt;
	llRemoveInventory(llGetScriptName()); &lt;br /&gt;
     }    &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Say Own Key &#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
	llSay(0, &amp;quot;my key is &amp;quot; + (string)llGetKey());&lt;br /&gt;
	llRemoveInventory(&amp;quot;Say Own Key&amp;quot;);&lt;br /&gt;
     }    &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User_talk:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47803</id>
		<title>User talk:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User_talk:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47803"/>
		<updated>2008-01-08T19:18:52Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: page madezorz&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi.  There&#039;s no CVS or anything for this little project, so this is my attempt to deal with bug fixes and the like in a rational way.&lt;br /&gt;
&lt;br /&gt;
Title your comments with a &amp;lt;nowiki&amp;gt; ===  &amp;lt;/nowiki&amp;gt; &#039;&#039;&#039;Level 3 Headline&#039;&#039;&#039; &amp;lt;nowiki&amp;gt; ===  &amp;lt;/nowiki&amp;gt; and put them in the comments section.&lt;br /&gt;
&lt;br /&gt;
Make changes to the &#039;&#039;&#039;&#039;&#039;Beta Code&#039;&#039;&#039;&#039;&#039; block  at the bottom of the page.  That way we can track what lines have changed in the page history.  Make sure to add your name to the comments :)&lt;br /&gt;
&amp;amp;mdash;[[User:Clarknova Helvetic|Clarknova Helvetic]] 11:18, 8 January 2008 (PST)&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
&lt;br /&gt;
=== A Sample Comment ===&lt;br /&gt;
Hi!&lt;br /&gt;
&lt;br /&gt;
== Beta Code ==&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//           END - TO - END PRIM CLONER  v 2.3&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
&lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
&lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot;\n        ];&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;        llSetPrimitiveParams(params);\n        params = [];&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n       // &amp;quot; + c ); }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/// On with the show...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
    &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
    &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n    state_entry()\n        {\n         list params;\n        \n\n         // If you are cutting code out to paste into custon functions\n         // Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n         params =\n&amp;quot;);&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
     &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
&lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
    &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
            &lt;br /&gt;
    &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
    &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
    &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
            &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
&lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n         PRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
                &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[\n         &amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;        // It&#039;s probably not a god idea to have your new prim jump to the old one\n        // &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
        &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
&lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
    &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n       // Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
                              &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
        &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
            &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n        ];&amp;quot;;&lt;br /&gt;
                        &lt;br /&gt;
            say(&amp;quot;       PRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
        &lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n      // If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
&lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
&lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
        say( &amp;quot;      params =\n      [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
    &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
        &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
        &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n        // The default value is 1 (distorted).\n       // if you are metamorphing an object that already had planar mapping (rare)\n       // uncomment those 0 lines.\n       // This may not seem like much savings\n       //  but if your script is trying to metamorph between as many as five objects\n       // those few bytes saved might come in handy at the end.\n\n       // If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;        // PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;        PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;        llSetPrimitiveParams(params);\        params = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
        &lt;br /&gt;
    say(&amp;quot;\n\n         // If you were cut/pasting this code into a custom transform function\n         // end your cut above this comment.\n         // Otherwise ignore this.\n\n        llSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n        llSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
    &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;\n        llRemoveInventory(llGetScriptName());\n     }\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
} &amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
        {&lt;br /&gt;
         list params;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
         // If you are cutting code out to paste into custon functions&lt;br /&gt;
         // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
&lt;br /&gt;
         params =&lt;br /&gt;
&lt;br /&gt;
         [&lt;br /&gt;
         PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
         PRIM_MATERIAL,2 , &lt;br /&gt;
         PRIM_PHYSICS,0 , &lt;br /&gt;
         PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
         PRIM_PHANTOM,2 , &lt;br /&gt;
         // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
        // PRIM_POSITION,&amp;lt;84.270088, 36.444294, 231.487076&amp;gt; ] + (params = []) +&lt;br /&gt;
         PRIM_ROTATION,&amp;lt;-0.363768, 0.720439, 0.134244, 0.574995&amp;gt; , &lt;br /&gt;
         PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
        ];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // Set all of the above paramaters as a group.&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
       // Please vote to fix it. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This prim has 3 faces.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
        PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
       // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
      // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
      [&lt;br /&gt;
&lt;br /&gt;
         PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
         PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
         // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
 &lt;br /&gt;
       // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
        // The default value is 1 (distorted).&lt;br /&gt;
       // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
       // uncomment those 0 lines.&lt;br /&gt;
       // This may not seem like much savings&lt;br /&gt;
       //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
       // those few bytes saved might come in handy at the end.&lt;br /&gt;
&lt;br /&gt;
       // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
         // PRIM_TEXGEN,0,0 , &lt;br /&gt;
         // PRIM_TEXGEN,1,0 , &lt;br /&gt;
         // PRIM_TEXGEN,2,0 , &lt;br /&gt;
         PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
         // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
         // end your cut above this comment.&lt;br /&gt;
         // Otherwise ignore this.&lt;br /&gt;
&lt;br /&gt;
        llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
 &lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47802</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47802"/>
		<updated>2008-01-08T19:04:11Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* BUGS */ durdur&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;3&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts using [[llSetPrimitiveParams|llSetPrimitiveParams([])]] and [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt; ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//           END - TO - END PRIM CLONER  v 2.3&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
&lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
&lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot;\n        ];&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;        llSetPrimitiveParams(params);\n        params = [];&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n       // &amp;quot; + c ); }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/// On with the show...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
    &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
    &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n    state_entry()\n        {\n         list params;\n        \n\n         // If you are cutting code out to paste into custon functions\n         // Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n         params =\n&amp;quot;);&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
     &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
&lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
    &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
            &lt;br /&gt;
    &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
    &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
    &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
            &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
&lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n         PRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
                &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[\n         &amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;        // It&#039;s probably not a god idea to have your new prim jump to the old one\n        // &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
        &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
&lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
    &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n       // Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
                              &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
        &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
            &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n        ];&amp;quot;;&lt;br /&gt;
                        &lt;br /&gt;
            say(&amp;quot;       PRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
        &lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n      // If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
&lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
&lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
        say( &amp;quot;      params =\n      [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
    &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
        &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
        &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n        // The default value is 1 (distorted).\n       // if you are metamorphing an object that already had planar mapping (rare)\n       // uncomment those 0 lines.\n       // This may not seem like much savings\n       //  but if your script is trying to metamorph between as many as five objects\n       // those few bytes saved might come in handy at the end.\n\n       // If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;        // PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;        PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;        llSetPrimitiveParams(params);\        params = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
        &lt;br /&gt;
    say(&amp;quot;\n\n         // If you were cut/pasting this code into a custom transform function\n         // end your cut above this comment.\n         // Otherwise ignore this.\n\n        llSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n        llSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
    &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;\n        llRemoveInventory(llGetScriptName());\n     }\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
} &amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
        {&lt;br /&gt;
         list params;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
         // If you are cutting code out to paste into custon functions&lt;br /&gt;
         // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
&lt;br /&gt;
         params =&lt;br /&gt;
&lt;br /&gt;
         [&lt;br /&gt;
         PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
         PRIM_MATERIAL,2 , &lt;br /&gt;
         PRIM_PHYSICS,0 , &lt;br /&gt;
         PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
         PRIM_PHANTOM,2 , &lt;br /&gt;
         // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
        // PRIM_POSITION,&amp;lt;84.270088, 36.444294, 231.487076&amp;gt; ] + (params = []) +&lt;br /&gt;
         PRIM_ROTATION,&amp;lt;-0.363768, 0.720439, 0.134244, 0.574995&amp;gt; , &lt;br /&gt;
         PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
        ];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // Set all of the above paramaters as a group.&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
       // Please vote to fix it. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This prim has 3 faces.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
        PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
       // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
      // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
      [&lt;br /&gt;
&lt;br /&gt;
         PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
         PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
         // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
 &lt;br /&gt;
       // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
        // The default value is 1 (distorted).&lt;br /&gt;
       // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
       // uncomment those 0 lines.&lt;br /&gt;
       // This may not seem like much savings&lt;br /&gt;
       //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
       // those few bytes saved might come in handy at the end.&lt;br /&gt;
&lt;br /&gt;
       // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
         // PRIM_TEXGEN,0,0 , &lt;br /&gt;
         // PRIM_TEXGEN,1,0 , &lt;br /&gt;
         // PRIM_TEXGEN,2,0 , &lt;br /&gt;
         PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
         // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
         // end your cut above this comment.&lt;br /&gt;
         // Otherwise ignore this.&lt;br /&gt;
&lt;br /&gt;
        llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
 &lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Increase the &#039;&#039;pause&#039;&#039; variable at the top of the script and try again.  If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Supports sculpties.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;shape_1()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_2()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                      &lt;br /&gt;
shape_3()&lt;br /&gt;
{&lt;br /&gt;
     // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_4()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                                               &lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
      on_rez(integer p) { llResetScript(); }&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
         do&lt;br /&gt;
         {&lt;br /&gt;
           shape_1();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_2();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_3();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
&lt;br /&gt;
           shape_4();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
       }while (1);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
If you find a bug, or want to make a change, please do so on the [[User talk:Clarknova Helvetic/Clone Primitive v2.0 | Discussion]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Code Block Limit&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In its current form this prim cycling script above can run stably with 10 complete output blocks, but 11 == Stack-Heap.  Instead of crashing right away, it crashes after six or iterations.  &lt;br /&gt;
&lt;br /&gt;
Can anyone tell me why?  It compiles, it can go through more than three, the rules list is cleared at the end of each transformation.  Less than 11 and it&#039;s stable.  &lt;br /&gt;
&lt;br /&gt;
llGetFreeMemeory() at each iteration shows no leak.  &lt;br /&gt;
&lt;br /&gt;
Any ideas?&lt;br /&gt;
&lt;br /&gt;
(Yes, I know that if I change only the parameters relevant I could go through thirty objects or more.  The script above is just to test overall efficiency of the output code.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PRIM_TEXGEN&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
aka &#039;&#039;Planar Mapping&#039;&#039; values are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wonky, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47801</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47801"/>
		<updated>2008-01-08T19:01:08Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: a little more bug data&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;3&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts using [[llSetPrimitiveParams|llSetPrimitiveParams([])]] and [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt; ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//           END - TO - END PRIM CLONER  v 2.3&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
&lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
&lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot;\n        ];&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;        llSetPrimitiveParams(params);\n        params = [];&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n       // &amp;quot; + c ); }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/// On with the show...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
    &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
    &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n    state_entry()\n        {\n         list params;\n        \n\n         // If you are cutting code out to paste into custon functions\n         // Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n         params =\n&amp;quot;);&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
     &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
&lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
    &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
            &lt;br /&gt;
    &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
    &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
    &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
            &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
&lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n         PRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
                &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[\n         &amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;        // It&#039;s probably not a god idea to have your new prim jump to the old one\n        // &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
        &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
&lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
    &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n       // Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
                              &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
        &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
            &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n        ];&amp;quot;;&lt;br /&gt;
                        &lt;br /&gt;
            say(&amp;quot;       PRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
        &lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n      // If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
&lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
&lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
        say( &amp;quot;      params =\n      [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
    &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
        &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
        &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n        // The default value is 1 (distorted).\n       // if you are metamorphing an object that already had planar mapping (rare)\n       // uncomment those 0 lines.\n       // This may not seem like much savings\n       //  but if your script is trying to metamorph between as many as five objects\n       // those few bytes saved might come in handy at the end.\n\n       // If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;        // PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;        PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;        llSetPrimitiveParams(params);\        params = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
        &lt;br /&gt;
    say(&amp;quot;\n\n         // If you were cut/pasting this code into a custom transform function\n         // end your cut above this comment.\n         // Otherwise ignore this.\n\n        llSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n        llSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
    &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;\n        llRemoveInventory(llGetScriptName());\n     }\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
} &amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
        {&lt;br /&gt;
         list params;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
         // If you are cutting code out to paste into custon functions&lt;br /&gt;
         // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
&lt;br /&gt;
         params =&lt;br /&gt;
&lt;br /&gt;
         [&lt;br /&gt;
         PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
         PRIM_MATERIAL,2 , &lt;br /&gt;
         PRIM_PHYSICS,0 , &lt;br /&gt;
         PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
         PRIM_PHANTOM,2 , &lt;br /&gt;
         // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
        // PRIM_POSITION,&amp;lt;84.270088, 36.444294, 231.487076&amp;gt; ] + (params = []) +&lt;br /&gt;
         PRIM_ROTATION,&amp;lt;-0.363768, 0.720439, 0.134244, 0.574995&amp;gt; , &lt;br /&gt;
         PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
        ];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // Set all of the above paramaters as a group.&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
       // Please vote to fix it. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This prim has 3 faces.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
        PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
       // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
      // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
      [&lt;br /&gt;
&lt;br /&gt;
         PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
         PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
         // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
 &lt;br /&gt;
       // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
        // The default value is 1 (distorted).&lt;br /&gt;
       // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
       // uncomment those 0 lines.&lt;br /&gt;
       // This may not seem like much savings&lt;br /&gt;
       //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
       // those few bytes saved might come in handy at the end.&lt;br /&gt;
&lt;br /&gt;
       // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
         // PRIM_TEXGEN,0,0 , &lt;br /&gt;
         // PRIM_TEXGEN,1,0 , &lt;br /&gt;
         // PRIM_TEXGEN,2,0 , &lt;br /&gt;
         PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
         // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
         // end your cut above this comment.&lt;br /&gt;
         // Otherwise ignore this.&lt;br /&gt;
&lt;br /&gt;
        llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
 &lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Increase the &#039;&#039;pause&#039;&#039; variable at the top of the script and try again.  If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Supports sculpties.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;shape_1()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_2()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                      &lt;br /&gt;
shape_3()&lt;br /&gt;
{&lt;br /&gt;
     // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_4()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                                               &lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
      on_rez(integer p) { llResetScript(); }&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
         do&lt;br /&gt;
         {&lt;br /&gt;
           shape_1();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_2();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_3();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
&lt;br /&gt;
           shape_4();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
       }while (1);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
If you find a bug, or want to make a change, please do so on the [[User talk:Clarknova Helvetic/Clone Primitive v2.0 | Discussion]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Code Block Limit&#039;&#039;&#039; &lt;br /&gt;
In its current form this prim cycling script above can run stably with 10 complete output blocks, but 11 == Stack-Heap.  Instead of crashing right away, it crashes after six or iterations.  Can anyone tell me why?  It compiles, it can go through more than three, the rules list is cleared at the end of each transformation.  Less than 11 and it&#039;s stable.  &lt;br /&gt;
&lt;br /&gt;
llGetFreeMemeory() at each iteration shows no leak.  &lt;br /&gt;
&lt;br /&gt;
Any ideas?&lt;br /&gt;
&lt;br /&gt;
(Yes, I know that if I change only the parameters relevant I could go through thirty objects or more.  The script above is just to test overall efficiency of the output code.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PRIM_TEXGEN&#039;&#039;&#039;&lt;br /&gt;
aka &#039;&#039;Planar Mapping&#039;&#039; values are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wrong, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47758</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47758"/>
		<updated>2008-01-08T12:21:06Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* Tips &amp;amp; Ideas */  I guess i should actually mention that...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;3&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts using [[llSetPrimitiveParams|llSetPrimitiveParams([])]] and [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt; ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//           END - TO - END PRIM CLONER  v 2.3&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
&lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
&lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot;\n        ];&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;        llSetPrimitiveParams(params);\n        params = [];&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n       // &amp;quot; + c ); }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/// On with the show...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
    &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
    &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n    state_entry()\n        {\n         list params;\n        \n\n         // If you are cutting code out to paste into custon functions\n         // Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n         params =\n&amp;quot;);&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
     &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
&lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
    &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
            &lt;br /&gt;
    &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
    &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
    &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
            &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
&lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n         PRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
                &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[\n         &amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;        // It&#039;s probably not a god idea to have your new prim jump to the old one\n        // &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
        &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
&lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
    &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n       // Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
                              &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
        &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
            &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n        ];&amp;quot;;&lt;br /&gt;
                        &lt;br /&gt;
            say(&amp;quot;       PRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
        &lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n      // If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
&lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
&lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
        say( &amp;quot;      params =\n      [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
    &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
        &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
        &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n        // The default value is 1 (distorted).\n       // if you are metamorphing an object that already had planar mapping (rare)\n       // uncomment those 0 lines.\n       // This may not seem like much savings\n       //  but if your script is trying to metamorph between as many as five objects\n       // those few bytes saved might come in handy at the end.\n\n       // If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;        // PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;        PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;        llSetPrimitiveParams(params);\        params = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
        &lt;br /&gt;
    say(&amp;quot;\n\n         // If you were cut/pasting this code into a custom transform function\n         // end your cut above this comment.\n         // Otherwise ignore this.\n\n        llSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n        llSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
    &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;\n        llRemoveInventory(llGetScriptName());\n     }\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
} &amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
        {&lt;br /&gt;
         list params;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
         // If you are cutting code out to paste into custon functions&lt;br /&gt;
         // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
&lt;br /&gt;
         params =&lt;br /&gt;
&lt;br /&gt;
         [&lt;br /&gt;
         PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
         PRIM_MATERIAL,2 , &lt;br /&gt;
         PRIM_PHYSICS,0 , &lt;br /&gt;
         PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
         PRIM_PHANTOM,2 , &lt;br /&gt;
         // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
        // PRIM_POSITION,&amp;lt;84.270088, 36.444294, 231.487076&amp;gt; ] + (params = []) +&lt;br /&gt;
         PRIM_ROTATION,&amp;lt;-0.363768, 0.720439, 0.134244, 0.574995&amp;gt; , &lt;br /&gt;
         PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
        ];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // Set all of the above paramaters as a group.&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
       // Please vote to fix it. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This prim has 3 faces.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
        PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
       // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
      // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
      [&lt;br /&gt;
&lt;br /&gt;
         PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
         PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
         // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
 &lt;br /&gt;
       // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
        // The default value is 1 (distorted).&lt;br /&gt;
       // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
       // uncomment those 0 lines.&lt;br /&gt;
       // This may not seem like much savings&lt;br /&gt;
       //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
       // those few bytes saved might come in handy at the end.&lt;br /&gt;
&lt;br /&gt;
       // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
         // PRIM_TEXGEN,0,0 , &lt;br /&gt;
         // PRIM_TEXGEN,1,0 , &lt;br /&gt;
         // PRIM_TEXGEN,2,0 , &lt;br /&gt;
         PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
         // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
         // end your cut above this comment.&lt;br /&gt;
         // Otherwise ignore this.&lt;br /&gt;
&lt;br /&gt;
        llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
 &lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Increase the &#039;&#039;pause&#039;&#039; variable at the top of the script and try again.  If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; Supports sculpties.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;shape_1()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_2()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                      &lt;br /&gt;
shape_3()&lt;br /&gt;
{&lt;br /&gt;
     // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_4()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                                               &lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
      on_rez(integer p) { llResetScript(); }&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
         do&lt;br /&gt;
         {&lt;br /&gt;
           shape_1();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_2();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_3();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
&lt;br /&gt;
           shape_4();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
       }while (1);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
( In its current form this script can run with 9 complete output blocks, but 10 == stack/heap ).&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
PRIM_TEXGEN aka &#039;&#039;Planar Mapping&#039;&#039; values are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wrong, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47733</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47733"/>
		<updated>2008-01-08T09:34:20Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: er, 9 !&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;3&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts using [[llSetPrimitiveParams|llSetPrimitiveParams([])]] and [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt; ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//           END - TO - END PRIM CLONER  v 2.3&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
&lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
&lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot;\n        ];&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;        llSetPrimitiveParams(params);\n        params = [];&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n       // &amp;quot; + c ); }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/// On with the show...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
    &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
    &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n    state_entry()\n        {\n         list params;\n        \n\n         // If you are cutting code out to paste into custon functions\n         // Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n         params =\n&amp;quot;);&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
     &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
&lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
    &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
            &lt;br /&gt;
    &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
    &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
    &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
            &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
&lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n         PRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
                &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[\n         &amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;        // It&#039;s probably not a god idea to have your new prim jump to the old one\n        // &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
        &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
&lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
    &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n       // Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
                              &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
        &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
            &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n        ];&amp;quot;;&lt;br /&gt;
                        &lt;br /&gt;
            say(&amp;quot;       PRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
        &lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n      // If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
&lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
&lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
        say( &amp;quot;      params =\n      [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
    &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
        &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
        &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n        // The default value is 1 (distorted).\n       // if you are metamorphing an object that already had planar mapping (rare)\n       // uncomment those 0 lines.\n       // This may not seem like much savings\n       //  but if your script is trying to metamorph between as many as five objects\n       // those few bytes saved might come in handy at the end.\n\n       // If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;        // PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;        PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;        llSetPrimitiveParams(params);\        params = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
        &lt;br /&gt;
    say(&amp;quot;\n\n         // If you were cut/pasting this code into a custom transform function\n         // end your cut above this comment.\n         // Otherwise ignore this.\n\n        llSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n        llSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
    &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;\n        llRemoveInventory(llGetScriptName());\n     }\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
} &amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
        {&lt;br /&gt;
         list params;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
         // If you are cutting code out to paste into custon functions&lt;br /&gt;
         // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
&lt;br /&gt;
         params =&lt;br /&gt;
&lt;br /&gt;
         [&lt;br /&gt;
         PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
         PRIM_MATERIAL,2 , &lt;br /&gt;
         PRIM_PHYSICS,0 , &lt;br /&gt;
         PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
         PRIM_PHANTOM,2 , &lt;br /&gt;
         // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
        // PRIM_POSITION,&amp;lt;84.270088, 36.444294, 231.487076&amp;gt; ] + (params = []) +&lt;br /&gt;
         PRIM_ROTATION,&amp;lt;-0.363768, 0.720439, 0.134244, 0.574995&amp;gt; , &lt;br /&gt;
         PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
        ];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // Set all of the above paramaters as a group.&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
       // Please vote to fix it. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This prim has 3 faces.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
        PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
       // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
      // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
      [&lt;br /&gt;
&lt;br /&gt;
         PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
         PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
         // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
 &lt;br /&gt;
       // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
        // The default value is 1 (distorted).&lt;br /&gt;
       // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
       // uncomment those 0 lines.&lt;br /&gt;
       // This may not seem like much savings&lt;br /&gt;
       //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
       // those few bytes saved might come in handy at the end.&lt;br /&gt;
&lt;br /&gt;
       // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
         // PRIM_TEXGEN,0,0 , &lt;br /&gt;
         // PRIM_TEXGEN,1,0 , &lt;br /&gt;
         // PRIM_TEXGEN,2,0 , &lt;br /&gt;
         PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
         // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
         // end your cut above this comment.&lt;br /&gt;
         // Otherwise ignore this.&lt;br /&gt;
&lt;br /&gt;
        llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
 &lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Increase the &#039;&#039;pause&#039;&#039; variable at the top of the script and try again.  If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;shape_1()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_2()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                      &lt;br /&gt;
shape_3()&lt;br /&gt;
{&lt;br /&gt;
     // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_4()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                                               &lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
      on_rez(integer p) { llResetScript(); }&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
         do&lt;br /&gt;
         {&lt;br /&gt;
           shape_1();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_2();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_3();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
&lt;br /&gt;
           shape_4();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
       }while (1);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
( In its current form this script can run with 9 complete output blocks, but 10 == stack/heap ).&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
PRIM_TEXGEN aka &#039;&#039;Planar Mapping&#039;&#039; values are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wrong, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47725</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47725"/>
		<updated>2008-01-08T08:43:23Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: I didn&amp;#039;t know about the &amp;lt;lsl&amp;gt; tag!  Sweet!  (also v3 now supports sculpties)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;3&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts using [[llSetPrimitiveParams|llSetPrimitiveParams([])]] and [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt; ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//           END - TO - END PRIM CLONER  v 2.3&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   This script chats out lines of text that can be pasted back &lt;br /&gt;
//   into a blank script to clone the original prim.&lt;br /&gt;
//&lt;br /&gt;
//   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
//&lt;br /&gt;
//    &lt;br /&gt;
 ////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                    HOW TO USE&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
//&lt;br /&gt;
//   It will output a complete script for replicating the object&lt;br /&gt;
//   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
//  &lt;br /&gt;
//   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
//   new script&lt;br /&gt;
//&lt;br /&gt;
//   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
//   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
//&lt;br /&gt;
//   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
//&lt;br /&gt;
//   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
//   do this a few times.&lt;br /&gt;
//&lt;br /&gt;
//&lt;br /&gt;
//   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
//   they&#039;re featured on the offical Wiki:&lt;br /&gt;
//&lt;br /&gt;
//   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//                       WHY?&lt;br /&gt;
//&lt;br /&gt;
//   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
//   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
//&lt;br /&gt;
//   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
//   so carve out what you need from the output.&lt;br /&gt;
//&lt;br /&gt;
//   The output code is also commented where appropriate. If you want &lt;br /&gt;
//   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
//   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
//&lt;br /&gt;
//   Many advanced items on the grid transform from one object to &lt;br /&gt;
//   another.  Builders have used scrips like this to generate the &lt;br /&gt;
//   code that goes into those products.&lt;br /&gt;
//&lt;br /&gt;
//   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
//   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
//   metamorphed with a single scipt.&lt;br /&gt;
//&lt;br /&gt;
//   In my experience you can pack five complete primitive trans-&lt;br /&gt;
//   formations into one script before you run out of bytes.&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//              Released nder the terms of the &lt;br /&gt;
//              GNU General Public Liscence v3&lt;br /&gt;
//&lt;br /&gt;
//  This source code is free to use / modify / resell &lt;br /&gt;
//  with the following restrictions:&lt;br /&gt;
//&lt;br /&gt;
//  If you include any portion of -this- script in a product you &lt;br /&gt;
//  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
//  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
//  and give attribution to the contributors.&lt;br /&gt;
//&lt;br /&gt;
//  This does not extend to the code this script generates.  That&lt;br /&gt;
//  is yours to liscense as you see fit.&lt;br /&gt;
//&lt;br /&gt;
//             No warantee expressed or implied.&lt;br /&gt;
//   &lt;br /&gt;
//  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
//&lt;br /&gt;
 ///////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//      Written by          &lt;br /&gt;
//      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
//      w/ thanks to Bopete Yossarian&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                          //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                          //// prevent line mix-up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Object-Specific parameters 2 string&lt;br /&gt;
string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Face-Specific parameters 2 string&lt;br /&gt;
string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Parameter prefixed and formatted for output&lt;br /&gt;
string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
&lt;br /&gt;
// General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
&lt;br /&gt;
// Printing out next element to add to the parameter list&lt;br /&gt;
sayn(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Printing out the last element to add to the parameter list&lt;br /&gt;
saynd(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot;\n        ];&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Print out the code to apply the parameters to the object&lt;br /&gt;
define() {  say(&amp;quot;        llSetPrimitiveParams(params);\n        params = [];&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
// Handle to insert comments&lt;br /&gt;
comment(string c) { say(&amp;quot;\n       // &amp;quot; + c ); }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/// On with the show...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
    &lt;br /&gt;
    // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
    string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
    llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    // Guess we should transfer the description too&lt;br /&gt;
    string object_desc = llGetObjectDesc();&lt;br /&gt;
    &lt;br /&gt;
    //  Print the script header up to state_entry&lt;br /&gt;
    say(&amp;quot;\ndefault\n{\n    state_entry()\n        {\n         list params;\n        \n\n         // If you are cutting code out to paste into custon functions\n         // Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n         params =\n&amp;quot;);&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
     &lt;br /&gt;
    // Add some comments to the script &lt;br /&gt;
&lt;br /&gt;
    // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
    // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
    &lt;br /&gt;
    // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
    list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            // ASIDE:&lt;br /&gt;
            // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
            //&lt;br /&gt;
            // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
            // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
            //&lt;br /&gt;
            // This is probably for historical reasons (the param order, not my &lt;br /&gt;
            // ultimate destiny).&lt;br /&gt;
            &lt;br /&gt;
    &lt;br /&gt;
    integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
    integer length; // So are you, integer length!&lt;br /&gt;
    &lt;br /&gt;
    length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
    &lt;br /&gt;
    for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
    {&lt;br /&gt;
        if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
        {&lt;br /&gt;
            saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
            i = length;&lt;br /&gt;
        }&lt;br /&gt;
        else if (i == 0) // PRIM_TYPE is a special case.  But then what isn&#039;t?&lt;br /&gt;
        {   &lt;br /&gt;
            //  Checking if it&#039;s a sculptie in a rather extravagant way,  &lt;br /&gt;
            //  but I also want to check my work.&lt;br /&gt;
            &lt;br /&gt;
            integer j = llList2Integer(Param_Names,i+1); // What&#039;s the param we&#039;re checking?&lt;br /&gt;
            list r = llGetPrimitiveParams([j]); // What are its values?&lt;br /&gt;
            integer t = llList2Integer(r,0); // What&#039;s the first value?&lt;br /&gt;
&lt;br /&gt;
            if (t == 7) // if it&#039;s a sculptie&lt;br /&gt;
            {&lt;br /&gt;
                sayn(&amp;quot;[\n         PRIM_TYPE,&amp;quot;+ (string)t + &amp;quot;,\&amp;quot;&amp;quot;+ llList2String(r,1) + &amp;quot;\&amp;quot;,&amp;quot; + llList2String(r,2) ); &lt;br /&gt;
                &lt;br /&gt;
            }&lt;br /&gt;
            else sayn(&amp;quot;[\n         &amp;quot; + param(llList2String(Param_Names,i), j));&lt;br /&gt;
        }&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
        else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
        {&lt;br /&gt;
            say(&amp;quot;        // It&#039;s probably not a god idea to have your new prim jump to the old one\n        // &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
        &lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    Param_Names = []; // Free up some memory&lt;br /&gt;
&lt;br /&gt;
    // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
    // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
    //&lt;br /&gt;
    // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;&amp;quot;); &lt;br /&gt;
    &lt;br /&gt;
    comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
    define();&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;&amp;quot;);&lt;br /&gt;
    comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n       // Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
                              &lt;br /&gt;
     //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
     //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
     //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
     ////&lt;br /&gt;
     //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
     //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
    integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
        &lt;br /&gt;
    comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        ///  PRIM_TEXTURE ///&lt;br /&gt;
&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            &lt;br /&gt;
            list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
            string s = &lt;br /&gt;
            &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,1)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,2)&lt;br /&gt;
            + &amp;quot;,&amp;quot;&lt;br /&gt;
            + llList2String(r,3) ;&lt;br /&gt;
            &lt;br /&gt;
            if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
            else if (i == sides -1)  s = s + &amp;quot;\n        ];&amp;quot;;&lt;br /&gt;
                        &lt;br /&gt;
            say(&amp;quot;       PRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
            r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
        &lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n      // If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
        ///  PRIM_COLOR ///&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
&lt;br /&gt;
             if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
             if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
        say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
            if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        define();&lt;br /&gt;
&lt;br /&gt;
        ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
        say( &amp;quot;      params =\n      [\n&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
    ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
    ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
    ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
    sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
    sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    //// Now for one more Face-Specific paramater&lt;br /&gt;
    &lt;br /&gt;
        ///  PRIM_TEXGEN ///     &lt;br /&gt;
        &lt;br /&gt;
        // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
        // The default value for all faces is 0 ( distored ) &lt;br /&gt;
        // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
        &lt;br /&gt;
        //  And we make a note of that in the output script here&lt;br /&gt;
        comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n        // The default value is 1 (distorted).\n       // if you are metamorphing an object that already had planar mapping (rare)\n       // uncomment those 0 lines.\n       // This may not seem like much savings\n       //  but if your script is trying to metamorph between as many as five objects\n       // those few bytes saved might come in handy at the end.\n\n       // If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
        for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
        {   &lt;br /&gt;
            list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
            if (llList2Integer(r,-1) == 0) say(&amp;quot;        // PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
            if (llList2Integer(r,-1) == 1) say(&amp;quot;        PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
    /// The last paramater is Object-Specific&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;        llSetPrimitiveParams(params);\        params = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
        &lt;br /&gt;
    say(&amp;quot;\n\n         // If you were cut/pasting this code into a custom transform function\n         // end your cut above this comment.\n         // Otherwise ignore this.\n\n        llSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
    say(&amp;quot;\n        llSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
    &lt;br /&gt;
    comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;\n        llRemoveInventory(llGetScriptName());\n     }\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
    &lt;br /&gt;
    say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
    llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
    }&lt;br /&gt;
} &amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
        {&lt;br /&gt;
         list params;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
         // If you are cutting code out to paste into custon functions&lt;br /&gt;
         // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
&lt;br /&gt;
         params =&lt;br /&gt;
&lt;br /&gt;
         [&lt;br /&gt;
         PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
         PRIM_MATERIAL,2 , &lt;br /&gt;
         PRIM_PHYSICS,0 , &lt;br /&gt;
         PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
         PRIM_PHANTOM,2 , &lt;br /&gt;
         // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
        // PRIM_POSITION,&amp;lt;84.270088, 36.444294, 231.487076&amp;gt; ] + (params = []) +&lt;br /&gt;
         PRIM_ROTATION,&amp;lt;-0.363768, 0.720439, 0.134244, 0.574995&amp;gt; , &lt;br /&gt;
         PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
        ];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // Set all of the above paramaters as a group.&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
       // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
       // Please vote to fix it. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This prim has 3 faces.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
        PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
        PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
 &lt;br /&gt;
       // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
      // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
         PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
        [&lt;br /&gt;
&lt;br /&gt;
         PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
         PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);&lt;br /&gt;
        params = [];&lt;br /&gt;
       params =&lt;br /&gt;
      [&lt;br /&gt;
&lt;br /&gt;
         PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
         PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
         PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
         // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
 &lt;br /&gt;
       // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
        // The default value is 1 (distorted).&lt;br /&gt;
       // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
       // uncomment those 0 lines.&lt;br /&gt;
       // This may not seem like much savings&lt;br /&gt;
       //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
       // those few bytes saved might come in handy at the end.&lt;br /&gt;
&lt;br /&gt;
       // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
         // PRIM_TEXGEN,0,0 , &lt;br /&gt;
         // PRIM_TEXGEN,1,0 , &lt;br /&gt;
         // PRIM_TEXGEN,2,0 , &lt;br /&gt;
         PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
        ];&lt;br /&gt;
         llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
         // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
         // end your cut above this comment.&lt;br /&gt;
         // Otherwise ignore this.&lt;br /&gt;
&lt;br /&gt;
        llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
        llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
       // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
 &lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Increase the &#039;&#039;pause&#039;&#039; variable at the top of the script and try again.  If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;shape_1()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_2()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                      &lt;br /&gt;
shape_3()&lt;br /&gt;
{&lt;br /&gt;
     // Clone Prim codeblock&lt;br /&gt;
}&lt;br /&gt;
shape_4()&lt;br /&gt;
{&lt;br /&gt;
      // Clone Prim codeblock&lt;br /&gt;
}                                               &lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
    {&lt;br /&gt;
      on_rez(integer p) { llResetScript(); }&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
         do&lt;br /&gt;
         {&lt;br /&gt;
           shape_1();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_2();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
           shape_3();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
&lt;br /&gt;
           shape_4();&lt;br /&gt;
           llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
       }while (1);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
( In its current form this script can run with 8 complete output blocks, but 9 == stack/heap ).&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
PRIM_TEXGEN aka &#039;&#039;Planar Mapping&#039;&#039; values are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wrong, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47705</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47705"/>
		<updated>2008-01-08T04:54:50Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* Tips &amp;amp; Ideas */  note about the pause variable added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;2&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts scripts with [[llSetPrimitiveParams|llSetPrimitiveParams([])]] or [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
     ///////////////////////////////////////////////////////////////////&lt;br /&gt;
    //&lt;br /&gt;
    //           END - TO - END PRIM CLONER  v 2.2&lt;br /&gt;
    //&lt;br /&gt;
    //&lt;br /&gt;
    //   This script chats out lines of text that can be pasted back &lt;br /&gt;
    //   into a blank script to clone the original prim.&lt;br /&gt;
    //&lt;br /&gt;
    //   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
    //&lt;br /&gt;
    //    &lt;br /&gt;
     ////////////////////////////////////////////////////////////////////&lt;br /&gt;
    //&lt;br /&gt;
    //                    HOW TO USE&lt;br /&gt;
    //&lt;br /&gt;
    //&lt;br /&gt;
    //   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
    //&lt;br /&gt;
    //   It will output a complete script for replicating the object&lt;br /&gt;
    //   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
    //  &lt;br /&gt;
    //   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
    //   new script&lt;br /&gt;
    //&lt;br /&gt;
    //   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
    //   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
    //&lt;br /&gt;
    //   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
    //&lt;br /&gt;
    //   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
    //   do this a few times.&lt;br /&gt;
    //&lt;br /&gt;
    //&lt;br /&gt;
    //   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
    //   they&#039;re featured on the offical Wiki:&lt;br /&gt;
    //&lt;br /&gt;
    //   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
    //&lt;br /&gt;
     ///////////////////////////////////////////////////////////////////&lt;br /&gt;
    //&lt;br /&gt;
    //                       WHY?&lt;br /&gt;
    //&lt;br /&gt;
    //   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
    //   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
    //&lt;br /&gt;
    //   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
    //   so carve out what you need from the output.&lt;br /&gt;
    //&lt;br /&gt;
    //   The output code is also commented where appropriate. If you want &lt;br /&gt;
    //   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
    //   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
    //&lt;br /&gt;
    //   Many advanced items on the grid transform from one object to &lt;br /&gt;
    //   another.  Builders have used scrips like this to generate the &lt;br /&gt;
    //   code that goes into those products.&lt;br /&gt;
    //&lt;br /&gt;
    //   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
    //   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
    //   metamorphed with a single scipt.&lt;br /&gt;
    //&lt;br /&gt;
    //   In my experience you can pack five complete primitive trans-&lt;br /&gt;
    //   formations into one script before you run out of bytes.&lt;br /&gt;
    //&lt;br /&gt;
     ///////////////////////////////////////////////////////////////////&lt;br /&gt;
    //&lt;br /&gt;
    //              Released nder the terms of the &lt;br /&gt;
    //              GNU General Public Liscence v3&lt;br /&gt;
    //&lt;br /&gt;
    //  This source code is free to use / modify / resell &lt;br /&gt;
    //  with the following restrictions:&lt;br /&gt;
    //&lt;br /&gt;
    //  If you include any portion of -this- script in a product you &lt;br /&gt;
    //  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
    //  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
    //  and give attribution to the contributors.&lt;br /&gt;
    //&lt;br /&gt;
    //  This does not extend to the code this script generates.  That&lt;br /&gt;
    //  is yours to liscense as you see fit.&lt;br /&gt;
    //&lt;br /&gt;
    //             No warantee expressed or implied.&lt;br /&gt;
    //   &lt;br /&gt;
    //  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
    //&lt;br /&gt;
     ///////////////////////////////////////////////////////////////////&lt;br /&gt;
    //&lt;br /&gt;
    //      Written by          &lt;br /&gt;
    //      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
    //      w/ thanks to Bopete Yossarian&lt;br /&gt;
    //&lt;br /&gt;
    ////////////////////////////////////////////////////////////////////&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    ///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                              //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                              //// prevent line mix-up.&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    // Object-Specific parameters 2 string&lt;br /&gt;
    string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
    &lt;br /&gt;
    // Face-Specific parameters 2 string&lt;br /&gt;
    string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
    &lt;br /&gt;
    // Parameter prefixed and formatted for output&lt;br /&gt;
    string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
    &lt;br /&gt;
    // General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
    say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
    &lt;br /&gt;
    // Printing out next element to add to the parameter list&lt;br /&gt;
    sayn(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
    &lt;br /&gt;
    // Printing out the last element to add to the parameter list&lt;br /&gt;
    saynd(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot;\n        ];&amp;quot;); }&lt;br /&gt;
    &lt;br /&gt;
    // Print out the code to apply the parameters to the object&lt;br /&gt;
    define() {  say(&amp;quot;        llSetPrimitiveParams(params);\n        params = [];&amp;quot;); }&lt;br /&gt;
    &lt;br /&gt;
    // Handle to insert comments&lt;br /&gt;
    comment(string c) { say(&amp;quot;\n       // &amp;quot; + c ); }&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    /// On with the show...&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
        &lt;br /&gt;
        // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
        string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
        llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        // Guess we should transfer the description too&lt;br /&gt;
        string object_desc = llGetObjectDesc();&lt;br /&gt;
        &lt;br /&gt;
        //  Print the script header up to state_entry&lt;br /&gt;
        say(&amp;quot;\ndefault\n{\n    state_entry()\n        {\n         list params;\n        \n\n         // If you are cutting code out to paste into custon functions\n         // Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n         params =\n&amp;quot;);&lt;br /&gt;
         &lt;br /&gt;
         &lt;br /&gt;
    &lt;br /&gt;
         &lt;br /&gt;
        // Add some comments to the script &lt;br /&gt;
    &lt;br /&gt;
        // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
        // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
        &lt;br /&gt;
        // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
        list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
                // ASIDE:&lt;br /&gt;
                // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
                //&lt;br /&gt;
                // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
                // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
                //&lt;br /&gt;
                // This is probably for historical reasons (the param order, not my &lt;br /&gt;
                // ultimate destiny).&lt;br /&gt;
                &lt;br /&gt;
        &lt;br /&gt;
        integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
        integer length; // So are you, integer length!&lt;br /&gt;
        &lt;br /&gt;
        length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
        &lt;br /&gt;
        for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
        {&lt;br /&gt;
            if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
            {&lt;br /&gt;
                saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
                i = length;&lt;br /&gt;
            }&lt;br /&gt;
            else if (i == 0) { sayn(&amp;quot;[\n           &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1))); }&lt;br /&gt;
            else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
            else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
            {&lt;br /&gt;
                say(&amp;quot;        // It&#039;s probably not a god idea to have your new prim jump to the old one\n        // &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
            &lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        Param_Names = []; // Free up some memory&lt;br /&gt;
    &lt;br /&gt;
        // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
        // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
        //&lt;br /&gt;
        // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.&lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;&amp;quot;); &lt;br /&gt;
        &lt;br /&gt;
        comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;&amp;quot;);&lt;br /&gt;
        comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n       // Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
                &lt;br /&gt;
                                  &lt;br /&gt;
         //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
         //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
         //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
         ////&lt;br /&gt;
         //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
         //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
         &lt;br /&gt;
         &lt;br /&gt;
        integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
            &lt;br /&gt;
        comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
            ///  PRIM_TEXTURE ///&lt;br /&gt;
    &lt;br /&gt;
            say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
            for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
            {   &lt;br /&gt;
                &lt;br /&gt;
                list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
                string s = &lt;br /&gt;
                &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
                + &amp;quot;,&amp;quot;&lt;br /&gt;
                + llList2String(r,1)&lt;br /&gt;
                + &amp;quot;,&amp;quot;&lt;br /&gt;
                + llList2String(r,2)&lt;br /&gt;
                + &amp;quot;,&amp;quot;&lt;br /&gt;
                + llList2String(r,3) ;&lt;br /&gt;
                &lt;br /&gt;
                if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
                else if (i == sides -1)  s = s + &amp;quot;\n        ];&amp;quot;;&lt;br /&gt;
                            &lt;br /&gt;
                say(&amp;quot;       PRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
                // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
                r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
        &lt;br /&gt;
            }&lt;br /&gt;
            &lt;br /&gt;
    &lt;br /&gt;
            &lt;br /&gt;
            define();&lt;br /&gt;
            &lt;br /&gt;
            comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n      // If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
        &lt;br /&gt;
            &lt;br /&gt;
            ///  PRIM_COLOR ///&lt;br /&gt;
            say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
            for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
            {   &lt;br /&gt;
    &lt;br /&gt;
                 if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
                 if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
            }&lt;br /&gt;
            define();&lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
            say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
            for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
            {   &lt;br /&gt;
                if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
                if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
        &lt;br /&gt;
            }&lt;br /&gt;
            define();&lt;br /&gt;
    &lt;br /&gt;
            ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
            &lt;br /&gt;
    &lt;br /&gt;
            say( &amp;quot;      params =\n      [\n&amp;quot;);&lt;br /&gt;
            for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
            {   &lt;br /&gt;
                sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
        &lt;br /&gt;
            }&lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
        ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
        ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
        ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
        &lt;br /&gt;
            &lt;br /&gt;
        sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
        sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
            &lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
        //// Now for one more Face-Specific paramater&lt;br /&gt;
        &lt;br /&gt;
            ///  PRIM_TEXGEN ///     &lt;br /&gt;
            &lt;br /&gt;
            // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
            // The default value for all faces is 0 ( distored ) &lt;br /&gt;
            // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
            &lt;br /&gt;
            //  And we make a note of that in the output script here&lt;br /&gt;
            comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n        // The default value is 1 (distorted).\n       // if you are metamorphing an object that already had planar mapping (rare)\n       // uncomment those 0 lines.\n       // This may not seem like much savings\n       //  but if your script is trying to metamorph between as many as five objects\n       // those few bytes saved might come in handy at the end.\n\n       // If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
            for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
            {   &lt;br /&gt;
                list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
                if (llList2Integer(r,-1) == 0) say(&amp;quot;        // PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
                if (llList2Integer(r,-1) == 1) say(&amp;quot;        PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
            }&lt;br /&gt;
            &lt;br /&gt;
        /// The last paramater is Object-Specific&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;        llSetPrimitiveParams(params);\        params = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
            &lt;br /&gt;
        say(&amp;quot;\n\n         // If you were cut/pasting this code into a custom transform function\n         // end your cut above this comment.\n         // Otherwise ignore this.\n\n        llSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
        say(&amp;quot;\n        llSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
        &lt;br /&gt;
        comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;\n        llRemoveInventory(llGetScriptName());\n     }\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
        &lt;br /&gt;
    &lt;br /&gt;
        llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
        llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
        }&lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
            {&lt;br /&gt;
             list params;&lt;br /&gt;
            &lt;br /&gt;
    &lt;br /&gt;
             // If you are cutting code out to paste into custon functions&lt;br /&gt;
             // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
    &lt;br /&gt;
             params =&lt;br /&gt;
    &lt;br /&gt;
             [&lt;br /&gt;
               PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
             PRIM_MATERIAL,2 , &lt;br /&gt;
             PRIM_PHYSICS,0 , &lt;br /&gt;
             PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
             PRIM_PHANTOM,2 , &lt;br /&gt;
             // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
            // PRIM_POSITION,&amp;lt;80.725319, 41.797234, 233.014313&amp;gt; ] + (params = []) +&lt;br /&gt;
             PRIM_ROTATION,&amp;lt;-0.378789, 0.297200, -0.082870, 0.872539&amp;gt; , &lt;br /&gt;
             PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
            ];&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
           // Set all of the above paramaters as a group.&lt;br /&gt;
             llSetPrimitiveParams(params);&lt;br /&gt;
            params = [];&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
           // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
           // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
           // Please vote to fix it. &lt;br /&gt;
    &lt;br /&gt;
     &lt;br /&gt;
           // This prim has 3 faces.&lt;br /&gt;
    &lt;br /&gt;
           params =&lt;br /&gt;
            [&lt;br /&gt;
    &lt;br /&gt;
            PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
            PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
            PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
            ];&lt;br /&gt;
             llSetPrimitiveParams(params);&lt;br /&gt;
            params = [];&lt;br /&gt;
     &lt;br /&gt;
           // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
          // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
    &lt;br /&gt;
           params =&lt;br /&gt;
            [&lt;br /&gt;
    &lt;br /&gt;
             PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
             PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
             PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
            ];&lt;br /&gt;
             llSetPrimitiveParams(params);&lt;br /&gt;
            params = [];&lt;br /&gt;
           params =&lt;br /&gt;
            [&lt;br /&gt;
    &lt;br /&gt;
             PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
             PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
             PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
            ];&lt;br /&gt;
             llSetPrimitiveParams(params);&lt;br /&gt;
            params = [];&lt;br /&gt;
           params =&lt;br /&gt;
          [&lt;br /&gt;
    &lt;br /&gt;
             PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
             PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
             PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
             PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
             // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
     &lt;br /&gt;
           // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
           // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
            // The default value is 1 (distorted).&lt;br /&gt;
           // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
           // uncomment those 0 lines.&lt;br /&gt;
           // This may not seem like much savings&lt;br /&gt;
           //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
           // those few bytes saved might come in handy at the end.&lt;br /&gt;
    &lt;br /&gt;
           // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
             // PRIM_TEXGEN,0,0 , &lt;br /&gt;
             // PRIM_TEXGEN,1,0 , &lt;br /&gt;
             // PRIM_TEXGEN,2,0 , &lt;br /&gt;
             PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
            ];&lt;br /&gt;
             llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
     &lt;br /&gt;
    &lt;br /&gt;
             // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
             // end your cut above this comment.&lt;br /&gt;
             // Otherwise ignore this.&lt;br /&gt;
    &lt;br /&gt;
            llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
     &lt;br /&gt;
            llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
     &lt;br /&gt;
           // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
     &lt;br /&gt;
            llRemoveInventory(llGetScriptName());&lt;br /&gt;
         }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Increase the &#039;&#039;pause&#039;&#039; variable at the top of the script and try again.  If that fails reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
    shape_1()&lt;br /&gt;
    {&lt;br /&gt;
        // Clone Prim codeblock&lt;br /&gt;
    }&lt;br /&gt;
    shape_2()&lt;br /&gt;
    {&lt;br /&gt;
        // Clone Prim codeblock&lt;br /&gt;
    }                      &lt;br /&gt;
    shape_3()&lt;br /&gt;
    {&lt;br /&gt;
        // Clone Prim codeblock&lt;br /&gt;
    }&lt;br /&gt;
    shape_4()&lt;br /&gt;
    {&lt;br /&gt;
        // Clone Prim codeblock&lt;br /&gt;
    }                                               &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        on_rez(integer p) { llResetScript(); }&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
            do&lt;br /&gt;
            {&lt;br /&gt;
                shape_1();&lt;br /&gt;
                llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
                shape_2();&lt;br /&gt;
                llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
                shape_3();&lt;br /&gt;
                llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
                shape_4();&lt;br /&gt;
                llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
            }while (1);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
PRIM_TEXGEN aka &#039;&#039;Planar Mapping&#039;&#039; values are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wrong, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47704</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47704"/>
		<updated>2008-01-08T04:51:55Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: update for v2.2.  output code now much cleaner.  planar mapping explained and commented&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.&amp;lt;u&amp;gt;2&amp;lt;/u&amp;gt;&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts scripts with [[llSetPrimitiveParams|llSetPrimitiveParams([])]] or [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
     ///////////////////////////////////////////////////////////////////&lt;br /&gt;
    //&lt;br /&gt;
    //           END - TO - END PRIM CLONER  v 2.2&lt;br /&gt;
    //&lt;br /&gt;
    //&lt;br /&gt;
    //   This script chats out lines of text that can be pasted back &lt;br /&gt;
    //   into a blank script to clone the original prim.&lt;br /&gt;
    //&lt;br /&gt;
    //   It also produces codeblocks optimized for automated transforms.&lt;br /&gt;
    //&lt;br /&gt;
    //    &lt;br /&gt;
     ////////////////////////////////////////////////////////////////////&lt;br /&gt;
    //&lt;br /&gt;
    //                    HOW TO USE&lt;br /&gt;
    //&lt;br /&gt;
    //&lt;br /&gt;
    //   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
    //&lt;br /&gt;
    //   It will output a complete script for replicating the object&lt;br /&gt;
    //   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
    //  &lt;br /&gt;
    //   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
    //   new script&lt;br /&gt;
    //&lt;br /&gt;
    //   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
    //   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
    //&lt;br /&gt;
    //   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
    //&lt;br /&gt;
    //   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
    //   do this a few times.&lt;br /&gt;
    //&lt;br /&gt;
    //&lt;br /&gt;
    //   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
    //   they&#039;re featured on the offical Wiki:&lt;br /&gt;
    //&lt;br /&gt;
    //   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
    //&lt;br /&gt;
     ///////////////////////////////////////////////////////////////////&lt;br /&gt;
    //&lt;br /&gt;
    //                       WHY?&lt;br /&gt;
    //&lt;br /&gt;
    //   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
    //   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
    //&lt;br /&gt;
    //   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
    //   so carve out what you need from the output.&lt;br /&gt;
    //&lt;br /&gt;
    //   The output code is also commented where appropriate. If you want &lt;br /&gt;
    //   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
    //   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
    //&lt;br /&gt;
    //   Many advanced items on the grid transform from one object to &lt;br /&gt;
    //   another.  Builders have used scrips like this to generate the &lt;br /&gt;
    //   code that goes into those products.&lt;br /&gt;
    //&lt;br /&gt;
    //   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
    //   llSetLinkPrimitiveParams([]).  A multi-prim prim object can be &lt;br /&gt;
    //   metamorphed with a single scipt.&lt;br /&gt;
    //&lt;br /&gt;
    //   In my experience you can pack five complete primitive trans-&lt;br /&gt;
    //   formations into one script before you run out of bytes.&lt;br /&gt;
    //&lt;br /&gt;
     ///////////////////////////////////////////////////////////////////&lt;br /&gt;
    //&lt;br /&gt;
    //              Released nder the terms of the &lt;br /&gt;
    //              GNU General Public Liscence v3&lt;br /&gt;
    //&lt;br /&gt;
    //  This source code is free to use / modify / resell &lt;br /&gt;
    //  with the following restrictions:&lt;br /&gt;
    //&lt;br /&gt;
    //  If you include any portion of -this- script in a product you &lt;br /&gt;
    //  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
    //  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
    //  and give attribution to the contributors.&lt;br /&gt;
    //&lt;br /&gt;
    //  This does not extend to the code this script generates.  That&lt;br /&gt;
    //  is yours to liscense as you see fit.&lt;br /&gt;
    //&lt;br /&gt;
    //             No warantee expressed or implied.&lt;br /&gt;
    //   &lt;br /&gt;
    //  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
    //&lt;br /&gt;
     ///////////////////////////////////////////////////////////////////&lt;br /&gt;
    //&lt;br /&gt;
    //      Written by          &lt;br /&gt;
    //      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
    //      w/ thanks to Bopete Yossarian&lt;br /&gt;
    //&lt;br /&gt;
    ////////////////////////////////////////////////////////////////////&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    ///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    float   pause   =   .1  ; //// Change this to change the delay between each printed line.&lt;br /&gt;
                              //// The laggier the server the more delay you&#039;ll need to &lt;br /&gt;
                              //// prevent line mix-up.&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    // Object-Specific parameters 2 string&lt;br /&gt;
    string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
    &lt;br /&gt;
    // Face-Specific parameters 2 string&lt;br /&gt;
    string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
    &lt;br /&gt;
    // Parameter prefixed and formatted for output&lt;br /&gt;
    string param(string p , integer q) { return p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
    &lt;br /&gt;
    // General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
    say(string c) { llSleep(pause); llOwnerSay(c); } &lt;br /&gt;
    &lt;br /&gt;
    // Printing out next element to add to the parameter list&lt;br /&gt;
    sayn(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot; , &amp;quot;); }&lt;br /&gt;
    &lt;br /&gt;
    // Printing out the last element to add to the parameter list&lt;br /&gt;
    saynd(string c) { say(&amp;quot;        &amp;quot; + c + &amp;quot;\n        ];&amp;quot;); }&lt;br /&gt;
    &lt;br /&gt;
    // Print out the code to apply the parameters to the object&lt;br /&gt;
    define() {  say(&amp;quot;        llSetPrimitiveParams(params);\n        params = [];&amp;quot;); }&lt;br /&gt;
    &lt;br /&gt;
    // Handle to insert comments&lt;br /&gt;
    comment(string c) { say(&amp;quot;\n       // &amp;quot; + c ); }&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    /// On with the show...&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
        &lt;br /&gt;
        // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
        string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
        llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        // Guess we should transfer the description too&lt;br /&gt;
        string object_desc = llGetObjectDesc();&lt;br /&gt;
        &lt;br /&gt;
        //  Print the script header up to state_entry&lt;br /&gt;
        say(&amp;quot;\ndefault\n{\n    state_entry()\n        {\n         list params;\n        \n\n         // If you are cutting code out to paste into custon functions\n         // Define \&amp;quot;params\&amp;quot; as a global list and start cutting below this line.\n\n         params =\n&amp;quot;);&lt;br /&gt;
         &lt;br /&gt;
         &lt;br /&gt;
    &lt;br /&gt;
         &lt;br /&gt;
        // Add some comments to the script &lt;br /&gt;
    &lt;br /&gt;
        // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
        // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
        &lt;br /&gt;
        // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
        list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
                // ASIDE:&lt;br /&gt;
                // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
                //&lt;br /&gt;
                // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
                // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
                //&lt;br /&gt;
                // This is probably for historical reasons (the param order, not my &lt;br /&gt;
                // ultimate destiny).&lt;br /&gt;
                &lt;br /&gt;
        &lt;br /&gt;
        integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
        integer length; // So are you, integer length!&lt;br /&gt;
        &lt;br /&gt;
        length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
        &lt;br /&gt;
        for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
        {&lt;br /&gt;
            if (i &amp;gt; length -3 ) // If we&#039;re at the last stride&lt;br /&gt;
            {&lt;br /&gt;
                saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // Fecth the constants out of Param_Names.&lt;br /&gt;
                i = length;&lt;br /&gt;
            }&lt;br /&gt;
            else if (i == 0) { sayn(&amp;quot;[\n           &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1))); }&lt;br /&gt;
            else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
            else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
            {&lt;br /&gt;
                say(&amp;quot;        // It&#039;s probably not a god idea to have your new prim jump to the old one\n        // &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
            &lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        Param_Names = []; // Free up some memory&lt;br /&gt;
    &lt;br /&gt;
        // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
        // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
        //&lt;br /&gt;
        // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.&lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;&amp;quot;); &lt;br /&gt;
        &lt;br /&gt;
        comment(&amp;quot;Set all of the above paramaters as a group.&amp;quot;);&lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;&amp;quot;);&lt;br /&gt;
        comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others \n       // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.\n       // Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
                &lt;br /&gt;
                                  &lt;br /&gt;
         //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
         //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
         //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
         ////&lt;br /&gt;
         //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
         //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
         &lt;br /&gt;
         &lt;br /&gt;
        integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
            &lt;br /&gt;
        comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
            ///  PRIM_TEXTURE ///&lt;br /&gt;
    &lt;br /&gt;
            say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
            for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
            {   &lt;br /&gt;
                &lt;br /&gt;
                list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
                string s = &lt;br /&gt;
                &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
                + &amp;quot;,&amp;quot;&lt;br /&gt;
                + llList2String(r,1)&lt;br /&gt;
                + &amp;quot;,&amp;quot;&lt;br /&gt;
                + llList2String(r,2)&lt;br /&gt;
                + &amp;quot;,&amp;quot;&lt;br /&gt;
                + llList2String(r,3) ;&lt;br /&gt;
                &lt;br /&gt;
                if (i &amp;lt; sides -1)  s = s + &amp;quot; , &amp;quot; ; &lt;br /&gt;
                else if (i == sides -1)  s = s + &amp;quot;\n        ];&amp;quot;;&lt;br /&gt;
                            &lt;br /&gt;
                say(&amp;quot;       PRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
                // Local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
                r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
        &lt;br /&gt;
            }&lt;br /&gt;
            &lt;br /&gt;
    &lt;br /&gt;
            &lt;br /&gt;
            define();&lt;br /&gt;
            &lt;br /&gt;
            comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n      // If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
        &lt;br /&gt;
            &lt;br /&gt;
            ///  PRIM_COLOR ///&lt;br /&gt;
            say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
            for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
            {   &lt;br /&gt;
    &lt;br /&gt;
                 if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
                 if (i == sides -1 ) saynd(&amp;quot;PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
            }&lt;br /&gt;
            define();&lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
            say( &amp;quot;      params =\n        [\n&amp;quot;);&lt;br /&gt;
            for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
            {   &lt;br /&gt;
                if (i &amp;lt; sides -1 ) sayn(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
                if (i == sides -1 ) saynd(&amp;quot;PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
        &lt;br /&gt;
            }&lt;br /&gt;
            define();&lt;br /&gt;
    &lt;br /&gt;
            ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
            &lt;br /&gt;
    &lt;br /&gt;
            say( &amp;quot;      params =\n      [\n&amp;quot;);&lt;br /&gt;
            for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
            {   &lt;br /&gt;
                sayn(&amp;quot;PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
        &lt;br /&gt;
            }&lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
        ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
        ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
        ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
        &lt;br /&gt;
            &lt;br /&gt;
        sayn(param( &amp;quot;PRIM_FLEXIBLE&amp;quot;,21));&lt;br /&gt;
        sayn(&amp;quot;// &amp;quot; + param( &amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24));&lt;br /&gt;
            &lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
        //// Now for one more Face-Specific paramater&lt;br /&gt;
        &lt;br /&gt;
            ///  PRIM_TEXGEN ///     &lt;br /&gt;
            &lt;br /&gt;
            // Planar mapping is for correcting the what circular surfaces do to textures &lt;br /&gt;
            // The default value for all faces is 0 ( distored ) &lt;br /&gt;
            // So we will only uncomment lines that carry a value of 1 ( corrected )&lt;br /&gt;
            &lt;br /&gt;
            //  And we make a note of that in the output script here&lt;br /&gt;
            comment(&amp;quot;Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.\n       // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.\n        // The default value is 1 (distorted).\n       // if you are metamorphing an object that already had planar mapping (rare)\n       // uncomment those 0 lines.\n       // This may not seem like much savings\n       //  but if your script is trying to metamorph between as many as five objects\n       // those few bytes saved might come in handy at the end.\n\n       // If your textures are coming out with the offsets all wrong, try uncommenting them.&amp;quot;);&lt;br /&gt;
            for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
            {   &lt;br /&gt;
                list r = llGetPrimitiveParams([PRIM_TEXGEN,i]);&lt;br /&gt;
                if (llList2Integer(r,-1) == 0) say(&amp;quot;        // PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);&lt;br /&gt;
                if (llList2Integer(r,-1) == 1) say(&amp;quot;        PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + llDumpList2String(r,&amp;quot; , &amp;quot;) + &amp;quot; , &amp;quot;);    &lt;br /&gt;
            }&lt;br /&gt;
            &lt;br /&gt;
        /// The last paramater is Object-Specific&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        saynd(&amp;quot;PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;        llSetPrimitiveParams(params);\        params = [];&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
            &lt;br /&gt;
        say(&amp;quot;\n\n         // If you were cut/pasting this code into a custom transform function\n         // end your cut above this comment.\n         // Otherwise ignore this.\n\n        llSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
        say(&amp;quot;\n        llSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
        &lt;br /&gt;
        comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;\n        llRemoveInventory(llGetScriptName());\n     }\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
        &lt;br /&gt;
    &lt;br /&gt;
        llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;Don&#039;t forget to remove the \&amp;quot;[HH:MM]  :\&amp;quot; timestamp at the beginning of each line.  Use Find/Replace  :)&amp;quot;); // Remind us to remove prefixes.)&lt;br /&gt;
        llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
        }&lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
            {&lt;br /&gt;
             list params;&lt;br /&gt;
            &lt;br /&gt;
    &lt;br /&gt;
             // If you are cutting code out to paste into custon functions&lt;br /&gt;
             // Define &amp;quot;params&amp;quot; as a global list and start cutting below this line.&lt;br /&gt;
    &lt;br /&gt;
             params =&lt;br /&gt;
    &lt;br /&gt;
             [&lt;br /&gt;
               PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 , &lt;br /&gt;
             PRIM_MATERIAL,2 , &lt;br /&gt;
             PRIM_PHYSICS,0 , &lt;br /&gt;
             PRIM_TEMP_ON_REZ,0 , &lt;br /&gt;
             PRIM_PHANTOM,2 , &lt;br /&gt;
             // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
            // PRIM_POSITION,&amp;lt;80.725319, 41.797234, 233.014313&amp;gt; ] + (params = []) +&lt;br /&gt;
             PRIM_ROTATION,&amp;lt;-0.378789, 0.297200, -0.082870, 0.872539&amp;gt; , &lt;br /&gt;
             PRIM_SIZE,&amp;lt;1.072797, 1.206897, 1.072797&amp;gt;&lt;br /&gt;
            ];&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
           // Set all of the above paramaters as a group.&lt;br /&gt;
             llSetPrimitiveParams(params);&lt;br /&gt;
            params = [];&lt;br /&gt;
     &lt;br /&gt;
     &lt;br /&gt;
           // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others &lt;br /&gt;
           // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
           // Please vote to fix it. &lt;br /&gt;
    &lt;br /&gt;
     &lt;br /&gt;
           // This prim has 3 faces.&lt;br /&gt;
    &lt;br /&gt;
           params =&lt;br /&gt;
            [&lt;br /&gt;
    &lt;br /&gt;
            PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
            PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 , &lt;br /&gt;
            PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000&lt;br /&gt;
            ];&lt;br /&gt;
             llSetPrimitiveParams(params);&lt;br /&gt;
            params = [];&lt;br /&gt;
     &lt;br /&gt;
           // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
          // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
    &lt;br /&gt;
           params =&lt;br /&gt;
            [&lt;br /&gt;
    &lt;br /&gt;
             PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
             PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 , &lt;br /&gt;
             PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000&lt;br /&gt;
            ];&lt;br /&gt;
             llSetPrimitiveParams(params);&lt;br /&gt;
            params = [];&lt;br /&gt;
           params =&lt;br /&gt;
            [&lt;br /&gt;
    &lt;br /&gt;
             PRIM_BUMP_SHINY,0,3,0 , &lt;br /&gt;
             PRIM_BUMP_SHINY,1,3,0 , &lt;br /&gt;
             PRIM_BUMP_SHINY,2,3,0&lt;br /&gt;
            ];&lt;br /&gt;
             llSetPrimitiveParams(params);&lt;br /&gt;
            params = [];&lt;br /&gt;
           params =&lt;br /&gt;
          [&lt;br /&gt;
    &lt;br /&gt;
             PRIM_FULLBRIGHT,0,1 , &lt;br /&gt;
             PRIM_FULLBRIGHT,1,1 , &lt;br /&gt;
             PRIM_FULLBRIGHT,2,1 , &lt;br /&gt;
             PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; , &lt;br /&gt;
             // PRIM_CAST_SHADOWS,1 , &lt;br /&gt;
     &lt;br /&gt;
           // Planar mapping (PRIM_TEXGEN) is for correcting the what circular surfaces do to textures.&lt;br /&gt;
           // Most builds don&#039;t use it, so it&#039;s commented out to save bytes in auto-transform code.&lt;br /&gt;
            // The default value is 1 (distorted).&lt;br /&gt;
           // if you are metamorphing an object that already had planar mapping (rare)&lt;br /&gt;
           // uncomment those 0 lines.&lt;br /&gt;
           // This may not seem like much savings&lt;br /&gt;
           //  but if your script is trying to metamorph between as many as five objects&lt;br /&gt;
           // those few bytes saved might come in handy at the end.&lt;br /&gt;
    &lt;br /&gt;
           // If your textures are coming out with the offsets all wrong, try uncommenting them.&lt;br /&gt;
             // PRIM_TEXGEN,0,0 , &lt;br /&gt;
             // PRIM_TEXGEN,1,0 , &lt;br /&gt;
             // PRIM_TEXGEN,2,0 , &lt;br /&gt;
             PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000&lt;br /&gt;
            ];&lt;br /&gt;
             llSetPrimitiveParams(params);        params = [];&lt;br /&gt;
     &lt;br /&gt;
    &lt;br /&gt;
             // If you were cut/pasting this code into a custom transform function&lt;br /&gt;
             // end your cut above this comment.&lt;br /&gt;
             // Otherwise ignore this.&lt;br /&gt;
    &lt;br /&gt;
            llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
     &lt;br /&gt;
            llSetObjectDesc(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
     &lt;br /&gt;
           // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
     &lt;br /&gt;
            llRemoveInventory(llGetScriptName());&lt;br /&gt;
         }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
    shape_1()&lt;br /&gt;
    {&lt;br /&gt;
        // Clone Prim codeblock&lt;br /&gt;
    }&lt;br /&gt;
    shape_2()&lt;br /&gt;
    {&lt;br /&gt;
        // Clone Prim codeblock&lt;br /&gt;
    }                      &lt;br /&gt;
    shape_3()&lt;br /&gt;
    {&lt;br /&gt;
        // Clone Prim codeblock&lt;br /&gt;
    }&lt;br /&gt;
    shape_4()&lt;br /&gt;
    {&lt;br /&gt;
        // Clone Prim codeblock&lt;br /&gt;
    }                                               &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        on_rez(integer p) { llResetScript(); }&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
            do&lt;br /&gt;
            {&lt;br /&gt;
                shape_1();&lt;br /&gt;
                llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
                shape_2();&lt;br /&gt;
                llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
                shape_3();&lt;br /&gt;
                llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
                shape_4();&lt;br /&gt;
                llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
            }while (1);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
PRIM_TEXGEN aka &#039;&#039;Planar Mapping&#039;&#039; values are automatically commented out if they&#039;re at default (FALSE).&lt;br /&gt;
&lt;br /&gt;
This is to save a little bytecode in case you&#039;re plugging a bunch of prim transforms into custom functions.  Usually no one uses Planar Mapping (it corrects for the distortion of circular surfaces).&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t a bug, it&#039;s a feature, and it&#039;s commented on in both Clone Primitive and the output script.  &lt;br /&gt;
&lt;br /&gt;
If this makes your textures look like their offsets went wrong, uncomment the PRIM_TEXGEN lines and recompile.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clear_Param_Widgets&amp;diff=47662</id>
		<title>User:Clarknova Helvetic/Clear Param Widgets</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clear_Param_Widgets&amp;diff=47662"/>
		<updated>2008-01-08T00:08:56Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* &amp;#039;&amp;#039;&amp;#039;Clear Hover Text&amp;#039;&amp;#039;&amp;#039; */ wtf m8&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;These Scripts clear a single param.  Drag &#039;n drop.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Just Die&#039;&#039;&#039; ==&lt;br /&gt;
Sometimes a prim jest don&#039;t die natural.&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
            llDie();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Die in X Minutes&#039;&#039;&#039; ==&lt;br /&gt;
Enter minutes in whole numbers, then drop script into prim &lt;br /&gt;
    integer minutes = 20;  // Change this to the number of minutes for the object to live.&lt;br /&gt;
    &lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry() { llSetTimerEvent((float)minutes*60.); }&lt;br /&gt;
        timer()&lt;br /&gt;
        {&lt;br /&gt;
            llInstantMessage(llGetOwner(),(string)llRound(minutes) + &amp;quot; minutes expired.  &amp;quot; + llGetObjectName() + &amp;quot; deleted.&amp;quot;);&lt;br /&gt;
            llDie();&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Clear Hover Text&#039;&#039;&#039; ==&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
            llSetText(&amp;quot;&amp;quot;,ZERO_VECTOR,0.);&lt;br /&gt;
            llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Clear Particles&#039;&#039;&#039; ==&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
                llParticleSystem([]);&lt;br /&gt;
                llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Stop Sound&#039;&#039;&#039; ==&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
            llStopSound();&lt;br /&gt;
            llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clear_Param_Widgets&amp;diff=47661</id>
		<title>User:Clarknova Helvetic/Clear Param Widgets</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clear_Param_Widgets&amp;diff=47661"/>
		<updated>2008-01-08T00:08:06Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: content added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;These Scripts clear a single param.  Drag &#039;n drop.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Just Die&#039;&#039;&#039; ==&lt;br /&gt;
Sometimes a prim jest don&#039;t die natural.&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
            llDie();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Die in X Minutes&#039;&#039;&#039; ==&lt;br /&gt;
Enter minutes in whole numbers, then drop script into prim &lt;br /&gt;
    integer minutes = 20;  // Change this to the number of minutes for the object to live.&lt;br /&gt;
    &lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry() { llSetTimerEvent((float)minutes*60.); }&lt;br /&gt;
        timer()&lt;br /&gt;
        {&lt;br /&gt;
            llInstantMessage(llGetOwner(),(string)llRound(minutes) + &amp;quot; minutes expired.  &amp;quot; + llGetObjectName() + &amp;quot; deleted.&amp;quot;);&lt;br /&gt;
            llDie();&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Clear Hover Text&#039;&#039;&#039; ==&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSetText(&amp;quot;&amp;quot;,ZERO_VECTOR,0.);&lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Clear Particles&#039;&#039;&#039; ==&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
                llParticleSystem([]);&lt;br /&gt;
                llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Stop Sound&#039;&#039;&#039; ==&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
            llStopSound();&lt;br /&gt;
            llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Set_Param_Widgets&amp;diff=47660</id>
		<title>User:Clarknova Helvetic/Set Param Widgets</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Set_Param_Widgets&amp;diff=47660"/>
		<updated>2008-01-07T23:59:50Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: only setting properties now.  clearing properties scripts have thier own page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;These Scripts are for setting a quick param.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Disposable Sit Target&#039;&#039;&#039; ==&lt;br /&gt;
Drag &#039;n drop to have something to sit on&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {   &lt;br /&gt;
            llSitTarget(&amp;lt;0,0,0.5&amp;gt;;&lt;br /&gt;
            llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
== &#039;&#039;&#039;Set Texture By Key&#039;&#039;&#039; ==&lt;br /&gt;
Enter key and side number, then drop script into prim &lt;br /&gt;
    key     texture =   &amp;quot;&amp;quot; ;&lt;br /&gt;
    integer face    =   ALL_SIDES;  // or individual side number&lt;br /&gt;
    &lt;br /&gt;
    // Use CTRL ALT SHIFT T to get the number of the face you&#039;ve selected.&lt;br /&gt;
    // Turn on admin options CTRL ALT V to get the key this way as well.&lt;br /&gt;
    //   Note that getting texure keys this way does not work in newer clients because&lt;br /&gt;
    //   fasion designers are the worthless dregs of human culture and will be&lt;br /&gt;
    //   shot dead in the former parking lots of thier studios which thier &lt;br /&gt;
    //   forced labor will have converted into civic gardens after the revolution.&lt;br /&gt;
    &lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
        llSetTexture(texture,face);&lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Set Hover Text&#039;&#039;&#039; ==&lt;br /&gt;
Enter text, color and alpha, then drop script into prim &lt;br /&gt;
    string  text =  &amp;quot;&amp;quot;;&lt;br /&gt;
    vector  color = &amp;lt;1.,1.,1.&amp;gt;;&lt;br /&gt;
    float   alpha = 1.0;&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
            llSetText(text,color,alpha);&lt;br /&gt;
            llSetTimerEvent(5.*60);&lt;br /&gt;
        }&lt;br /&gt;
        touch_start(integer n)&lt;br /&gt;
        {&lt;br /&gt;
            llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
        timer() { llRemoveInventory(llGetScriptName()); }&lt;br /&gt;
    }&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=47636</id>
		<title>User:Clarknova Helvetic</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=47636"/>
		<updated>2008-01-07T22:00:14Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* Scripting Widgets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you were linked from the forums you&#039;re probably looking for [[User:Clarknova Helvetic/Clone Primitive  v2.0|Clone Primitive  v2.0]].&lt;br /&gt;
&lt;br /&gt;
== About Moi ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Snapshot Tornado.jpg|thumb|right|256px| Someone&#039;s got to clean up around here.]]&lt;br /&gt;
&lt;br /&gt;
I like to script and build and also ponies.&lt;br /&gt;
&lt;br /&gt;
Three days younger than [[User:Arcadia Asylum|Arcadia Asylum]].&lt;br /&gt;
&lt;br /&gt;
Started SL on 2006/23/10.  Soon stopped because I couldn&#039;t stand client crashes.  Came back a year later when I had a decent video card and found that everyone I&#039;d met.. this is their job now.&lt;br /&gt;
&lt;br /&gt;
I make and sell gidgets [http://slexchange.com/modules.php?name=Marketplace&amp;amp;MerchantID=91584| on SLX] and [http://slurl.com/secondlife/Valis/85/37/232| in-world].  About half are freebies.  &lt;br /&gt;
&lt;br /&gt;
One of my most popular items was my first real project: The Builder&#039;s Sky Platform.  There are about 2500 users with one in their inventory.  One of the features I would change now is that it drops a half-kilometer halo of particles when the user falls off.  I&#039;m really surprised no one (+1) has ever complained.  &lt;br /&gt;
&lt;br /&gt;
Personally, I&#039;d hang me for it.&lt;br /&gt;
&lt;br /&gt;
If you care you can usually find me at [http://slurl.com/secondlife/Combat%20(sandbox)%20Rausch/177/159/24| The Rausch], or at [http://slurl.com/secondlife/Valis/85/37/232| My Shop] in Valis. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scripting Widgets ==&lt;br /&gt;
&lt;br /&gt;
I drag &#039;n drop these scripts into objects when I need to know something about them, or to set a quick parameter.  They do their job then delete from object inventory.&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Say This &amp;amp; That Widgets|Say This &amp;amp; That]]&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Set Param Widgets|Set Param Widgets]]&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Clear Param Widgets|Clear Param Widgets]]&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Set_Param_Widgets&amp;diff=47635</id>
		<title>User:Clarknova Helvetic/Set Param Widgets</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Set_Param_Widgets&amp;diff=47635"/>
		<updated>2008-01-07T21:58:56Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: Removing all content from page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47620</id>
		<title>User:Clarknova Helvetic/Clone Primitive v2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Clone_Primitive_v2.0&amp;diff=47620"/>
		<updated>2008-01-07T20:25:44Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: bugs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Clone Primitive v2.0&#039;&#039;&#039;  is a Total, End-2-End virtual object replication solution for the simulated cyberspace known to its tecnocrati &amp;quot;netziens&amp;quot; as &#039;&#039;Second Life&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Shoot me.&lt;br /&gt;
&lt;br /&gt;
[[Image:Script_Cloned_Strip.jpg|thumb||right|250px|Cloned by script]]&lt;br /&gt;
&lt;br /&gt;
== How to Use ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drop this script into a prim and it spits out a complete script in owner chat.  &lt;br /&gt;
&lt;br /&gt;
Paste that script into a completely blank script, strip out the Timestamps with find/replace, and drop that into any other prim.  Viola!  You have a copy of the first prim.&lt;br /&gt;
 &lt;br /&gt;
Both scripts self-delete from object inventory after doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What&#039;s it for? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why would you need this?  You don&#039;t.    Maybe.  It does essentially the same thing as shift-copy, which most people learn on their third day.  &lt;br /&gt;
&lt;br /&gt;
However, it does one nice thing, which is to print out all your primitive params in a format that&#039;s easy to plug into other scripts scripts with [[llSetPrimitiveParams|llSetPrimitiveParams([])]] or [[llSetLinkPrimitiveParams|llSetLinkPrimitiveParams([])]] transformation functions.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure people like [[Cubey Terra|Cubey]] and Horizons have scripts like these that spit out parameter codeblocks for use in their morphing rezzer gizmos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Script ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m including the script with its huge comment header.  Below that a sample output script.&lt;br /&gt;
&lt;br /&gt;
     ///////////////////////////////////////////////////////////////////&lt;br /&gt;
    //&lt;br /&gt;
    //           END - TO - END PRIM CLONER  v 2.1&lt;br /&gt;
    //&lt;br /&gt;
    //&lt;br /&gt;
    //   This script chats out lines of text that can be pasted back &lt;br /&gt;
    //   into a blank script to clone the original prim.&lt;br /&gt;
    //&lt;br /&gt;
    //    &lt;br /&gt;
     ////////////////////////////////////////////////////////////////////&lt;br /&gt;
    //&lt;br /&gt;
    //                    HOW TO USE&lt;br /&gt;
    //&lt;br /&gt;
    //&lt;br /&gt;
    //   Drag &#039;n Drop this script into the prim you want to copy.   &lt;br /&gt;
    //&lt;br /&gt;
    //   It will output a complete script for replicating the object&lt;br /&gt;
    //   in Owner-Only chat.  Then it will delete itself.&lt;br /&gt;
    //  &lt;br /&gt;
    //   Copy and paste the chatted script into a *completly blank*&lt;br /&gt;
    //   new script&lt;br /&gt;
    //&lt;br /&gt;
    //   Then use the  Search/Replace function under the Edit menu &lt;br /&gt;
    //   to replace the &amp;quot;[HH:MM]  :&amp;quot; line prefixes with a blank.&lt;br /&gt;
    //&lt;br /&gt;
    //   Just hit the &#039;Replace All&#039; button.&lt;br /&gt;
    //&lt;br /&gt;
    //   It can take 2 minutes or more to print out, so you may have to &lt;br /&gt;
    //   do this a few times.&lt;br /&gt;
    //&lt;br /&gt;
    //&lt;br /&gt;
    //   The Primitve Paramaters will be chatted out in the oder that &lt;br /&gt;
    //   they&#039;re featured on the offical Wiki:&lt;br /&gt;
    //&lt;br /&gt;
    //   http://wiki.secondlife.com/wiki/LlGetPrimitiveParams   &lt;br /&gt;
    //&lt;br /&gt;
     ///////////////////////////////////////////////////////////////////&lt;br /&gt;
    //&lt;br /&gt;
    //                       WHY?&lt;br /&gt;
    //&lt;br /&gt;
    //   Chances are you&#039;re not going to need an end-to-end&lt;br /&gt;
    //   script to dupe your prim. Shift-drag copy is a lot easier.&lt;br /&gt;
    //&lt;br /&gt;
    //   But if you&#039;re reading this you probably want some of the code,&lt;br /&gt;
    //   so carve out what you need from the output.&lt;br /&gt;
    //&lt;br /&gt;
    //   The output code is also commented where appropriate. If you want &lt;br /&gt;
    //   To know more about what&#039;s going on, read the comments here and &lt;br /&gt;
    //   check out the wiki.  The wiki&#039;s good.&lt;br /&gt;
    //&lt;br /&gt;
    //   Many advanced items on the grid transform from one object to &lt;br /&gt;
    //   another.  Builders have used scrips like this to generate the &lt;br /&gt;
    //   code that goes into those products.&lt;br /&gt;
    //&lt;br /&gt;
    //   Consider the use of both of llSetPrimitiveParams([]) and &lt;br /&gt;
    //   llSetLinkPrimitiveParams([]).  An entire 30 prim object can be &lt;br /&gt;
    //   metamorphed with a single scipt.&lt;br /&gt;
    //&lt;br /&gt;
    //&lt;br /&gt;
     ///////////////////////////////////////////////////////////////////&lt;br /&gt;
    //&lt;br /&gt;
    //              Released nder the terms of the &lt;br /&gt;
    //              GNU General Public Liscence v3&lt;br /&gt;
    //&lt;br /&gt;
    //  This source code is free to use / modify / resell &lt;br /&gt;
    //  with the following restrictions:&lt;br /&gt;
    //&lt;br /&gt;
    //  If you include any portion of -this- script in a product you &lt;br /&gt;
    //  distribute you must make the script fully mod/copy/trans for &lt;br /&gt;
    //  the next user/owner.  You must also liscence it under the GPL &lt;br /&gt;
    //  and give attribution to the contributors.&lt;br /&gt;
    //&lt;br /&gt;
    //  This does not extend to the code this script generates.  That&lt;br /&gt;
    //  is yours to liscense as you see fit.&lt;br /&gt;
    //&lt;br /&gt;
    //             No warantee expressed or implied.&lt;br /&gt;
    //   &lt;br /&gt;
    //  For more info see http://www.gnu.org/copyleft/gpl.html&lt;br /&gt;
    //&lt;br /&gt;
     ///////////////////////////////////////////////////////////////////&lt;br /&gt;
    //&lt;br /&gt;
    //      Written by          &lt;br /&gt;
    //      Clarknova Helvetic [2008.01.04]&lt;br /&gt;
    //      w/ thanks to Bopete Yossarian&lt;br /&gt;
    //&lt;br /&gt;
    ////////////////////////////////////////////////////////////////////&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    ///  Global Functions &amp;amp; Vars to make life easier&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    // Object-Specific parameters 2 string&lt;br /&gt;
    string osp(integer p) {return llDumpList2String(llGetPrimitiveParams([p]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
    &lt;br /&gt;
    // Face-Specific parameters 2 string&lt;br /&gt;
    string fsp(integer p, integer f) { return llDumpList2String(llGetPrimitiveParams([p,f]),&amp;quot;,&amp;quot;); }&lt;br /&gt;
    &lt;br /&gt;
    // Parameter prefixed and formatted for output&lt;br /&gt;
    string param(string p , integer q) { return &amp;quot;[ &amp;quot; + p + &amp;quot;,&amp;quot; + osp(q); }&lt;br /&gt;
    &lt;br /&gt;
    // General owner chat w\ Sleep function to stop chat lag from  screwing up the line order&lt;br /&gt;
    say(string c) { llSleep(1.); llOwnerSay(c); } &lt;br /&gt;
    &lt;br /&gt;
    // Printing out next element to add to the parameter list&lt;br /&gt;
    sayn(string c) { say(&amp;quot;          &amp;quot; + c + &amp;quot; ] + (params = []) +&amp;quot;); }&lt;br /&gt;
    &lt;br /&gt;
    // Printing out the last element to add to the parameter list&lt;br /&gt;
    saynd(string c) { say(&amp;quot;          &amp;quot; + c + &amp;quot; ]  ;&amp;quot;); }&lt;br /&gt;
    &lt;br /&gt;
    // Print out the code to apply the parameters to the object&lt;br /&gt;
    define() {  say(&amp;quot;       llSetPrimitiveParams(params);\n         params = [];&amp;quot;); }&lt;br /&gt;
    &lt;br /&gt;
    // Handle to insert comments&lt;br /&gt;
    comment(string c) { say(&amp;quot;         // &amp;quot; + c ); }&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    /// On with the show...&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
    &lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;COPY/PASTE THE CODE BELOW INTO A *BLANK* SCRIPT TO CLONE THIS PRIM: \n\n&amp;quot;);  // Announce what we&#039;re doing&lt;br /&gt;
        &lt;br /&gt;
        // We&#039;re going to change the object&#039;s name to a null string to make the output easier to read.&lt;br /&gt;
        string object_name = llGetObjectName(); // Store the object&#039;s name so we can set it back when done&lt;br /&gt;
        llSetObjectName(&amp;quot;&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        // Guess we should transfer the description too&lt;br /&gt;
        string object_desc = llGetObjectDesc();&lt;br /&gt;
        &lt;br /&gt;
        //  Print the script header up to state_entry&lt;br /&gt;
        say(&amp;quot;\ndefault\n{   state_entry()\n     {\n         list params;\n           params =\n&amp;quot;);&lt;br /&gt;
         &lt;br /&gt;
         &lt;br /&gt;
    &lt;br /&gt;
         &lt;br /&gt;
        // Add some comments to the script &lt;br /&gt;
        comment(&amp;quot;Be aware that the  \&amp;quot;  + (params = []) +  \&amp;quot; bit is a funny little hack that makes lists &amp;quot;);&lt;br /&gt;
        comment(&amp;quot;concatenate faster, and has nothing to do with the Paramaters themselves.&amp;quot;);&lt;br /&gt;
        say(&amp;quot;\n&amp;quot;); &lt;br /&gt;
        // [12:56]  Tali Rosca: It uses the C-style thing about an assignment also being an expression with a value.&lt;br /&gt;
        // [12:56]  Tali Rosca: Why it actually saves memory still baffles my mind, though.&lt;br /&gt;
        &lt;br /&gt;
        // list of the the first: paramater constants as strings, then thier integer value.&lt;br /&gt;
        list Param_Names = [&amp;quot;PRIM_TYPE&amp;quot;,PRIM_TYPE,&amp;quot;PRIM_MATERIAL&amp;quot;,PRIM_MATERIAL,&amp;quot;PRIM_PHYSICS&amp;quot;,PRIM_PHYSICS,&amp;quot;PRIM_TEMP_ON_REZ&amp;quot;,PRIM_TEMP_ON_REZ,&amp;quot;PRIM_PHANTOM&amp;quot;,PRIM_PHANTOM,&amp;quot;PRIM_POSITION&amp;quot;,PRIM_POSITION,&amp;quot;PRIM_ROTATION&amp;quot;,PRIM_ROTATION,&amp;quot;PRIM_SIZE&amp;quot;,PRIM_SIZE];&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
                // ASIDE:&lt;br /&gt;
                // Prim params are of two types: Object-Specific and Face-Specific.&lt;br /&gt;
                //&lt;br /&gt;
                // I&#039;d Like to group them together according to type, but LsL doesn&#039;t&lt;br /&gt;
                // nor does wiki.secondlife, and I am sworn to complete my destiny...&lt;br /&gt;
                //&lt;br /&gt;
                // This is probably for historical reasons (the param order, not my &lt;br /&gt;
                // ultimate destiny).&lt;br /&gt;
                &lt;br /&gt;
        &lt;br /&gt;
        integer i; // You&#039;re going to see a lot of use, integer i!&lt;br /&gt;
        integer length; // So are you, integer length!&lt;br /&gt;
        &lt;br /&gt;
        length = (llGetListLength(Param_Names)); // I&#039;m way lazy.  Let&#039;s make LsL do basic math for us.&lt;br /&gt;
        &lt;br /&gt;
        for ( i = 0 ; i &amp;lt; length ; i = i +2) // This is may answer to list strides.  Take that!&lt;br /&gt;
        {&lt;br /&gt;
            if (i &amp;gt; length -3 ) &lt;br /&gt;
            {&lt;br /&gt;
                saynd(param(llList2String(Param_Names,length -2), llList2Integer(Param_Names,length -1))) ; // It don&#039;t get any lazier, folks.&lt;br /&gt;
                i = length;&lt;br /&gt;
            }&lt;br /&gt;
            else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i != length -6 ) sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) ) ;&lt;br /&gt;
            else if (i &amp;lt; length -3 &amp;amp;&amp;amp; i == length -6 )&lt;br /&gt;
            {&lt;br /&gt;
                say(&amp;quot;           // It&#039;s probably not a god idea to have your new prim jump to the old one\n           // &amp;quot; + param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) + &amp;quot; ] + (params = []) +&amp;quot;); &lt;br /&gt;
            &lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        Param_Names = []; // Free up some memory&lt;br /&gt;
    &lt;br /&gt;
        // I reallllly want our script to set all of the paramaters at once, with one llSetPrimitiveParams() &lt;br /&gt;
        // call at the end of the script but we can&#039;t because of bugs in LsL.  &lt;br /&gt;
        //&lt;br /&gt;
        // See  https://jira.secondlife.com/browse/SVC-38  for more info.  Please vote to fix it.&lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;&amp;quot;); &lt;br /&gt;
        &lt;br /&gt;
        comment(&amp;quot;Set all of the above paramaters in a chunk &#039;o junk&amp;quot;);&lt;br /&gt;
        define();&lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;&amp;quot;);&lt;br /&gt;
        comment(&amp;quot;We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others&amp;quot;);&lt;br /&gt;
        comment(&amp;quot;during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&amp;quot;);&lt;br /&gt;
        comment(&amp;quot;Please vote to fix it. \n&amp;quot;);&lt;br /&gt;
                &lt;br /&gt;
                                  &lt;br /&gt;
         //// Okay, now for the hard stuff: 4 out of 5 of the Face-Specific params, starting with the hardest:&lt;br /&gt;
         //// PRIM_TEXTURE.  Why is PRIM_TEXTURE a pain?  Because llSetPrimitiveParams wants it in qoutes, but&lt;br /&gt;
         //// llGetPrimitiveParams doesn&#039;t give it to us in quotes.  It&#039;s a pickle.&lt;br /&gt;
         ////&lt;br /&gt;
         //// The Face-Specific params each need thier own For loop because the number of faces is variable&lt;br /&gt;
         //// from prim to prim.  A simple sphere only has one.  A tube can have up to 9.&lt;br /&gt;
         &lt;br /&gt;
         &lt;br /&gt;
        integer sides = llGetNumberOfSides();  // So here we find out how many faces we&#039;ve got&lt;br /&gt;
            &lt;br /&gt;
        comment(&amp;quot;This prim has &amp;quot; + (string)sides + &amp;quot; faces.\n&amp;quot;); // Don&#039;t care enough to correct for the singular :)&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
            ///  PRIM_TEXTURE ///&lt;br /&gt;
    &lt;br /&gt;
            say( &amp;quot;      params =&amp;quot;);&lt;br /&gt;
            for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
            {   &lt;br /&gt;
                &lt;br /&gt;
                list r =llGetPrimitiveParams([PRIM_TEXTURE,i]);&lt;br /&gt;
                string s = &lt;br /&gt;
                &amp;quot;\&amp;quot;&amp;quot;  + llList2String(r,0) + &amp;quot;\&amp;quot;&amp;quot; // First element is the texture key.&lt;br /&gt;
                + &amp;quot;,&amp;quot;&lt;br /&gt;
                + llList2String(r,1)&lt;br /&gt;
                + &amp;quot;,&amp;quot;&lt;br /&gt;
                + llList2String(r,2)&lt;br /&gt;
                + &amp;quot;,&amp;quot;&lt;br /&gt;
                + llList2String(r,3)&lt;br /&gt;
               + &amp;quot; ]&amp;quot;;&lt;br /&gt;
                &lt;br /&gt;
                if (i &amp;lt; sides -1) s = s + &amp;quot; + (params = []) + &amp;quot;;&lt;br /&gt;
                if (i == sides -1) s = s + &amp;quot; ;&amp;quot;;&lt;br /&gt;
                &lt;br /&gt;
                &lt;br /&gt;
                say(&amp;quot;       [ PRIM_TEXTURE,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + s );    &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
                // They say local variables aren&#039;t cleared when we leave thier scope.  Can you believe that crap?&lt;br /&gt;
                r = []; s = &amp;quot;&amp;quot;; &lt;br /&gt;
        &lt;br /&gt;
            }&lt;br /&gt;
            &lt;br /&gt;
    &lt;br /&gt;
            &lt;br /&gt;
            define();&lt;br /&gt;
            &lt;br /&gt;
            comment(&amp;quot;Note that you -cannot- define textures and colors in the same call!\n       // If you&#039;re cutting out these params for your custom code watch out for this.\n&amp;quot;);   &lt;br /&gt;
        &lt;br /&gt;
            &lt;br /&gt;
            ///  PRIM_COLOR ///&lt;br /&gt;
            say( &amp;quot;      params =&amp;quot;);&lt;br /&gt;
            for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
            {   &lt;br /&gt;
    &lt;br /&gt;
                 if (i &amp;lt; sides -1 ) sayn(&amp;quot;[ PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i));&lt;br /&gt;
                 if (i == sides -1 ) saynd(&amp;quot;       [ PRIM_COLOR,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_COLOR,i)); &lt;br /&gt;
            }&lt;br /&gt;
            define();&lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            ///  PRIM_BUMP_SHINY ///&lt;br /&gt;
            say( &amp;quot;      params =&amp;quot;);&lt;br /&gt;
            for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
            {   &lt;br /&gt;
                if (i &amp;lt; sides -1 ) sayn(&amp;quot;[ PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i) );&lt;br /&gt;
                if (i == sides -1 ) saynd(&amp;quot;       [ PRIM_BUMP_SHINY,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_BUMP_SHINY,i)); &lt;br /&gt;
        &lt;br /&gt;
            }&lt;br /&gt;
            define();&lt;br /&gt;
    &lt;br /&gt;
            ///  PRIM_FULLBRIGHT ///&lt;br /&gt;
            &lt;br /&gt;
            say( &amp;quot;      params =&amp;quot;);&lt;br /&gt;
            &lt;br /&gt;
            for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
            {   &lt;br /&gt;
                sayn(&amp;quot;[ PRIM_FULLBRIGHT,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_FULLBRIGHT,i)); &lt;br /&gt;
        &lt;br /&gt;
            }&lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
        ////   Now back to an Object-Specific paramaters : Flexible &amp;amp; Shadows&lt;br /&gt;
        ////   Remember that I&#039;m going in this screwy order so that our&lt;br /&gt;
        ////   Code matches the table on http://wiki.secondlife.com/wiki/LlSetPrimitiveParams&lt;br /&gt;
        &lt;br /&gt;
            &lt;br /&gt;
        Param_Names = [&amp;quot;PRIM_FLEXIBLE&amp;quot;,21,&amp;quot;PRIM_CAST_SHADOWS&amp;quot;,24];&lt;br /&gt;
            &lt;br /&gt;
        length = (llGetListLength(Param_Names)); &lt;br /&gt;
        &lt;br /&gt;
        for ( i = 0 ; i &amp;lt; length ; i = i +2) &lt;br /&gt;
        {&lt;br /&gt;
            sayn(param( llList2String(Param_Names,i), llList2Integer(Param_Names,i+1)) );&lt;br /&gt;
            if (i &amp;gt; length -3 ) i = length;&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        //// Now for one more Face-Specific paramater&lt;br /&gt;
        &lt;br /&gt;
            ///  PRIM_TEXGEN ///     Planar mapping?  I don&#039;t even know what that is!&lt;br /&gt;
    &lt;br /&gt;
            for (i = 0 ; i &amp;lt; sides ; ++i)  &lt;br /&gt;
            {   &lt;br /&gt;
                sayn(&amp;quot;[ PRIM_TEXGEN,&amp;quot; + (string)i + &amp;quot;,&amp;quot; + fsp(PRIM_TEXGEN,i) );&lt;br /&gt;
        &lt;br /&gt;
            }&lt;br /&gt;
            &lt;br /&gt;
        /// The last paramater is Object-Specific&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        saynd(&amp;quot;[ PRIM_POINT_LIGHT,&amp;quot; + osp(PRIM_POINT_LIGHT) );&lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;       llSetPrimitiveParams(params);&amp;quot;);  //  Print the final function call, braces &amp;amp; some blank lines&lt;br /&gt;
            &lt;br /&gt;
        say(&amp;quot;\n      llSetObjectName(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s name match this one&lt;br /&gt;
        say(&amp;quot;\n      llSetObjectDesc(\&amp;quot;&amp;quot; + object_name + &amp;quot;\&amp;quot;);\n&amp;quot;);  // Make the target&#039;s desc match this one&lt;br /&gt;
        &lt;br /&gt;
        comment(&amp;quot;This next line deletes the script.  Comment it out if you want the script to persist&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;\n      llRemoveInventory(llGetScriptName());\n }\n}\n\n\n&amp;quot;);  // Remove the cloning script when done &lt;br /&gt;
        &lt;br /&gt;
    &lt;br /&gt;
        llSetObjectName(object_name); // Change our object&#039;s name back.&lt;br /&gt;
        &lt;br /&gt;
        say(&amp;quot;Don&#039;t forget to remove the \&amp;quot; [HH:MM]  :\&amp;quot; prefix at the beginning of each line.  Use Find/replace. :)&amp;quot;); // Remind us to remove prefixes.&lt;br /&gt;
        &lt;br /&gt;
        llRemoveInventory(llGetScriptName());  // Delete this script.&lt;br /&gt;
        }&lt;br /&gt;
    } &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Well thet shoor is a lotta code!  Most of it whitespace and comments.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Sample Output ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of the output.  This will make a shiny, metallic mobius strip.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    default&lt;br /&gt;
    {   state_entry()&lt;br /&gt;
         {&lt;br /&gt;
             list params;&lt;br /&gt;
               params =&lt;br /&gt;
    &lt;br /&gt;
             // Be aware that the  &amp;quot;  + (params = []) +  &amp;quot; bit is a funny little hack that makes lists &lt;br /&gt;
             // concatenate faster, and has nothing to do with the Paramaters themselves.&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
              [ PRIM_TYPE,4,0,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,0.000000,&amp;lt;0.500000, -0.500000, 0.000000&amp;gt;,&amp;lt;0.250000, 0.050000, 0.000000&amp;gt;,&amp;lt;0.000000, -0.100000, 0.000000&amp;gt;,&amp;lt;0.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,1.000000,0.000000,0.000000 ] + (params = []) +&lt;br /&gt;
              [ PRIM_MATERIAL,2 ] + (params = []) +&lt;br /&gt;
              [ PRIM_PHYSICS,0 ] + (params = []) +&lt;br /&gt;
              [ PRIM_TEMP_ON_REZ,0 ] + (params = []) +&lt;br /&gt;
              [ PRIM_PHANTOM,1 ] + (params = []) +&lt;br /&gt;
               // It&#039;s probably not a god idea to have your new prim jump to the old one&lt;br /&gt;
               // [ PRIM_POSITION,&amp;lt;92.500000, 46.000000, 122.952721&amp;gt; ] + (params = []) +&lt;br /&gt;
              [ PRIM_ROTATION,&amp;lt;-0.069309, -0.703702, 0.069309, 0.703702&amp;gt; ] + (params = []) +&lt;br /&gt;
              [ PRIM_SIZE,&amp;lt;1.555556, 1.750001, 1.555556&amp;gt; ]  ;&lt;br /&gt;
    &lt;br /&gt;
             // Set all of the above paramaters in a chunk &#039;o junk&lt;br /&gt;
           llSetPrimitiveParams(params);&lt;br /&gt;
             params = [];&lt;br /&gt;
    &lt;br /&gt;
             // We are breaking the llSetPtimitiveParam([]) calls into blocks, because some params are incompatible with others&lt;br /&gt;
             // during the same call. This is an LsL bug.  See https://jira.secondlife.com/browse/SVC-38 for more info.&lt;br /&gt;
             // Please vote to fix it. &lt;br /&gt;
    &lt;br /&gt;
             // This prim has 3 faces.&lt;br /&gt;
    &lt;br /&gt;
          params =&lt;br /&gt;
           [ PRIM_TEXTURE,0,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 ] + (params = []) + &lt;br /&gt;
           [ PRIM_TEXTURE,1,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 ] + (params = []) + &lt;br /&gt;
           [ PRIM_TEXTURE,2,&amp;quot;5748decc-f629-461c-9a36-a35a221fe21f&amp;quot;,&amp;lt;1.000000, 1.000000, 0.000000&amp;gt;,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt;,0.000000 ] ;&lt;br /&gt;
           llSetPrimitiveParams(params);&lt;br /&gt;
             params = [];&lt;br /&gt;
             // Note that you -cannot- define textures and colors in the same call!&lt;br /&gt;
           // If you&#039;re cutting out these params for your custom code watch out for this.&lt;br /&gt;
    &lt;br /&gt;
          params =&lt;br /&gt;
              [ PRIM_COLOR,0,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 ] + (params = []) +&lt;br /&gt;
              [ PRIM_COLOR,1,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 ] + (params = []) +&lt;br /&gt;
                     [ PRIM_COLOR,2,&amp;lt;0.054902, 0.654902, 0.062745&amp;gt;,1.000000 ]  ;&lt;br /&gt;
           llSetPrimitiveParams(params);&lt;br /&gt;
             params = [];&lt;br /&gt;
          params =&lt;br /&gt;
              [ PRIM_BUMP_SHINY,0,3,0 ] + (params = []) +&lt;br /&gt;
              [ PRIM_BUMP_SHINY,1,3,0 ] + (params = []) +&lt;br /&gt;
                     [ PRIM_BUMP_SHINY,2,3,0 ]  ;&lt;br /&gt;
            llSetPrimitiveParams(params);&lt;br /&gt;
             params = [];&lt;br /&gt;
           params =&lt;br /&gt;
    &lt;br /&gt;
               [ PRIM_FULLBRIGHT,0,1 ] + (params = []) +&lt;br /&gt;
               [ PRIM_FULLBRIGHT,1,1 ] + (params = []) +&lt;br /&gt;
               [ PRIM_FULLBRIGHT,2,1 ] + (params = []) +&lt;br /&gt;
               [ PRIM_FLEXIBLE,0,2,0.300000,2.000000,0.000000,1.000000,&amp;lt;0.000000, 0.000000, 0.000000&amp;gt; ] + (params = []) +&lt;br /&gt;
               [ PRIM_CAST_SHADOWS,0 ] + (params = []) +&lt;br /&gt;
               [ PRIM_TEXGEN,0,0 ] + (params = []) +&lt;br /&gt;
               [ PRIM_TEXGEN,1,0 ] + (params = []) +&lt;br /&gt;
               [ PRIM_TEXGEN,2,0 ] + (params = []) +&lt;br /&gt;
               [ PRIM_POINT_LIGHT,1,&amp;lt;1.000000, 1.000000, 1.000000&amp;gt;,0.200000,20.000000,0.000000 ]  ;&lt;br /&gt;
            llSetPrimitiveParams(params);&lt;br /&gt;
     &lt;br /&gt;
          llSetObjectName(&amp;quot;Mobius Torus&amp;quot;);&lt;br /&gt;
          llSetObjectName(&amp;quot;test object&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
              // This next line deletes the script.  Comment it out if you want the script to persist&lt;br /&gt;
     &lt;br /&gt;
          llRemoveInventory(llGetScriptName());&lt;br /&gt;
     }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MegaMobius_004.jpg|thumb||right|250px|Heavens to Betsy!]]&lt;br /&gt;
&lt;br /&gt;
See?  Simple to deal with.  Comment out what you don&#039;t want, restructure, etc.  I use this script mainly for finding the horizontal texture offset on face 666 of my tortured tube dong.  &lt;br /&gt;
&lt;br /&gt;
Easy peasy to read, too.&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Ideas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning:&#039;&#039;&#039; Bad chat lag will sometimes re-order your code for you.  Reduce your draw distance, move to a different sim and wait for SL to stop sucking.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; comment out the PRIM_SIZE in the output script and drop it in a megaprim after you&#039;ve built your scale model. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; One neat thing you can do is have your prim cycle between objects. Just take the entire codeblock in state_entry() and stick it in a custom function  thus:&lt;br /&gt;
&lt;br /&gt;
    shape_1()&lt;br /&gt;
    {&lt;br /&gt;
        // Clone Prim codeblock&lt;br /&gt;
    }&lt;br /&gt;
    shape_2()&lt;br /&gt;
    {&lt;br /&gt;
        // Clone Prim codeblock&lt;br /&gt;
    }                      &lt;br /&gt;
    shape_3()&lt;br /&gt;
    {&lt;br /&gt;
        // Clone Prim codeblock&lt;br /&gt;
    }&lt;br /&gt;
    shape_4()&lt;br /&gt;
    {&lt;br /&gt;
        // Clone Prim codeblock&lt;br /&gt;
    }                                               &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        on_rez(integer p) { llResetScript(); }&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
            do&lt;br /&gt;
            {&lt;br /&gt;
                shape_1();&lt;br /&gt;
                llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
                shape_2();&lt;br /&gt;
                llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
                shape_3();&lt;br /&gt;
                llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
                shape_4();&lt;br /&gt;
                llSleep(10.);&lt;br /&gt;
 &lt;br /&gt;
            }while (1);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All sorts of possibilities, really.  I recommend coffee, sleep deprivation and imagination.&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
&lt;br /&gt;
* Code output is byte heavy, reducing number of complete transforms that can be packed into another script.  &lt;br /&gt;
&lt;br /&gt;
** &#039;&#039;+ (params = []) +&#039;&#039; could be replaced with a simple comma in most cases.&lt;br /&gt;
&lt;br /&gt;
** There should be a Lite version that does not print the less important params like PRIM_TEXGEN and PRIM_CAST_SHADOWS.  Or comments them out.&lt;br /&gt;
&lt;br /&gt;
* Code spacing is not exactly standardized.  Find/Replace of certain generic strings has to be repeated several times.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
In my comment header here , and in copies I give out in-world, I declare this script copyrighted under the [http://www.gnu.org/licenses/licenses.html| GPL v3].  &lt;br /&gt;
&lt;br /&gt;
Linden Labs declares everything on their Wiki released under the [http://creativecommons.org/licenses/by-sa/2.5/| CC Attribution-Share Alike 2.5].  &lt;br /&gt;
&lt;br /&gt;
Both amount to the same thing: if you use redistribute my code in any form, those scripts must be full perms, and my name and the name of everyone that touched them must be prominently commented.&lt;br /&gt;
&lt;br /&gt;
Period.  I am Fascist about this.&lt;br /&gt;
&lt;br /&gt;
Code output by the script is of course yours, and you can do anything you want with that, but &#039;&#039;this&#039;&#039; script must remain Open Source.  You can even copy/paste it into your own script item and sell it on SLX, but you have to include the license information and my name, and everyone will laugh at you and your customers will know you ripped them off you big jerk.  :D&lt;br /&gt;
&lt;br /&gt;
Also I&#039;m selling it as well, for anyone silly enough to spend $L20, so I&#039;m way ahead of and undercutting you.&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Set_Param_Widgets&amp;diff=47559</id>
		<title>User:Clarknova Helvetic/Set Param Widgets</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Set_Param_Widgets&amp;diff=47559"/>
		<updated>2008-01-07T01:01:43Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: a bit moar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;These Scripts are for setting a quick param or doing something else to a prim.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Just Die&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Sometimes a prim jest don&#039;t die natural.&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
            llDie();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Die in X Minutes&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    integer minutes = 20;  // Change this to the number of minutes for the object to live.&lt;br /&gt;
    &lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry() { llSetTimerEvent((float)minutes*60.); }&lt;br /&gt;
        timer()&lt;br /&gt;
        {&lt;br /&gt;
            llInstantMessage(llGetOwner(),(string)llRound(minutes) + &amp;quot; minutes expired.  &amp;quot; + llGetObjectName() + &amp;quot; deleted.&amp;quot;);&lt;br /&gt;
            llDie();&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Disposable Sit Target&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {   &lt;br /&gt;
            llSitTarget(&amp;lt;0,0,0.5&amp;gt;;&lt;br /&gt;
            llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Set Hover Text&#039;&#039;&#039; ==&lt;br /&gt;
Change variables to suit and save.  Script removes on next touch or in 5 minutes, whichever first.&lt;br /&gt;
    string  text =  &amp;quot;&amp;quot;;&lt;br /&gt;
    vector  color = &amp;lt;1.,1.,1.&amp;gt;;&lt;br /&gt;
    float   alpha = 1.0;&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
            llSetText(text,color,alpha);&lt;br /&gt;
            llSetTimerEvent(5.*60);&lt;br /&gt;
        }&lt;br /&gt;
        touch_start(integer n)&lt;br /&gt;
        {&lt;br /&gt;
            llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
        timer() { llRemoveInventory(llGetScriptName()); }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Halt Rotation&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
                llTargetOmega(ZERO_VECTOR, 0, 0);&lt;br /&gt;
                llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Clear Particles&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
                llParticleSystem([]);&lt;br /&gt;
                llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Set_Param_Widgets&amp;diff=47555</id>
		<title>User:Clarknova Helvetic/Set Param Widgets</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Set_Param_Widgets&amp;diff=47555"/>
		<updated>2008-01-07T00:38:19Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: 2 moar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;These Scripts are for setting a quick param or doing something else to a prim.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Just Die&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Sometimes a prim jest don&#039;t die natural.&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
            llDie();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Die in X Minutes&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    integer minutes = 20;  // Change this to the number of minutes for the object to live.&lt;br /&gt;
    &lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry() { llSetTimerEvent((float)minutes*60.); }&lt;br /&gt;
        timer()&lt;br /&gt;
        {&lt;br /&gt;
            llInstantMessage(llGetOwner(),(string)llRound(minutes) + &amp;quot; minutes expired.  &amp;quot; + llGetObjectName() + &amp;quot; deleted.&amp;quot;);&lt;br /&gt;
            llDie();&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Disposable Sit Target&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {   &lt;br /&gt;
            llSitTarget(&amp;lt;0,0,0.5&amp;gt;;&lt;br /&gt;
            llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Set Hover Text&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
    string  text =  &amp;quot;&amp;quot;;&lt;br /&gt;
    vector  color = &amp;lt;1.,1.,1.&amp;gt;;&lt;br /&gt;
    float   alpha = 1.0;&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
            llSetText(text,color,alpha);&lt;br /&gt;
            llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Halt Rotation&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
                llTargetOmega(ZERO_VECTOR, 0, 0);&lt;br /&gt;
                llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Clear Particles&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
                llParticleSystem([]);&lt;br /&gt;
                llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Set_Param_Widgets&amp;diff=47553</id>
		<title>User:Clarknova Helvetic/Set Param Widgets</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic/Set_Param_Widgets&amp;diff=47553"/>
		<updated>2008-01-07T00:27:34Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: /* &amp;#039;&amp;#039;&amp;#039;Die in X Minutes&amp;#039;&amp;#039;&amp;#039; */  had it set to on_rez rather than state entry.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These Scripts are for setting a quick param or doing something else to a prim.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Just Die&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Sometimes a body jest don&#039;t die natural.&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
            llDie();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Die in X Minutes&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    integer minutes = 20;  // Change this to the number of minutes for the object to live.&lt;br /&gt;
    &lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry() { llSetTimerEvent((float)minutes*60.); }&lt;br /&gt;
        timer()&lt;br /&gt;
        {&lt;br /&gt;
            llInstantMessage(llGetOwner(),(string)llRound(minutes) + &amp;quot; minutes expired.  &amp;quot; + llGetObjectName() + &amp;quot; deleted.&amp;quot;);&lt;br /&gt;
            llDie();&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Disposable Sit Target&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {   &lt;br /&gt;
            llSitTarget(&amp;lt;0,0,0.5&amp;gt;;&lt;br /&gt;
            llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Set Hover Text&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
    string  text =  &amp;quot;&amp;quot;;&lt;br /&gt;
    vector  color = &amp;lt;1.,1.,1.&amp;gt;;&lt;br /&gt;
    float   alpha = 1.0;&lt;br /&gt;
    default&lt;br /&gt;
    {&lt;br /&gt;
        state_entry()&lt;br /&gt;
        {&lt;br /&gt;
            llSetText(text,color,alpha);&lt;br /&gt;
            llRemoveInventory(llGetScriptName());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=47549</id>
		<title>User:Clarknova Helvetic</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Clarknova_Helvetic&amp;diff=47549"/>
		<updated>2008-01-06T23:49:55Z</updated>

		<summary type="html">&lt;p&gt;Clarknova Helvetic: pic.  stuff.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you were linked from the forums you&#039;re probably looking for [[User:Clarknova Helvetic/Clone Primitive  v2.0|Clone Primitive  v2.0]].&lt;br /&gt;
&lt;br /&gt;
== About Moi ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Snapshot Tornado.jpg|thumb|right|256px| Someone&#039;s got to clean up around here.]]&lt;br /&gt;
&lt;br /&gt;
I like to script and build and also ponies.&lt;br /&gt;
&lt;br /&gt;
Three days younger than [[User:Arcadia Asylum|Arcadia Asylum]].&lt;br /&gt;
&lt;br /&gt;
Started SL on 2006/23/10.  Soon stopped because I couldn&#039;t stand client crashes.  Came back a year later when I had a decent video card and found that everyone I&#039;d met.. this is their job now.&lt;br /&gt;
&lt;br /&gt;
I make and sell gidgets [http://slexchange.com/modules.php?name=Marketplace&amp;amp;MerchantID=91584| on SLX] and [http://slurl.com/secondlife/Valis/85/37/232| in-world].  About half are freebies.  &lt;br /&gt;
&lt;br /&gt;
One of my most popular items was my first real project: The Builder&#039;s Sky Platform.  There are about 2500 users with one in their inventory.  One of the features I would change now is that it drops a half-kilometer halo of particles when the user falls off.  I&#039;m really surprised no one (+1) has ever complained.  &lt;br /&gt;
&lt;br /&gt;
Personally, I&#039;d hang me for it.&lt;br /&gt;
&lt;br /&gt;
If you care you can usually find me at [http://slurl.com/secondlife/Combat%20(sandbox)%20Rausch/177/159/24| The Rausch], or at [http://slurl.com/secondlife/Valis/85/37/232| My Shop] in Valis. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scripting Widgets ==&lt;br /&gt;
&lt;br /&gt;
I drag &#039;n drop these scripts into objects when I need to know something about them, or to set a quick parameter.  They do their job then delete from object inventory.&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Say This &amp;amp; That Widgets|Say This &amp;amp; That Widgets]]&lt;br /&gt;
&lt;br /&gt;
[[User:Clarknova Helvetic/Set Param Widgets|Set Param Widgets]]&lt;/div&gt;</summary>
		<author><name>Clarknova Helvetic</name></author>
	</entry>
</feed>