Jym_Nova icon

Give Folder (Unpacker)

Jym_Nova | PRO | 09/26/15 02:19:39 PM UTC | 0 ⭐ | 695 👁️ | Never ⏰ | []
Linden Scripting |

0 B

|

None

|

0 👍

/

0 👎

// 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 <http://www.gnu.org/licenses/>.
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.");
    }
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎