Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Roz's Thunderdome Gift Box
- //DON'T USE THIS TO RESELL NO-TRANSFER ITEMS
- //THIS ITEM IS NOT FOR GACHA RESELLERS, IT
- //WILL DELETE ITEMS FROM THE PRIM INVENTORY
- //ONCE IT IS REZZED. THIS IS ONLY FOR FULL
- //PERM/COPY&TRANS ITEMS YOU HAVE MADE, HAVE
- //SET PERMISSIONS FOR, OR CAN SAFELY KEEP
- //BACKUPS OF IN YOUR INVENTORY!
- //IT WILL DELETE ITEMS IN THE PRIM INVENTORY!
- //Make sure the script is in the box FIRST!
- //Then place your promotional "gacha" items
- //inside (along with any promotional textures,
- //landmarks, or non-object items). Once the
- //box is rezzed, an item is selected at random
- //and all other objects are deleted from the
- //box's inventory.
- //You can set the box for "sale" inworld (as
- //long as you don't take it inventory), or
- //you can take the box into inventory and send
- //it to others, or give it away as a promo
- //item for others to rez. If you accidentally
- //"wear" the box while it's in your inventory,
- //you'll have to create a new one.
- //This script can be thwarted in a no-script
- //rez area. Use for promo items, not for
- //gacha event type items.
- default
- {
- on_rez(integer start_param)
- {
- string pickOne;
- string rollCall;
- integer howMany;
- integer index;
- howMany = llGetInventoryNumber(INVENTORY_OBJECT);
- pickOne = llGetInventoryName(INVENTORY_OBJECT, (integer)llFrand(howMany));
- for (index=(howMany-1);index>=0;index--)
- {
- rollCall = llGetInventoryName(INVENTORY_OBJECT,index);
- if (rollCall != pickOne)llRemoveInventory(rollCall);
- //THIS DELETES ALL OBJECTS EXCEPT ONE RANDOM OBJECT!
- //Landmarks, textures, and system layer clothing are
- //still safe, though.
- }
- llSetObjectName(pickOne + " (BOXED)" );
- llOwnerSay("This script can be thwarted by opening your box in a no-script parcel");
- llOwnerSay("But I'll bet you already knew that!");
- llRemoveInventory(llGetScriptName()); //Script self deletes.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement