Notify List of Avatars

// Send an IM to the objects owner and the list of avs listed in the script.
// Will also send an acknowledgement IM to the touching av.
//
// NB that SL includes delays and throttling to prevent spamming
// see: https://wiki.secondlife.com/wiki/LlInstantMessage
//
// Kimm Paulino
// Written for Laz Longfall, Jun 2012
 
// List of full avatar UUIDs.
// you can get this from viewing the profile of each avatar in SL
// (well in firestorm anyway)
//
// IMPORTANT: There is no error checking of these - make
// sure you paste them in correctly!
list avs = [
"12345678-f00d-cafe-9876-0987654321ef",
"87654321-dead-dead-1234-fedcba012345"
// Remember no comma after the last entry ...
];
string helpmsg = "Someone needs help!";
string ackmsg = "I've IM'd the store owners.  Someone will be along as soon as possible.";
 
default
{
    touch_start (integer num_detected)
    {
        key owner = llGetOwner();
        key sender = llDetectedKey(0);
        string name = llKey2Name (sender);
 
        list timestamp = llParseString2List(llGetTimestamp(),["T","."],[""]);
        string time = llList2String(timestamp, 0) + " " + llList2String(timestamp, 1);
 
        llInstantMessage (sender, ackmsg);
        string msg = time + " " + helpmsg + " [" + name + "]";
        llInstantMessage (owner, msg);
        integer num = llGetListLength (avs);
        integer i;
        for (i=0; i

 

Add a comment

Rip Script for Prim Clothing

// Constants
integer intListenChannel = 2938;
string  strLandmarkName = "Spiders Design, Heathrow (23, 10, 21)";

string  strButtonsUser = "  1 == Pull\n
                            2 == Rip off\n
                            3 == Touch
                            ";
list    lstButtonsUser = ["Landmark", "1", "2", "3"];

// Variables
list    lstBanList = [];
integer isOn = TRUE;
integer intState = 0; // 0=idle; 1=user clicked; 2=permission; 3=ban; 4=owner clicked
string  strCurrentSelection = "";
string  strCurrentUserName;
key     keyCurrentUser;

showDialogUser(key _av)
{
    intState = 1;
    llDialog(_av, strButtonsUser, lstButtonsUser, intListenChannel);
}

showDialogPermission()
{
    intState = 2;
    llDialog(llGetOwner(), strCurrentUserName + " is trying to interact with your skirt, do you want to permit this?", ["yes", "no"], intListenChannel);
}

showDialogBan()
{
    intState = 3;
    llDialog(llGetOwner(), "Do you want to ban " + strCurrentUserName + " from clicking your skirt?", ["yes", "no"], intListenChannel);
}

showDialogOwner()
{
    intState = 4;
    llDialog(llGetOwner(), "What do you want to do?\n 
                            1 == Pull\n
                            2 == Rip off\n
                            3 == Touch", ["Landmark", "Reset list", "Say list", "1", "2", "3"], intListenChannel);
}

clear()
{
    strCurrentSelection = "";
    strCurrentUserName = "";
    keyCurrentUser = NULL_KEY;
    intState = 0;
}

default
{
    state_entry()
    {
        llListen(intListenChannel, "", "", "");
    }
    
    attach(key _id)
    {
        if (_id != NULL_KEY)
        {
            llRequestPermissions(llGetOwner(), PERMISSION_ATTACH);
        }
    }
    
    listen(integer _ch, string _nm, key _id, string _msg)
    {
        if (intState == 1) // if user clicked
        {
            if (_msg == "Landmark")
            {
                llGiveInventory(_id, strLandmarkName);
            } else if (_msg == "1")
            {
                strCurrentSelection = "1";
                keyCurrentUser = _id;
                strCurrentUserName = llKey2Name(keyCurrentUser);
                
                // Change this text to what you want to happen on button 1                
                llSay(0, strCurrentUserName + " does a step forward and pulls on " + llKey2Name(llGetOwner()) + "'s skirt watching it slip to the ground as her sleek slender body is uncovered");
                
                showDialogPermission();
            } else if (_msg == "2")
            {
                strCurrentSelection = "2";
                keyCurrentUser = _id;
                strCurrentUserName = llKey2Name(keyCurrentUser);
                
                // Change this text to what you want to happen on button 2
                llSay(0, strCurrentUserName + " grabs " + llKey2Name(llGetOwner()) + "'s skirt and gives it a good rip you won't be needing this anymore!!");
                
                showDialogPermission();
            } else if (_msg == "3")
            {
                strCurrentSelection = "3";
                keyCurrentUser = _id;
                strCurrentUserName = llKey2Name(keyCurrentUser);
                
                // Change this text to what you want to happen on button 3
                llSay(0, strCurrentUserName + " touches " + llKey2Name(llGetOwner()) + "'s skirt and feels the softness of the lace thinking of how her skin must feel");
                
                showDialogPermission();
            }
        } else if (intState == 2) // owner has to give permission
        {
            if (_msg == "no")
            {
                llSay(0, llKey2Name(llGetOwner()) + " slaps " + strCurrentUserName + " in the face leaving her tiny hand print in a redding welt as she screams!");
                showDialogBan();
            } else if (_msg == "yes")
            {
                if (strCurrentSelection == "1")
                {
                    // Change this text to what you want to happen on button 1                
                    llSay(0, llKey2Name(llGetOwner()) + "'s skirt drops to the floor");
                    clear();
                    llDetachFromAvatar(); // if you don't want the skirt to be taken off delete this line                     
                } else if (strCurrentSelection == "2")
                {
                    // Change this text to what you want to happen on button 2                
                    llSay(0, llKey2Name(llGetOwner()) + "'s skirt gets ripped to shreds");
                    clear();
                    llDetachFromAvatar(); // if you don't want the skirt to be taken off delete this line
                } else if (strCurrentSelection == "3")
                {
                    // Change this text to what you want to happen on button 3                
                    llSay(0, llKey2Name(llGetOwner()) + "'s skirt feels really soft");
                    clear();
                    llDetachFromAvatar(); // if you don't want the skirt to be taken off delete this line
                }
            }
        } else if (intState == 3) // owner denied, do you want to ban
        {
            if (_msg == "yes")
            {
                lstBanList += strCurrentUserName;
                clear();
            } else if (_msg == "no")
            {
                clear();
            }
        } else if (intState == 4) // owner clicked
        {
            if (_msg == "Landmark")
            {
                llGiveInventory(_id, strLandmarkName); 
            } else if (_msg == "Reset list")
            {
                lstBanList = [];
                llOwnerSay("Ban list has been reset");
            } else if (_msg == "Say list")
            {
                integer i;
                llOwnerSay("These are the avatars that are banned:");
                for (i = 0; i 

 

Add a comment

Height Detector

//Title: Height Detector
//Date:11-16-2003 7:24 PM
//Scripter: Francis Chung
//ATTENTION GET RID OF THE // IN FRONT OF "DEFAULT" TO ACTIVATE THIS SCRIPT

//default
{ 
    state_entry() 
    { 
        llSetStatus(STATUS_PHANTOM, TRUE); 
        llSetText( "Touch to find out your height", <1,1,1>, 1 ); 
    } 

    touch_start(integer total_number) 
    { 
        key avatar; 
        string name; 
        vector size; 
        vector pos; 
        string saeheight = ""; 
        float heightfeet; 

        avatar = llDetectedKey(0); 
        size   = llGetAgentSize( avatar ); 
        name   = llDetectedName(0); 
        pos    = llDetectedPos(0); 
        
        heightfeet = size.z * 3.28083; 
        saeheight  = (string)((integer) llFloor(heightfeet)) + " feet "; 
        
        heightfeet -= llFloor(heightfeet); 
        saeheight  += (string)((integer)(llRound(heightfeet * 12))) + " inches"; 

        llSay( 0, name + " is " + (string)size.z + " m (" + saeheight + ") tall. (counting your shoes)" ); 
        
        size.x = 0.5; 
        size.y = 0.5; 
        llSetScale( size ); 
        // pos.x += 0.5; 
        llSetPos( pos ); 

    } 
} 

 

Add a comment

Multi-point Attachment

//********************************************************
//This Script was pulled out for you by YadNi Monde from the SL FORUMS at http://forums.secondlife.com/forumdisplay.php?f=15, it is intended to stay FREE by it s author(s) and all the comments here in ORANGE must NOT be deleted. They include notes on how to use it and no help will be provided either by YadNi Monde or it s Author(s). IF YOU DO NOT AGREE WITH THIS JUST DONT USE!!!
//********************************************************







// Multi point attachment by Joannah Cramer
//The idea for script came from this thread (http://forums.secondlife.com/showthread.php?t=145241). Basically, it will memorize offsets and rotations of item separately for each AV attachment point the item is attached to, and restore them as needed. This way rather than having to create separate versions of one attachment aligned for each of possible points, the item maker can just ship single item which will align itself properly in all pre-recorded spots, no matter where exactly the buyer picks to fit it.
//
//How to use: drop into root prim of attachment. Attach it to AV point, move and rotate around until it's positioned the way you like. Detach the item, attach it again to another point, position and rotate like before, detach when it looks fine there too. Repeat the attach-position-detach thing for each of the points you want to have recorded.




// this script memorizes position and rotation of object for each attachment point it was worn on.
// allows easy creation of items like weapons looking proper both in hand and when put on the hip/back,
// skirts and body parts which can be easily switched between lower torso points,
// headphones switching position when moved from head onto chest, etc
//
// USE: put the script in the root prim of your object.
// position and angle of last used attach point will be memorized when the object is detached.
//
// to pre-set positions for multiple points attach the item to selected point, adjust position and angle,
// then detach the item, attach it to another point, adjust position and angle, detach... repeat for all
// desired attachment points.

list    attach_points;
list    attach_offsets;
list    attach_angles;
integer current_point;

default {
    
    state_entry() { current_point = llGetAttached(); } // grab the attach point when script is first put in the item
    
    attach( key Contact ) {
        
        if( Contact != NULL_KEY ) {
            // item is being attached
            current_point = llGetAttached(); // cache the point so correct data can be saved on detach
            integer idx = llListFindList( attach_points, [ current_point ] );
            if( idx != -1 ) {
                // previously used attach point, restore memorized position of object
                llSetPrimitiveParams( [ PRIM_POSITION, llList2Vector( attach_offsets, idx ),
                                        PRIM_ROTATION, llList2Rot( attach_angles, idx ) ] );
            }
            else {
                // a new attach location. remove potential offsets from last recognized attach point.
                llSetPrimitiveParams( [ PRIM_POSITION, ZERO_VECTOR, PRIM_ROTATION, ZERO_ROTATION ] );
            }
        }
        else {
            // item is being detached, store the data
            if( current_point == 0 ) { return; }
            integer idx = llListFindList( attach_points, [ current_point ] );
            vector offset = llGetLocalPos();
            rotation angle = llGetLocalRot();
            if( idx == -1 ) {
                // add new point data
                attach_points  += current_point;
                attach_offsets += offset;
                attach_angles  += angle;
            }
            else {
                // update existing point data
                attach_offsets = llListReplaceList( attach_offsets, [ offset ], idx, idx );
                attach_angles  = llListReplaceList( attach_angles,  [ angle ], idx, idx );
            }
        }
    }
} 

 

Add a comment

Gat Avatar Days Old

// Get Days Old
// Travis Lambert -- 10-19-2005 (504 days old) :)  


list lTdy;
list lYmd;
float fYear;
float fMonth;
float fDay;
integer iDayTotal;
float fYMonth;
float fYDay;
float fBornFloat;
float fTmonth;
float fTday;
float fTodayFloat;
float fYearTotal;
string sToday;
string sName;

default 
{ 
    touch_start(integer num_detected) 
    { 
        llRequestAgentData(llDetectedKey(0), DATA_BORN); 
        sName = llDetectedName(0);
        llSetText("Age Detector",<1 ,1,1>,1);
    } 
    dataserver(key kQueryid, string sData) 
    { 
        //determine born date
        list lYmd = llParseString2List(sData, ["-"], []); 
        float fYear = llList2Float(lYmd, 0); 
        float fMonth = llList2Float(lYmd, 1); 
        float fDay = llList2Float(lYmd, 2); 
        
        
        //seperate born month, day, year
        fYMonth = (fMonth / 12);
        fYDay = (fDay / 365);
        fBornFloat = fYear + fYMonth + fYDay;

        
        //determine today's date
        string sToday = llGetDate();
        list lTdy = llParseString2List(sToday, ["-"], []);
        float tyear = llList2Float(lTdy, 0);
        float tmonth = llList2Float(lTdy, 1);
        float tday = llList2Float(lTdy, 2);
        
        //seperate today's month, day, year
        fTmonth = (tmonth / 12);
        fTday = (tday / 365);
        fTodayFloat = tyear + fTmonth + fTday;
                
        
        //total up & compute
        fYearTotal = fTodayFloat - fBornFloat;
        iDayTotal = llRound((float) fYearTotal * 365.0);
        
        llSay(0,sName + " is " + (string) iDayTotal + " Days Old!");
  
        
        
    } 
} 

 

Add a comment