MOO-cows Mailing List Archive


Re: Property Permissions

On Fri, 8 Mar 1996, Hans Friedrich wrote:

> What do the property permissions stand for? I can't seem to find that out
> anywhere in the manual or help system. I wanted to create an RPG system for
> my MOO, but needed to find out how the points can be manipulated by other
> objects and players actions, if they are props that only the player hs
> access to.

Properties have three permission 'bits' (actually flags)
-'r' (default on i believe) whether a NON-owner player can read the 
property or not.

-'w' (default off) whether a NON-owner player can change the property or not.

-'c' (Default on) whether the ownership of the property changes on 
children of this object or not.

Properties have an owner, just like the object it is on, but the owner 
can differ from the object. (it defaults to the person who added it, at 
least in the LambdaCore.) Owners of a property can _always_ read and 
write it, no matter the flags.

If you want a property secured, so noone can edit it (except a wizard, 
they can edit anything) just @chown the property to Hacker (or $noman, 
$noone or who ever you want to use...) and set it -c. so any children of 
the object (for instance $player) will have the property, but will be 
unable to alter it. If you want them to be able to see its contents 
through a verb, or change it through a verb, just write that verb, put it 
on $player, and @chown it to whoever owns the property. (try not to use 
Wizardly verbs, they tend to make huge security breaches ;-)

Don't forget that a verb runs with permissions from the _owner_, not the 
person who calls it. If you want to make a 'generic target' that a player 
can 'slay' or 'kill', just add a property 'hp' or 'hitpoints' on the 
object, put it -c, make it from a player character solely intended for 
keeping those objects (like NPC-Manager or something) and make a verb 
on the object 'being_hit()', which substracts the necessary HP from the 
.hp property. Players can't cheat by manually lowering the .hp property, 
and you can make any checks you want inside the being_hit() verb to 
ensure it is a legit kill.



Home | Subject Index | Thread Index