After you Subscribe email your username
and receipt to
goonsquad.me@gmail.com
Membership Options
Pay With Bitcoin
  • 31 Vote(s) - 2.81 Average
  • 5
  • 4
  • 3
  • 2
  • 1
Thread Modes

rezzer system with menu works in sl or opensim
boogaloo Offline
Goonsquad Member
******
Goonsquad

Posts: 150
Threads: 150
Joined: Feb 2013
Reputation: 58
first is for the rez box you need to make a prim 1 x 1 x 1 then insert the rezzer base script into it

PHP Code:
Code:

integer REZZER_CHANNEL  = -1213210;
integer VENDOR_CHANNEL  = -1925670;
integer MAX_CHANNEL     99;
integer MIN_CHANNEL     1;
float   REZ_DELAY       1.00;
float   TIMER_RATE      0.5;
float   TIMER_EVENT     25.0;

integer  gStartParam;
integer  gRCommId;
integer  gRCommChannel;
integer  gRezzerNumber;
integer  gVCommId;
integer  gVCommChannel;
integer  gVendorNumber;
integer  gMenuChannel;
integer  gListenId;

// menu options and locations
string  gRecord   "Record";
string  gBuild    "Build";
string  gFinish   "Finish";
string  gChannel  "Channel";
string  gGroupOn  "Group: off";
string  gGroupOff  "Group: on";
integer gGroupLoc;
string  gChatOn   "Chat: on";
string  gChatOff  "Chat: off";
integer gChatLoc;
string  gPosRez   "Pos: Rezzer";
string  gPosSim   "Pos: Sim";
integer gPosLoc;
string  gUnRecord "UnRecord";
string  gClean    "Clean";
string  gReset    "Reset";
string  gBack     "<<Back";
string  gExit     "Exit";

//Misc info
list     gMenuList;
list     
gCreatorList;
list     
gOwnerList;
list     
gChannelList;
integer  gIndex;
vector   gLastPos;
rotation gLastRot;
key      gCreator;
key      gOwner;
key      gAvaKey;

// multi-vendor rezzer info
vector   gRezzerOffset;
rotation gRezzerRotation;


give_message(key idstring message)
{
    if (
llList2String(gMenuListgChatLoc) == gChatOn)
    {
        if (
id == llGetOwner())
            
llOwnerSay(message);
        else
            
llInstantMessage(idmessage);
    }
}


string set_menu_string()
{
    
string message "";
    if (
gCreator == gOwner)
        
message += "Record  :  Record all Components Locations\n";
    
message += "Build    : Build Building\n";
    
message += "Finish   : Build Finished, Remove scripts\n";
    
    
message += "Group   : Group Access is ";
    if (
llList2String(gMenuListgGroupLoc) == gGroupOn)
        
message += "on\n";
    else
        
message += "off\n";
        
    if (
gCreator == gOwner)
        
message += "Channel : Set Channel, Current Channel: " + (string)gRezzerNumber "\n";
    
    
message += "Chat     : Rezzer Comms in open chat is ";
    if (
llList2String(gMenuListgChatLoc) == gChatOn)
        
message += "on\n";
    else
        
message += "off\n";
    
    
message += "Pos       : Set Building Position. Set to ";
    if (
llList2String(gMenuListgPosLoc) == gPosRez)
        
message += "rezzer box\n";
    else
        
message += "sim location\n";
    
    if (
gCreator == gOwner)
        
message += "UnRecord: Remove Component Locations\n";
    
message += "Clean   : Remove all building components\n";
    
message += "Reset   : Reset Scripts";
    return 
message;
}


integer get_desc()
{
    
string tempString llGetObjectDesc();
    
gRezzerNumber = (integer)tempString;
    
    if (
llStringLength(tempString) < 4)
        return 
FALSE;

    list 
tempList llParseString2List(tempString, ["#"], []);
    
gRezzerOffset = (vector)llList2String(tempList1);
    
gRezzerRotation = (rotation)llList2String(tempList2);
    return 
TRUE;
}


set_desc()
{
    
string tempString llGetObjectDesc();
    if (
llStringLength(tempString) < 10)
        
llSetObjectDesc((string)gRezzerNumber);
    else
    {
        list 
tempList llParseString2List(tempString, ["#"], []);
        
gRezzerOffset = (vector)llList2String(tempList1);
        
gRezzerRotation = (rotation)llList2String(tempList2);
        
llSetObjectDesc((string)gRezzerNumber "#" + (string)gRezzerOffset "#" + (string)gRezzerRotation);
    }
}

        
integer move_rezzor()
{
    if (
get_desc() == TRUE)
    {
        
vector currentPos llGetPos();
        
rotation currentRotation llGetRot();
        
vector destPos = (gRezzerOffset currentRotation) + currentPos;
        
rotation destRot gRezzerRotation currentRotation;
        
        list 
params = [];
        
integer iHops llAbs((integer)llCeil(llVecDist(llGetPos(), destPos) / 10.0));
        
integer x;
        for( 
0iHopsx++ )
            
params += [PRIM_POSITIONdestPos];
        
llSetPrimitiveParams(params);
        
llSetRot(destRot);
        return 
TRUE;
    }
    
    
llOwnerSay("WARNING: Rezzer Position has not been recorded?");
    return 
FALSE;
}


integer set_channal()
{
    
gMenuChannel = (integer)llFrand(-1000000) - 100000;
    
llListenRemove(gListenId);
    
gListenId llListen(gMenuChannel""NULL_KEY"");
    return 
gMenuChannel;
}


set_RComm_channel()
{
    
gRCommChannel REZZER_CHANNEL gStartParam 100 gRezzerNumber;
    
llListenRemove(gRCommId);
    
gRCommId llListen(gRCommChannel""NULL_KEY"");
}


set_VComm_channel()
{
    
gVCommChannel VENDOR_CHANNEL gVendorNumber 100;
    
llListenRemove(gVCommId);
    
gVCommId llListen(gVCommChannel""NULL_KEY"");
}


default
{
    
on_rez(integer start_param)
    {
        
llResetScript();
    }
    
    
state_entry()
    {
        
gCreator llGetCreator();
        
gOwner llGetOwner();
        
gStartParam 0;
        
gVendorNumber 0;
        
gChannelList = ["+10""-10"gExit"+5""-5"gBack"+1""-1"];
        
gCreatorList = [gGroupOngPosRezgResetgFinishgChatOngCleangBuildgChannelgUnRecordgRecord];
        
gOwnerList = [gGroupOngPosRezgResetgFinishgChatOngCleangBuild];
        
gGroupLoc llListFindList(gCreatorList, [gGroupOn]);
        
gChatLoc llListFindList(gCreatorList, [gChatOn]);
        
gPosLoc llListFindList(gCreatorList, [gPosRez]);
        
        
gRezzerNumber = (integer)llGetObjectDesc();
        if (
gRezzerNumber == 0)
        {
            
gRezzerNumber 1;
            
llSetObjectDesc((string)gRezzerNumber);
        }
        
        
gRCommChannel REZZER_CHANNEL gRezzerNumber;
        if (
gCreator == gOwner)
            
gMenuList gCreatorList;
        else
            
gMenuList gOwnerList;
        
state running;
    }
}
        

state running
{
    
on_rez(integer start_param)
    {
        
gStartParam start_param;
        
gOwner llGetOwner();
        
        if (
gOwner != gCreator)
            
llResetScript();

        if (
start_param 0// multi-vendor is calling this script
        
{
            
llSetTimerEvent(0.0);
            
gVendorNumber start_param;
            
set_RComm_channel();
            
set_VComm_channel();
            if (
move_rezzor() == TRUE)
            {
                
gIndex llGetInventoryNumber(INVENTORY_OBJECT) - 1;
                
llRezObject(llGetInventoryName(INVENTORY_OBJECTgIndex), llGetPos(), ZERO_VECTORllGetRot(), gStartParam 100 gRezzerNumber);
            }
        }
    }
    
    
state_entry()
    {
        if (
gOwner == gCreator)
            
set_VComm_channel();
    }
        
    
touch_start(integer total_number)
    {
        if (
gStartParam == 0)
        {
            
gAvaKey llDetectedKey(0);
            if (
gAvaKey == gOwner || (llList2String(gMenuListgGroupLoc) == gGroupOn && llSameGroup(gAvaKey)))        
                
llDialog(gAvaKeyset_menu_string(), gMenuListset_channal());  
        }
    }
    
    
changed(integer change)
    {
        if(
change CHANGED_OWNER)
        {
            
llSetObjectDesc(" ");
            
llResetScript();
        }
    }

    
listen(integer channelstring namekey idstring message)
    {  
        if(
channel == gRCommChannel)
        {
            if( 
message == "READYTOPOS")
            {  
                
vector vThisPos llGetPos();
                
rotation rThisRot llGetRot();
                
llRegionSay(gRCommChannel"MOVESINGLE|" llDumpList2String([ vThisPosrThisRot ], "|"));
            }
            else
            if( 
message == "ATDEST")
            {
                
gIndex--;
                if(
gIndex >= 0)
                {
                    
llSleep(REZ_DELAY);
                    
llRezObject(llGetInventoryName(INVENTORY_OBJECTgIndex), llGetPos(), ZERO_VECTORllGetRot(), gStartParam 100 gRezzerNumber);
                }
                else
                {
                    
llSetTimerEvent(TIMER_RATE);
                }
            }
        }
        else
        if (
channel == gVCommChannel)
        {
            if (
message == "CleanRezzer")
            {
                
llRegionSay(gRCommChannel"CLEAN");
                
llDie();
            }
            else
            {
                list 
temp llParseString2List(message, ["|"], []);
                
string command llList2String(temp0);
                if (
command == "RecordRezzer")  // Format: "RecordRezzer|Vendor number|offset|rotation"
                
{
                    
gVendorNumber = (integer)llList2String(temp1);
                    
set_VComm_channel();
                    
vector baseLocation = (vector)llList2String(temp,2);
                    
rotation baseRotation = (rotation)llList2String(temp,3);
                    
gRezzerOffset = (llGetPos() - baseLocation) / baseRotation;
                    
gRezzerRotation llGetRot() / baseRotation;
                    
llSetObjectDesc((string)gVendorNumber "#" + (string)gRezzerOffset "#" + (string)gRezzerRotation);
                    
llOwnerSay("Recorded Rezzer Box Position.");
                }
            }
        }
        else
        if (
channel == gMenuChannel)
        {
            if (
message == gRecord)
            {
                
give_message(id"Recording Positions");
                if(
llList2String(gMenuListgPosLoc) == gPosSim)
                    
llRegionSay(gRCommChannel"RECORDSIM");
                else
                    
llRegionSay(gRCommChannel"RECORD|" llDumpList2String([ llGetPos(), llGetRot() ], "|"));
            }
            else
            if (
message == gBuild)
            {
                
give_message(id"Rezzing the Building!");
                
llSetTimerEvent(0.0);
                
set_RComm_channel();
                
gIndex llGetInventoryNumber(INVENTORY_OBJECT) - 1;
                
llRezObject(llGetInventoryName(INVENTORY_OBJECTgIndex), llGetPos(), ZERO_VECTORllGetRot(), gRezzerNumber);
            }
            else
            if (
message == gFinish)
            {
                
give_message(id"Removing component rezzer scripts.");
                
llSetTimerEvent(0.0);
                
llRegionSay(gRCommChannel"FINISHED");
            }
            else
            if (
message == gGroupOn)
            {
                
gMenuList llListReplaceList(gMenuList, [gGroupOff], gGroupLocgGroupLoc);
                
llDialog(idset_menu_string(), gMenuListchannel);  
            }
            else
            if (
message == gGroupOff)
            {
                
gMenuList llListReplaceList(gMenuList, [gGroupOn], gGroupLocgGroupLoc);
                
llDialog(idset_menu_string(), gMenuListchannel);  
            }
            else
            if (
message == gChannel)
                
llDialog(id"Set Comm. Channel\nCurrent Channel: " + (string)gRezzerNumbergChannelListchannel);
            else
            if (
message == "+1" || message == "+5" || message == "+10" || message == "-1" || message == "-5" || message == "-10")
            {
                if (
gRezzerNumber + (integer)message MAX_CHANNEL)
                    
llOwnerSay("Channel can not be more than: " + (string)MAX_CHANNEL);
                else
                if (
gRezzerNumber + (integer)message MIN_CHANNEL)
                    
llOwnerSay("Channel can not be less than: " + (string)MIN_CHANNEL);
                else
                {
                    
gRezzerNumber += (integer)message;
                    
set_RComm_channel();
                    
llRegionSay(gRCommChannel"CHANNEL|" + (string)gRezzerNumber);
                    
set_desc();
                }
                
llDialog(id,"Set Channel\nCurrent Channel: " + (string)gRezzerNumbergChannelListchannel);
            }
            else
            if (
message == gChatOn)
            {
                
gMenuList llListReplaceList(gMenuList, [gChatOff], gChatLocgChatLoc);
                
llDialog(idset_menu_string(), gMenuListchannel);  
            }
            else
            if (
message == gChatOff)
            {
                
gMenuList llListReplaceList(gMenuList, [gChatOn], gChatLocgChatLoc);
                
llDialog(idset_menu_string(), gMenuListchannel);
            }
            else
            if (
message == gPosSim)
            {
                
gMenuList llListReplaceList(gMenuList, [gPosRez], gPosLocgPosLoc);
                
llDialog(idset_menu_string(), gMenuListchannel);
            }
            else
            if (
message == gPosRez)
            {
                
gMenuList llListReplaceList(gMenuList, [gPosSim], gPosLocgPosLoc);
                
llDialog(idset_menu_string(), gMenuListchannel);
            }
            else
            if (
message == gUnRecord)
            {
                
give_message(id"Unrecording Positions");
                
llSetTimerEvent(0.0);
                
llRegionSay(gRCommChannel"UNRECORD");
            }
            else
            if (
message == gReset)
            {
                
give_message(id"Reset Script");
                
llResetScript();
            }
            else
            if (
message == gClean)
            {
                
give_message(id"Removing components");
                
llSetTimerEvent(0.0);
                
llRegionSay(gRCommChannel"CLEAN");
            }
            else
            if (
message == gBack)
                
llDialog(idset_menu_string(), gMenuListchannel);
        }
    }
    
    
timer()
    {
        if((
llGetRot() != gLastRot) || (llGetPos() != gLastPos))
        {
            
gLastPos llGetPos();
            
gLastRot llGetRot();
            
llRegionSay(gRCommChannel"MOVE|" llDumpList2String([ gLastPosgLastRot ], "|"));
        }
    }



then put the following script into every prim or linkset you want to put in the rezzor box


PHP Code:
Code

integer  REZZER_CHANNEL  = -1213210;
integer  gRezzerNumber;
integer  gRezzerChannel;
integer  gRCommId;
vector   gOffset;
rotation gRotation;
vector   gDestPos;
rotation gDestRot;
integer  gSimLocation;
integer  gMoveFlag;


integer get_desc_info()
{
    
//FORMAT:  gRezzerNumber|vOffset|gRotation|gSimLocation
    
string tempString llGetObjectDesc();
    if (
llStringLength(tempString) < 5)
        return 
FALSE;
        
    list 
tempList llParseString2List(tempString, ["#"], []);
    
gRezzerNumber = (integer)llList2String(tempList0);
    
gOffset = (vector)llList2String(tempList1);
    
gRotation = (rotation)llList2String(tempList2);
    
gSimLocation = (integer)llList2String(tempList3);
    return 
TRUE;
}


set_comm_channel()
{
    
llListenRemove(gRCommId);
    
gRezzerChannel REZZER_CHANNEL gRezzerNumber;
    
gRCommId llListen(gRezzerChannel""NULL_KEY"");
    
string tempString llGetObjectDesc();
    if (
llStringLength(tempString) > 10)
    {
        list 
tempList llParseString2List(tempString, ["#"], []);
        
gOffset = (vector)llList2String(tempList1);
        
gRotation = (rotation)llList2String(tempList2);
        
gSimLocation = (integer)llList2String(tempList3);
        
llSetObjectDesc((string)gRezzerNumber "#" + (string)gOffset "#" + (string)gRotation "#" + (string)gSimLocation);
    }  
}
    

start_move(vector basePosrotation baseRotkey id)
{
    if(
get_desc_info())
    {
        if(
gSimLocation == FALSE)
        {
            
gDestPos = (gOffset baseRot) + basePos;
            
gDestRot gRotation baseRot;
        }
        else
        {
            
gDestPos gOffset;
            
gDestRot gRotation;
        }

        if(
gDestPos.0.0)
            
gDestPos.0.0;
        if(
gDestPos.255.0)
            
gDestPos.255.0;
        if(
gDestPos.0.0)
            
gDestPos.0.0;
        if(
gDestPos.255.0)
            
gDestPos.255.0;
        if(
gDestPos.4096.0)
            
gDestPos.4096.0;
    
        
do_move();
    }
    else
        
llOwnerSay("ERRORMOVE:  position not yet recorded?");
}


do_move()
{
    if (
gDestPos != llGetPos())
    {
        list 
params = [];
        
integer hops llAbs((integer)llCeil(llVecDist(llGetPos(), gDestPos) / 10.0));
        
integer x;
        for( 
0hopsx++ )
            
params+= [PRIM_POSITIONgDestPos];
        
llSetPrimitiveParams(params);
        
        if(
gMoveFlag)
        {
            
llRegionSay(gRezzerChannel"ATDEST");
            
gMoveFlag FALSE;
        }
    }
    
llSetRot(gDestRot);
}


default
{
    
state_entry()
    {
        
gRezzerNumber = (integer)llGetObjectDesc();
        if (
gRezzerNumber == 0)
        {
            
gRezzerNumber 1;
            
llSetObjectDesc("1");
        }
        
set_comm_channel();
        
state running;
    }
}


state running
{
    
on_rez(integer start_param)
    {
        if (
start_param 0)
        {
            
gRezzerNumber start_param;
            
set_comm_channel();
            
gMoveFlag TRUE;
            
llRegionSay(gRezzerChannel"READYTOPOS");
        }
    }
    
    
state_entry()
    {
        
set_comm_channel();
    }
    
    
listen(integer channelstring namekey idstring message)
    {
        if(
message == "FINISHED"// message format: "FINISHED"
        
{
            
llSetObjectDesc(" ");
            
llRemoveInventory(llGetScriptName());
        }
        else
        if(
message == "CLEAN"// message format: "CLEAN | gRezzerNumber"
        
{
            
llDie();
        }
        else
        if(
message == "RESET"// message format: "RESET"
        
{
            
llSetObjectDesc(" ");
            
llResetScript();
        }
        else
        if(
message == "UNRECORD"// message format: "UNRECORD"
        
{
            
llSetObjectDesc(" ");
        }
        else
        if(
message == "RECORDSIM"// message format: "RECORDSIM"
        
{
            
gRotation llGetRot();
            
gOffset llGetPos();
            
gSimLocation TRUE;
            
llSetObjectDesc((string)gRezzerNumber "#" + (string)gOffset "#" + (string)gRotation "#" + (string)gSimLocation);
            
llOwnerSay("Recorded sim position.");
        }
        else
        {
            list 
tempList llParseString2List(message, ["|"], []);
            
string command llList2String(tempList,0);
            if (
command == "CHANNEL")
            {
                
gRezzerNumber = (integer)llList2String(tempList1);
                
set_comm_channel();  
            }
            if (
command == "CLEAN")  // message format: "CLEAN|channel"
            
{
                if (
gRezzerNumber == (integer)llList2String(tempList1))
                    
llDie();
            }
            else
            if (
command == "RECORD" || command == "MOVE" || command == "MOVESINGLE")
            {
                
vector basePos = (vector)llList2String(tempList1);
                
rotation baseRot = (rotation)llList2String(tempList2);
                if(
command == "RECORD"// message format: "RECORD | base position | base rotation"
                
{
                    
gOffset = (llGetPos() - basePos) / baseRot;
                    
gRotation llGetRot() / baseRot;
                    
gSimLocation FALSE;
                    
llSetObjectDesc((string)gRezzerNumber "#" + (string)gOffset "#" + (string)gRotation "#" + (string)gSimLocation);
                    
llOwnerSay("Recorded position.");
                }
                else
                if(
command == "MOVE"// message format: "MOVE | base position | base rotation"
                    
start_move(basePosbaseRotid);
                else
                if(
command == "MOVESINGLE" && gMoveFlag// message format: "MOVESINGLE | base position | base rotation"
                    
start_move(basePosbaseRotid);
            }
        }
    }



then when you have packaged your builds follow the menu on the rez box it will all make sense to builders

quick tutorial

1 put the rez box script inthe rez box
2 put the other script in everything you want to rez linksets only need it adding to the base prim
3 once the script is in all the prims hit record on the rez box and watch it save position stored or somthing similar
4 take a copy of all the build parts and put them in the rezzor
5 hit build on the rezzor
6 if you want to remove your build hit the clean button

there are other functions on the rez system to but thats the basics

Haggis Offline
Beginner
Registered

Posts: 4
Threads: 2
Joined: Jun 2017
Reputation: 3
ahhh.. thank you, I have just tried a dozen scripts and none worked but this one is working fine, fantastic!


Possibly Related Threads...
Thread / Author Replies / Views Last Post
18 Replies 8,305 Views
Last Post by Eagles
03-30-2016, 06:25 AM
27 Replies 11,385 Views
Last Post by awadop
03-20-2016, 06:33 AM
7 Replies 6,123 Views
Last Post by Xconman
02-20-2016, 11:51 AM
23 Replies 10,340 Views
Last Post by seldar
12-11-2015, 09:00 PM
2 Replies 2,396 Views
Last Post by portlas
04-24-2015, 08:46 PM
0 Replies 1,775 Views
Last Post by deadpool
02-19-2013, 02:31 PM




Users browsing this thread: 1 Guest(s)

Color Skins

Change Color:

Background Patterns:

Background Images:

Background Header:

Setting Panel

Main Options: