Edie_Shoreland icon

Lena Perky/Lush Anti-Walk of Shame v1

Edie_Shoreland | PRO | 03/08/19 08:56:05 PM UTC | 0 ⭐ | 9375 👁️ | Never ⏰ | []
Linden Scripting |

0 B

|

None

|

0 👍

/

0 👎

//NawtieNitey Resident  March 8, 2019
//Tested on Lena Perky 3.13
 
//Not perfect, but it gets you dressed if you find yourself
//teleported to or rezzing on an unfamiliar sim (maintenence
//days or times where you've logged off naked in one of your
//non-usual hangouts). This script allows you to shop "naked"
//if you need to test animations on a PG or Mature sim, or if
//you simply don't feel like putting on an outfit.
 
//Create a new script in your Lena body. Copy and paste this
//code to the new script, and save it. Find a safe place to
//teleport nude and select the level of "dress" you want for
//the sim.  You can opt to whitelist the sim for "always nude"
//or select to be nude for this visit only, wear a catsuit, or
//ignore the dialog and keep your new default "tights".
 
//The script records your skin's default colors, and without
//changing the texture, darkens specific areas of the Lena
//Perky/Lush and gives the appearance of clothing when you're
//in nudity restricted regions.  When you teleport back to 
//a whitelist region, your body will return to it's formerly
//"nude" state.  CAUTION: Make sure your entire Lena body's
//base color is white (or it's normal default color) BEFORE
//resetting or saving the script.  Don't panic if you forget,
//just edit the body, select white, then reset the script.
 
//Type "quiet" in your Lena's object description if you don't
//want the alerts.
 
integer bl0 = 1;
integer bl1;
integer bu0;
integer bu1;
integer nip;
vector bl0skco = <1.00,1.00,1.00>;
vector bl1skco = <1.00,1.00,1.00>;
vector bu0skco = <1.00,1.00,1.00>;
vector bu1skco = <1.00,1.00,1.00>;
vector nipskco = <1.00,1.00,1.00>;
 
key lenaOwner;
integer avichan;
integer lisHandle;
 
list Nakiespots;
 
getLinkNum()
{
    integer primCount = llGetNumberOfPrims();
    integer i;
    for (i=0; i<primCount+1;i++)
    {
        if (llGetLinkName(i)=="BodyLw1") bl1 = i;
        if (llGetLinkName(i)=="BodyUp0") bu0 = i;
        if (llGetLinkName(i)=="BodyUp1") bu1 = i;
        if (llGetLinkName(i)=="Nipples") nip = i;
    }
    bl0 = 1;
}
 
integer alertMe (string ObjDesc)
{
    integer giveAlert;
    ObjDesc = llToLower(ObjDesc);
    //and here's where the magic happens...
    if (llSubStringIndex(ObjDesc, "quiet") == -1) giveAlert = TRUE;
    else giveAlert = FALSE;
    return giveAlert;
}
 
wearTights()
//llSetPrimitiveParamsFast also changes the alpha, and
//while you should still be "dressed" well before the
//typical time it takes for mesh outfits to rez when 
//teleporting into a new sim, this function may change
//in the future.
{
    llSetLinkColor(nip, <0.01,0.05,0.05>, ALL_SIDES);
    llSetLinkColor(bu0, <0.01,0.05,0.05>, ALL_SIDES);
    llSetLinkColor(bl0, <0.50,0.50,0.55>, ALL_SIDES);
    llSetLinkColor(bl1, <0.01,0.05,0.05>, ALL_SIDES);
    llSetLinkColor(bl1, <0.50,0.50,0.55>, 0);
    llSetLinkColor(bl1, <0.50,0.50,0.55>, 1);
    llSetLinkColor(bu1, <0.01,0.05,0.05>, 0);
    llSetLinkColor(bl1, <0.50,0.50,0.55>, 2);
    llSetLinkColor(bu1, <0.01,0.05,0.05>, 1);
    llSetLinkColor(bl1, <0.50,0.50,0.55>, 3);
    llSetLinkColor(bu1, <0.01,0.05,0.05>, 2);
    llSetLinkColor(bl1, <0.50,0.50,0.55>, 4);
}
 
wearCatsuit()
{
    llSetLinkColor(nip, <0.01,0.05,0.05>, ALL_SIDES);
    llSetLinkColor(bu0, <0.01,0.05,0.05>, ALL_SIDES);
    llSetLinkColor(bl0, <0.01,0.05,0.05>, ALL_SIDES);
    llSetLinkColor(bl1, <0.01,0.05,0.05>, ALL_SIDES);
    llSetLinkColor(bu1, <0.01,0.05,0.05>, 0);
    llSetLinkColor(bu1, <0.01,0.05,0.05>, 1);
    llSetLinkColor(bu1, <0.01,0.05,0.05>, 2);
}
 
goNude()
{
    llSetLinkColor(nip, nipskco, ALL_SIDES);
    llSetLinkColor(bu0, bu0skco, ALL_SIDES);
    llSetLinkColor(bl0, bl0skco, ALL_SIDES);
    llSetLinkColor(bl1, bl1skco, ALL_SIDES);
    llSetLinkColor(bu1, bu1skco, ALL_SIDES);
}
 
getNaked()
{
    //Records initial skin color on the rare chance your skin
    //base color is not <1.00,1.00,1.00> 
    list skinclr = llGetLinkPrimitiveParams(bu0, [PRIM_COLOR, 2]);
    bu0skco =  llList2Vector(skinclr,0);
    skinclr = llGetLinkPrimitiveParams(bu1, [PRIM_COLOR, 2]);
    bu1skco =  llList2Vector(skinclr,0);
    skinclr = llGetLinkPrimitiveParams(bl0, [PRIM_COLOR, 2]);
    bl0skco =  llList2Vector(skinclr,0);
    skinclr = llGetLinkPrimitiveParams(bl1, [PRIM_COLOR, 2]);
    bl1skco =  llList2Vector(skinclr,0);
    skinclr = llGetLinkPrimitiveParams(nip, [PRIM_COLOR, 0]);
    nipskco =  llList2Vector(skinclr,0);
}
 
 
default
{
    state_entry()
    {
        lenaOwner = llGetOwner( );
        string uniq_chan = (string)lenaOwner; //get the wearer's key
        uniq_chan = "0x" + (llGetSubString(uniq_chan, 6, 7)) + (llGetSubString(uniq_chan, 11, 12));
        avichan = (integer)uniq_chan; //establish a channel using parts of that key.
        getLinkNum();
        getNaked();
        lisHandle = llListen(avichan, "", llGetOwner(), "");
    }
    
    changed(integer change)
    {
        if (change & CHANGED_REGION)
        {
            if(llListFindList(Nakiespots,[llGetRegionName()])==-1)
            {
                wearTights();
                if (alertMe (llGetObjectDesc())) llDialog(lenaOwner,"Would you like to add this sim to your nudity allowed list, allow nudity this visit only, wear tights, or wear a catsuit?",["visit only", "tights", "catsuit", "always allow"],avichan);
            }
            else goNude();
        }
    }
 
    on_rez(integer start_param)
    {
        if(llListFindList(Nakiespots,[llGetRegionName()])==-1)
        {
            wearTights();
            if (alertMe (llGetObjectDesc())) llDialog(lenaOwner,"Would you like to add this sim to your nudity allowed list, allow nudity this visit only, wear tights, or wear a catsuit?",["visit only", "tights", "catsuit", "always allow"],avichan);
        }
        else goNude();
    }
 
    listen(integer chan, string name, key id, string msg)
    {
        if (msg == "visit only") goNude();
        if (msg == "tights") wearTights();
        if (msg == "catsuit") wearCatsuit();
        if (msg == "always allow")
        {
            Nakiespots = Nakiespots + llGetRegionName();
            goNude();
        }       
    }
 
    
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎