Very Simple Doors

Expired

These are not advanced door scripts. Just really simple to understand and use. In some situations you may need more advanced scripts.

 

 

Create'o'Door'o'Matic'o'Script ( V2 )

 

Drag and drop this script onto (or into) a fresh prim and like magic it will resemble a door. The most important use for this type of prim shaping is for rotating doors, since the rotations typically occur around the true center of the prim. This script path cuts the prim so that the center is at one edge. This edge then becomes the hinge point.

 

// V2 //
 
default
{
    state_entry()
    {
        key LL_Brazillian_Rosewood = "a25bebc8-4739-453d-d44e-fc522cf95488"; // The UUID for a wood texture by Linden Labs.
        llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_BOX, 0, <0.125, 0.375, 0.0>, 0.0, <0.0, 0.0, 0.0>, <1 .0, 1.0, 0.0>, <0.0, 0.0, 0.0>,
                              PRIM_TEXTURE, 0, LL_Brazillian_Rosewood, <2 .0, 0.1, 0.0>, <0.5, 0.025, 0.0>, 0.0,   // Set texture
                              PRIM_TEXTURE, 1, LL_Brazillian_Rosewood, <2 .0, 1.0, 0.0>, <0.5, 0.0, 0.0>, 0.0,     // Set texture
                              PRIM_TEXTURE, 2, LL_Brazillian_Rosewood, <0.05, 1.0, 0.0>, <0.0125, 0.0, 0.0>, 0.0, // Set texture
                              PRIM_TEXTURE, 3, LL_Brazillian_Rosewood, <2 .0, 0.1, 0.0>, <0.5, -0.025, 0.0>, 0.0,  // Set texture
                              PRIM_TEXTURE, 4, LL_Brazillian_Rosewood, <0.05, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0,    // Set texture
                              PRIM_TEXTURE, 5, LL_Brazillian_Rosewood, <1 .0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0,     // Set texture
                              PRIM_BUMP_SHINY, ALL_SIDES, 1, 13, // Apply the "siding" bump map.
                              PRIM_SIZE, <3 .0, 0.2, 3.0>]); // Set the size (after path cutting only 1/4 of the prim remains).
        llRemoveInventory(llGetScriptName()); // Self deleting script.
    }
}

 

 

Rotating Door ( V3 )

 

Simple smooth swinging type door with an auto close timer and speed of rotation setting.

 

// V3 //
 
float angle = 90.0; // Adjust the degree of rotation (prims local Z axis).
// For clockwise rotation set a negative amount
 
float time = 10.0; // The amount of time the door remain open before auto closing.
// Set to zero ( 0.0 ) to disable.
 
///////////////////////////////////////////////////////
 
rotation door_open; // Used to store the open rotation.
 
rotation door_closed; // Used to store the closed rotation.
 
integer open = TRUE; // Used to instruct the Door function.
 
Door(integer i) // The named function and its integer instruction.
{
    if(i) // If i is TRUE open the door.
    {
        llSetLocalRot(door_open); // Set the local rotation to door_open.
        llSetTimerEvent(time); // Set the timer to running.
    }
    else // If i is FALSE close the door.
    {
        llSetTimerEvent(0.0); // Stop the timer.
        llSetLocalRot(door_closed); // Set the local rotation to door_closed.
    }
    open = (!i); // Set the value of open to NOT the value of the instruction so...
}                // ...next time it is called it does the opposite.
 
default // Create a state for the code to run in.
{
    state_entry() // Triggered on entering the state.
    {
        door_closed = llGetLocalRot(); // Store the rotation of the closed door.
        // The closed door is the rotation the script measures of the prim when...
        // the script is first run in it.
        door_open = llEuler2Rot(((llRot2Euler(door_closed) * RAD_TO_DEG) + <0.0, 0.0, angle>) * DEG_TO_RAD);
        // Store the rotation for the open door by adding the desired angle of rotation.
    }
    touch_start(integer nd) // Triggered when the door is touched.
    {
        Door(open); // Instruct the Door function to either open or close...
    }               // ...depending on the value of "open".
    timer() // Triggered when a timer is set and the specified time has elapsed.
    {
        Door(FALSE); // Close the door.
    }
}

 

 

Sliding Door ( V2 )

 

Very simple sliding type door with an auto close timer.

 

// V2 //
 
vector offset = <2 .0, 0.5, 0.0>; // Set how much in each direction (X,Y,Z) the prim moves...
// ...from it's closed position.
 
float time = 10.0; // The amount of time the door remain open before auto closing.
// Set to zero ( 0.0 ) to disable.
 
///////////////////////////////////////////////////////
 
vector door_open; // Used to store the open position.
 
vector door_closed; // Used to store the closed position.
 
integer open = TRUE; // Used to instruct the Door function.
 
Door(integer i) // The named function and its integer instruction.
{
    if(i) // If i is TRUE open the door.
    {
        llSetPos(door_open); // Set the local position to door_open.
        llSetTimerEvent(time); // Set the timer to running.
    }
    else // If i is FALSE close the door.
    {
        llSetTimerEvent(0.0); // Stop the timer.
        llSetPos(door_closed); // Set the local position to door_closed.
    }
    open = (!i); // Set the value of open to NOT the value of the instruction so...
}                // ...next time it is called it does the opposite.
 
default // Create a state for the code to run in.
{
    on_rez(integer param) // Triggered when the door (linked or not) is rezzed.
    {
        llResetScript(); // Clear the script memory and start fresh.
    }
    changed(integer change) // Triggered when the prim senses various changes.
    { // BEWARE: This is a simple script and will not discern if the door is being sat on.
      // THE SCRIPT WILL RESET IF THE DOOR IS SAT ON.
        if(change & CHANGED_LINK) // Check if the change was in how the prim is linked.
        llResetScript(); // Reset the script to reset the positions.
    }
    state_entry() // Triggered on entering the state.
    {
        door_closed = llGetLocalPos(); // Store the local position of the closed door.
        // The closed door is the position the script measures of the prim when...
        // the script is first run in it.
        door_open = (door_closed + offset);
        // Store the position for the open door by adding the desired offset.
    }
    touch_start(integer nd) // Triggered when the door is touched.
    {
        Door(open); // Instruct the Door function to either open or close...
    }               // ...depending on the value of "open".
    timer() // Triggered when a timer is set and the specified time has elapsed.
    {
        Door(FALSE); // Close the door.
    }
}

 

Swingin' Door ( V2 )

Expired

From Fred Gandt:

 

DUE FOR AN UPDATE Sucks a bit. Works but could be so much better.

    https://d1yjxggot69855.cloudfront.net/skins/monobook/bullet.gif); color: rgb(0, 0, 0); font-family: verdana, helvetica, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
  • I have included as many conditions in the link_messaging conditions as I could to help keep the potential for conflict with other scripts used in any LINK_SET with this script down to a very unlikely level. If you have other scripts issuing or receiving link_messages in the same link_set as this script and in those other scripts there are few conditions to be met within the link_message event, add conditions to exclude unwanted reaction to this scripts issues of link_messages. Or something like that anyway. Long story short...Scripts can talk to each other. Make sure the messages go where they are supposed to go.
    https://d1yjxggot69855.cloudfront.net/skins/monobook/bullet.gif); color: rgb(0, 0, 0); font-family: verdana, helvetica, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
  • Doors made with this script do not need to be configured by changing anything in the script or in a notecard (a notecard is used to set security lists of allowed and disallowed agents). There is a simple dialog menu system for all config options. To activate the menu click on the door and hold the mouse button down until the menu shows. On laggy regions this may take a few seconds, be patient.
    https://d1yjxggot69855.cloudfront.net/skins/monobook/bullet.gif); color: rgb(0, 0, 0); font-family: verdana, helvetica, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
  • Features can be changed in Self (the door that gives you the menu), Local (double doors) or Global (all doors in a link set).
    https://d1yjxggot69855.cloudfront.net/skins/monobook/bullet.gif); color: rgb(0, 0, 0); font-family: verdana, helvetica, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
  • Consecutively linked doors (at this time 3 doors won't function well as a local set) regard each other as Local, perfect for making double doors, either both acting as one folding door or each acting as one 1/2 of a double set of doors. All doors linked to the same set regard each other as Global.
    https://d1yjxggot69855.cloudfront.net/skins/monobook/bullet.gif); color: rgb(0, 0, 0); font-family: verdana, helvetica, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
  • Double sets of double doors can now be configured. So two sets of folding doors can be operated as one set of four doors. This is done without using a permanently open listen so is relatively lagless. Four doors need to be linked in order - Child door of one set of folding doors > Root of that set > Child of the other set of folding doors > Root of that set (the last door selected becoming the temporary root of all four). Then bring up the menu from one of the root-to-be doors (either outside door) and choose "DDD" (stands for Double Double Doors). Grant two scripts permissions when asked and the doors will reconfigure them selves in around 5 seconds. Give 10 to be sure they have finished. Now you can treat each set of folding doors as a local set.
    https://d1yjxggot69855.cloudfront.net/skins/monobook/bullet.gif); color: rgb(0, 0, 0); font-family: verdana, helvetica, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
  • DOUBLE DOUBLE DOORS WILL BREAK IF TAKEN AND RE-REZZED. I'LL ATTEMPT TO FIX THIS ISSUE SOON.
    https://d1yjxggot69855.cloudfront.net/skins/monobook/bullet.gif); color: rgb(0, 0, 0); font-family: verdana, helvetica, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
  • For Whitelist and Blacklist security include a notecard in the doors something like the example below. If doors are linked together in any of the many possible ways only one of the doors needs to have the Whitelist/Blacklist NC.
    https://d1yjxggot69855.cloudfront.net/skins/monobook/bullet.gif); color: rgb(0, 0, 0); font-family: verdana, helvetica, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
  • The following notecard example contains two important words - "Whitelist" & "Blacklist". The whitelist is those who you allow to use the door when against the general public it is locked. If the door is deadlocked only the owner can operate it. The blacklist is those who may NEVER use the door. You do not need to add yourself to the whitelist (owner oddly enough may always use the door). Names are cAsE & speelign sensitive.
    https://d1yjxggot69855.cloudfront.net/skins/monobook/bullet.gif); color: rgb(0, 0, 0); font-family: verdana, helvetica, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
  • There is a group option to allow members of the group the door is set to (not deeded) to use it when it is otherwise locked (not deadlocked). If group is set on the door both those on the whitelist and those wearing the correct group tag may use the door. Anyone on the blacklist will still be banned even if they are wearing the right group tag.
    https://d1yjxggot69855.cloudfront.net/skins/monobook/bullet.gif); color: rgb(0, 0, 0); font-family: verdana, helvetica, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
  • When linking doors be careful to -
    https://d1yjxggot69855.cloudfront.net/skins/monobook/bullet.gif); ">
  • Not make any door the root of more than a linkset you wish to act as a door. If a door is a root every child prim linked to it will move with the door.
    https://d1yjxggot69855.cloudfront.net/skins/monobook/bullet.gif); ">
  • Not link doors to a strangely angled root prim. When building ALWAYS try to make your root prim zero rotation when linking.
    https://d1yjxggot69855.cloudfront.net/skins/monobook/bullet.gif); ">
  • Reset the script in any door edited to a strange rotation (i.e. 45degrees on the Y axis). Once linked to a build as a child prim the whole build can be rotated without resetting door scripts.
    https://d1yjxggot69855.cloudfront.net/skins/monobook/bullet.gif); ">
  • When making folding doors, consider which should be the root and which the child. The child should be the door that is not hinged on the wall.
Whitelist

Fred Flintstone
Elmer Fudd
Rank Xerox
Blacklist
The Joker
Miss Crabapple
M Linden

 

 

// V2 //
 
// THERE IS NO NEED FOR THE AVERAGE USER TO CHANGE ANYTHING IN THE SCRIPT.
// THE SCRIPT WILL TAKE CARE OF ALMOST EVERYTHING. USE THE MENU TO CHANGE SETTINGS.
 
 
// I designed it to be dragged and dropped into a fresh prim. This will create the basic door.
// Re-texture and color as you like. Re-shaping may cause problems...
// ...(rotations are around the true center of the prim (this is a path-cut door) on it's local Z axis).
 
 
// DIALOG MENU FOR ALL USER SETTINGS OPTIONS
// Touch and hold the mouse button until a blue drop-down dialog shows for config options.
 
 
// The next few lines could be altered by you without harming the script (within reason).
 
list angle_list = ["150", "180", "210", "90", "105", "120", "45", "60", "75"]; // More options coming. Max number 9 options.
 
list time_list = ["16", "18", "20", "10", "12", "14", "4", "6", "8"]; // Auto closure times. Max number 9 options.
 
key LL_Brazillian_Rosewood = "a25bebc8-4739-453d-d44e-fc522cf95488"; // Start texture. Sets as door is created.
 
key Door_Opening = "99236139-075b-3057-7c6f-0f68bb2af001"; // Door sounds (if replacing consider the length).
 
key Door_Closing = "43e46041-25fa-0a03-7be8-78297f579d53";
 
key Doorbell = "213aae54-6093-7fcc-118f-3039a5435986"; // Door bell sound.
 
// FROM HERE ON DO NOT CHANGE ANYTHING UNLESS YOU KNOW WHAT YOU ARE DOING.
 
 
integer notecard_length;
 
integer sound_on = TRUE;
 
string dia_msg = "\n";
 
list dia_buttons = [];
 
list whitelist = [];
 
list blacklist = [];
 
float angle = 90.0;
 
integer permission;
 
integer url_count;
 
integer count_NCL;
 
string owner_name;
 
float time = 6.0;
 
string addressee;
 
integer dia_chan;
 
integer dia_lis;
 
integer t_count;
 
integer aligned;
 
integer sat_on;
 
integer global;
 
integer locked;
 
string my_url;
 
integer group;
 
integer local;
 
integer emile;
 
key my_buddy;
 
integer IGAN;
 
integer DDDC;
 
integer dead;
 
integer open;
 
integer DDD;
 
integer DTB;
 
integer nop;
 
key bell_id;
 
integer mln;
 
key my_key;
 
string NCN;
 
key rrruid;
 
key owner;
 
key ruid;
 
key NoNL;
 
key NCK;
 
key OLC;
 
key NL;
 
 
 
OperateDoor(integer o, integer lm, integer h, integer t)
{
    if(nop >= 2 && (!lm) && (!t))
    {
        if(!h)
        llMessageLinked(LINK_ALL_OTHERS, dia_chan, owner_name, owner);
        else if(h)
        llMessageLinked(LINK_ALL_OTHERS, dia_chan, "DSAH", owner);
    }
    if(sound_on)
    {
        key door_sound;
        if(o)
        door_sound = Door_Closing;
        else
        door_sound = Door_Opening;
        llPlaySound(door_sound, 1.0);
    }
    float d;
    float a = angle;
    vector v = (llRot2Euler(llGetLocalRot())*RAD_TO_DEG);
    float x = v.x;
    float y = v.y;
    float z = v.z;
    if(llFabs(x) <1.0)
    d = 1.0;
    else
    d = -1.0;
    if(o)
    {
        if(llFabs(x) < 1.0)
        d = -1.0;
        else
        d = 1.0;
        a = -angle;
        llSetTimerEvent(0.0);
    }
    else
    llSetTimerEvent(time);
    if(aligned)
    {
        llTargetOmega(<0.0,0.0,d>, (angle/90.0), 1.0);
        llSleep(1.5);
        llTargetOmega(ZERO_VECTOR, 0.0, 0.0);
    }
    llSetLocalRot(llEuler2Rot(*DEG_TO_RAD));
    open = (!open);
}
 
TouchMeAllOver(key id, integer t, integer te)
{
    if(t && id == owner)
    {
        global = FALSE;
        local = FALSE;
        dia_msg = "\n\"Global\" - Instruct all doors linked to this.
        \n\"Local\" - Instruct only locally linked doors.
        \n\"Self\" - Instruct only this door.";
        dia_buttons = ["Self", "Local", "CANCEL", "Global"];
        if(nop == 4)
        dia_buttons += ["-", "DDD"];
        dia_lis = llListen(dia_chan, owner_name, owner, "");
        llDialog(owner, dia_msg, dia_buttons, dia_chan);
    }
    if(te)
    {
        if(t_count <10)
        {
            if(!dead)
            {
                if(!Whitelist(id))
                {
                    bell_id = id;
                    OLC = llRequestAgentData(owner, DATA_ONLINE);
                    return;
                } 
            }
            else
            {
                if(id != owner)
                return;
            }
            if(DDD && (mln == 1))
            llHTTPRequest(my_url, [HTTP_METHOD, "POST"], "OTFD");
            OperateDoor(open, FALSE, FALSE, FALSE);
        }
        t_count = 0;
    }
}
 
integer Whitelist(key id)
{
    integer w = TRUE;
    integer index;
    if(id == NULL_KEY)
    {
        whitelist = [];
        blacklist = [];
        count_NCL = 0;
        NCN = llGetInventoryName(INVENTORY_NOTECARD, 0);
        if(llStringLength(NCN))
        {
            IGAN = TRUE;
            NCK = llGetInventoryKey(NCN);
            llMessageLinked(LINK_ALL_OTHERS, dia_chan, "IGAN", NCK);
            NoNL = llGetNumberOfNotecardLines(NCN);
        }
        else
        {
            IGAN = FALSE;
            if(nop > 1)
            llMessageLinked(LINK_ALL_OTHERS, dia_chan, "IGAN", owner);
        }
        llOwnerSay("Door Ready");
    }
    else
    {
        if(id != owner)
        {
            if(locked)
            {
                index = llListFindList(whitelist, [llKey2Name(id)]);
                if(index == -1)
                w = FALSE;
                if(group && (!w))
                {
                    if(llSameGroup(id))
                    w = TRUE;
                }
            }
            index = llListFindList(blacklist, [llKey2Name(id)]);
            if(index != -1)
            w = FALSE;
        }
    }
    return w;
}
 
GetCracking()
{
    owner = llGetOwner();
    dia_chan = (-1*llAbs(((integer)("0x" + llGetSubString(((string)owner), -9, -3)))));
    owner_name = llKey2Name(owner);
    nop = llGetNumberOfPrims();
    mln = llGetLinkNumber();
    my_key = llGetLinkKey(mln);
    GetAligned(nop, mln);
}
 
GetAligned(integer p, integer l)
{
    vector myrot = (llRot2Euler(llGetRot())*RAD_TO_DEG);
    vector rootrot = (llRot2Euler(llGetRootRotation())*RAD_TO_DEG);
    integer mrx = llRound(llFabs(myrot.x));
    integer mry = llRound(llFabs(myrot.y));
    integer rrx = llRound(llFabs(rootrot.x));
    integer rry = llRound(llFabs(rootrot.y));
    if(p > 1 && l != 1)
    {
        if((mrx == rrx && mry == rry))
        aligned = TRUE;
        else if((mrx == (rrx + 180) && mry == rry))
        aligned = TRUE;
        else if((mrx == (rrx - 180) && mry == rry))
        aligned = TRUE;
        else if((mrx == rrx && mry == (rry + 180)))
        aligned = TRUE;
        else if((mrx == rrx && mry == (rry - 180)))
        aligned = TRUE;
        else if((mrx == (rrx + 180) && mry == (rry + 180)))
        aligned = TRUE;
        else if((mrx == (rrx + 180) && mry == (rry - 180)))
        aligned = TRUE;
        else if((mrx == (rrx - 180) && mry == (rry - 180)))
        aligned = TRUE;
        else if((mrx == (rrx - 180) && mry == (rry + 180)))
        aligned = TRUE;
        else
        aligned = FALSE;
    }
    else
    {
        if((!mrx) && (!mry))
        aligned = TRUE;
        else if((mrx == 180) && (mry == 180))
        aligned = TRUE;
        else if((!mrx) && (mry == 180))
        aligned = TRUE;
        else if((mrx == 180) && (!mry))
        aligned = TRUE;
        else
        {
            aligned = FALSE;
            llSleep(0.2);
            llMessageLinked(LINK_ALL_OTHERS, dia_chan, "MA", owner);
        }
    }
}
 
StringControl(string s, integer g, integer l, integer lm)
{
    if(s == "SoundOff")
    sound_on = FALSE;
    else if(s == "SoundOn")
    sound_on = TRUE;
    else if(s == "UnLock")
    locked = FALSE;
    else if(s == "Lock")
    locked = TRUE;
    else if(s == "GroupOff")
    group = FALSE;
    else if(s == "GroupOn")
    group = TRUE;
    else if(s == "UnDead")
    dead = FALSE;
    else if(s == "DeadLock")
    dead = TRUE;
    else if(s == "NoAuto")
    time = 0.0;
    else if(s != "-")
    {
        float m = ((float)s);
        if(m > 20.0)
        angle = m;
        else
        time = m;
    }
    if(!lm)
    {
        string w;
        if(g)
        w = "globules" + s;
        else if(l)
        w = "homies" + s;
        llMessageLinked(LINK_ALL_OTHERS, dia_chan, w, owner);
    }
}
 
DoubleDoubleDoors(integer l, integer d)
{
    if(!d)
    {
        DTB = TRUE;
        if(l == 3)
        my_buddy = llGetLinkKey(4);
        else
        my_buddy = llGetLinkKey(2);
        llMessageLinked(LINK_ALL_OTHERS, dia_chan, "DOTHIS", my_buddy);
    }
}
 
default
{
    on_rez(integer param)
    {
        GetCracking();
        Whitelist(NULL_KEY);
    }
    state_entry()
    {
        llSitTarget(<0.0,0.0,0.1>, ZERO_ROTATION); // To guard against action when triggering the changed event.
        GetCracking();
        vector pos = llGetPos();
        llSetPrimitiveParams([9, 0, 0, <0.125, 0.375, 0.0>, 0.0, ZERO_VECTOR, <1 .0, 1.0, 0.0>, ZERO_VECTOR,
                              17, 0, LL_Brazillian_Rosewood, <2 .0, 0.1, 0.0>, <0.5, 0.025, 0.0>, 0.0,
                              17, 1, LL_Brazillian_Rosewood, <2 .0, 1.0, 0.0>, <0.5, 0.0, 0.0>, 0.0,
                              17, 2, LL_Brazillian_Rosewood, <0.05, 1.0, 0.0>, <0.0125, 0.0, 0.0>, 0.0,
                              17, 3, LL_Brazillian_Rosewood, <2 .0, 0.1, 0.0>, <0.5, -0.025, 0.0>, 0.0,
                              17, 4, LL_Brazillian_Rosewood, <0.05, 1.0, 0.0>, ZERO_VECTOR, 0.0,
                              17, 5, LL_Brazillian_Rosewood, <1 .0, 1.0, 0.0>, ZERO_VECTOR, 0.0,
                              19, ALL_SIDES, 1, 13,
                              7, <3 .0, 0.2, 3.0>]);
        Whitelist(NULL_KEY);
    }
    listen(integer chan, string name, key id, string msg)
    {
        llListenRemove(dia_lis);
        if(msg != "CANCEL")
        {
            if(msg == "Global" | msg == "Local" | msg == "Self")
            {
                if(msg == "Global")
                global = TRUE;
                else if(msg == "Local")
                local = TRUE;
                dia_msg = "\nConfigure your doors.";
                dia_buttons = ["AutoClose", "CANCEL", "Angle"];
                if(sound_on)
                dia_buttons += ["SoundOff"];
                else
                dia_buttons += ["SoundOn"];
                if(locked)
                dia_buttons += ["UnLock"];
                else
                dia_buttons += ["Lock"];
                if(group)
                dia_buttons += ["GroupOff"];
                else
                dia_buttons += ["GroupOn"];
                if(dead)
                dia_buttons += ["UnDead"];
                else
                dia_buttons += ["DeadLock"];
                dia_lis = llListen(dia_chan, owner_name, owner, "");
                llDialog(owner, dia_msg, dia_buttons, dia_chan);
            }
            else if(msg == "AutoClose" | msg == "Angle")
            {
                dia_lis = llListen(dia_chan, owner_name, owner, "");
                if(msg == "AutoClose")
                {
                    dia_msg = "\nSelect the length of time to wait before auto closing or turn off auto closure.";
                    if(llRound(time))
                    dia_msg += ("\nThe time this door is set at is \"" + ((string)((integer)time)) + "\" seconds now.");
                    dia_buttons = ["NoAuto", "-", "CANCEL"];
                    dia_buttons += time_list;
                }
                else
                {
                    dia_msg = ("\nSelect the degree of travel for your doors.
                                \nThis door is set at \"" + ((string)angle) + "\" now.");
                    dia_buttons = ["-", "CANCEL", "-"];
                    dia_buttons += angle_list;
                }
                llDialog(owner, dia_msg, dia_buttons, dia_chan);
            }
            else if(msg == "DDD")
            {
                if(mln == 1 | mln == 3)
                {
                    if(permission)
                    DoubleDoubleDoors(mln, DTB);
                    else
                    {
                        llInstantMessage(owner, "\nPermissions are required by both the scripts destined to be roots.
                                                 \nPlease grant those permissions when asked.");
                        llRequestPermissions(owner, PERMISSION_CHANGE_LINKS);
                    }
                }
                else
                llInstantMessage(owner, "Please bring up the menu and choose \"DDD\" from either of the roots-to-be.");
            }
            else
            StringControl(msg, global, local, FALSE);
        }
    }
    run_time_permissions(integer perms)
    {
        if(perms & PERMISSION_CHANGE_LINKS)
        {
            permission = TRUE;
            DoubleDoubleDoors(mln, DTB);
        }
        else
        {
            permission = FALSE;
            llInstantMessage(owner, "\nPermissions are required by this script for certain operations.
                                     \nThey MUST be granted to continue.");
            llRequestPermissions(owner, PERMISSION_CHANGE_LINKS);
        }
    }
    dataserver(key q, string data)
    {
        if(q == NoNL)
        {
            notecard_length = ((integer)data);
            NL = llGetNotecardLine(NCN, count_NCL);
        }
        else if(q == NL)
        {
            if(data != EOF)
            whitelist += [data];
            if(count_NCL = 10)
        {
            key id = llDetectedKey(0);
            TouchMeAllOver(id, TRUE, FALSE);
        }
    }
    touch_end(integer nd)
    {
        key id = llDetectedKey(0);
        TouchMeAllOver(id, FALSE, TRUE);
    }
    timer()
    {
        if(emile)
        llGetNextEmail("", "");
        else
        {
            llSetTimerEvent(0.0);
            llListenRemove(dia_lis);
            OperateDoor(open, FALSE, FALSE, TRUE);
        }
 
    }
    changed(integer change)
    {
        if(change & CHANGED_INVENTORY)
        {
            IGAN = FALSE;
            Whitelist(NULL_KEY);
        }
        else if(change & CHANGED_LINK)
        {
            if(llAvatarOnSitTarget())
            {
                sat_on = TRUE;
                return;
            }
            else
            {
                if(sat_on)
                {
                    sat_on = FALSE;
                    return;
                }
            }
            llSleep(1.0);
            if(DDD)
            llCreateLink(my_buddy, TRUE);
            nop = llGetNumberOfPrims();
            mln = llGetLinkNumber();
            my_key = llGetLinkKey(mln);
            GetAligned(nop, mln);
            Whitelist(NULL_KEY);
        }
        else if(change & CHANGED_REGION_START)
        {
            if(DDDC)
            rrruid = llRequestURL();
            else if(DDD)
            {
                emile = TRUE;
                llSetTimerEvent(5.0);
            }
        }
    }
}

 

Single Prim Double Doors ( V3 )

Expired

// V3 //
 
float auto_close = 10.0; // The time the door remains open before auto closing. Set to zero for no auto closure.
 
integer open;
 
OperateDoors()
{
    if(!open)
    {
        float f = 0.0;
        while((f += 0.01) <= 1.0)
        llSetLinkPrimitiveParamsFast(LINK_THIS, [9, 0, 0, <0.375,0.875,0.0>, 0.95, ZERO_VECTOR, , ZERO_VECTOR]);
    }
    else
    {
        float f = 1.0;
        while((f -= 0.01) >= -1.0)
        llSetLinkPrimitiveParamsFast(LINK_THIS, [9, 0, 0, <0.375,0.875,0.0>, 0.95, ZERO_VECTOR, , ZERO_VECTOR]);
    }
    llSetTimerEvent(auto_close);
    open = (!open);
}
 
default
{
    state_entry()
    {
        vector pos = llGetPos();
        llSetLinkPrimitiveParamsFast(LINK_THIS, [9, 0, 0, <0.375,0.875,0.0>, 0.95, ZERO_VECTOR, <0.0,1.0,0.0>, ZERO_VECTOR,
                                                 17, -1, TEXTURE_BLANK, <1 .0,1.0,0.0>, ZERO_VECTOR, 0.0,
                                                 6, ,
                                                 18, -1, ZERO_VECTOR, 0.4,
                                                 8, ,
                                                 7, <3 .0,5.0,0.01>]);
    }
    touch_start(integer nd)
    {
        if(llToLower(llGetObjectDesc()) == "owner")
        {
            while(nd)
            {
                if(llDetectedKey(--nd) == llGetOwner())
                OperateDoors();
            }
        }
        else
        OperateDoors();
    }
    timer()
    {
        llSetTimerEvent(0.0);
        if(open)
        OperateDoors();
    }
}

 

Simple Sliding Door

Expired

//Sliding Door v4
//Works when linked
//by Kayla Stonecutter
 
//How far in meters to travel in each direction.  Two or all three can be used for angled movement
//NOTE: when linked, this is relative to the root prim
//Positive = move north, negative = move south
float       NorthSouth = 0.0;
//Positive = move east, negative = move west
float       EastWest = -0.85;
//Positive = move up, negative = move down
float       UpDown = 0.0;
 
//The amount in seconds to stay open, set to 0 to not autoclose
float       Timer = 240.0;
 
//Sound to play on open, either a UUID or a name in the door contents
//if a name, it must be exact. Leave at "" for no sound
string      OpenSound = "cb340647-9680-dd5e-49c0-86edfa01b3ac";
 
//Volume to play open sound, 0.0 is same as no sound, 1.0 is max
float       OpenVol = 1.0;
 
//Sound to play on close, either a UUID or a name in the door contents
//if a name, it must be exact. Leave at "" for no sound
string      CloseSound = "e7ff1054-003d-d134-66be-207573f2b535";
 
//Volume to play close sound, 0.0 is same as no sound, 1.0 is max
float       CloseVol = 1.0;
 
//misc variables
vector      Pos;
vector      Offset;
integer     Open;
integer     x;
 
default
{
    state_entry()
    {
        Offset = ;
    }
 
    touch_start(integer num)
    {
        for(x = 0; x