IGS (In Game Data Server)

De DigiWiki.

Scripted LSL (Linden Second Language) Servers in SL (Second Life) run about the same way as a Real Life on would work. The "llEmail Tags" would work as a port going from one area to the next working over a wide area like from a Workstation to a DNS (Domain Name Server). But instead of ports and wires llEmail sends directly to a prims key or a outside email address.

Here is a example of a LSL server that when it gets a command from a out of sim device it sends back updated information. Just like a FTP (File Transfer Protocal) Server.

Device - Sends A Information Request For Texture When It Hears startup on Channel 0.

default
{
    state_entry() //Starts State
    {
        llListen( 0, "", NULL_KEY, "startup" ); //Starts to listion for startup
    }
 
    listen( integer channel, string name, key id, string message ) //chat collection
    {
        if ( id == llGetOwner() ) //Only allow owner to say this command.
        {
            llEmail("03ada148-cd2f-f9ed-60c4-e79251022fd2@lsl.secondlife.com", "request_startup_1", ""); //Send Message too prim key 03ada148-cd2f-f9ed-60c4-e79251022fd2.
        }
        else //If the chater is not the owner do somthing below this line.
        {
 
        }
    }
}

Server - Gets the request and resends the texture data to who ever sent the email.

default {
    state_entry() {
 
 
        llSetTimerEvent(0.1); //Starts Timer Event
    }
 
    timer() {
        llGetNextEmail("", "request_startup_1"); //Waits for email.
    }
 
    email(string time, string address, string subj, string message, integer num_left) { //Email Data
 
     llEmail(address+"@lsl.secondlife.com","6159fd53-d0ee-1a7b-c53c-d0df8989982a", ""); // When email is recived send main data back to address that was stringed on email data.
// This will not work. The address it gets has "@lsl.secondlife.com" attached already... this would come out at <key>@lsl.secondlife.com@lsl.secondlife.com
// So that line should just read - llEmail(address,"6159fd53-d0ee-1a7b-c53c-d0df8989982a", ""); ?? Correct me if I'm wrong ~ Rove Stromer 
 
    }
}

Device - Gets the information and sets the texture UUID from the server to the prim.

default {
    state_entry() {
 
 
        llSetTimerEvent(0.1);
    }
 
    timer() {
        llGetNextEmail("", ""); //Gets any emails coming to this object,
    }
 
    email(string time, string address, string subj, string message, integer num_left) { //email data
 
    llSetTexture(subj,ALL_SIDES); //Gets the subject of the email which holds the texture and sets it to all sides of the prim.
 
    }
}
Outils personnels
  • Cette page a été consultée 318 fois.
donate
Google Ads