THIS IS A COPY MADE AT TECFA FOR SAFEKEEPING THIS MANUAL. IT'S NOT THE ORIGINAL
enCore v.4 User's Guide
Help Keys: Help with Encrypting
enCore supports a simple but powerful notation for specifying locks on objects, encryption on notes, and other applications. The idea is to describe a constraint that must be satisfied concerning what some object must be or contain in order to use some other object.
The constraint is given in the form of a logical expression, made up of object numbers connected with the operators 'and', 'or', and 'not' (written '&&', '||', and '!', for compatibility with the MOO programming language). When writing such expressions, though, one usually does not use object numbers directly, but rather gives their names, as with most enCore commands.
These logical expressions (called "key expressions") are always evaluated in the context of some particular "candidate" object, to see if that object meets the constraint. To do so, we consider the candidate object, along with every object it contains (and the ones those objects contain, and so on), to be "true" and all other objects to be 'false'.
As an example, suppose the player Munchkin wanted to lock the exit leading to his home so that only he and the holder of his magic wand could use it. Further, suppose that Munchkin was object #999 and the wand was #1001. Munchkin would use the '@lock' command to lock the exit with the following key expression:
@lock exitname with me || magic wand
and the system would understand this to mean #999 || #1001 . That is, players could only use the exit if they were (or were carrying) either #999 or #1001.
To encrypt a note or letter so that it could only be read by Munchkin or someone carrying his book, his bell, and his candle, Munchkin would use the "encrypt" command with the key expression me || (bell && book && candle)
@encrypt notename with me || (bell && book && candle)
If using the object names does not seem to be working, you can try using their object numbers. Also, if you do not include yourself in the key expression, you will not be able to read the letter or use the exit (or whatever).
Finally, to keep players from taking a large gold coffin through a particularly narrow exit, Munchkin would use this key expression: ! coffin
That is, the expression would be false for any object that was or was carrying the coffin.
There is one other kind of clause that can appear in a key expression: ? object
This is evaluated by testing whether the given object is unlocked for the candidate object; if so, this clause is true, and otherwise, it is false. This allows you to have several locks all sharing some single other one; when the other one is changed, all of the locks change their behavior simultaneously.
MOO interface || Quick Start || Beginner's Guide || | Getting around || Communicating ||Character options || Working with objects || Objects help ||Using MOO Mail || Creating objects and rooms || ||Xpress options || Getting help || Command summary || Making accounts
Page last updated 00/00/2003 --LI