Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Create a bunch of new scripts in inventory, give them cool names like Ultrapocolypse,
- // Megarmageddon, and Bob. Copy this code to each of your recently created scripts,
- // rez a box, and dump these scripts inside.
- // Although theoretically the surviving script should be the one announcing its victory
- // You may want to use edit to peek inside the box to see which one actually survived.
- // Expect to see "Script is missing from database" if you try to open any remaining
- // non-survivor scripts in your makeshift arena. The surviving script will stay intact
- // and accessible.
- // Reward the winning script by saving it in mono and take it back into inventory. It
- // will be slaughtered if you leave it in the box.
- // Edie Shoreland, Evie Moriguchi, and NawtieNitey 2019
- delete_scripts()
- {
- string thisScript = llGetScriptName();
- string inventoryItemName;
- integer index = llGetInventoryNumber(INVENTORY_SCRIPT);
- while (index)
- {
- --index;
- inventoryItemName = llGetInventoryName(INVENTORY_SCRIPT, index);
- if (inventoryItemName != thisScript) llRemoveInventory(inventoryItemName);
- }
- }
- default
- {
- state_entry()
- {
- delete_scripts();
- llSleep (10);
- llSay (0, llGetScriptName() + " is the winner!");
- }
- touch_end(integer bye)
- {
- llSay (0, "The arena is closed!");
- //llDie(); //Time to destroy the evidence
- }
- }
Add Comment
Please, Sign In to add comment