Clothing Macros

From Redwall MUCK Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

To give yourself clothing, do the following:


1) use lsedit to setup a default description:


lsedit me=desc/default


All descriptions go under the /desc prop, and should be named. MPI parsing (embedded MPI) is support so break lines with {lit: } at the end to avoid run-ons.


2) Specify the first of many sets of clothing (currently only your default set)


+desc default


3) Set the code in your description property that will actually USE the description your wrote using the lsedit program that you set with +desc.

NOTE: this needs YOUR NAME where it says name, and the asterisk (*) MUST BE THERE. So, if your name is Otter, it would be *Otter...


@desc me={clothing:*name,default}


4) Build as many descriptions as you like doing


lsedit me=desc/name_of_outfit


5) to set a new description:

+desc name_of_outfit


Clothing MPI Macro

This macro is what the player puts into the @desc in order to cause thier select clothing to expand. It is traditionally put in #0, but can of course be installed in some other room, but it must be reachable up the parent chain for any player that uses it.


@set #0=_msgmacs/clothing:{if:{nearby:me,{:1}},{lexec:{prop:descprop,{:1}}},{lexec:desc/{:2},{:1}}}


NOTE: the above is long, and needs to be on one line


The usage of this is as follows: {clothing:*name_of_player,default_description}


Clothing selection command

This is the command the user invokes to actually cause a switch of clothing. Its usage might be:


+desc armor


To put on armor, and then to take it off...


+desc default


Note that if the game supports distant viewing (such as Redwall's @icdesc command or a wizard doing look *playername) only the DEFAULT setting will show.


To install the command:

@rec +desc

@action +desc=#0=cmd/plus_desc

@link $cmd/plus_desc=$nothing

lsedit $cmd/plus_desc=ldesc

.del 1 $

{if:{eq:{&arg},},

   {if:{eq:{prop:descprop,me},},

       You need to +desc  first.

   ,

       Your current description set is {prop:descprop,me}.

   }

,

   {if:{eq:{prop:/desc/{&arg}#,me},},

      You need to lsedit me=/desc/{&arg} before this will work.

   ,

      You store description {store:/desc/{&arg},descprop,me}{lit: }

      for the current description{lit:,} which is:\r{lexec:/desc/{&arg},me}

   }

}

.end

@succ $cmd/plus_desc={lexec:ldesc}

@set $cmd/plus_desc=w

See Also