Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

A Lockable Filing Cabinet with Key Script

YangZhi Quan
Registered User
Join date: 17 Aug 2008
Posts: 1
01-16-2009 12:37
I'd like to add a script to a prim filing cabinet that will allow the cabinet to be locked and unlocked via a prim key. Basically, I'd like the cabinet to toggle between 2 states, "locked" and "unlocked".

If "locked", clicking the cabinet will result in a chat message letting the person know it's locked. The contents of the cabinet would be inaccessible.

If "unlocked", clicking the cabinet will present the person with a menu of the contents within which can be taken into inventory.

The prim key would lock or unlock the cabinet by whispering on a secure channel. Thus, if the key is rezzed or attached within listening distance of the cabinet and clicked, it will whisper its code word on the secure channel and toggle the state of the cabinet.

Basically, I'm trying to combine a listener script with a simple 2 state script (like a door open/close script) and a multi-object giver script (like a bar that offers multiple drinks for the taking).

I know what I want, but I know nothing about scripting to combine these simple elements. Can anyone help, or at least point me in the right direction?

Thanks in advance.
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
01-16-2009 15:26
If you know "nothing about scripting" (and have no interest in learning) then any tips we give won't help you. You may have better luck posting this in products wanted.
_____________________
http://slurl.com/secondlife/Together
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-17-2009 13:19
I'd say you have all the elements there. cabinet is touched --> advertises it is locked (or just opens, preempting the rest) --> key responds with it's own message to unlock --> cabinet unlocks.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -