// Written By: Ĵyм Ѡҩℓƒ (Jym Resident) /* LICENCE: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . or you may visit - http://license.idjhost.com/ */ // DESCRIPTION // Give folder of contents on touch default{ on_rez(integer p){ llInstantMessage(llGetOwner(), "Touch me to recieve contents."); llResetScript(); } touch(integer num_detected){ if (llDetectedKey(0)==llGetOwner()){ llInstantMessage(llGetOwner(), "Please wait, gathering information..."); list inventory = []; list INVENTORY_CONSTANTS = [ INVENTORY_TEXTURE, INVENTORY_SOUND, INVENTORY_OBJECT, INVENTORY_LANDMARK, INVENTORY_CLOTHING, INVENTORY_NOTECARD, INVENTORY_BODYPART]; integer i; integer j; integer len = llGetListLength(INVENTORY_CONSTANTS); for (i = 0; i < len; i++){ integer constant = (integer) llList2String(INVENTORY_CONSTANTS, i); integer num = llGetInventoryNumber(constant); for (j = 0; j < num; j++){ string name = llGetInventoryName(constant, j); if (name != llGetScriptName()){ inventory += name; } } } string folderName = llGetObjectName() + "'s Contents"; llGiveInventoryList(llGetOwner(), folderName, inventory); llInstantMessage(llGetOwner(), "Look in your inventory for a folder called: " + folderName + ". This folder contains your purchased items."); } else llWhisper(0, "this item does not belong to you."); } }