Simply locking an object makes its display in bold text and prevents anyone other than you from tampering with it (get it, paint it etc..)
You can only lock objects which are unlocked.
eg: lock the elephant
read the command called unlock if you want to unlock your locked objects.
Locking an object with a second (key-type) object imposes restrictions on it. If its a doorway then noone can go through it (except the owner of it). If its a basic object then noone can read it (except the owner of it).
The second key-type object can be something in your inventory inv or in the same location as you.
eg: lock the shed with the spade or lock the magic book with the gold key
read some info about locking and unlocking to remove the restrictions.
Scripting notes when an object is sucessfully locked with a key-type object the trigger word 'locks' is sent out to the room.
When an object is successfully locked (made bold) it sends out the trigger word 'locksobj'