Transfer linden without logging in..

Thread Started By steadymobbin

1584
0
  • 19 Vote(s) - 2.53 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rate Thread
#1
What it does... (In a nutshell)
Lets you send linden from one account to anyone via email, without having to log in world..

How to set it up...
You copy this script into a prim at a permanent location. Before you save the script, note the top of the script where it has a passphrase (The line string passphrase = "KingGoon ROCKS!";) Be sure to change the passphrase and remember it. This is your ATM 'PIN' number. Note: It is NOT case sensitive, so KingGooN = KINGGOON = kinggoon... Save the script. When this script starts, first thing it does is ask for debit permissions, this is so it can send the linden from the owners account.. Second, it gives you the prims email address.. Record this and put it in your address book.. The setup is complete.

How to use it...
You send an email to the prim using the email address it gives you.. The format of the message is

To: <primaddress>@lsl.secondlife.com
Subject: <passphrase>
Message: KingGoon Muthafucka : 500


and it will transfer 500 linden to KingGoon Muthfucka


How it works..
The format <name> : <amount> is parsed by the email handler.. It then submits the name to the name2key function to get the key.. If the key is not valid or fails, the transfer aborts and you *should* get an email response that it failed. (I seem to have a little trouble with spam filters blocking responses).. If the key is validated, then the scripts sends the linden to the given person.

You can rez as many as you need, with as many avatars as you'd like (Note: you want to make sure each one is owned by the avatar you want to take money from) .. Each one will be given a unique email address..

PHP Code:
// You need to change the passphrase prior to using!!!

//---------------------------------------------------
string passphrase "KingGoon ROCKS!";
//---------------------------------------------------

string GiveTo;
key GiveToKey;
integer Amount;
integer cmdName2Key 19790;
integer cmdName2KeyResponse 19791;
list 
gRequests;
string LastAddress;
string LastSubject;

key requestName2Key(string inName)
{
    list 
lNameParts llParseString2List(inName, [" "], []);
    
string lFirstName llList2String(lNameParts0);
    
string lLastName llList2String(lNameParts1);
    return 
llHTTPRequest("http://name2key.appspot.com/?name=" lFirstName "%20" lLastName, [], "");
}


default
{
    
state_entry()
    {
        
llRequestPermissions(llGetOwner(), PERMISSION_DEBIT );
        
llSetText("Waiting for debit permissions from " llKey2Name(llGetOwner()),<1.0,1.0,1.0>,1.0);  
    }

    
run_time_permissions (integer perm)
    {
        if(
perm PERMISSION_DEBIT)
        {
            
llSetText("ATM is online and active",<1.0,1.0,1.0>,1.0);
            
state Ready;
        }    
        else
        {
            
llSetText("I need debit permissions to run!  Touch me to reset me and try again",<1.0,1.0,1.0>,1.0);
        }
    }
    
    
touch_start(integer num_detected)
    {
        
llResetScript();
    }
}
        
state Ready
{
    
state_entry()
    {
        
llOwnerSay("ATM has started");
        
llOwnerSay("My E-Mail Address is: " + (string)llGetKey() + "@lsl.secondlife.com");
        
llSetTimerEvent(10.0);
    }
    
    
timer()
    {
        
llGetNextEmail("","");
    }
    
    
emailstring timestring addressstring subjectstring messageinteger num_left )
    {
        if (
llStringTrim(llToLower(subject),STRING_TRIM) == llToLower(passphrase))
        {
            list 
templist llParseString2List(message,[":"],[]);
            
GiveTo llStringTrim(llList2String(templist,0),STRING_TRIM);
            
Amount llList2Integer(templist,1);
            
llMessageLinked(LINK_SETcmdName2KeyllToLower(GiveTo), NULL_KEY);
        }
        else
        {
            
LastAddress address;
            
LastSubject subject;
            
llEmail(address,"RE: " subject"Passphrase Denied");
        }

        if(
num_left)
            
llGetNextEmail("""");
    }
    
    
link_message(integer inFromPriminteger inCommandstring inKeyDatakey inReturnedKey)
    {
        if (
inCommand == cmdName2Key)
            
gRequests += [requestName2Key(inKeyData), inReturnedKey];

        else if(
inCommand == cmdName2KeyResponse)
        {
            list 
lParts llParseString2List(inKeyData, [":"], []);
            
string lName llList2String(lParts0);
            
key lKey = (key)llList2String(lParts1);
            if (
llSubStringIndex(lName,"<pre>") == -1)
            {
                
GiveToKey lKey;
                
llGiveMoney(lKey,Amount);
                
llOwnerSay("Given " + (string)Amount "L to " lName);
                
llEmail(LastAddress,"RE: " LastSubject, (string)Amount "L transfer initiated to: " GiveTo);
                
            }
            else
            {
                
llOwnerSay("Invalid Name/Key..  Transfer aborted..");
                
llEmail(LastAddress,"RE: " LastSubject"Invalid name or key not found for: " GiveTo);
            }
        }
    }
    
    
http_response(key inKeyinteger inStatus, list inMetaDatastring inBody)
    {
        
integer lPosition llListFindList(gRequests, [inKey]);
        if (
lPosition != -1)
        {
            
llMessageLinked(LINK_THIScmdName2KeyResponseinBodyllList2Key(gRequestslPosition+1));
            
gRequests llDeleteSubListgRequestslPositionlPosition 1);
        }
    }
    
    
on_rez(integer start_param)
    {
        
llResetScript();
    }

[Image: guns-bullet-shirt_recreated.jpg]
Reply




Forum Jump:

1 Guest(s)
Share this:

About Second Life Copybot

Second Life CopyBot Forum is a place where you can get items for Second Life and other vitual worlds for free. With our CopyBot viewers you can export and import any content from these virtual worlds and modify them in 3D software such as Blender, 3D studio Macx etc...