Camp Chair Get L$

Thread Started By steadymobbin

2000
0
  • 43 Vote(s) - 3.28 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rate Thread
#1
PHP Code:
integer campmoney 0;
integer campadd 1// Amount for each camp time finished (L$).
integer camptime 900// Camp time for get the amount (seconds).

string sittext1 "Sit here for free money\nL$";
string sittext2 =  " every 15 minutes"// Change this line when you change the camp time (15mn = 900s).
string camptext "Paying L$1/15min.... Money: "// Change this line when you change the camp time and amount.
string piesittext "Camp";
string sittext;
string reciever;


default
{
    
state_entry()
    {
        
sittext sittext1 + (string)campadd sittext2;
        
llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
        
llSetText(sittext, <0.01.00.0>, 1);
        
llSitTarget(<0.00.00.6>, ZERO_ROTATION);
        
llSetSitText(piesittext);
    }
    
on_rez(integer start_param)
    {
        
llResetScript();
    }
    
changed(integer change)
    {
        if (
change CHANGED_LINK)
        {
            if (
llAvatarOnSitTarget() != NULL_KEY)
            {
                
reciever llAvatarOnSitTarget();
                
llSetText(camptext + (string)campmoney, <0.01.00.0>, 1.0);
                
llSetTimerEvent(camptime);
            }
            else
            {
                
llGiveMoney(recievercampmoney);
                
reciever "";
                
campmoney 0;  
                
llSetText(sittext, <0.01.00.0>, 1.0);
                
llSetTimerEvent(100000000);
            }
        }
    }
    
timer()
    {
        
campmoney campmoney campadd;
        
llSetText(camptext + (string)campmoney, <0.01.00.0>, 1.0);
        if (
llAvatarOnSitTarget() != NULL_KEY)
        {
        }
        else
        {
            
reciever "";
            
campmoney 0;  
            
llSetText(sittext, <0.01.00.0>, 1.0);
        }
    }
    
run_time_permissions(integer perm)  
    {
        if(
perm PERMISSION_DEBIT)
        {
            
llSetText(sittext, <0.01.00.0>, 1.0);
        }
        else
        {
            
llSetText("OFFLINE", <1.00.00.0>, 1.0);
            
llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
        }
    }

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




Possibly Related Threads…
Thread Author Replies Views Last Post
  Simple Lucky Chair Script Famenig 2 4,711 09-22-2014, 07:25 AM
Last Post: InigoMontoya

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...