Hal Canary (hwc) wrote in sl_creators,
Hal Canary
hwc
sl_creators

Treasure Chest Script

I wrote this one for a friend of mine.

// Open Sesame Treasurechest script for SL.
// Copyright 2008 Hal Canary
// 2008-08-31 04:13:32 lsl2 script
//
// Licence Information:
//    This program is free software; you can redistribute it and/or
//    modify it under the terms of version 2 of the GNU General
//    Public License as published by the Free Software Foundation.
//
//    A copy of the licence can be found at:
//        http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
//
//    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.


string open = "open";       // secret password
string give = "Block";      // name of thing to give
integer chan = 0;           // channel to listen of (0 == open chat)

// Make sure that the inventory of the object containing this script
// has the thing that is supposed to be given.

default {
    state_entry() {
        integer listen_handle;
        listen_handle = llListen(chan, "", "", open);
    }

    touch_start(integer total_number) {
        llSay(0, "What's the password?");
    }
    
    listen( integer channel, string name, key id, string message ) {
        llGiveInventory(id, give);
    }
}
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded 

  • 0 comments