Area Building

· Home
· Overview
· Helps
· Mobiles
· Objects
· Rooms
· Resets

· Shops
· Specials
· Time
· Weather
· Scripts


This file is a short manual on how to write SHOPS section for Mirkwood (ROM 2.3).

 -Tomasin


There are basically 2 kinds of shops. Object Shops sell products, such as food, armor, weapons, magic items, etc. Pet Shops sell.. well, pets!


Object Shops

 This doc was stripped directly from Ozymandias' ozy.doc. Thanks Ozy.

If you intend on having shops in your area, then you will need a #SHOPS section. This section, in fact, is the easiest of all the sections in an area to do, and takes very little time.

First, I'll provide an example from the midgaard.are area file of some of the shops from Midgaard's #SHOPS section:

#SHOPS
3000  2  3  4  10 0  105  15  0  23 ; The Wizard
3001  0  0  0  0  0  110  100 0  23 ; The Baker
3002  1  8  13 15 19 150  40  0  23 ; The Grocer
3003  5  0  0  0  0  130  40  0  23 ; The Weaponsmith
3004  9  0  0  0  0  100  50  0  23 ; The Armourer
3006  22 0  0  0  0  120  90  6  22 ; The Captain
The syntax of the #SHOPS is as follows:

<mobile-vnum> <trade-0> <trade-1> <trade-2> <trade-3> <trade-4> <profit-buy> <profit-sell> <open-hour> <close-hour>

The first value, the mobile-vnum, is the 'keeper', or the mobile who is the shopkeeper. ALL MOBILES with that vnum will be shopkeepers.

The trade-0 through trade-4 are item types which the shopkeeper will buy. Unused slots should have a '0' in them'; for instance, a shopkeeper who doesn't buy anything would have five zeroes. The item types are the same values from the #OBJECTS section, in the OBJECT TYPE table. I am providing this table again, for this purpose, at the end of this #SHOPS help section.

The 'profit-buy' number is a markup for players buying the item, in percentage points. 100 is nominal price; 150 is 50% markup, and so on. The 'profit-sell' number is a markdown for players selling the item, in percentage points. 100 is nominal price, 75 is 25% markdown,
and so on. The buying markup should be at least 100, generally greater, and the selling markdown should be no more than 100, generally lower.

The 'open-hour' and 'close-hour' numbers define the hours when the shopkeeper will do business. For a 24-hour shop, these numbers would be 0 and 23.

Everything beyond 'close-hour' to the end of the line is taken to be a comment.

Note that there is no room number for a shop. Just load the shopkeeper mobile in to the room of your choice, via that #RESETS section, and make the mobile a sentinel in the ACT-FLAGS section of the mobile in #MOBILES. Or, for a wandering shopkeeper, just make it non-sentinel.

The objects the shopkeeper sells are exactly those loaded by the 'G' reset command in #RESETS for that shopkeeper. These items replenish automatically. If a player sells an
object to a shopkeeper, the shopkeeper will keep it for resale if he, she, or it doesn't already have an identical object. The items a player sells to a shopkeeper, however, do not replenish.

**IMPORTANT!!: You end your #SHOPS section with a '0' on the line after the last shop.

=== OBJECT TYPES (items a shopkeeper will buy from player):

ITEM_LIGHT           1
ITEM_SCROLL          2
ITEM_WAND            3
ITEM_STAFF           4
ITEM_WEAPON          5
ITEM_TREASURE        8
ITEM_ARMOR           9
ITEM_POTION         10
ITEM_CLOTHING       11
ITEM_FURNITURE      12
ITEM_TRASH          13
ITEM_CONTAINER      15
ITEM_DRINK_CON      17
ITEM_KEY            18
ITEM_FOOD           19
ITEM_MONEY          20
ITEM_BOAT           22
ITEM_CORPSE_NPC     23
ITEM_PILL           26
ITEM_MAP            28
**note: In general, when designing a mobile as a shopkeeper in the #MOBILES section, you should make him/her IMMUNE to all forms of attack by having the mobile immune to magic, disease, poison, and weapons using the IMM_BITS in the immunities section of the mob in #MOBILES. Also, it is generally a good idea to make these mobiles NOPURGE by having an 'ACT_FLAG' of ACT_NOPURGE for the mobile in the #MOBILES section. After all, you don't want your players killing the shopkeepers, or a purge-happy immortal accidentally purging the shopkeeper with a purge command.


Pet Shops

 Pet shops are explained briefly in the room helps, but we'll do it again here more fully. Basically the room where the shopkeeper stands must have a room flag of 'M'. It's basically the room that sells the pet, so you can have a 'virtual' shopkeeper in the room description, or create a sentinal 'dummy' shopkeeper. The pets to be purchased must be in a room that is vnum+1 of the shop itself. These rooms should not be accessible. (ie, make them no recall rooms, private, etc. Use JKN for room flags.) In the resets, you merely have to make sure that the pets are deposited in that room. Simple!