Shop edit has the following syntax:
sedit <shop vnum> - edit the shop with number <vnum> - See below!
You can only do this in your own zone.
show shops [number] List the shops in the game. The optional argument is a
shop REAL number, ie. the number to the far left when
listing multiple shops. When supplied, it will give
detailed information about that shop.
The sedit command starts the menu based shop editor.
NOTE: A shop must always have the next free number in the zone. That is, if
it's the first shop in zone XX it MUST be number XX00. And the next must then be
XX01.
This is an overview of the main sedit window:
-- Shop Number : [1200]
0) Keeper : [-1] None
1) Open 1 : 0 2) Close 1 : 28
3) Open 2 : 0 4) Close 2 : 0
5) Sell rate : 1.00 6) Buy rate : 1.00
7) Keeper no item : %s Sorry, I don't stock that item.
8) Player no item : %s You don't seem to have that.
9) Keeper no cash : %s I can't afford that!
A) Player no cash : %s You are too poor!
B) Keeper no buy : %s I don't trade in such items.
C) Buy sucess : %s That'll be %d coins, thanks.
D) Sell sucess : %s I'll give you %d coins for that.
E) No Trade With : NOBITS
F) Shop flags : NOBITS
R) Rooms Menu
P) Products Menu
T) Accept Types Menu
Q) Quit
Enter Choice :
Lets split it up in smaller bits:
-- Shop Number : [1200]
0) Keeper : [-1] None
The first thing to decide is who'll be the shopkeeper. Use the vnum of the
mob you want.
1) Open 1 : 0 2) Close 1 : 28
3) Open 2 : 0 4) Close 2 : 0
The next part decides when the shop is open for trade. The four values allow
for a 'lunch break'; I.e. open from 7 to 12 and from 13 to 6..
5) Sell rate : 1.00 6) Buy rate : 1.00
The sell/buy rates are multiplied by the item value, when an item is
sold/bought by the shopkeeper. The sell rate must always be more than 1, and
the buy rate less then 1, so the shopkeeper has a profit margin.
7) Keeper no item : %s Sorry, I don't stock that item.
8) Player no item : %s You don't seem to have that.
9) Keeper no cash : %s I can't afford that!
A) Player no cash : %s You are too poor!
B) Keeper no buy : %s I don't trade in such items.
C) Buy sucess : %s That'll be %d coins, thanks.
D) Sell sucess : %s I'll give you %d coins for that.
The texts are used in the shop for giving messages to the buyer/seller. The
format is the same as you'd use in tell, with the name of the buyer/seller
substituted by %s; I.e. to get the result The shopkeeper tells you, 'Get out of here, smuck!',
you'd use
%s Get out of here, smuck!
In the buy/sell success messages, %d denotes the price of the object. This must always come after the %s.
E) No Trade With : NOBITS
Opens a bitvector menu to set which people
the shop will not trade with.
A list of the flags is here.
F) Shop flags : NOBITS
Opens a bitvector menu to set some special
shop flags.
A list of the flags are here.
R) Rooms Menu
Opens the rooms menu, in which you set where the shopkeeper is allowed to
trade. This is can be an arbitrary long list of room numbers. If the shopkeeper
is encountered outside these rooms, he is unable to trade.
P) Products Menu
Lets you enter the products menu. All items on the product menu will, if the
shopkeeper has one of them, become available in unlimited amounts. Thus, if a
shopkeeper has a chainmail and a ringmail as 'products', they will be available
in unlimited amounts, even if the shopkeeper only has one of each.
NOTE: The shopkeeper still need to have the object. Thus, if the afore mentioned
shopkeeper didn't have a ringmail, none would be available.
T) Accept Types Menu
The accept types menu is a little more complicated:
## Type Buy namelist and EXTRA-flags
0 - CONTAINER - bag
A) Add a new entry.
D) Delete an entry.
Q) Quit
Enter choice :
This menu controls what types of items that the shop will buy.
There can be an arbitrarily long list of buy types.
The first argument, called 'Type' is the Type of items the shop
will buy. For more information on object types click here
The second (optional) argument is called the namelist and allows you to provide optional
keywords to define specific keywords that must be present on the objects for the shopkeeper
to buy or sell it.
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:
WEAPON [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:
WEAPON [sword & (long|short) | warhammer | ^golden & bow] & magic
^-Changes--^
You can also include object extra flags (see the list here.
The 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.
Q) Quit
Quits the shop editor and asks if you want to save your changes. All changes are saved
to disk right away. |