Jump to content
Les White

Current State of Name2Key hacks

Recommended Posts

Does anyone have any information or clues about the current state of name2key hacks? What are people using these days? I need something that works to use for gifting items. Same old story.

No need to point me to the wiki or other sources unless you KNOW it works. I'm a long time scripter and I've been testing a bunch of methods today with poor results.

Any tips or hints from people who use something that works would be very appreciated.

 

Share this post


Link to post
Share on other sites

Looks like old school is the winner!

Active database with 8 million+ names, easy hooks and CSV dumps to allow me to make a back up DB should they fail.

Thank Innula. I hope I can return the favor some day.

Share this post


Link to post
Share on other sites

I use w-hat myself, but Innula convinced me a year or two ago that it was smart to use a backup service as well, since no single service manages to capture all UUIDs. Here's what I have been using.  As you'll see, I'm using w-hat as the backup here, and http://vwrsearch.secondlife.com  as the primary source:

key kReq;
key kReq2;
string NAME;
integer gChan;
 
default
{
    state_entry()
    {
        gChan = (integer)llFrand(1000000.0) -492;
        llListen(gChan, "", llGetOwner(), "");
    }
    
    touch_start(integer num)
    {
        llTextBox(llGetOwner(), "\nType the name of an avatar to retrieve the key:", gChan);
    }
    
    listen(integer channel, string name, key id, string message)
    {
        NAME = message;
        state kn2k;
    }
}
 
state kn2k
{
    state_entry() 
    {
        llSetTimerEvent(0.5);
    }
    
    timer() 
    {
        llSetTimerEvent(0);
        kReq = llHTTPRequest("http://www.w3.org/services/html2txt?url=" + 
            llEscapeURL("http://vwrsearch.secondlife.com/client_search.php?q=") + llEscapeURL(NAME), 
            [HTTP_BODY_MAXLENGTH, 16384], "");
    }
 
    http_response(key request_id, integer status, list metadata, string body) 
    {
        key avKey;
        if(request_id == kReq)
        {
            body = llList2String(llParseString2List(body, ["http://world.secondlife.com/resident/"], []), 1);
            body = llList2String(llParseString2List(body, ["\n"], []), 0);
            if (avKey = (key)body)
            {
                llOwnerSay("\n"+NAME + "'s key is: " + body );
                state default;
            }
            else
            {
                llSay(0,"\n Not in N2K. Trying w-hat database ... ");
                kReq2 = llHTTPRequest("http://w-hat.com/name2key"+ "/" + llEscapeURL(NAME), [], "" );
            }
        }
        else if(request_id == kReq2)
        {
            if (avKey = (key)body)
            {
                llOwnerSay("\n"+NAME + "'s key is: " + body );
                state default;
            }
            else
            {
                llOwnerSay("\n"+NAME + "'s key is not in either database.");
                state default;
            }
        }
    }
}

 

Edited by Rolig Loon
  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...