|
Aqua Razor
Registered User
Join date: 14 Sep 2007
Posts: 2
|
06-27-2008 18:35
Hi, Is there any function that calls the sim map texture? I would like to have the sim map in a prim. Did searched but found nothing. Thanks in advance.
|
|
Max Pitre
Registered User
Join date: 19 Jul 2006
Posts: 370
|
06-27-2008 20:40
I think Jesse Barnett made a script for that. It's here in the forums I think somewhere. Found it on my hard drive... key http_request_id; string URL = "http://www.subnova.com/secondlife/api/map.php"; string SIM_NAME; integer iLine = 0; integer CHANNEL = 1000; string name = "sim name"; default { on_rez(integer n) { llResetScript(); } state_entry() { vector temp; list temp_name; integer i=0; temp = llGetScale(); http_request_id = llHTTPRequest(URL + "?" + "sim" + "=", [], ""); iLine = 0; temp_name = llParseString2List(name,[],[" "]); for (i = 0; i < llGetListLength(temp_name); i++) { if (llList2String(temp_name,i) == " ") { temp_name = llListReplaceList(temp_name,["_"],i,i); } } SIM_NAME = llDumpList2String(temp_name,""); http_request_id = llHTTPRequest(URL + "?" + "sim" + "=" + SIM_NAME, [], ""); llSetTimerEvent(86400); } timer () { llResetScript(); } http_response(key request_id, integer status, list metadata, string body) { if (request_id == http_request_id) { llSetTexture(body, 0); } } }
|
|
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
|
06-27-2008 21:34
nice, i took the liberty of screwing with the script  MRC update: -added touch_start reset -sim name defined by object description key http_request_id; string URL = "http://www.subnova.com/secondlife/api/map.php"; string SIM_NAME; integer iLine = 0; integer CHANNEL = 1000; string name; default { on_rez(integer n) { llResetScript(); } state_entry() { name = llGetObjectDesc(); vector temp; list temp_name; integer i=0; temp = llGetScale(); http_request_id = llHTTPRequest(URL + "?" + "sim" + "=", [], ""); iLine = 0; temp_name = llParseString2List(name,[],[" "]); for (i = 0; i < llGetListLength(temp_name); i++) { if (llList2String(temp_name,i) == " ") { temp_name = llListReplaceList(temp_name,["_"],i,i); } } SIM_NAME = llDumpList2String(temp_name,""); http_request_id = llHTTPRequest(URL + "?" + "sim" + "=" + SIM_NAME, [], ""); llSetText("Sim: "+(string)llGetObjectDesc(),<1,1,1>,1); llSetTimerEvent(86400); } touch_start(integer touchy) { llResetScript(); } timer () { llResetScript(); } http_response(key request_id, integer status, list metadata, string body) { if (request_id == http_request_id) { llSetTexture(body, 0); } } }
|
|
Coder Kas
Registered User
Join date: 1 Jun 2008
Posts: 2
|
06-29-2008 20:18
/54/71/248800/1.htmlTry searching before posting to reduce the number of repeated threads.
|