Difference between revisions of "Clothing Macros"

From Redwall MUCK Wiki
(Imported from text file)
 
Line 1: Line 1:
To give yourself clothing, do the following:


To give yourself clothing, do the following:


1) use lsedit to setup a default description:
1) use lsedit to setup a default description:


  lsedit me=desc/default


  All descriptions go under the /desc prop, and should
lsedit me=desc/default


  be named. MPI parsing (embedded MPI) is support so


  break lines with {lit: } at the end to avoid run-ons.
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)
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
+desc default


  actually USE the description your wrote using the


  lsedit program that you set with +desc.
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
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...


  the asterisk (*) MUST BE THERE. So, if your name


  is Otter, it would be *Otter...
@desc me={clothing:*name,default}


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


4) Build as many descriptions as you like doing
4) Build as many descriptions as you like doing


  lsedit me=desc/name_of_outfit
 
lsedit me=desc/name_of_outfit
 


5) to set a new description:
5) to set a new description:


  +desc name_of_outfit
+desc name_of_outfit


Enjoy!


EOF
== Clothing MPI Macro ==
 
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.
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}}},
@set #0=_msgmacs/clothing:{if:{nearby:me,{:1}},{lexec:{prop:descprop,{:1}}},{lexec:desc/{:2},{:1}}}


{lexec:desc/{:2},{:1}}}


NOTE: the above is long, and needs to be on one line
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}
The usage of this is as follows: {clothing:*name_of_player,default_description}


Clothing selection command
 
===Clothing selection command===


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


+desc armor
 
+desc armor
 


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


+desc default
 
+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.
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:
To install the command:


<pre>
@rec +desc
@rec +desc


Line 114: Line 113:


@set $cmd/plus_desc=w
@set $cmd/plus_desc=w
</pre>


[[Coding|Coding]]
==See Also==
 
* [[Coding|Coding]]
[[Coding|up]]
*[[Debugging_MPI|Debugging MPI]]
 
[[Debugging_MPI|Debugging MPI ›]]
 
* [[940|Printer-friendly version]]
 


[[Category:Naco]]
[[Category:Naco]]
[[Category:May_2009]]
[[Category:May_2009]]
[[Category:MPI]]
[[Category:MPI]]
[[Category:Coding Help]]

Latest revision as of 18:48, 19 November 2017

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