OOC:Festival Booths

To create a booth that sells festival items on admin quota, you will basically need to come up with three objects. A simple example of one of these is below. For these sort of mass sale objects, things that are well-desced are often a wiser choice than things that all need to have individual parents because of varied commands, but yeah.


The Booth

This is the actual booth object people go into to buy your thing(s). Booths go on Matsuri quota, which start out as a blank object, so the usual @create sort of steps have been skipped to reflect that.

@name Blank=My Booth
@set my booth=ENTER_OK
@set my booth=AUDIBLE
@desc my booth=%tA small booth set up for the festival, it has an enclosed porch of sorts in front of a small booth, the front has frogs painted on either side of the booth, the poles in front have ivy wrapped around them. A sign above the porch gives the name of the booth "My booth" and underneath is written "Come buy a shiny for yourself or a loved one!!"%r%rEnter the Booth to see the list of items and to order.
@parent my booth=#10
&CMD_TT my booth=$tt *:think tt(%0, Privately\,)
@ENTER my booth=You step into booth.
@idesc my booth=%tInside the booth there is a counter behind which stands the cute shop keeper. Go ahead and look around, maybe view the [ANSI(m,sign)] detailing the types of things you can buy.
@LALIAS my booth=Out;O;Exit
@INPREFIX my booth=>
@LEAVE my booth=You go back outside.
@LISTEN my booth=*
@OENTER my booth=enters the booth.
@OLEAVE my booth=has left the booth.
@OXENTER my booth=enters Flowers in her hair.
@OXLEAVE my booth=comes out of Flowers in Her Hair.
@PREFIX my booth=Inside my booth
&VIEW_SIGN my booth=Hello, welcome to My Booth, here you can buy  [ANSI(g,a blue shiny)], [ANSI(g,a red shiny)], or [ANSI(g,a purple shiny)] Each shiny is 100 lilies and can be ordered by 'say'ing the Shopkeeper's name and the green words.

The Parent

This is the object where all the descriptions of your things that you're selling goes. Each one should be identified by a UNIQUE and preferably short attribute name. It also will be created out of a blank Matsuri object. Yes, that's all of it. The parent is the /simple/ part.

@name Blank=Shiny Parent
@desc Shiny Parent=[u(%VA)]
&BLUE shiny parent=%tA blue shiny stone.
&PURPLE shiny parent=%tA purple shiny stone.
&RED shiny parent=%tA red shiny stone.

The Shopkeeper

This is the person/animal/machine/whatever that actually sells your thing and takes money and gives people stuff. While there are customizable bits, this is the most code-y part and be very, very, very careful rewriting anything you don't understand. In an order command, the sitem is the NAME OF THE DESC of the item on the parent, and the litem is NAME OF THE ITEM CREATED. Because I don't know what dbref your parent will be, the single dbref reference has been replaced with #1 for demonstration purposes only. In an actual vendor, point to the dbref of the parent object.

@name blank=Shopkeeper
@set Shopkeeper=MONITOR
@desc Shopkeeper=A young woman of not more than 18 years. She is smiling and has straight brown hair.  She wears a simple denim jumper covered in pockets with small silver buckles and buttons over a light white blouse.
@APAYMENT shopkeeper=pose tucks the money into a pocket of her jumper\, then grabs the appropriate item from the shelves. She hands it to %N. "Thank you for your business!";@switch hasattr(me,sitem)=1,{th [u(order)];give %n=%q1;&sale_[u(sale)] me=%n bought a [u(litem)] (%q1);&sale me=[add(u(sale),1)]}
&CMD_blue shopkeeper=^*shopkeeper*a blue shiny*:@cost me=100;pose smiles at [name(%#)] and nods cheerfully. "That'll be 100 lilies\, please.";&sitem me=blue; &litem me=Blue Shiny
&CMD_purple shopkeeper=^*shopkeeper*a purple shiny*:@cost me=100;pose smiles at [name(%#)] and nods cheerfully. "That'll be 100 lilies\, please.";&sitem me=purple; &litem me=Purple Shiny
&CMD_red shopkeeper^*shopkeeper*a red shiny*:@cost me=100;pose smiles at [name(%#)] and nods cheerfully. "That'll be 100 lilies\, please.";&sitem me=red; &litem me=Red Shiny
@COST shopkeeper=100
&ORDER shopkeeper=[setr(1, create([u(litem)]))][set(%q1, !no_command)][set(%q1, va:[u(sitem)])][parent(%q1, #1)]
&SALE shopkeeper=

And that's it. Basically, if you can type up those three items in a text file or an email, get it mostly right, and send it to breis or Abryn, you too can rake in a small income from Matsuri sales at no quota cost to yourself! Too cool.

Retrieved from "https://www.yuriba.com/mwiki/index.php?title=OOC:Festival_Booths&oldid=10249"