L$ Gift Giver ( V2 )

Expired

TAKE CARE WITH THIS ONE. IT WILL DEDUCT L$ FROM YOUR ACCOUNT ONCE YOU GRANT PERMISSIONS.

 

 

The script will give a gift of the stated amount of L$ to whoever touches the object it is in. The money will be deducted from the object owner's account. Only one gift will be given to each agent and only if the total amount given since the last time permissions were granted has not been maxxed. Once the amount given is equal to the total stated, the script will enter a quiet state and wait to be reset.

// V2 //
 
integer total = 100; // Total amount the script is allowed to give away.
 
integer gift = 1; // Amount to give per gift.
 
/////////////////////////////////////////////
 
key owner; // Used to store the owners UUID.
 
integer perms; // Used to store if permissions were granted.
 
integer given; // Used to count the total amount given.
 
list agents = []; // Used to store the UUIDs of the agents who have had a gift.
 
default
{
    on_rez(integer param)
    {
        llResetScript(); // Clear all lists and reset all variables. This action will also clear the permissions.
    }
    changed(integer change)
    {
        if(change & CHANGED_OWNER) // If the script or object changes ownership the script will not be able
        llResetScript();           // to deduct cash from the previous owners account.
    }
    state_entry()
    {
        owner = llGetOwner(); // Store the owners key.
        llRequestPermissions(owner, PERMISSION_DEBIT); // !! THIS MEANS IT WILL TAKE YOUR MONEY !!
    }
    run_time_permissions(integer perm)
    {
        if(perm & PERMISSION_DEBIT) // Have we got the permissions we requested?
        perms = TRUE; // Store the result of success.
        else
        llRequestPermissions(owner, PERMISSION_DEBIT); // If not we ask for them again.
    }
    touch_start(integer nd)
    {
        while(nd && (given 

 

Give Only to Agents of an Age ( V1 )

Expired

Simple freebie giver that discriminates against old people. Use to allow only newer residents to grab your freebies.

    https://d1yjxggot69855.cloudfront.net/skins/monobook/bullet.gif); color: rgb(0, 0, 0); font-family: verdana, helvetica, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
  • The measure of age isn't perfect but, the worst it will be off by is a day or so.

Load the prim up with stuff (of any type (set free scripts to "Not Running")) and the script will automatically read the contents and be ready to hand them out.

 

 

// V1 //
 
integer noobage = 30; // Age in days upto which an agent is considered eligible.
 
string folder_name = "Folder"; // name of folder as it appears in the agents inventory.
 
///////////////////////////////////////////////////////////////////////////////////////
 
list inv = [];
 
integer Inv = 0;
 
integer busy = 0;
 
list waiting = [];
 
key iq = NULL_KEY;
 
key Agent = NULL_KEY;
 
integer ThankYouForTheDays(string d)
{
    return llRound((((float)llGetSubString(d, 0, 3)) * 365.25) +
                   (((float)llGetSubString(d, 5, 6)) * 30.4375) +
                   ((float)llGetSubString(d, 8, 9)));
}
 
integer Noob(string dob, string date)
{
    if((ThankYouForTheDays(date) - ThankYouForTheDays(dob)) <= noobage)
    return 1;
    return 0;
}
 
default
{
    on_rez(integer param)
    {
        llResetScript();
    }
    changed(integer change)
    {
        if(change & (CHANGED_OWNER | CHANGED_INVENTORY))
        llResetScript();
    }
    state_entry()
    {
        integer noi = llGetInventoryNumber(INVENTORY_ALL);
        string name;
        while(noi)
        {
            if((name = llGetInventoryName(INVENTORY_ALL, (--noi))) != llGetScriptName())
            inv += [name];
        }
        Inv = llGetListLength(inv);
    }
    touch_start(integer nd)
    {
        while(nd && Inv)
        {
            key agent = llDetectedKey(--nd);
            if(!busy)
            {
                busy = TRUE;
                iq = llRequestAgentData((Agent = agent), DATA_BORN);
            }
            else
            {
                if(llListFindList(waiting, [agent]) == -1)
                waiting += [agent];
            }
        }
    }
    dataserver(key q, string data)
    {
        if(q == iq)
        {
            if(Noob(data, llGetDate()))
            llGiveInventoryList(Agent, folder_name, inv);
            if(llGetListLength(waiting))
            {
                iq = llRequestAgentData((Agent = llList2Key(waiting, 0)), DATA_BORN);
                waiting = llDeleteSubList(waiting, 0, 0);
            }
            else
            busy = FALSE;
        }
    }
}

 

Random Item Giver ( V2 ) IN ITS PRESENT STATE THIS SCRIPT SHOULD NOT BE USED TO GIVE ITEMS WITH NO COPY PERMISSIONS

Expired

/ V2 //
 
integer NOI;
 
default
{
    state_entry()
    {
        NOI = (llGetInventoryNumber(INVENTORY_ALL) - 1);
    }
    touch_start(integer nd)
    {
        while(nd && NOI)
        {
            string inv;
            while((inv = llGetInventoryName(INVENTORY_ALL, llRound(llFrand((float)NOI)))) == llGetScriptName());
            llGiveInventory(llDetectedKey(--nd), inv);
        }
    }
    changed(integer change)
    {
        if(change & (CHANGED_INVENTORY | CHANGED_OWNER))
        llResetScript();
    }
}

 

Configurable Unpacker ( V1 )

Expired

// V1 //
 
key owner;
 
string me;
 
integer open = FALSE;
 
list folder_contents;
 
string folder_name; // The folder name will establish from the description of the object this script is in.
 
// CHANGE ONLY THE SETTINGS BELOW //
 
integer give_this_script = TRUE; // Give this FREE script away with the other contents? Think about it....
 
integer allow_only_owner = FALSE; // Owner only or open to all?
 
integer self_delete = FALSE; // Self delete?
 
integer timed_deletion = FALSE; // Delete immediately after giving contents or hang around a bit?
 
float deletion_delay = 10.0; // Length of time to hang around in seconds (if timed_deletion is set TRUE)
 
string display_rez_text = ""; // Floating text on rez?
 
string localchat_rez_text = ""; // Chatted message on rez?
 
string ownerchat_rez_text = ""; // Chatted message only to owner on rez?
 
string display_deletion_text = ""; // Floating text before deletion?
 
string localchat_deletion_text = ""; // Chatted message before deletion?
 
string ownerchat_deletion_text = ""; // Chatted message only to owner before deletion?
 
vector rez_text_color = <1 .0,1.0,1.0>; // Color of floating text if set to show on rez.
 
vector deletion_text_color = <1 .0,1.0,1.0>; // Color of floating text if set to show before deletion.
 
float rez_text_alpha = 1.0; // Transparency of floating text if set to show on rez.
 
float deletion_text_alpha = 1.0; // Transparency of floating text if set to show before deletion.
 
// CHANGE ONLY THE SETTINGS ABOVE //
 
OnRezTextOptionsFunctionThingy(integer o)
{
    if(display_rez_text != "")
    llSetText(display_rez_text, rez_text_color, rez_text_alpha);
    if(localchat_rez_text != "")
    llSay(0, localchat_rez_text);
    if(ownerchat_rez_text != "")
    llOwnerSay(ownerchat_rez_text);
    if(!o)
    {
        integer count = 0;
        integer NOI = llGetInventoryNumber(INVENTORY_ALL);
        if(NOI)
        {
            folder_contents = [];
            do
            {
                string name = llGetInventoryName(INVENTORY_ALL, count);
                if(name == me)
                {
                    if(give_this_script)
                    folder_contents += [name];
                }
                else
                folder_contents += [name];
            }
            while((++count)