Jump to content

Current State of Name2Key hacks


Les White
 Share

You are about to reply to a thread that has been inactive for 2372 days.

Please take a moment to consider if this thread is worth bumping.

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.

 

Link to comment
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
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2372 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...