Sets the value of a KVP attribute on a character or object. If no character or object is specified (forms 1 and 4) then the character or object bearing the currently executing MUDL script is used. If an integer is given, then that is the index of the KVP proc for which the parameter is set (the numbering scheme is just like that used by the 'setproc' command); otherwise the currently executing MUDL script's proc is used, or if that's not an option then the first MUDL proc on the object or character is used.
Here are some examples:
To set the parameter 'kill' to 'everybody' in the currently executing mudl proc,
set_attr('kill','everybody')
To instead set this parameter on proc 3 of the currently executing mudl object or character (remembering that proc 3 is the FOURTH proc because we count from zero in these parts),
set_attr(3,'kill','everybody')
while to set 'kill' to 'everybody' on the first mudl proc of the object or character stored in %1 you would
set_attr(%1,'kill','everybody')
and to set it on proc 2 of that character,
set_attr(%1,2,'kill','everybody')
All KVP values are strings. It is common to use set_attr and get_attr to create local variables. If this variable is to be an integer, it must be transformed to and from a string. For example if the variable is called 'x' this would be done as follows:
set_attr('x',''+%1)and
integer(get_attr('x'))