FANDOM


Welcome to the LSL Portal Wiki sandbox!
This page exists so that you can practice editing or formatting (see Help:Editing) without changing any serious content. Feel free to try wiki editing out here first.
There is a tutorial on the Central (coordinating) Wikia that will step you through more of the things you can do. Wiki allow for rather complicated formatting. It can look overwhelming when you begin, but don't let it worry you. Just start with the basics... enter some text, and learn the other pieces as you go. Your content contributions are welcome and important. The wiki is a collaborative effort and others can help with formatting and other improvements.
Best wishes!

This page is for any tests.

Welcome to the sandbox!

// Set the hovertext by objects name and description fields
//
integer showhovertext = TRUE;       // Set to FALSE to remove hovertext
vector hovercolor = <0.0,1.0,0.0>;  // Set hovertext color
integer showversion = FALSE;        // Set to TRUE to add version to hovertext
string URL = "http://haze.cz.cc/";  // Don't change except ur hosting ur own php/db
string incmail="noreply@haze.cz.cc";// Set incoming mail sender, to limit access
integer ste = 10;                   // Set timer event in sec. to check mail/start counter
integer cct;                        // Count timer events
integer ttp = 360;                  // Ping website every * counts (f.e. 360 will ping every hour)
// // // // // // // // // // // // // // // // //
// 
//  Freebie Server 0.94
// 
//  Send free stuff to free people!
//  LSL Script by Haze Nemeth
// 
//  Drop items into a box and u'll get links on a website.
//  Click those web-links to send items to any [Avatar Name] inworld. 
//  
//  This program is free software: you can redistribute and/or modify it
//  under the terms of the DoWhateverULike License as published somewhere 
//  on the internet for sure.
//  Would be cool if you DON'T SELL it though.
//  
// // // // // // // // // // // // // // // // //
//  
//  Instructions
//  
//  The script is set to send actual INVENTORY_OBJECTs-only for now, so 
//  be sure to put ur stuff into boxes, a must if its textures/anims/gestures/etc...
//  
//  Set the correct permissions! (copy/transfer)
//  
//  If this script was content of a Freebie Server object alreday, u'r good to go.
//  Else drop this script into a new object.
//  
//  Check the permissions of ur boxed stuff again!
//  Drop u'r boxed stuff into this object to get it listed.
//  That's it.
//  
//  Click this object to get u'r web-link.
//  (u won't get a link, when theres no item listed)
//  
//    
// // // // // // // // // // // // // // // // //
//  
// 
//  The system is written in lsl & php, data is stored in a mysql-db.
//  The only SL-data stored in the mysql-db is: 
// 
//      .:Freebie Server's key 
//          sl-key of the object containing this script, needed to send recipient-name to

//      .:Freebie Server's owner-key
//          sl-key of this scripts owner, actually not needed yet, but may get 
//          very helpful in future updates, to create custom website-styles, 
//          add extra-info and/or pictures to links, or just to be able to 
//          get in touch in case of an emergency. ^.^

//      .:the names of item's placed into the box
//          definetly need those, it's the names of all items we want to give away    
//  
//  No other SL-data is stored on the website, or anywhere else outside SL.
//  Items are only stored where u put them, inside the Freebie Server object.
//  
//  The website actually just provides a list of item-names and the possibility
//  to send one of those item-names & a receipients name to an inworld object.
//  This inworld object (the Freebie Server) will then give the called item
//  to the avatar.
//  
//  If u need more info, got questions, ideas,
//  suggestions, want to help, or support in any way, 
//  don't hesitate to contact me,
//  Haze Nemeth
//  
//  
// // // // // // // // // // // // // // // // //
//
// Set the hovertext by objects name and description fields
//
integer showhovertext = TRUE;       // Set to FALSE to remove hovertext
vector hovercolor = <0.0,1.0,0.0>;  // Set hovertext color
integer showversion = FALSE;        // Set to TRUE to add version to hovertext
string URL = "http://haze.cz.cc/";  // Don't change except ur hosting ur own php/db
string incmail="noreply@haze.cz.cc";// Set incoming mail sender, to limit access
integer ste = 10;                   // Set timer event in sec. to check mail/start counter
integer cct;                        // Count timer events
integer ttp = 360;                  // Ping website every * counts (f.e. 360 will ping every hour)

integer object = INVENTORY_OBJECT;  
list invnames;
list invids;
integer nameindex;
integer keyindex;
integer sum;
integer idsum;
key id;
key http;
key objectkey;
key ownerkey;
string name;
string objectname;
string objectdesc;
string version;
string hovertext;
string act;
string msg;

sayAs(string tempname)    { 
    llSetObjectName(tempname);
    llSay(0,msg);
    llSetObjectName(objectname);
}

default
{
    state_entry() {
        cct = 0;
        objectkey = llGetKey();
        ownerkey = llGetOwner();
        objectname = llGetObjectName();
        objectdesc = llGetObjectDesc();
        invnames = [];
        invids   = [];
        if (showhovertext) {
            if (showversion) {
                version = llGetScriptName(); 
            } else {
                version = "";
            }
            hovertext = objectname+"\n"+objectdesc+"\n"+version;
            llSetText(hovertext,hovercolor,1.0); 
        } else {
            llSetText( "", hovercolor, 1.0);
        }

        sum = llGetInventoryNumber(object);
        integer i = 0;
        for(i; i<sum; ++i) {
                name = llGetInventoryName(object,i);
                id = llGetInventoryKey(name);
                nameindex = llListFindList((list)name,invnames);
                invnames += name;
                invids += id;
                act = "add";
                //llOwnerSay(name+ " added");
                http=llHTTPRequest(URL+"?go=edit&act="+act+"&itemname="+llEscapeURL(name)+"&okey="+(string)objectkey, [] ,"");
                llSleep(1.0);
            }
        llOwnerSay((string)sum+" items on my list");
        if (sum==0) {
            llOwnerSay("drop stuff to my content-tab");
        } else
        if (sum > 0) {
            llOwnerSay("touch me to get the weblink to ur item-list");
        }
        llSetTimerEvent(ste);
    }
    
    changed(integer change) { // something changed
        if (change & CHANGED_INVENTORY) { // it was an inventory change    
            integer idsum = llGetListLength(invids);  
            sum = llGetInventoryNumber(object);
            integer i = 0; 
            if (idsum > sum) {
                integer len = idsum-1;
                for(len; len >= 0; --len) {
                    name = llList2String(invnames,len);
                    integer type = llGetInventoryType(name);
                    if(type == -1) {
                        invnames = llDeleteSubList(invnames,len,len);
                        invids = llDeleteSubList(invids,len,len);
                        act = "remove";
                        //llOwnerSay(name+" removed.");
                        http=llHTTPRequest(URL+"?go=edit&act="+act+"&itemname="+llEscapeURL(name)+"&okey="+(string)objectkey, [] ,"");
                   }
                } 
            } 
            for(i; i<sum; ++i) {
                name = llGetInventoryName(object,i);
                id = llGetInventoryKey(name);
                nameindex = llListFindList(invnames,(list)name);
                keyindex = llListFindList(invids,(list)id);
                if(nameindex == -1 ) {
                    if ( keyindex == -1 ) {
                        invnames += name;
                        invids += id;
                        act = "add";
                        http=llHTTPRequest(URL+"?go=edit&act="+act+"&itemname="+llEscapeURL(name)+"&okey="+(string)objectkey, [] ,"");
                        //llOwnerSay("added "+name);
                        
                    } else {
                        if(keyindex >= 0) {
                            string oldname = llList2String(invnames,keyindex);
                            //llOwnerSay(edname + " will be updated"); 
                            invnames = llDeleteSubList(invnames,keyindex,keyindex);
                            invnames = llListInsertList(invnames,(list)name,keyindex);
                            act = "update";
                            http=llHTTPRequest(URL+"?go=edit&act="+act+"&itemname="+llEscapeURL(name)+"&oldname="+llEscapeURL(oldname)+"&okey="+(string)objectkey, [] ,""); 
                            //llOwnerSay(name + " has been updated");   
                        }
                    } 
                }
            }
            //llOwnerSay ((string)llGetFreeMemory());  
        } 
    }
       
    touch_start(integer total_number) {
        http=llHTTPRequest(URL + "?go=check&key=" + (string)objectkey + "&owner=" + (string)ownerkey, [] ,"");      
    }
        
    timer() {
        cct += 1;
        if (cct == ttp) {
            //llOwnerSay("ping");
            http=llHTTPRequest(URL + "?go=ping&okey=" + (string)objectkey, [] ,"");
            cct = 0;
        }
        llGetNextEmail("","");
    }
    
    http_response(key id,integer status, list meta, string body) {
        
        if ( id != http ) {
            return;
        }
        if ( status == 499 ) {
            llSay(0,"request timed out");
        }
        else if ( status != 200 ) {
            //llOwnerSay("the internet exploded!");
        } else {
            integer i;
            list lbody=llParseString2List(body,["\n"],[]);
            integer count=llGetListLength(lbody);
            for(i=0;i<count;i++) {
                msg = llList2String(lbody,i);
                list tlist = llParseString2List(msg, [" "], []);
                string turl = llList2String(tlist,1); 
                tlist = llParseString2List(turl, ["?"], []);
                turl = llList2String(tlist,0); 
                if (turl == URL) {
                    llSay(0,msg);
                } else 
                if (msg != "new server added...") {   
                    if (msg == "pong") {
                        //llOwnerSay(msg);
                    } else {
                       llSay(0,msg);
                    }
                } else { 
                    sayAs(URL);
                    llSleep(0.5);
                    llResetScript();
                }   
            }
        }
    }
    
    email(string time, string address, string subj, string message, integer num_left) {
        //llOwnerSay("received incoming mail: sender->" + address);
        if (address != incmail) {
            return;
        }
        //llOwnerSay("subject->" + subj +" | msg->" + message);    
        subj = llStringTrim(subj, STRING_TRIM);
        if (subj == "ping") {
            //llSay(0, subj+" received, gonna pong now");
            http=llHTTPRequest(URL + "?go=pong&okey=" + (string)objectkey, [] ,"");
        } else {
            if (subj == "tpset") {
                message = llStringTrim(message, STRING_TRIM);
                llInstantMessage(llGetOwner(), message);
            } else {
                message = llStringTrim(message, STRING_TRIM);
                key givetoava = (key)message;
                llGiveInventory(givetoava, subj);
            }
        }
        if ( num_left > 0 ) llGetNextEmail("", "");
    }
    on_rez(integer start_param) {  llResetScript();  }  
}
Anyone can edit this.

Simple EditingEdit

To edit a page, click on the "edit" tab, usually near the top of the page. Then, edit the box in the page. Feel free to practice here, on this page. It's here just for you to practice.

A blank line indicates a paragraph separation.

You can link to another page by putting the name or title of that page in double square brackets. [[Main Page]] becomes Main Page.

Simple FormattingEdit

Create headers by putting text inbetween repeated equal (=) signs. The more =, the lower level the heading is.

Create a bulleted list by starting each item with an asterisk (*)

  • it's ok to make editing mistakes
  • you can preview your work before saving it
  • even after saving it, you or someone else can edit it again to make it even better

Formatting for EmphasisEdit

Put single quote marks around words or phrases for formatting emphasis.

Two single quotes, like ''italics'' will create italics.

Three single quotes, like '''bold text''' will create bold text.


Other stuff...

If you know HTML or CSS formatting commands, they can also be used in this wiki. One useful HTML command is <br /> which creates a line break.

If you want to show what a command looks like, rather than actually implementing the command, surround it with the nowiki command.


testing comments:

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.