Top Free Scripts
Script ID : 10
Audience : Default
Version 1.00.02
Published Date: 2006/12/15 7:02:56
Reads : 17030
Agent/Avatar

I made the following script for my store. It tells the Owner how many Landmarks have been given away when the owner Touches the object.
(It will not give the owner a Landmark, 'cause that would get annoying everytime you checked the tally.)

integer given;

default
{
    
on_rez(integer start_param)
    {
        
llResetScript();
    }
    
    
state_entry()
    {
        
given 0;
        
llOwnerSay("Be sure to only have one landmark in the inventory.");
        
llOwnerSay("Touch at any time to see how many Landmarks have been given away!");
        
llSetText("Touch for a Landmark", <0.901960.725490.35294>, 1.0);
    }

    
touch_start(integer total_number)
    {
        if ( 
llDetectedKey(0) != llGetOwner() )
        {
            
given given 1;
            
llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_LANDMARK0));
        }
        else if ( 
llDetectedKey(0) == llGetOwner() )
        {
            
llOwnerSay((string)given " landmarks have been given away since this object was rezzed.");
        }
    }
}

0
|  Links 
Printer Friendly Page Send this Script to a Friend
Search for Help
New Product
Free Item
Sponsor

Site Info
Total Hits