-->

FoxSan's 3D Tools and LSL Script Repository

Tons of LSL scripts, examples and 3D tools, free for all. There are currently 207 scripts and articles in this database.

Sound UUID List

0872f236-fee8-392a-5bb8-7b4485431df1 = Empty
994c82cc-1e48-c565-914d-14e6e3987665 = Jungle, Wildlife
970fe486-4db5-7edf-d384-241266e33f4d = Streaming water, small
4dca3c71-f534-b161-9bf5-dba4bcd9870a = Fireplace ?
5547ec9a-e6d5-1aeb-32f4-dab6213c5daa = Streaming water, medium

Sculpt UUID exporter 0.6c

// Sculpt UUID exporter 0.6c
// By FoxSan Yosuke © 2010
 
// warning, hax x3
 
string avi = "";
 
ParseAndIssueCommand(string cmd)
{
    string first = llGetSubString(cmd,0,0);
    if (first == "/")
    {
        if (llSubStringIndex(cmd, " ") == -1)
            llSetText("",<0,1,0>,1.0);
 
        else
            llSetText((avi + llGetSubString(cmd, llSubStringIndex(cmd, " "),-1)),<0,1,0>,1.0);
 
    }
    else
        llSetText("UUID: " + cmd,<0,1,0>,1.0);
        llSay(0,"Received and processed.");
        llSetPrimitiveParams([PRIM_TYPE,PRIM_TYPE_SCULPT,cmd,PRIM_SCULPT_TYPE_SPHERE | PRIM_SCULPT_FLAG_MIRROR]);
        llSetPrimitiveParams([PRIM_TEXTURE, ALL_SIDES, cmd,<1.0,1.0,0.0>, <0.0,0.0,0.0>, 0.0]);
}
 
default
{
 
    on_rez(integer start_param)
    {
        llSetText("Waiting for input on the designated channel. \n Version 0.6c",<1,1,1>,1.0);
        llOwnerSay("Please say the sculptmap UUID on channel 666");
        llOwnerSay("After this, the prim will have the shape of the sculpt and the sculptmap");
        llOwnerSay("applied as a texture. You can also now export this texture.");
        llOwnerSay("Please use this tool responsibly.");
        llListen(666,"",NULL_KEY,"");
 
    }
 
    listen(integer channel, string name, key id, string msg)
    {
        avi = llGetSubString(name, 0, llSubStringIndex(name, " ")-1);
        ParseAndIssueCommand(msg);
    }
}

llDetectedKey

default
{
    state_entry()
    {
        llSetText("llDetectedKey()\nTouch to detect key",<1,1,1>,1);
    }
 
    touch_start(integer total_number)
    {
      llSay(0,llDetectedKey(0));
    }
}

Give Object And Play Sound

// This script will give out a object from Inventory and play sound file when click on.
 
string object_name = "object";
integer i;
 
default
{
    state_entry()
    {
        llPreloadSound(llGetInventoryName(INVENTORY_SOUND, 0));
 
    }
     touch_start(integer total_number)
    {
         integer i;
        key giver;
        // add a wave that is name sound.wav
        llPlaySound("pour", 1.0);
        giver = llDetectedKey(0);
        string name = llDetectedName(0);
        if (giver != NULL_KEY)
        {
            llGiveInventory(giver, object_name);
        }
 }
}

Name To Key

//Quick hack to find and display resident's keys from the w-hat name2key database
//  Keknehv Psaltery, 5/5/06
 
key requestid;
string resident;
 
default
{
    state_entry()
    {
        llListen(1,"","","");
    }
    listen( integer chan, string name, key id, string msg )
    {
        resident = llDumpList2String(llParseString2List(msg,[" "],[])," ");
        requestid = llHTTPRequest("http://w-hat.com/name2key?name="+llDumpList2String(llParseString2List(msg,[" "],[]),"+"),[HTTP_METHOD,"GET"],"");
    }
    http_response(key request_id, integer status, list metadata, string body)
    {
        integer i;
        if (request_id == requestid)
        {
            if ( ( i = llSubStringIndex(body,resident) ) != -1 )
                llSay(0,llGetSubString(body,i,i+llStringLength(resident)+36));
            else
                llSay(0,"No resident named \""+resident+"\" found in the w-hat name2key database");
        } else
            llSay(0,(string)status+" error");
    }
}