Group Only Give

Date 2009/5/28 4:28:27 | Topic: Agent/Avatar

Gives an Object only to avatars with the same active group.

Object to give must be inside prim with this script.

If item is not an object or you wish to give more than 1 item at once, put those items into a "box" object to be given.

default
{
    
touch_start(integer total_number)
    {
        
integer number 0;
        do
        {
            if (
llDetectedGroup(number))
                
llGiveInventory(llDetectedKey(number), llGetInventoryName(INVENTORY_OBJECT,0));
            else
                
llSay(0"Wrong active group!");
        }while(
total_number > ++number);
    }
}




This script comes from Alicia Stella Design - Best Tip Jars in Second Life
http://www.aliciastella.com

The URL for this script is:
http://www.aliciastella.com/modules/AMS/article.php?storyid=28