osgrid.org
https://forums.osgrid.org/

Alternative Profile Picture v0.1
https://forums.osgrid.org/viewtopic.php?f=5&t=5920
Page 2 of 2

Author:  dj phil [ Wed Oct 31, 2018 12:18 pm ]
Post subject:  Re: Alternative Profile Picture v0.1

Hi Frankie Rockett,

I just tested my script "Alernative Profile Picture v0.1" and also the Lotek Ixtar script and they both work very well.

I think you made a mistake somewhere but there is no shame in this :P

PS: If you want the script to be quieter, you can always add llOwnerSay(body) to the very beginning of http_response.
You will know what the php script returns as an answer to the inworld script ...

Author:  paela argus [ Fri Nov 02, 2018 1:43 am ]
Post subject:  Re: Alternative Profile Picture v0.1

{L_CODE}:
// Alternative Profile Picture v0.1 by djphil (CC-BY-NC-SA 2.0 BE)

key query;
string url = "http://helper.osgrid.org/get_picture_uuid.php";

default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Initialisation ...");
        llSetTexture(TEXTURE_BLANK, ALL_SIDES);
    }
   
    touch_start(integer n)
    {
        query = llHTTPRequest(url + "?name=" + llDetectedName(0), [HTTP_METHOD, "GET"], "");
    }

    http_response(key response, integer status, list data, string body)
    {
        if (response == query)
        {
            body = llStringTrim(body, STRING_TRIM);
            if (body == "00000000-0000-0000-0000-000000000000") llResetScript();
            llSetTexture(body, ALL_SIDES);
        }
    }
}

Working well for me in Osgrid

Page 2 of 2 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/