From the NannyMUD documentation
2001-09-21
simple_armour - A simple armour.
set_type set_class
query_ac (compatibilty) armour_class is_armour query_worn
PROPERTY NAME
cursed - Described below.DESCRIPTION
This property prevents the armour from being removed or dropped once it has been worn. The value of the property influences the short description when worn: _Value_ integer(worn and cursed) " " (worn and ) "" (worn) This allows for fine-tuned control of appearance of, for example, guild armours that are not to be removed. PROPERTY NAME
__default_extra_look - Described below.DESCRIPTION
The property __extra_look is used when the armour is worn, __default_extra_look otherwise.PROPERTY NAME
__remote -DESCRIPTION
See 'remote_do_wear' etc. below.PROPERTY NAME
no_id_on_type -DESCRIPTION
If not set, an armour will answer to its type as id, i.e. if it has the type 'boot', and name 'moccasin', you can still refer to it as 'boot'. Setting this property disables that.PROPERTY NAME
block_wear_msg -DESCRIPTION
If set, the standard message of 'You already wear an armour of type ...' is replaced by the property value.
FUNCTION
NAME
set_type - set the type of armour.SYNTAX
void set_type(string type)DESCRIPTION
Set the type of the armour. If you do not call this function, the armour will use the default type, which is "armour". There are rules on what types are allowed to have an armour class. You should read the rules, and re-read them now and then to be up to date.
FUNCTION
NAME
set_class - Set the armour class.SYNTAX
void set_class(int class)DESCRIPTION
This functions sets the armour class of the armour. The rules define what armour types are allowed to have an armour class, what armour classes are aloowed, and what weight/class combinations are allowed. You should read the rules, and re-read them now and then to be up to date.
FUNCTION
NAME
set_worn - Mark the armour as worn.SYNTAX
void set_worn(object user)DESCRIPTION
This function can be called to mark the armour as worn. That should only be done from the lib, or by code that really knows what it is doing.
FUNCTION
NAME
set_stop_worn - Mark the armour as not worn.SYNTAX
void set_stop_worn()DESCRIPTION
Using this function, you can mark the armour as not being worn. This should be done from the lib, or from code that really knows what it is doing.
FUNCTION
NAME
armour_class - Get the armour class,SYNTAX
int armour_class()DESCRIPTION
This function returns the armour class as set by set_class().
FUNCTION
NAME
short - The short description.SYNTAX
varargs string short(int flags)DESCRIPTION
The armour object defines this function to be able to add the "(worn)", "(cursed)" and "(worn and cursed)" as needed. The flag argument is a bitmask. Different things happen depending on the bits in the flag: flag & 1 : Don't add the 'worn' or 'cursed' texts. More flags might be supported in the future.
FUNCTION
NAME
extra_look - Get an extra description for the player.SYNTAX
string extra_look()DESCRIPTION
The armour defines this function to be able to handle the use of the property "__default_extra_look".
FUNCTION
NAME
query_worn - Is the armour worn?SYNTAX
object query_worn()DESCRIPTION
This function tells if the armour is worn or not. The value returned from the function is the object (player or NPC) who weras the armour. The returned value is zero if the armour isn't worn.
FUNCTION
NAME
id - Identity of the armour.SYNTAX
int id(str)DESCRIPTION
The armour re-defines this function to handle the property "no_id_on_type".
FUNCTION
NAME
remote_prevent_wear - Stop the armour from being used.SYNTAX
int remote_prevent_wear(object armour)DESCRIPTION
This function allows you to add checks that prevents the armour from being used. You achieve this by returning non-zero from this function.
FUNCTION
NAME
remote_do_wear - Get a call when the armour gets worn.SYNTAX
void remote_do_wear(object armour)DESCRIPTION
This function is called when the armour is being worn.
FUNCTION
NAME
remote_prevent_remove - Prevent the removal of the armour.SYNTAX
int remote_prevent_remove(object armour)DESCRIPTION
This function is called when the player is trying to remove the armour. If it returns non-zero, the removal attempt will fail.NOTE
You can't use this_player() or write() in remote_prevent_remove() without checking that this_player() exists first. Instead use query_worn() or environment(), and replace write() with tell_object().
FUNCTION
NAME
remote_do_remove -SYNTAX
void remote_do_remove(object armour)DESCRIPTION
This function is called when the player removes an armour.NOTE
You can't use this_player() or write() in remote_do_remove() without checking that this_player() exists first. Instead use query_worn() or environment(), and replace write() with tell_object().
FUNCTION
NAME
remote object -SYNTAX
void add_property("__remote",string remote_object_file_name); void add_property("__remote",object remote_object);DESCRIPTION
The remote is used to add side effects and extra messages to the armour. These functions are used in the remote_object. (all take the armour as the only argument). The functions are: remote_prevent_wear remote_do_wear remote_prevent_remove remote_do_removeNOTE
If the remote_object_file_name is given as a string, the functions are called in the master object. If you want them to be called in a clone, you must give an object.