?

Log in

No account? Create an account

Previous Entry | Next Entry

For my NaNoWriMo friends in SL

Rez your favorite stasis chamber and put this script in it. Turn on RLV, wear your relay, and set it to some inescapable serious mode.
// Personalized ForceSitter
//
// Description:
// For anyone in SL who's participating in NaNoWriMo. 
// During the month of November, it senses for you and traps you. 
// You can log out and log back in, and it will trap you again. 
//
// Author:
// Timberwoof Lupindo; Black Gazza Prison; November 2, 2014
//
// To deploy: 
// Make a new script and copy all of this to it. 
// Name the script Personalized ForceSitter. 
// Copy the script into your favorite easy chair, psychiatric couch, stasis tube, etc. 
// Attach an RLV relay and set it to suitably difficult-to-escape settings. 
// Turn RLV on in your Second Life viewer. Approach your object. 
// Sit down and write! 
//
// Safeword: 
// Turn off RLV in your viewer and relog. 
//
// License: 
// Free to use, copy, modify, learn from.
// No guarantees are made. Don't blame me if this messes you up. 
// The original version is published, so dangerous variations can't be blamed on me. 

key targetPrim;
key targetAvatar;
integer RLVchan = -1812221819; //RLV Relay channel. do NOT change!

relay(string cmd_name, key user_uuid, string command) 
{
    // Send command to relay.
    llRegionSayTo(user_uuid, RLVchan, cmd_name+","+(string)user_uuid+","+command);
}
 
sitOwner()
{
    if (llSubStringIndex(llGetTimestamp(),"-11-") > -1)   
    {
        // During November, force-sit, lock, prevent editing.
        // You can add more RLV commands here if you want to. 
        relay("sit", targetAvatar, "@sit:"+(string)targetPrim+"=force" );
        relay("sitlock", targetAvatar, "@unsit=n");
        relay("edit", targetAvatar, "@edit=n");
    }
    else
    {
        // I'm pretty sure this will let you go.
        relay("sitlock", targetAvatar, "@unsit=y");
        relay("edit", targetAvatar, "@edit=y");
    }
}

default
{
    state_entry()
    {
        // The script initializes. 
        // Get your UUID and the uuid of the object the script is in. 
        // Search for you.  
        targetPrim = llGetLinkKey(1);
        targetAvatar = llGetOwner();
        llSensorRepeat("", targetAvatar, AGENT, 10, PI_BY_TWO, 10);
    }

    sensor(integer num_detected)
    {
        // You've been detected. 
        // Forces you to sit, stops the detector, and starts the event timer. 
        sitOwner();
        llSensorRemove();
        llSetTimerEvent(30);
    }
    
    timer()
    {
        // Presumably you're sitting on the object. 
        // Periodically verify that you are still sitting on the object. 
        if (llAvatarOnSitTarget() == targetAvatar)
        {
            // You're still sitting on the object. 
            // We don't need the sensor, so remove it. 
            llSensorRemove();
        }
        else
        {
            // Where are you? Did you log off? 
            // We'll keep the light on for you. 
            llSensorRepeat("", targetAvatar, AGENT, 10, PI_BY_TWO, 10);
        }
    }
}

Comments

( 1 comment — Leave a comment )
schnee
Nov. 2nd, 2014 10:54 am (UTC)
What does that do, other than forcing you to remain seated if you're the object's owner and it's November 2014?
( 1 comment — Leave a comment )