I am bored out of my mind

vibrokatana

New Member
I was so bored out of my mind I spent a half an hour creating this monstrocity of a script:

I wanted to see how close I could come to single, double click mouse functions in second life. Now I am bored again :\
Code:
integer gAllowEveryone = FALSE;         //To allow anyone to open/close the door
integer gRotationalDependant = TRUE;    //To move based on the rotation of the object, useful for unlinked doors that may be rezzed at different angles
vector gOffset = <0,-2,0>;              //The amount to move (negative)
float gDelay = 0.3;                     //The delay to allow for the second click and beginning movement
integer gCommandChannel = -1234;        //The base channel +FRand(200)
list gAdmins = ["Some Newb"];           //List of names to allow menu access, capitalization counts

//internal - do not modify
integer gTrigger = FALSE;               //Goes to true on first click, false on second and aborts movement
integer gClosed = TRUE;                 //The integer that varies the direction for opening/closing


GeberateMenu(key id)                    //Generate the menu and display the dialog
{       
    list Options = [];
    
    if(gAllowEveryone)
        Options += "lock";
    else
        Options += "unlock";
    
    Options += ["reset", "status"];
    
    llDialog(id, "Please select and option", Options, gCommandChannel);
}

StartTrigger()
{
    llSetTimerEvent(gDelay);
    gTrigger = TRUE;   
}

EndTrigger()
{
    gTrigger = FALSE;
    llSetTimerEvent(0); 
}

ScriptInit()                            //Add in the owner if he is not in there
{
    string OwnerName = llKey2Name(llGetOwner());
    if(!~llListFindList(gAdmins, [OwnerName]))
        gAdmins += OwnerName;
}

ShowStatus()
{
    string Message = "\n\t";
    
    Message += " Locked: ";
    if(gAllowEveryone)
        Message += "No";
    else
       Message += "Yes"; 
    
    Message += "\n\t Open: ";
    
    if(gClosed > 0)                     //-1 is open, 1 is closed
        Message += "No"; 
    else
        Message += "Yes";
    
    Message += "\n\t Admins: ";
    Message += llDumpList2String(gAdmins, ", ");
    
    llWhisper(0, Message);    
}

default
{
    changed(integer change)
    {
        if(change & CHANGED_OWNER)
            llResetScript();
    }
            
    state_entry()
    {
        ScriptInit();
        gCommandChannel += llRound(llFrand(200));           //Generate a random channel so they don't collide.  
        llListen(gCommandChannel, "", NULL_KEY, "");
    }
    
    touch_start(integer total_number)
    {
        key id = llDetectedKey(0);
        integer Verified;
        if((Verified = ~llListFindList(gAdmins, [llKey2Name(id)])) || gAllowEveryone)       //Verify as an admin (!=0) or allow everyone
        {
            if(Verified && llGetAndResetTime() < gDelay && gTrigger)                        //must be verified, on the second click and within the delay
            {
                EndTrigger();
                GeberateMenu(id);
            }
            else                                                                            //The first click
                StartTrigger();
        }
    }
    
    timer()
    {
        if(gTrigger)                                                                        //Incase the event fires check to see if it really needs to
        {
            vector MoveTo = llGetPos();
            
            if(gRotationalDependant)
                MoveTo += (gOffset * (gClosed = -gClosed)) * llGetRot();
            else
                MoveTo += (gOffset * (gClosed = -gClosed));

            llSetPos(MoveTo);
        }
        
        EndTrigger();
    }
    
    listen(integer channel, string name, key id, string message)
    {
        string AVName = llKey2Name(llGetOwnerKey(id));                                      //Generate the owner name -> naming object as an avatar doesnt work
        
        if(~llListFindList(gAdmins, [AVName]))                                              //verify they are an admin
        {
            if(message == "lock")
            {
                gAllowEveryone = FALSE;
                llWhisper(0,"Door Locked");   
            }
            else if(message == "unlock")
            {
                gAllowEveryone = TRUE;
                llWhisper(0,"Door Unlocked");   
            }
            else if(message == "reset")
            {
                llWhisper(0,"Resetting Script"); 
                llResetScript();
            }
            else if(message == "status")
                ShowStatus();
        }
    }
}

Tomorrow I guess I will go up to college and try to bury my nose in something to read. I am going insane, I need something interesting to do!

Please save me from my own insanity, I have spent time writing a door script, nothing good can come of this!
 
well i have two potential projects..... converting a normal WMP or winamp playlist to a shoutcast server one, and better support for darwine :D
 
well i have two potential projects..... converting a normal WMP or winamp playlist to a shoutcast server one, and better support for darwine :D

DO you know how boring it is to write converters? Besides, you can do it yourself, look up the "sed" command. If I can figure it out in 3 days you should be able to figure it out within a few weeks :p

sed -e 's/ *.*.http/http/' -e 's/rmvb.*/rmvb/' -e 's/$(echo -e \015)//' | sed -n '1,1 P';

hmm, I wrote this one awhile back to grab http....rmvb, it even has an error work around cause by some random issue with the storage system I was using.
 
ummm yeah vibro, i refuse to do coding, im a hardware junkie, software user. not a coder lol
 
make something with GameMaker XD

(this should be interesting--and I suggested this because I knew VK wouldn't do it)

EDIT: By the way, Atown, I have surpassed your post count :)
 
It was just that GM wasn't the kind of program I could picture you using, for whatever reason

dude.... with the amount of spam u generate... im not worried about ur post count being higher than mine lol
 
Atowns posts tend to be a lot less spammy. So C$ has to aim for 1.75x Atown in order to be considered having a "higher post count".
 
Atown, you quoted the wrong part of my post. The part you quoted made that post seem spammy--I was just telling him why I told him to make something with GM...
 
Atown, you quoted the wrong part of my post. The part you quoted made that post seem spammy--I was just telling him why I told him to make something with GM...

like i said, im not worried bout my post count :D
 
Oh, stop it.


Anyway, VK should make his own forum so that whenever someone types the word Microsoft they get auto-emailed with a long letter about why he really disapproves.
 
or read the bible outloud and announcing all the capitals, example:

Capital J-esus went to Capital J-erusulem for the Capital P-assover.

its alot of fun, me and my homegroup were bored one night lol
 
Back
Top