Code: Wardrobe

The only wardrobe code that I could find would not allow spaces in outfit names, nor did it provide functionality for easily removing old outfits, or updating the base description. I coded this up to address these issues and make it easier to use.

If you want your character's age to show up after their clothing or knot, just use %R to make a new line after the outfit or knot description and use [age(v(birthsecs))] where you want the age to show. I find it much easier to just include it somewhere in my base description, however.

Please be aware that this code will not provide any confirmation in overwriting outfits or deleting them. Make sure to keep a back up in case you accidentally remove something you didn't mean to…

Any questions or comments can be directed to Jayashri on PernWorld.

Wardrobe Help
+desc * Adds or updates the base description.
+wear * Wears the selected outfit.
+knot * Wears the selected outfit with the position knot.
NOTE: You must have done +outfit Knot=<desc> for this to work.
+outfit <name>=<desc> Added the outfit as <name> with the selected <desc>.
+list outfit Lists all currently stored outfits.
+view outfit * View a stored outfit's description.
+rm outfit * Remove the selected outfit.
@@ Code for setting the base description.
&CMD-BASE_DESC me=$+desc *:&BASE_DESC %#=%0
@@ Code for wearing an outfit.
&CMD-WEAR me=$+wear *:@desc %#=%T[u(BASE_DESC)]%R%T[u(OUTFIT-[edit(%0,%b,_)])]
@@ Code for wearing an outfit plus the knot.
&CMD-KNOT me=$+knot *:@desc %#=%T[u(BASE_DESC)]%R%T[u(OUTFIT-[edit(%0,%b,_)])]%R%T[v(OUTFIT-KNOT)]
@@ Code for adding or overriding an outfit.
&CMD-ADD_OUTFIT me=$+outfit *=*:&OUTFIT-[edit(%0,%b,_)] %#=%1;&LIST-OUTFIT %#=[setunion(v(LIST-OUTFIT),%0|,|)]
@@ Code for listing all stored outfits.
&CMD-LIST_OUTFIT me=$+list outfit:@pemit %#=You have the following outfits stored:%R[edit(u(LIST-OUTFIT),|,[space(5)])]
@@ Code for viewing an outfit.
&CMD-VIEW_OUTFIT me=$+view outfit *:@pemit %#=Your outfit, %0, has the following description:%R[space(5)][u(OUTFIT-[edit(%0,%b,_)])]
@@ Code for removing an outfit.
&CMD-RM_OUTFIT me=$+rm outfit *:&OUTFIT-[edit(%0,%b,_)] %#=;&LIST-OUTFIT %#=[remove(v(LIST-OUTFIT),%0,|)]
Getting Started
Step 1 Copy all the code in the box above and paste it into the MUSH.
Step 2 +desc <physical description>
This sets the base description for the +wear and +knot commands to use.
Step 3 +outfit <name>=<desc>
Add one or more outfits to the wardrobe.
Step 4 +outfit Knot=<knot>
Adds a knot description to be used by +knot. This step is optional.
Step 5 +wear <outfit> or +knot <outfit>
Wear the outfit with or without the knot.
You're done!
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License