August 21st, 2010
Sculpt UUID exporter 0.6c
March 23rd, 2010
// 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
March 23rd, 2010
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
March 22nd, 2010
// 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
March 20th, 2010
//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");
}
}


