Search the Community
Showing results for tags 'llname2key'.
-
Hi there, I'd like to take a moment to announce two new script function that we here at the lab are just putting into testing on the Beta Grid(Aditi) and that will roll out to the main grid in the coming weeks. llName2Key and llRequestUserKey. These functions will provide the UUID of a named avatar. llName2Key only works for agents that are either in the region that the script is running on, llRequestUserKey will work for any agent on the grid. Documentation on these functions is on the Second Life wiki. Here: llName2Key and here: llRequestUserKey. They are available for testing on the beta grid (Aditi) in the following regions: Sylveon, Umbreon, Leafeon and Mystic Lane Sample Usage integer chat_handle = 0; list events; integer STRIDE = 2; default { state_entry() { llSetTextureAnim(ANIM_ON|LOOP, ALL_SIDES, 5, 5, 0, 23, 20.0); chat_handle = llListen(1, "", llGetOwner(), ""); } listen( integer channel, string name, key id, string message) { llSay(0, "Checking for \"" + message + "\""); llSay(0, "llName2Key = " + (string)llName2Key(message)); if (llGetOwner() != id) { llSay(0, "No dataserver lookup for you!"); return; } events += [ llRequestUserKey(message), message ]; } dataserver(key request_id, string data) { integer index = llListFindList(events, [ request_id] ); if (~index ) { string name = llList2String(events, index + 1); llSay(0, "Dataserver \"" + name + "\" = " + data ); events = llDeleteSubList(events, index, index + STRIDE - 1); } } } A quick afterward for people who were at the user group meetings: Please note the name change.