Give random object

De DigiWiki.

Place this in an object with a big inventory (well, doesn't have to have LOTS in it) and touch to recieve any ole random object.

// Emmas Seetan 21 September, 16:46
 
default
{
    touch_start(integer total_number)
    {
        float totalobjects = llGetInventoryNumber(INVENTORY_OBJECT); //number of objects
        totalobjects = llFrand(totalobjects); //Total objects
        //Give any random  object out of the total
        llGiveInventory(llDetectedKey(0),llGetInventoryName(INVENTORY_OBJECT, (integer)totalobjects));
    }
}
Outils personnels
  • Cette page a été consultée 899 fois.
donate
Google Ads