Give inventory contents upon password

Thread Started By steadymobbin

1755
0
  • 41 Vote(s) - 2.93 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rate Thread
#1
PHP Code:
string name "Package";
integer type INVENTORY_ALL// INVENTORY_NOTECARD, INVENTORY_LANDMARK, INVENTORY_OBJECT, ETC, ETC
string password "porcamadona";

integer channel 30;
integer pchannel 31;

//-------------------------------------------

default
{
    
state_entry()
    {
        
llSetObjectNamename " Distributor" );
        
llSetObjectDesc"Geezmo Distributor v0.1" );
        
llSetText"Touch me to get\n" name, <1.01.01.0>, 1.0 );
        
llListenchannel"""""" );
        
llListenpchannel""llGetOwner(), "" );
    }

    
touch_start(integer total_number)
    {
        if ( 
llDetectedKey) == llGetOwner() )
        {
            
llOwnerSay"\nThe current password is: " password 
                          
"\nIf you wanna change it, you have to type on channel " +
                          (string)
pchannel " the new password." );
        } else {
            
llWhisper0"You must type the right password on channel " +
                          (string)
channel " in order to get the package box." );
        }
    }
    
    
listeninteger _cstring _nkey _istring _m )
    {
        if ( 
_c == channel )
        {
            if ( 
_m == password )
            {
                list 
content;
                
integer i;
                for ( ; 
i<llGetInventoryNumber(type); ++)
                {
                    if ( 
llGetInventoryNametype) != llGetScriptName() )
                        
content += llGetInventoryNametype);
                }
                
                
llGiveInventoryList(_inamecontent);
            }
        }
        
        if ( 
_c == pchannel )
        {
            
password _m;
            
llOwnerSay"The new password is: " password );
        }
    }

Quote this message in a reply Thanks Quote this post Report this post to a moderator
HideMyAss
.com 
[Image: guns-bullet-shirt_recreated.jpg]
Reply




Possibly Related Threads…
Thread Author Replies Views Last Post
  Give to Group Only script IAmFireProof 0 2,414 03-20-2016, 07:25 PM
Last Post: IAmFireProof

Forum Jump:

1 Guest(s)
Share this:

About Second Life Copybot

Second Life CopyBot Forum is a place where you can get items for Second Life and other vitual worlds for free. With our CopyBot viewers you can export and import any content from these virtual worlds and modify them in 3D software such as Blender, 3D studio Macx etc...