Difference between revisions of "Profile Picture"
Jump to navigation
Jump to search
(Created page with "== Profile Picture == Use this script to get user's profile picture UUID and diplay it in-world. === Usage === Create a box, add the code and click. * Note that the string uuid …") |
|||
Line 1: | Line 1: | ||
Use this script to get user's profile picture UUID and diplay it in-world. | Use this script to get user's profile picture UUID and diplay it in-world. | ||
Revision as of 19:13, 11 March 2011
Use this script to get user's profile picture UUID and diplay it in-world.
Usage
Create a box, add the code and click.
- Note that the string uuid is set on touch.
<lsl> key DefaultTexture = "9d45f95d-5bb5-0f01-7b3c-29c5297ce67e"; string URL_RESIDENT = "http://world.secondlife.com/resident/"; string uuid;
string meta_find = "<meta name=\"imageid\" content=\"";
default {
on_rez(integer r) { llResetScript(); } state_entry() { llSetTexture(DefaultTexture,2); } touch_start(integer n) { uuid = llDetectedKey(0); llHTTPRequest( URL_RESIDENT + uuid,[HTTP_METHOD,"GET"],""); } http_response(key req,integer stat, list met, string body) { integer meta_pos = llSubStringIndex(body, meta_find) + llStringLength(meta_find); string texture = llGetSubString(body, meta_pos, meta_pos + 35); llSetTexture(texture, ALL_SIDES); }
} </lsl> ---