Fill a prim with this script and as many objects as you like. User Touches and gets 1 random object. (No more than 100 objects is suggested for best results.)
default
{
touch_start(integer total_number)
{
float totalobjects = llGetInventoryNumber(INVENTORY_OBJECT);
totalobjects = llFrand(totalobjects);
llGiveInventory(llDetectedKey(0),llGetInventoryName(INVENTORY_OBJECT, (integer)totalobjects));
}
}
|