Give Random Object

Written by: Headmaster
default
{
    touch_start(integer total_number)
    {
        float totalobjects = llGetInventoryNumber(INVENTORY_OBJECT);
        totalobjects = llFrand(totalobjects);
        llGiveInventory(llDetectedKey(0),llGetInventoryName(INVENTORY_OBJECT, (integer)totalobjects));
    }
}

 

Category: