Builder:Shops
From Wormhole Sci-Fi MUD Homepage
The .shp file contains all the myriad information necessary to make a working shop in a mud. You will find it useful to learn how to create these by hand, because the OLC for shops is quite slow and temperamental.
Here is an example of a shop from the .shp file, followed by a line-by-line explanation:
---example follows this line---
(hash)2200~
2217
2218
2219
-1
1.2
0.8
5
9
-1
%s I don't have any of those!~
%s Are you sure you have one?~
%s Sorry--I don't buy those!~
%s I can't afford that... sorry.~
%s You can't quite afford that yet... sorry.~
%s That will be %d coins.~
%s Here's %d coins for that.~
1
0
2200
0
2200
8
12
13
17
---example precedes this line---
The explanation:
#2200~
The vnum of the shop. This number must be unique (no other shop can have the same number) but the vnum you select will not influence gameplay. By convention, most authors set the shop vnum to be the same as the room vnum where the shop is located.
2217 2218 2219 -1
These are the vnums of the particular items the shop sells. Items listed here need only be given to the mobile once, and he will have an endless supply to sell to players. Note the -1 that denotes the end of the list.
1.2
The multiplier for price markup when selling items. Greater than 1.
0.8
The multiplier for price markdown when buying items from players. Below 1.
5 9 -1
These are the item TYPES the shop buys. (see OBJECT TYPES elsewhere in this handbook. (this example shop buys weapons and armor). Note the -1 denotng the end of the list.
%s I don't have any of those!~ ... %s Here's %d coins for that.~
These are all the messages the shopkeeper will say in particular situations. These are better explained in 'SHOP MESSAGES' below.
1 0
These are the shopkeeper's tempers. See 'TEMPERS and HOURS' below.
2200
The vnum of the shopkeeper.
0
The vnum of the clan ( 0 if not a clan shop )
2200
The vnum of the room, telling the game where the shop will be. If the shopkeeper isn't in that room, the shop cannot be used. Note that you can specify several different rooms, creating a large shop and requiring players to find the wandering shopkeeper before they can do business with him.
8 ... 17
The hours the shop is open. Please consult 'TEMPERS and HOURS' below.
- SHOP MESSAGES
The shop messages section has seven different slots for messages. They range as follows (in order): What the shopkeeper says when...
1)... he doesn't have that object to sell.
2)... the player doesn't have that object to sell.
3)... he doesn't buy that type of item.
4)... he doesn't have enough money to buy an object.
5)... the player doesn't have enough money to buy an object.
6)... he sells an object.
7)... he buys an object.
The variable %s should precede the message (for say), and %d may also be used for the price of an object. Note each message ends with a tilde.
- TEMPERS and HOURS
A shop keeper's temper is controlled by two fields, the first for when the player can't afford the item, the second for when a player is attempting to kill the shopkeeper.
Note the following messages are those included in the dikudocs, and may not be the same from mud to mud.
Temper 1:
Value [0] The shopkeeper spits at the player Value [1] The shopkeeper smokes a joint.
Temper 2:
Value [0] The shopkeeper warns the player, and attacks! Value [1] The shopkeeper insults the player, and no combat takes place.
The hours fields are fairly simple. The first two are the opening and closing hours of the shop, in 24 hour time. The third and fourth are ALSO the opening and closing times of the shop. Thus, a shop can open and close more than once each day, as in our example:
8 12 13 17
The example shop opens at 8 am, closes at noon -- lunch? -- reopens at 1 pm, and closes at 5 pm.
- SHOP ARCHETYPE
#vnum~
<first item produced by shopkeeper>
<second item produced by shopkeeper>
<third item produced by shopkeeper>
<etc... as many as you want>
-1
<multiplier for selling items (1 or more)>
<multipler for buying items (less than 1)>
<first item type bought>
<second item type bought>
<third type bought>
<etc... as many as you want>
-1
<message 1: that he doesn't have that object to sell>
<message 2: the player doesn't have that object to sell>
<message 3: that he doesn't buy that type of item>
<message 4: he doesn't have enough money to buy the object>
<message 5: the player doesn't have enough money to buy an object>
<message 6: object successfully sold to player>
<message 7: shopkeeper buys an object>
<temper 1>
<temper 2>
<shopkeeper vnum>
<clan vnum>
<room vnum>
<shop opens at>
<shop closes at>
<shop opens for the second time at>
<shop closes for the second time at>
- TIPS and OBSERVATIONS
The original builder docs say: "Any stationary mob can be a shopkeeper... this can advance the plot of a particular area no end if used cleverly. Shopkeepers don't *have* to buy anything. Or sell anything...
Tips and observations from Artoo:
Moving mobiles can be shopkeepers, too. We used to have a mobile who roved the docking ring, and had to be tracked down before you could buy his wares. A mobile shopkeeper MUST be kept seperate from any other place where you use shop commands, though. (This means other object shops, pet shops, priestly healers and post offices. Otherwise the game won't know what to do when you type LIST, BUY etc.) Use !mob rooms to keep mobile shopkeepers in strictly defined areas.
If a shopkeeper keeps getting killed, consider giving it the FRIEND flag. This is preferable to making the site of the shop lawful, since it is still possible to fight anbody who might happen to be in the shop.
If a shopkeeper sells a container filled with items, subsequent containers sold (assuming the container is in his 'products' list) will always be empty. This only applies to objects, not drinks.
