Linked Prim Scrubber

Expired

This gadget will clean linked prims of particles, text, Rotations objects inventory: items and scripts to use just put root base and linked scrubber in obects main (root) prim the base script will put the scrubber in all linked prims after putting scripts in the root prim. will be cleaned then take object into inventory rerez object edit object go to tools menu choose set scripts to running and poof linked object will have nothing no inventory or any particles, movement or text in (LinkedScrubber) script edjust sleep event for object prim size 2-50 prim object sleep for 0.5-1.5 seconds 51-100 prims 1.5-3.0 101-150 prims 3.0-4.5 seconds 151-256 prims 4.5-6.5 seconds

There are 3 scripts included in this post

Linked Scrubber:

string scriptName;
default  
{         
state_entry()     
{ 
        llSleep(1.5);
        llSetSitText( "" );
        llSetTouchText( "" );
        llParticleSystem( [ ] );
        llSetText( "", ZERO_VECTOR, 1.0 );
        llTargetOmega( ZERO_VECTOR, 0, 0 );
        llSetCameraAtOffset( ZERO_VECTOR );
        llSetCameraEyeOffset( ZERO_VECTOR );
        llSitTarget( ZERO_VECTOR, ZERO_ROTATION );
        llSetTextureAnim( FALSE , ALL_SIDES, 1, 1, 0, 0, 0.0 );
        llStopSound();
        llOwnerSay("This Prim is Clean... ");        
        llSetObjectName((string)llGetLinkNumber()); 
        llOwnerSay("" + (string)llGetLinkNumber()); 
        integer total = llGetInventoryNumber(INVENTORY_ALL);
        integer i;
        for (i = 0; i 

 Linked Scrubber Base Script 2.0:

string script = "LinkedScrubber";  
default 
{   
state_entry()
    {
  
       integer i;     
       for(i = 2; i <= llGetNumberOfPrims(); i++) 
       {            
        key k = llGetLinkKey(i);             
        llGiveInventory(k, script);
    
    }
}

        changed(integer mask)
         {
           if(mask & (CHANGED_INVENTORY))
           llResetScript();  
              
         }    
    }

 

Single Prim Scrubber:

string scriptName;
default  
{         
state_entry()     
{ 
        llSleep(1.5); //change per object link size
        llSetSitText( "" );
        llSetTouchText( "" );
        llParticleSystem( [ ] );
        llSetText( "", ZERO_VECTOR, 1.0 );
        llTargetOmega( ZERO_VECTOR, 0, 0 );
        llSetCameraAtOffset( ZERO_VECTOR );
        llSetCameraEyeOffset( ZERO_VECTOR );
        llSitTarget( ZERO_VECTOR, ZERO_ROTATION );
        llSetTextureAnim( FALSE , ALL_SIDES, 1, 1, 0, 0, 0.0 );
        llStopSound();
        llOwnerSay("This Prim is Clean... ");        
       // llSetObjectName((string)llGetLinkNumber()); 
        llOwnerSay("" + (string)llGetLinkNumber()); 
        integer total = llGetInventoryNumber(INVENTORY_ALL);
        integer i;
        for (i = 0; i 

 

Inventory Give or Drop

Expired

//  Inventory Give or Drop
//  Created by Water Rogers for IBM/Opensource

//  Purpose
//  --------------------------------------------------------------
//  This is a simple example of how an object can give inventory
//  or how somoene without modify permissions can give the object
//  inventory.

//  Requirements
//  --------------------------------------------------------------
//  A single prim is all that is necessary for this example.

//  Usage
//  --------------------------------------------------------------
//  Click on the object, and it will give a notecard.  Drop something
//  on the object (other then a script), and it will put it into
//  the object's inventory.


//  EVENTS
//  --------------------------------------------------------------

string      g_InventoryName     = "Test Card";  //  Name of the inventory we're giving


default
{
    state_entry()
    {
        //  This function is what allows people to drop inventory into
        //  an object even if they don't have modify permissions.  This
        //  is nice if you want to create a suggestion box, for example.
        llAllowInventoryDrop(TRUE);
    }

    touch_start(integer total_number)
    {
        //  If anyone touches the object, they'll receive inventory from
        //  the object.
        llGiveInventory(llDetectedKey(0), g_InventoryName);
    }
    
    changed(integer change)
    {
        //  Changed is used to detect something that changed with the
        //  object.  Textures, links, size, locations, inventory are all
        //  examples of what can be detected on change.  Since we're only
        //  interested in what's been changed in the inventory, we'll use
        //  the following check.  Also, since we're working with bit masks,
        //  we need to use bitwise opperands in conditional statements.
        if(change & (CHANGED_INVENTORY | CHANGED_ALLOWED_DROP))
        {
            //  This will whisper whenever anything in the inventory
            //  changes.
            llWhisper(0, "Thanks!");
        }
    }
}

 

Window Opacity

Expired

This script changes the opacity of windows. It includes the script for the window and the controller script.

Window Opacity Script:

// script that changes opacity of object based on external messages

integer gChannel = 50; // communication channel on which we listen for opacity change commands
integer gLastListen; // id of last listen command

default
{
    state_entry()
    {
        gLastListen = llListen(gChannel, "", "", "0");
    }
    
    listen(integer channel, string name, key id, string msg)
    {
        llListenRemove(gLastListen);
        
        integer nextOpacityLvl = (integer)msg;
        nextOpacityLvl += 1;
        if (nextOpacityLvl > 3) nextOpacityLvl = 0;
        gLastListen = llListen(gChannel, "", "", (string)nextOpacityLvl);
        
        float opacityLvl = (float)msg;
        opacityLvl = 1 - ((opacityLvl / 3) * 0.9);
        llSetAlpha(opacityLvl, ALL_SIDES);
    } 
} 

 

Controller Script:

// script for a switch that controls window opacity
integer gOpacityLevel = 0; // current opacity level of windows
integer gChannel = 50; // channel that controls which windows respond to this switch

default
{
    state_entry()
    {
       
    }
    
    touch_start(integer num_touchers)
    {
        gOpacityLevel += 1;
        if (gOpacityLevel > 3)
        {
            gOpacityLevel = 0;
        }
        string opacityCmd = "";
        opacityCmd = opacityCmd + (string)gOpacityLevel;
        llSay(gChannel, opacityCmd);
    }
}

 

Phantom On/Off

Expired

//PHANTOM ON OFF by ArchTx Edo 
//Changes and object from solid to phantom and back again each time it is touched 

default 
{ 
    touch_start(integer total_number) 
    {   
            llSetPrimitiveParams([PRIM_PHANTOM, FALSE]); state phantom; 
        } 
} 
state phantom 
{ 
    touch_start(integer total_number) 
    { 
        llSetPrimitiveParams([PRIM_PHANTOM, TRUE]); state default; 
    } 
}