Key2Name: Difference between revisions
Jump to navigation
Jump to search
Ackley Bing (talk | contribs) :) |
mNo edit summary |
||
| Line 1: | Line 1: | ||
{{LSLC|Library}} | {{LSL Header}}{{LSLC|Library}} | ||
= | {{LSL Function/warning|inline=*|Dead Service|The web service this script utilized is no longer available. The URL has been removed as the domain is now being used as a phishing site. This article exists for historical interest.}} | ||
== llName2Key Script == | == llName2Key Script == | ||
<lsl> | <lsl> | ||
string black_db_key2name_service = " | string black_db_key2name_service = ""; | ||
key QID; | key QID; | ||
Revision as of 00:07, 7 January 2013
| LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
llName2Key Script
<lsl> string black_db_key2name_service = ""; key QID;
string Name; key UUID;
llGetKey2Name(key UUID) {
QID = llHTTPRequest(black_db_key2name_service+llEscapeURL((string)UUID), [], "");
}
default {
state_entry()
{
llListen(0, "", llGetOwner(), "");
}
listen(integer channel, string name, key id, string str)
{
UUID = id;
llGetKey2Name(UUID);
}
http_response(key req, integer status, list meta, string body)
{
if(req == QID && status == 200)
{
Name = llStringTrim(body, STRING_TRIM);
if(llStringLength(Name) == 0)
{
//None found
}
else
{
llOwnerSay((string)UUID + "'s name = "+Name);
}
}
}
}</lsl>