Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How to get the UUID of an avatar

AnneMarie Paule
Registered User
Join date: 2 Jul 2008
Posts: 3
07-02-2008 02:21
anyone knows how can I get the UUID of a name? is there an opposite to llkey2name?

i'm new, and been searching for hours and can't find any clue...
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
07-02-2008 02:46
From: AnneMarie Paule
anyone knows how can I get the UUID of a name? is there an opposite to llkey2name?

i'm new, and been searching for hours and can't find any clue...
There's no opposite to llKey2Name.

You have a few choices:

1) llSensor if they're nearby
2) touch_start(), again if they're nearby
3) Use an external database like w-hat's: http://w-hat.com/name2key
AnneMarie Paule
Registered User
Join date: 2 Jul 2008
Posts: 3
07-02-2008 02:58
thanks Jil!..
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
07-02-2008 04:37
just a note, external databases are said to have occassional errors. So verify the key is correct.

Inworld, you can also use collission to detect them if they conveniently are willing to walk into, or onto, your object (or if you're willing to hit them with an object.. like a bullet). A bullet could strike an avatar (or intersect if phantom), and then "region say" the detected UUID for use.

Likewise, I think there has been some efforts at using the web search.. ( http://taterunino.net/searchform.html ) to look up an avatar's name, and thus determine their UUID by decoding the URL of the returned results. IT seems however, that this may be less reliable than the external database method.
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Laurence Corleone
Registered User
Join date: 12 Oct 2006
Posts: 126
07-02-2008 08:38
I don't remember where I got this or whose script it is but put this in a prim and say /99 uuid avatarname and it will tell you their uuid.

Or you can say /99 online avatarname and it will tell you if they are online or not.

CODE

string NAME = "";
string URL = "http://w-hat.com/name2key";
key reqid;
integer uuid = FALSE;
key oncheck;
integer chan = 99;

default
{
state_entry()
{
llListen(chan,"",llGetOwner(),"");
llOwnerSay("I listen on channel "+(string)chan+" and you can use the commands 'uuid avatarname' or 'online avatarname' as functions");
}

listen(integer number, string name, key id, string message)
{
list temp = llParseString2List(message,[" "],[]);
string com = llToLower(llList2String(temp,0));
string who = llList2String(temp,1)+" "+llList2String(temp,2);
if(llGetListLength(temp) != 3)
{
llOwnerSay("can't check that");
return;
}
if(com == "online")
{
NAME = who;
reqid = llHTTPRequest( URL + "?terse=1&name="+llEscapeURL(NAME), [], "" );
uuid = FALSE;
}
else if(com == "uuid")
{
NAME = who;
reqid = llHTTPRequest( URL + "?terse=1&name="+llEscapeURL(NAME), [], "" );
uuid = TRUE;
}
}

http_response(key id, integer status, list meta, string body)
{
if ( id != reqid )
{
return;
}
if ( status == 499 )
{
llOwnerSay("name2key request timed out");
}
else if ( status != 200 )
{
llOwnerSay("the internet exploded!!");
}
else if ( (key)body == NULL_KEY )
{
llOwnerSay("No key found for " + NAME);
}
else
{
if(!uuid)
{
oncheck = llRequestAgentData(body, DATA_ONLINE);
return;
}
llOwnerSay(NAME + "'s key is: " + body );
}
}

dataserver(key id,string data)
{
if(id == oncheck)
{
string status = "offline";
if(data == "1")
{
status = "online";
}
llOwnerSay(NAME + " is: " + status );
}
}

on_rez(integer rez)
{
llResetScript();
}
}
_____________________
There are no stupid questions, just stupid people.
AnneMarie Paule
Registered User
Join date: 2 Jul 2008
Posts: 3
07-02-2008 18:19
THANK YOU guys!.

nice to have you around here to provide a quick answer for newbies like me.. appreciate it a lot!.