Difference between revisions of "Key2Name"

From Second Life Wiki
Jump to navigation Jump to search
(Created page with "{{LSLC|Library}} == Black DB Key2Name == Can also use [http://www.blackclan.net/ Black DB Name2Key Website] and use the Live name search. == llName2Key Script == <lsl> string …")
 
(:))
Line 45: Line 45:
     }
     }
}</lsl>
}</lsl>
==See Also==
[[Who]]

Revision as of 15:15, 6 January 2013


Black DB Key2Name

Can also use Black DB Name2Key Website and use the Live name search.

llName2Key Script

<lsl> string black_db_key2name_service = "http://blackclan.net/name2key/k2n.php?q="; 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>

See Also

Who