Building your First Shop
sedit is the command to edit shops. Shops are places in the MUD where players can buy or sell goods. You are allowed to edit shops XX00 through XX99, though you will probably never need that many.
As a general rule, try to match the virual number of the shop to the virtual number of the room that you'll be putting the shop in, just to make your life a little easier.
Editing shops is more complicated than any other type of editing that you'll have to do, but it isn't too bad. Unfortunately we cannot build a shop without attaching it somewhere, so the best time to look at this part of the tutorial is when you actually need to build a shop.
When you need a shop for a room, type in sedit XXYY where YY is the number of the room you are going to place the shop in.
First off, your shop needs a keeper, a mob dedicated to being the shopkeeper. It is a good idea to create this mob beforehand, though you can leave the keeper field blank for the time being and fill it in later when you create the shopkeeper. Shopkeepers should always be anti-charm, by the way. Give your shop a keeper when you have one ready.
NOTE: shopkeepers must be loaded into the room with the shop using zedit commands. sedit doesn't load shopkeepers for you.
Next up are the two open and close fields. These let you set when the shop opens and when it closes. If the shop only has one open and close time use only the first two fields. If the shop has two (ie the shop closes for lunch and reopens in the afternoon) then use all four fields to set up the time. Shops that are open all the time should have the values 0 and 28 in their open and close fields, respectively.
The sell rate and the buy rate are the multipliers for the prices of the object (set in the oedit screen) when the shopkeeper sells and buys goods. The sell rate should generally be >=1.00 and the buy rate should be <=1.00 so the shopkeeper sells things at greater than their value and buys things at less than their value.
Next up are the seven messages the shopkeeper can use in various situations. These are fairly straightforward. Eash message should be preceeded by a %s. The buy and sell success lines can also use %d to represent the price, in coins of the object being bought from or sold to the shopkeeper.
Then we have the no trade with flags. These tell who the shopkeeper will or will not trade with. Your choices are:
1) Good 2) Evil
3) Neutral 4) Magic User
5) Cleric 6) Thief
7) Warrior 8) Hunter
9) Shaman 10) Human
11) Elf 12) Dwarf
13) Gnome 14) Half-Elf
15) Halfling 16) Wolfen
17) Drow
You can add people the shop won't trade as with other flags (the can be more than one type of charater the shop won't trade with). Remove unwanted flags by typing in the number again.
Now we have the shop flags. There are two of these:
WILL_FIGHT Players can to try to kill shopkeeper.
USES_BANK Shopkeeper will put money over 15000 coins in the bank.
Feel free to add or remove these items. Note that shopkeepers should be difficult, if not nearly impossible to kill.
Now we come to the rooms menu. This is a listing of all the rooms that a shop will operate in. In other words, if a shopkeeper is not in one of these rooms players will not be able to buy from him/her. You can have as many rooms as you want, but generally one room per shop, with the same virtual numbers, is the norm. The rooms menu looks like this:
## VNUM Room
0 - [ 205] - H2O 4 U
A) Add a new room.
D) Delete a room.
C) Compact Display.
Q) Quit
The options are pretty straightforward and will not be discussed here.
Next we have the Products menu, here you can add, by using the virtual numbers of the objects, the objects that this shop will sell. Add as many objects as you want. The Products menu looks like this:
## VNUM Product
0 - [ 2400] - Brokken's Loincloth
A) Add a new product.
D) Delete a product.
Q) Quit
Finally, to end off you shops, you have to edit the items that the shop will purchase. The Accept types menu looks like this:
## Type Namelist
A) Add a new entry.
D) Delete an entry.
Q) Quit
Adding new entries to this menu can be quite tricky. Here is a quick runthrough of what you need to add the entries properly. First off, for each entry, you have to specify the type of item you're accepting, be it a weapon, armor, whatever. That's the easy part, now you need to list the names that you will accept of that type of item (ie golden, magical
pearl, etc).
The following is what the CircleMUD builder's manual has to say about namelists for the accept types menu:
Name lists are formed by boolean expressions. The following operators are
available:
',^ = Not *, & = And +, | = Or
The precedence is Parenthesis, Not, And, Or. Take the following line for an
example:
[sword & long|short | warhammer | ^golden & bow] & magic
This shop will buy the following items of type WEAPON:
1.sword long magic
2.short magic (the first & is done before the first | )
3.warhammer magic
4.^golden bow magic
Note that the ^ in front of golden affects ONLY golden, and nothing else
in the listing. Basically, the above expression could be written in English as:
[(sword and long) or short or warhammer or (not golden and bow)] and magic
If you want the shop to only buy ``short magic'' only if they were also swords,
you could change the expression to:
[sword & (long|short) | warhammer | ^golden & bow] & magic
^-Changes--^
You can also include object extra flags). The previous example used ``magic''
as a keyword that had to be on the object. If we wanted to make it so that the
MAGIC flag had to be set on the item, we would change ``magic'' to ``MAGIC.''
Similar changes could be made to add other flags such as ``HUM'' or ``GLOW.''
It should be noted that these expressions are case sensitive and that all
keywords should appear in lower-case, while the flag names should be in all
caps.
This is quite a bit different from the namelists used in other parts of olc.
NOTE: Namelists are optional. If you want your store to buy all weapons, set the type bought to WEAPON and leave the namelist empty.
And that's it for editing shops, not too hard, really, just a bit of work required to get everything the way you want it.
|