Thanks to the OSGrid Forum for making the changes needed to make this excellent script work in Opensim.
IMPORTANT: This Script generates notecards when you are creating your package – and notecard generation is a “high” threat level function. You need to be on your own land when CREATING your package.

QUICK USE:

  • Drop the Base script in the Base.
    // Builders' Buddy 1.10 (Base Script)
    // by Newfie Pendragon, 2006-2008
    //
    // Script Purpose & Use
    // Functions are dependent on the "component script"
    //
    // QUICK USE:
    // - Drop this script in the Base.
    // - Drop the "Component" Script in each building part.
    // - Touch your Base, and choose RECORD
    // - Take all building parts into inventory
    // - Drag building parts from inventory into Base Prim
    // - Touch your base and choose BUILD
    //
    // OTHER COMMANDS from the Touch menu
    // - To reposition, move/rotate Base Prim choose POSITION
    // - To lock into position (removes scripts) choose DONE
    // - To delete building pieces: choose CLEAN
    ///////////////////////////////////////////////////////////////////////////////
    // This script is copyrighted material, and has a few (minor) restrictions.
    // For complete details, including a revision history, please see
    //  http://wiki.secondlife.com/wiki/Builders_Buddy
    ///////////////////////////////////////////////////////////////////////////////
    
    // Channel used by Base Prim to talk to Component Prims
    // This channel must be the same one in the component script
    // A negative channel is used because it elimited accidental activations
    // by an Avatar talking on obscure channels
    integer DefaultPRIMCHAN = -192567;     // Default channel to use
    //integer PRIMCHAN = DefaultPRIMCHAN;    // Channel used by Base Prim to talk to Component Prims;
    integer PRIMCHAN = -192567;  // OpenSim Modification - also comment out the previous line for OpenSim
                                           // ***THIS MUST MATCH IN BOTH SCRIPTS!***
    
    ///////////////////////////////////////////////////////////////////////////////
    // Variables for Positioninglimits within the sim
    //
    // Change these values if your using Megaregions or want to limit otherwise.
    float vDestPosXMIN = 0.0;
    float vDestPosXMAX = 1024.0;
    float vDestPosYMIN = 0.0;
    float vDestPosYMAX = 1024.0;
    float vDestPosZMAX = 10000.0;
    
    
    
    
    
    
    
    //The UUID of the creator of the object
    //Leave this as "" unless Opensim displays wrong name in object properties
    key creatorUUID = "";
    
    // Set to TRUE to allow group members to use the dialog menu
    // Set to FALSE to disallow group members from using the dialog menu
    integer ingroup = TRUE;
    
    // Set to TRUE to delete piece from inventory when rezzed
    // (WARNING) If set to FALSE, user will be able to rez multiple copies
    integer deleteOnRez = FALSE;
    
    // Allow non-creator to use CLEAN command?
    // (WARNING) If set to TRUE, it is recommended to set
    // deleteOnRez to FALSE, or user could lose entire building
    integer allowClean = TRUE;
    
    //When user selects CLEAN, delete the base prim too?
    integer dieOnClean = FALSE;
    
    // Set to TRUE to record piece's location based on sim
    // coordinates instead of relationship to base prim
    integer recordSimLocation = FALSE;
    
    // Set to TRUE to rez all building pieces before positioning,
    // or FALSE to do (slower?) one at a time
    integer bulkBuild = TRUE;
    
    //Set to FALSE if you dont want the script to say anything while 'working'
    integer chatty = TRUE;
    
    //How long to listen for a menu response before shutting down the listener
    float fListenTime = 30.0;
    
    //How often (in seconds) to perform any timed checks
    float fTimerRate = 0.25;
    
    //How long to sit still before exiting active mode
    float fStoppedTime = 30.0;
    
    //Opensim sometimes blocks rezzing to prevent "gray goo" attacks
    //How long we wait (seconds) before we assume Opensim blocked our rez attempt
    integer iRezWait = 10;
    
    //Specify which Menu Options will be displayed
    //FALSE will restrict full options to creator
    //TRUE will offer full options to anyone
    integer fullOptions = FALSE;
    
    //Set to TRUE if you want ShapeGen channel support
    // (Last 4 digits of channel affected)
    integer SGCompatible = FALSE;
    
    
    ///////////////////////////////////////////////////////////////////////////////
    //Part of KEYPAD CODE BY Andromeda Quonset....More added below in seevral places
    list Menu2 = [ "-", "0","enter","7","8","9","4","5","6","1","2","3"];
    string Input = "";
    string Sign = "+";
    string SignInput = " ";
    string Caption = "Enter a number, include any leading 0's: ";
    
    ///////////////////////////////////////////////////////////////////////////////
    // DO NOT EDIT BELOW THIS LINE.... NO.. NOT EVEN THEN
    ///////////////////////////////////////////////////////////////////////////////
    
    //Name each option-these names will be your button names.
    string optRecord = "Record";
    string optReset = "Reset";
    string optBuild = "Build";
    string optPos = "Position";
    string optClean = "Clean";
    string optDone = "Done";
    string optChannel = "Channel";
    
    //Menu option descriptions
    string descRecord = ": Record the position of all parts\n";
    string descReset = ": Forgets the position of all parts\n";
    string descBuild = ": Rez inv. items and position them\n";
    string descPos = ": Reposition the parts to a new location\n";
    string descClean = ": De-Rez all pieces\n";
    string descDone = ": Remove all BB scripts and freeze parts in place.\n";
    string descChannel = ": Change Channel used on base and parts.\n";
    
    integer MENU_CHANNEL;
    integer MENU2_CHANNEL;
    integer MENU_HANDLE;
    integer MENU2_HANDLE;
    key agent;
    key objectowner;
    integer group;
    string title = "";
    list optionlist = [];
    integer bMoving;
    vector vLastPos;
    rotation rLastRot;
    integer bRezzing;
    integer iListenTimeout = 0;
    integer iLastRez = 0;
    integer iRezIndex;
    
    
    InvertSign()
    {
        if(Sign == "+")
            Sign = "-";
        else
            Sign = "+";
    }
    
    //To avoid flooding the sim with a high rate of movements
    //(and the resulting mass updates it will bring), we used
    // a short throttle to limit ourselves
    announce_moved()
    {
        llRegionSay(PRIMCHAN, "MOVE " + llDumpList2String([ llGetPos(), llGetRot() ], "|"));
        llResetTime();        //Reset our throttle
        vLastPos = llGetPos();
        rLastRot = llGetRot();
        return;
    }
    
    
    rez_object()
    {
        //Rez the object indicated by iRezIndex
        llRezObject(llGetInventoryName(INVENTORY_OBJECT, iRezIndex), llGetPos(), ZERO_VECTOR, llGetRot(), PRIMCHAN);
        iLastRez = llGetUnixTime();
        llSleep(2);
    
        if(!bRezzing) {
            bRezzing = TRUE;
            //timer_on();
        }
        llSay(PRIMCHAN, "SET_LIMITS " + (string)vDestPosXMIN + " " + (string)vDestPosXMAX + " " + (string)vDestPosYMIN + " " + (string)vDestPosYMAX + " " + (string)vDestPosZMAX );
    }
    
    post_rez_object()
    {
        if ( creatorUUID != llGetOwner() ) {
            if(deleteOnRez) llRemoveInventory(llGetInventoryName(INVENTORY_OBJECT, iRezIndex));
        }
    }
    
    heard(integer channel, string name, key id, string message)
    {
        if( channel == PRIMCHAN ) {
            if( message == "READYTOPOS" ) {
                //New prim ready to be positioned
                vector vThisPos = llGetPos();
                rotation rThisRot = llGetRot();
                llRegionSay(PRIMCHAN, "MOVESINGLE " + llDumpList2String([ vThisPos, rThisRot ], "|"));
    
            } else if( message == "ATDEST" ) {
                //Rez the next in the sequence (if any)
                iRezIndex--;
                if(iRezIndex >= 0) {
                    //Attempt to rez it
                    rez_object();
                } else {
                    //We are done building, reset our listeners
                    iLastRez = 0;
                    bRezzing = FALSE;
                    state reset_listeners;
                }
            }
            return;
    
        } else if( channel == MENU_CHANNEL ) {   //Process input from original menu
            if ( message == optRecord ) {
                PRIMCHAN = DefaultPRIMCHAN;
                llOwnerSay("Recording positions...");
                if(recordSimLocation) {
                    //Location in sim
                    llRegionSay(PRIMCHAN, "RECORDABS " + llDumpList2String([ llGetPos(), llGetRot() ], "|"));
                } else {
                    //Location relative to base
                    llRegionSay(PRIMCHAN, "RECORD " + llDumpList2String([ llGetPos(), llGetRot() ], "|"));
                }
                return;
            }
            if( message == optReset ) {
                llOwnerSay("Forgetting positions...");
                llShout(PRIMCHAN, "RESET");
                return;
            }
            if ( message == optBuild ) {
                if(chatty) llOwnerSay("Rezzing build pieces...");
    
                //If rezzing/positioning one at a time, we need
                // to listen for when they've reached their dest
                if(!bulkBuild) {
                    llListen(PRIMCHAN, "", NULL_KEY, "READYTOPOS");
                    llListen(PRIMCHAN, "", NULL_KEY, "ATDEST");
                }
    
                //Start rezzing, last piece first
                iRezIndex = llGetInventoryNumber(INVENTORY_OBJECT) - 1;
                rez_object();
                return;
            }
            if ( message == optPos ) {
                if(chatty) llOwnerSay("Positioning");
                vector vThisPos = llGetPos();
                rotation rThisRot = llGetRot();
                llRegionSay(PRIMCHAN, "MOVE " + llDumpList2String([ vThisPos, rThisRot ], "|"));
                return;
            }
            if ( message == optClean ) {
                llRegionSay(PRIMCHAN, "CLEAN");
                if(dieOnClean) llDie();
                return;
            }
            if ( message == optDone ) {
                llRegionSay(PRIMCHAN, "DONE");
                if(chatty) llOwnerSay("Removing Builder's Buddy scripts.");
                return;
            }
            if ( message == optChannel ) {
                Sign = "+"; //default is a positive number
                Input = "";
                llDialog( agent, Caption, Menu2, MENU2_CHANNEL );
            }
    
        } else if ( channel == MENU2_CHANNEL ) {    //process input from MENU2
            // if a valid choice was made, implement that choice if possible.
            // (llListFindList returns -1 if Choice is not in the menu list.)
            if ( llListFindList( Menu2, [ message ]) != -1 ) {
                if( llListFindList(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], [message]) != -1) {
                    Input += message;
                    SignInput = Sign + Input;
                    llDialog( agent, Caption + SignInput, Menu2, MENU2_CHANNEL );
    
                } else if( message == "-" ) {
                    InvertSign();
                    SignInput = Sign + Input;
                    llDialog( agent, Caption + SignInput, Menu2, MENU2_CHANNEL );
    
                } else if( message == "enter" ) {     //terminate input from menu2
                    string CalcChan = Input;
    
                    //Apply ShapeGen compatibility?
                    if(SGCompatible) {
                        //new assign channel number, forcing last 4 digits to 0000
                        integer ChanSize = llStringLength(Input); //determine number of digits (chars)
                        if(ChanSize > 5) {
                            CalcChan = llGetSubString(Input, 0, 4);    //Shorten to 5 digits
                        }
                        CalcChan += "0000"; //append 0000
                        if(Sign == "-")
                            CalcChan = Sign + CalcChan;
                    }
                    PRIMCHAN = (integer)CalcChan; //assign channel number
                    llOwnerSay("Channel set to " + (string)PRIMCHAN + ".");
                }
    
            } else {
                llDialog( agent, Caption, Menu2, MENU2_CHANNEL );
            }
        }
    }
    
    
    ///////////////////////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////////////////////////
    default {
        ///////////////////////////////////////////////////////////////////////////////
        changed(integer change) {
            if(change & CHANGED_OWNER)
            llResetScript();
        }
    
        ///////////////////////////////////////////////////////////////////////////////
        state_entry () {
            //Determine the creator UUID
            if(creatorUUID == "") creatorUUID = llGetCreator();
    
            //Use which menu?
            if (creatorUUID == llGetOwner() || fullOptions) {
                //Display all options
                optionlist = [optPos, optClean, optDone, optRecord, optReset, optBuild, optChannel];
                title = optRecord + descRecord;
                title += optReset + descReset;
                title += optBuild + descBuild;
                title += optPos + descPos;
                title += optClean + descClean;
                title += optDone + descDone;
                title += optChannel + descChannel;
    
            } else {
                //Display limited options
                if(allowClean) {
                    optionlist = [optBuild, optPos, optClean, optDone];
                    title = optBuild + descBuild;
                    title += optPos + descPos;
                    title += optClean + descClean;
                    title += optDone + descDone;
                } else {
                    optionlist = [optBuild, optPos, optDone];
                    title = optBuild + descBuild;
                    title += optPos + descPos;
                    title += optDone + descDone;
                }
            }
    
            //Record our position
            vLastPos = llGetPos();
            rLastRot = llGetRot();
    
            llSetTimerEvent(fTimerRate);
        }
    
        ///////////////////////////////////////////////////////////////////////////////
        touch_start (integer total_number) {
            group = llDetectedGroup(0); // Is the Agent in the objowners group?
            agent = llDetectedKey(0); // Agent's key
            objectowner = llGetOwner(); // objowners key
            // is the Agent = the owner OR is the agent in the owners group
            if ( (objectowner == agent) || ( group && ingroup )  )  {
                iListenTimeout = llGetUnixTime() + llFloor(fListenTime);
                MENU_CHANNEL = llFloor(llFrand(-99999.0 - -100));
                MENU2_CHANNEL = MENU_CHANNEL + 1;
                MENU_HANDLE = llListen(MENU_CHANNEL,"","","");
                MENU2_HANDLE = llListen(MENU2_CHANNEL,"","","");
                if ( creatorUUID == llGetOwner() || fullOptions) {
                    llDialog(agent,title + "Now on Channel " + (string)PRIMCHAN, optionlist, MENU_CHANNEL); //display channel number if authorized
                } else {
                    llDialog(agent, title, optionlist, MENU_CHANNEL);
                }
                //timer_on();
            }
        }
    
        ///////////////////////////////////////////////////////////////////////////////
        listen(integer channel, string name, key id, string message) {
            heard(channel, name, id, message);
            return;
        }
    
        ///////////////////////////////////////////////////////////////////////////////
        moving_start()
        {
            if( !bMoving )
            {
                bMoving = TRUE;
                //timer_on();
                announce_moved();
            }
        }
    
        ///////////////////////////////////////////////////////////////////////////////
        object_rez(key id) {
            //The object rezzed, perform any post-rez processing
            post_rez_object();
    
            //Rezzing it all before moving?
            if(bulkBuild) {
                //Move on to the next object
                //Loop through backwards (safety precaution in case of inventory change)
                iRezIndex--;
                if(iRezIndex >= 0) {
                    //Attempt to rez it
                    rez_object();
    
                } else {
                    //Rezzing complete, now positioning
                    iLastRez = 0;
                    bRezzing = FALSE;
                    if(chatty) llOwnerSay("Positioning");
                    llRegionSay(PRIMCHAN, "MOVE " + llDumpList2String([ llGetPos(), llGetRot() ], "|"));
                }
            }
        }
    
        ///////////////////////////////////////////////////////////////////////////////
        timer() {
            //Did we change position/rotation?
            if( (llGetRot() != rLastRot) || (llGetPos() != vLastPos) )
            {
                if( llGetTime() > fTimerRate ) {
                    announce_moved();
                }
            }
    
            //Are we rezzing?
            if(bRezzing) {
                //Did the last one take too long?
                if((llGetUnixTime() - iLastRez) >= iRezWait) {
                    //Yes, retry it
                    if(chatty) llOwnerSay("Reattempting rez of most recent piece");
                    rez_object();
                }
            }
    
            //Open listener?
            if( iListenTimeout != 0 )
            {
                //Past our close timeout?
                if( iListenTimeout <= llGetUnixTime() )
                {
                    iListenTimeout = 0;
                    llListenRemove(MENU_HANDLE);
                }
            }
        }
    
        ///////////////////////////////////////////////////////////////////////////////
        on_rez(integer iStart)
        {
            //Reset ourselves
            llResetScript();
        }
    }
    
    
    //////////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////
    state reset_listeners
    {
        //////////////////////////////////////////////////////////////////////////////////////////
        state_entry()
        {
            state default;
        }
    }<span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1">​</span><span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1">​</span>

     

  • Drop the “Component” Script in each building part.
    // Builders' Buddy 1.10 (Component Script)
    // by Newfie Pendragon, 2006-2008
    //
    // Script Purpose & Use
    // Functions are dependent on the "component script"
    //
    // QUICK USE:
    // - Drop this script in the Base.
    // - Drop the "Component" Script in each building part.
    // - Touch your Base, and choose RECORD
    // - Take all building parts into inventory
    // - Drag building parts from inventory into Base Prim
    // - Touch your base and choose BUILD
    //
    // OTHER COMMANDS from the Touch menu
    // - To reposition, move/rotate Base Prim choose POSITION
    // - To lock into position (removes scripts) choose DONE
    // - To delete building pieces: choose CLEAN
    ///////////////////////////////////////////////////////////////////////////////
    // This script is copyrighted material, and has a few (minor) restrictions.
    // For complete details, including a revision history, please see
    //  http://wiki.secondlife.com/wiki/Builders_Buddy
    ///////////////////////////////////////////////////////////////////////////////
    
    ///////////////////////////////////////////////////////////////////////////////
    // Added a Memory datastorage for opensim using osMakeNotecard
    ///////////////////////////////////////////////////////////////////////////////
    
    
    //////////////////////////////////////////////////////////////////////////////////////////
    // Configurable Settings
    float fTimerInterval = 0.25;        // Time in seconds between movement 'ticks'
    integer DefaultChannel = -192567; // Andromeda Quonset's default channel
    //integer PRIMCHAN = DefaultChannel;  // Channel used by Base Prim to talk to Component Prims;
    integer PRIMCHAN = -192567;  // OpenSim Modification - also comment out the previous line for OpenSim
                                        // ***THIS MUST MATCH IN BOTH SCRIPTS!***
    
    //////////////////////////////////////////////////////////////////////////////////////////
    // Runtime Variables (Dont need to change below here unless making a derivative)
    vector vOffset;
    rotation rRotation;
    integer bNeedMove;
    vector vDestPos;
    rotation rDestRot;
    integer bMovingSingle = FALSE;
    integer bAbsolute = FALSE;
    integer bRecorded = FALSE;
    
    
    list record_mem = []; // Memory to be stored
    key g_quary_nc;  //for reading our memory notecard
    integer nc_line;  //what line are we reading
    integer iStartValue;
    
    //////////////////////////////////////////////////////////////////////////////////////////
    // Variables for Positioninglimits within the sim
    float vDestPosXMIN = 0.0;
    float vDestPosXMAX = 256.0;
    float vDestPosYMIN = 0.0;
    float vDestPosYMAX = 256.0;
    float vDestPosZMAX = 10000.0;
    
    
    ////////////////////////////////////////////////////////////////////////////////
    string first_word(string In_String, string Token)
    {
        //This routine searches for the first word in a string,
        // and returns it.  If no word boundary found, returns
        // the whole string.
        if(Token == "") Token = " ";
        integer pos = llSubStringIndex(In_String, Token);
    
        //Found it?
        if( pos >= 1 )
            return llGetSubString(In_String, 0, pos - 1);
        else
            return In_String;
    }
    
    ////////////////////////////////////////////////////////////////////////////////
    string other_words(string In_String, string Token)
    {
        //This routine searches for the other-than-first words in a string,
        // and returns it. If no word boundary found, returns
        // an empty string.
        if( Token == "" ) Token = " ";
    
        integer pos = llSubStringIndex(In_String, Token);
    
        //Found it?
        if( pos >= 1 )
            return llGetSubString(In_String, pos + 1, llStringLength(In_String));
        else
            return "";
    }
    
    ////////////////////////////////////////////////////////////////////////////////
    do_move()
    {
        integer i = 0;
        vector vLastPos = ZERO_VECTOR;
        while( (i < 5) && (llGetPos() != vDestPos) )
        {
            list lParams = [];
    
            //If we're not there....
            if( llGetPos() != vDestPos )
            {
                //We may be stuck on the ground...
                //Did we move at all compared to last loop?
                if( llGetPos() == vLastPos )
                {
                    //Yep, stuck...move straight up 10m (attempt to dislodge)
                    lParams = [ PRIM_POSITION, llGetPos() + <0, 0, 10.0> ];
                    //llSetPos(llGetPos() + <0, 0, 10.0>);
                } else {
                    //Record our spot for 'stuck' detection
                    vLastPos = llGetPos();
                }
            }
    
            //Try to move to destination
            //Upgraded to attempt to use the llSetPrimitiveParams fast-move hack
            //(Newfie, June 2006)
            integer iHops = llAbs(llCeil(llVecDist(llGetPos(), vDestPos) / 10.0));
            integer x;
            for( x = 0; x < iHops; x++ ) {
                lParams += [ PRIM_POSITION, vDestPos ];
            }
            llSetPrimitiveParams(lParams);
            //llSleep(0.1);
            i++;
        }
    
        //Set rotation
        llSetRot(rDestRot);
    }
    
    start_move(string sText, key kID)
    {
        //Don't move if we've not yet recorded a position
        if( !bRecorded ) return;
    
        //Also ignore commands from bases with a different owner than us
        //(Anti-hacking measure)
        if( llGetOwner() != llGetOwnerKey(kID) ) return;
    
        //Calculate our destination position relative to base?
        if(!bAbsolute) {
            //Relative position
            //Calculate our destination position
            sText = other_words(sText, " ");
            list lParams = llParseString2List(sText, [ "|" ], []);
            vector vBase = (vector)llList2String(lParams, 0);
            rotation rBase = (rotation)llList2String(lParams, 1);
    
            vDestPos = (vOffset * rBase) + vBase;
            rDestRot = rRotation * rBase;
        } else {
            //Sim position
            vDestPos = vOffset;
            rDestRot = rRotation;
        }
    
        //Make sure our calculated position is within the sim
        if(vDestPos.x < vDestPosXMIN) vDestPos.x = vDestPosXMIN;
        if(vDestPos.x > vDestPosXMAX) vDestPos.x = vDestPosXMAX;
        if(vDestPos.y < vDestPosYMIN) vDestPos.y = vDestPosYMIN;
        if(vDestPos.y > vDestPosYMAX) vDestPos.y = vDestPosYMAX;
        if(vDestPos.z > vDestPosZMAX) vDestPos.z = vDestPosZMAX;
    
    
        //Turn on our timer to perform the move?
        if( !bNeedMove )
        {
            llSetTimerEvent(fTimerInterval);
            bNeedMove = TRUE;
        }
        return;
    }
    
    //////////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////
    default
    {
        //////////////////////////////////////////////////////////////////////////////////////////
        state_entry()
        {
            //Open up the listener
            llListen(PRIMCHAN, "", NULL_KEY, "");
            llRegionSay(PRIMCHAN, "READYTOPOS");
        }
    
        //////////////////////////////////////////////////////////////////////////////////////////
        on_rez(integer iStart)
        {
            iStartValue = iStart;
            if(llGetInventoryType("Builders Buddy Memory") != -1)
            {
                nc_line = 0;
                g_quary_nc = llGetNotecardLine("Builders Buddy Memory", nc_line);
            }
            else
            {
                //Set the channel to what's specified
                if( iStart != 0 )
                {
                    PRIMCHAN = iStart;
                    state reset_listeners;
                }
            }
        }
    
        //////////////////////////////////////////////////////////////////////////////////////////
        listen(integer iChan, string sName, key kID, string sText)
        {
            string sCmd = llToUpper(first_word(sText, " "));
    
            if( sCmd == "SET_LIMITS" )
            {
                list lParams = llParseString2List(sText, [ " " ], []);
                
                vDestPosXMIN = llList2Float(lParams, 1);
                vDestPosXMAX = llList2Float(lParams, 2);
                vDestPosYMIN = llList2Float(lParams, 3);
                vDestPosYMAX = llList2Float(lParams, 4);
                vDestPosZMAX = llList2Float(lParams, 5);        
            
            }   
            else if( sCmd == "RECORD" )
            {
                record_mem = [];
                
                //Record position relative to base prim
                sText = other_words(sText, " ");
                list lParams = llParseString2List(sText, [ "|" ], []);
                vector vBase = (vector)llList2String(lParams, 0);
                rotation rBase = (rotation)llList2String(lParams, 1);
    
                vOffset = (llGetPos() - vBase) / rBase;
                    record_mem += "vOffset|" +(string)vOffset ;
                rRotation = llGetRot() / rBase;
                    record_mem += "rRotation|" +(string)rRotation ;
                bAbsolute = FALSE;
                    record_mem += "bAbsolute|" +(string)bAbsolute ;
                bRecorded = TRUE;
                    record_mem += "bRecorded|" +(string)bRecorded ;
                
                if(llGetInventoryType("Builders Buddy Memory") != -1)
                {
                    llRemoveInventory("Builders Buddy Memory");
                }
                osMakeNotecard( "Builders Buddy Memory", record_mem );
                
                
                llOwnerSay("Recorded position.");
                return;
            }
    
            if( sCmd == "RECORDABS" )
            {
                record_mem = [];
                //Record absolute position
                rRotation = llGetRot();
                    record_mem += "rRotation|" +(string)rRotation ;
                vOffset = llGetPos();
                    record_mem += "vOffset|" +(string)vOffset ;
                bAbsolute = TRUE;
                    record_mem += "bAbsolute|" +(string)bAbsolute ;
                bRecorded = TRUE;
                    record_mem += "bRecorded|" +(string)bRecorded ;
                    
                if(llGetInventoryType("Builders Buddy Memory") != -1)
                {
                    llRemoveInventory("Builders Buddy Memory");
                }
                osMakeNotecard( "Builders Buddy Memory", record_mem );                
                
                llOwnerSay("Recorded sim position.");
                return;
            }
    
            //////////////////////////////////////////////////////////////////////////////////////////
            if( sCmd == "MOVE" )
            {
                start_move(sText, kID);
                return;
            }
    
            if( sCmd == "MOVESINGLE" )
            {
                //If we haven't gotten this before, position ourselves
                if(!bMovingSingle) {
                    //Record that we are a single-prim move
                    bMovingSingle = TRUE;
    
                    //Now move it
                    start_move(sText, kID);
                    return;
                }
            }
    
            //////////////////////////////////////////////////////////////////////////////////////////
            if( sCmd == "DONE" )
            {
                //We are done, remove script
                if(llGetInventoryType("Builders Buddy Memory") != -1)
                {
                    llRemoveInventory("Builders Buddy Memory");
                }
                llRemoveInventory(llGetScriptName());
                return;
            }
    
            //////////////////////////////////////////////////////////////////////////////////////////
            if( sCmd == "CLEAN" )
            {
                //Clean up
                llDie();
                return;
            }
    
            //////////////////////////////////////////////////////////////////////////////////////////
            if( sCmd == "RESET" )
            {
                llResetScript();
            }
        }
    
        //////////////////////////////////////////////////////////////////////////////////////////
        timer()
        {
            //Turn ourselves off
            llSetTimerEvent(0.0);
    
            //Do we need to move?
            if( bNeedMove )
            {
                //Perform the move and clean up
                do_move();
    
                //If single-prim move, announce to base we're done
                if(bMovingSingle) {
                    llRegionSay(PRIMCHAN, "ATDEST");
                }
    
                //Done moving
                bNeedMove = FALSE;
            }
            return;
        }
        dataserver(key queryid, string data)
        {
            if ( queryid == g_quary_nc)
            {
                if (data != EOF)
                {
                    list n = llParseString2List(data, ["|"], []);
                    
                    if(llList2String(n, 0) == "vOffset")
                    {
                        vOffset = llList2Vector(n, 1);
                    }
                    else if(llList2String(n, 0) == "rRotation")
                    {
                        rRotation = llList2Rot(n, 1);
                    }
                    else if(llList2String(n, 0) == "bAbsolute")
                    {
                        bAbsolute = (integer)llList2String(n, 1);
                    }
                    else if(llList2String(n, 0) == "bRecorded")
                    {
                        bRecorded = (integer)llList2String(n, 1);
                    }
                    nc_line++;
                    g_quary_nc = llGetNotecardLine("Builders Buddy Memory", nc_line);
                }
                else
                {
                    //Set the channel to what's specified
                    if( iStartValue != 0 )
                    {
                        PRIMCHAN = iStartValue;
                        state reset_listeners;
                    }
                }
            }
        }
    }
    
    
    //////////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////
    state reset_listeners
    {
        //////////////////////////////////////////////////////////////////////////////////////////
        state_entry()
        {
            state default;
        }
    }
  • Touch your Base, and choose RECORD
  • Take all building parts into inventory
  • Drag building parts from inventory into Base Prim
  • Touch your base and choose BUILD

OTHER COMMANDS from the Touch menu:

  • To reposition, move/rotate Base Prim choose POSITION
  • To lock into position (removes scripts) choose DONE
  • To delete building pieces: choose CLEAN

DETAILED INSTRUCTIONS:

01. Definitions

For the sake of this help, we refer to the base unit as the “Packing Box”, and the set of unlinked items as the “Set.”

02. Preparing Your Prims to Work with Builder’s Buddy

Note: please ensure first that you are on land you own, and where you are allowed to run scripts, or this will not work.

  1. Make a prim. Any size, any shape, and you can decorate later how you wish.
    This is now what we are going to refer to as the “Packing Box.” Occasionally, elsewhere, you will see it referred to as the “base unit.”
    All rotations for “Packing Box” should be set to 0, or all bets are off for how the objects rezzed out of it later will come out :} [1]
    Drop the base script into it.
  2. Rez in-world the set of prims you wish to be working with, if they are not already. As we are preparing them for distribution, now is the time to check that all of the permissions on them are what you like.
    TIP  –  In the steps below, you are going to do something to these items, then take them back into inventory. Remember that items rezzed in-world in Opensim, once taken *back* into inventory, tend to want to go back into the folder you rezzed them from. See the potential problem? You could end up with identically named items in that folder, the unprepared objects and the prepared objects, with no way to tell the difference. Consequently, you may wish to make sure in advance that once you have rezzed the items in-world from a folder, that in your inventory you then drag the originals off to another folder, so the coast will be clear for the incoming prepared ones. This can be particularly important if like most builders you leave each piece with the remarkably unique name of “Object”.
  3. Place the Component script into the content folder [2] of each piece or set of linked pieces of your build or set. To clarify, if you have several prims linked together (a “linked” set), just one of those prims (the “root” prim, which is the one you see by default when you edit a linked set, anyway) needs a Component script in it. If a prim is a standalone prim, it needs its own Component script.
  4. Check your work. Did every piece or set of linked pieces get a Component script? Okay, then proceed.
  5. Unless you have logistical reasons not to, we recommend now moving the Packing Box into roughly the centre of the Set. See footnote [3] at the end.
  6. Click on the Packing Box (the prim you dropped the base script into earlier.) A blue menu will appear on your screen.
  7. Press the RECORD button; the base Packing Box then records the locations of the prims or primsets that have a component script in them. With many pieces in a build, it can be very easy to forget to add component scripts into a piece or two. To help check that you haven’t, after you have recorded the positions, go into edit mode on the Packing Box and move it up a bit. If everything follows as expected, then you are set. If not, from the Opensim client menu overhead, go EDIT – UNDO to have the Packing Box go back to where it was a second ago. Add a component script to the bits that didn’t move. Record the positions again, then proceed.
  8. Leave the base Packing Box out, but take back into inventory all of the pieces that have Component scripts in them. It doesn’t matter whether you take them in one by one, or whether you grab them all at once using TAKE from the Opensim client overhead menu to take them as a compound object.
  9. The items are now in your inventory, and if you noted the advice in Step 2 above, you know exactly where they are in your inventory. Now, edit the Packing Box, switch to its contents folder, and drag all these prepared items into it.
  10. Rename the Packing Box prim to a more helpful name than Object, if you haven’t already.
  11. Try rezzing the set from the Packing Box, as described below in Section 03.

03. Using Builder’s Buddy

Editing the packing box, and using the position arrows in edit mode, will cause the entire Set to move around with the Packing Box. Occasionally, if you are in a very laggy sim, or Opensim is having some kind of problem, when rezzing a build out of the Packing Box you may have to click on the Packing Box to get the menu, and click the POSITION button to get everything to pop into place. If that still doesn’t do the trick, click on the CLEAN button, and then the BUILD button to try again.

TIP! Occasionally, you may put all the prepared component pieces into the Packing Box, and run a test rez only to find that you’re missing a piece of a house or furniture set that you meant to include. Don’t despair; after all, that’s what test runs are for!

Do the following:

  1. rez the set as it is out of the Packing Box;
  2. position the missing piece into place, where it should have gone;
  3. add a component script to that missing piece;
  4. record;
  5. take just that missing piece into your inventory (make sure perms are right!);
  6. place just that missing piece into the Packing Box

Note: that’s right, just the missing piece — no need to replace everything else.

04. Fine-Tuning the Behavior

Inside the Base script, at the top of it, are some parameters that you can set.
Full help comments are provided in the script above each parameter.
Please see these if you wish to change various aspects of how Buddy’s Builder operates for you.
Here, though, is expanded help on a few items:

  1. “dieOnClean” – If you choose to use a piece of your build as the base component (which is fine), you will want to ensure that the “dieOnClean” to parameter is set to FALSE, or you risk deleting the piece during when any CLEAN command is issued.
  2. “creatorUUID” variable – You only need to fill this in if you are not the creator of the main root prim of your object.
    Builder’s Buddy checks the creator of the main root prim of your object to ensure that it can correctly determine which menu to show to whom. The creator gets the expanded menu; end users get the simpler menu that they need. Normally, the creator of the packaged object has also made its root prim. Occasionally, though, you may use prims other than those made by your own hand — for instance, if you use megaprims. In this case, you can make sure you still get the expanded menu by specifying your UUID.
  3. “chatty” variable – If you want the Builder’s Buddy to be less “chatty” while working away, you can change this via this script variable.  By default, it is set to: integer chatty = TRUE. To make Builder’s Buddy quieter, you would change this to: integer chatty = FALSE.  Bear in mind, though, that only the owner of the Packing Box can hear the messages, because the OSSL script uses “llOwnerSay” versus “Say”.
    So, even though group members by default can use the menu on the Packing Box (because by default integer ingroup = TRUE ), those group members won’t hear any confirmation messages unless they are the owner.

05. Buttons and Their Uses

  • CHANNEL: The Packing Box and the Set pieces need a “channel” that they use to talk to each other. If you have several Packing Boxes, or several Sets, rezzed out and on the go all at once, you’ll definitely want to make sure that each Packing Box / Set combination has its own unique channel to talk on, or the wrong Set might end up listening to the wrong Packing Box, and disaster could result! You could end up, for instance, issuing a CLEAN (delete) command that the only copy you have on a build might here!
  • RECORD: This memorizes the locations of the linksets you have dropped Component scripts into;
  • RESET: This “un-memorizes” the locations of the linksets you have dropped Component scripts into — that is to say, it undoes any recording;
  • BUILD: This will rez your set of prepared, unlinked items, putting them all in the right place in relation both to each other, and in relation to the Packing Box.
  • POSITION: There may be times when the Set of objects doesn’t respond to being moved by simply moving the Packing Box with the arrows (covered further below in point 4 of 11. USING BUILDER’S BUDDY) — owing to lag, or no-script zones, etc. The POSITION command can be used to force the Set to try again.
  • CLEAN: This will derez the items you just rezzed using BUILD. This is done using the llDie() command. This means these items are gone, bye-bye, gonzo — you won’t even see them in your Lost and Found, or Trash.
  • DONE: Removes the Component scripts from the linksets, leaving them where they are “permanently.” (Removing all the scripts helps to reduce work on the sim server.)
  • MOVE: Moves and rotates your set of unlinked items in relation to the Packing Box’s height and rotation (e.g. your Packing Box will stay where it is; the build pieces will move.)

06. Other Notes:

  1. Position of set from Packing Box
    If you had the Packing Box 5 metres in the air when you hit the RECORD button, then all the pieces of your Set will remember their position in relation to the box. Bearing that in mind, it therefore would not be a good idea to place the Packing Box on the ground and hit the BUILD button, because some pieces — say, a floor — might then end up 5 metres *under* the ground and be a headache for all concerned. So, tell purchasers of your Packing Box how high up or how low to place the Packing Box before hitting the BUILD button.
    If you have indeed placed the Packing Box in the centre of your build before hitting the RECORD button, then advise purchasers that the build will rez using the Packing Box as the approximate centre.
  2. Not getting a Menu on the Packing Box
    Check that scripts are enabled for you where you are;
    Check that the default click behaviour on the Packing Box hasn’t been changed to Pay, etc.
    Edit the Packing Box, go to the contents folder, open up the Base Script, and check that it is set to running.
    If you copied the scripts yourself directly from the wiki on the web, ensure that no funny spaces or bad breaks come in with the text, as it often does from web pages;
  3. There is no issue per se using megaprims, though normal constraints re sim boundaries, unsocial neighbours who deny building rights, etc :} still apply. However, if a megaprim is used as your base object, you may need to set the “creatorUUID” variable (08. FINE-TUNING THE BEHAVIOUR above) to your creator’s UUID.
  4. There is no issue with Buddy’s Builder rezzing part of a build — e.g. a foundation, a basement, etc, below ground level, if that is what you want.
  5. Underground: When the linksets are moved/positioned, Opensim uses the coordinates of the root prim to move everything else with it.
    When you move a root prim by hand, you can to some extent ram it under the ground (as you no doubt remember from your early days in Opensim.)
    However, when a root prim is moved by script, script cannot move that room underground. Attempts to do so will fail silently.
    Child prims linked to it, though, *can* go underground, so long as the root prim’s centrepoint remains aboveground.
    Bear this in mind if, for instance, you are planning to rez a house with a foundation, or basement.
  6. Two different Menus:  There are two different menus: one full menu for the creator of the Packing Box, and one with fewer options for the customer.
  7. What memorizes the positions of all the bits to be rezzed — the Packing Box, or the bits themselves?
    Each “bit” remembers its own position, independent of the Packing Box and independent of its fellow bits.
    For instance, with pieces from an already recorded set, you can:

    1. make a fresh, new Packing Box;
    2. drop a fresh, new base script into it;
    3. load the previously prepared component pieces into it….
      and it will all still work!
  8. Naming component pieces:  Builder’s Buddy does not require all the prims in a build to have unique names. That being said, many feel it is good practice to have some kind of a naming system for the objects in your build so that they are not all named “object” or “block” or whatever. Otherwise, when you add them to the Packing Box, the Opensim system will just arbitrarily name them all Object, Object 1, Object 2, etc, and they will then not have the same name as those pieces in your inventory.  Depending on what your build is, you may have more than one naming convention. At the very least, when you manually add the component script to the component objects, consider naming the objects numerically yourself such as Object 01, Object 02, etc. That way, you have some idea of how many objects are in the build, and by going 01, 02, you know the numbers weren’t just system-assigned ones. You can also count them easier from inside your inventory. When a build command doesn’t work right, you can look back at your history and see which object by number didn’t respond to the base prim when you did the record command.

07. Footnotes:

  1. Rotation – It is only the rotation of the Packing Box that you have to be concerned with. The rotation of the prims, or linked sets of prims, that you will be rezzing *doesn’t* matter. Their rotations are part of the data that Builder’s Buddy records, and deals with.
  2. Finding the Content Folder of an Item – Right-click the item in question (it must be rezzed in-world.) From the round pie menu, choose edit. The modal properties window will appear. Look on the right hand side for a button that says either “More>>” or “Less>>”. If the blue button says “More>>”, please click it. It will now say “Less>>”. If it already says less, you are already ready for the next step.
    For the next step, look for the folder tab called “Content”. Click on this tab, please. You are now in the Content area of the item. To put items in here, locate them in your inventory, and drag them from your inventory and *drop* then into the Content folder. In a second or two, they will appear there. If Opensim is not behaving at the time, it may take a few more seconds.
    To leave edit mode, locate the x in the upper-right hand corner of this editing properties window. Click it.
  3. Distance of Set pieces from Packing Box – In one way, there is no distance limit, with the simple proviso that all the prims must be in the same sim as the base. The base uses “region say” to communicate with them, meaning that its directions will be heard any anything listening for them within that region (aka sim.)
    However, the linden script command to rez something can only rez something at a maximum distance of 96 metres from the item doing the rezzing. Note, however, that this is “in all directions”, so the rezzer can rez something a maximum distance of 96 metres to the left, and 96 metres to the right — ergo, a total distance, if the rezzer is in the middle, of 192 metres, which is not bad going. If you also place the box, say, 96 metres in the air, then you can rez pieces 96 metres up, 96 metres down, and 96 metres to either side, right and left (bear in mind that you probably want to be higher than 96 metres in the air; ground level is rarely actually bang on “0” in most sims.)
    Consequently, when first setting out the Packing Box, and before pressing the RECORD button, it’s good practice to place the Packing Box in the *middle* of the build, unless there are other prevailing reasons to place it elsewhere.

08. Using Builder’s Buddy – Customer Help

Note: the following directions for usage are written in such a way that you can supply them just as they are written below to users / purchasers of your products, or, of course, modify them to make them more relevant to your product.
– – – – – – – – – – – – – – – – – – –
Packing Box refers to the prim object you received for your purchase. “Set” refers to the items that will be rezzed out of it.
[Note: please ensure first that you are on land where you are allowed to run scripts, or this will not work.]

  1. Rez the Packing Box. The creator may have supplied you with directions about how to place the Packing Box for optimal rezzing results. If the creator noted that the Set rezzes using the Packing Box as its centre, bear that in mind. The creator may have recommended placing the Packing Box at a certain height before using it. If so, this is most easily done by editing the Packing Box [1], going to the Object tab of its properties, and just typing the coordinates provided into the appropriate X, Y and / or Z fields. When you close the editing properties, the Packing Box may appear to vanish, but it hasn’t — it has just instantly moved to that new position! Fly there yourself to join it.
    TIP! Before changing the position using the X-Y-Z fields, consider just plain sitting on the Packing Box. That way, when it whizzes off, you will too right along with it!
  2. Click on the Packing Box. A blue menu will appear on your screen. The buttons are:
    Build / Position / Clean / Done
  3. Click the BUILD button. In a matter of microseconds, the Set rezzes into place.
  4. To move the entire Set of objects all at once, just edit the Packing Box and move it — the pieces magically move in relation to it!
  5. There may be times when the Set of objects doesn’t respond to being moved, as just described — owing to lag, or no-script zones, etc. The POSITION command can be used to force the Set to try again.
  6.  If a real mess has somehow happened, or if you were just experimenting, click the CLEAN button. This will derez everything you just rezzed, except the Packing Box itself. Then, click the BUILD button again.
  7. To fix the build in place, click the DONE button.

Customer Help Footnotes

[1] Editing the Packing Box
Right-click the item in question (it must be rezzed in-world.) From the round pie menu, choose Edit. The modal properties window will appear. Look on the right hand side of it for a button that says either “More>>” or “Less>>”. If it already says less, you are already ready for the next step. If the blue button instead says “More>>”, please click it. It will now say “Less>>”. You are now ready to proceed.
To leave edit mode, locate the x in the upper-right hand corner of this editing properties window. Click it.