home » builders » builder's lessons » pet shops
Pet shops
Pet shops should be well planned in advance when designing the area, due to the fiddly way they work. A pet shop needs two consecutive room vnums to work right. (Else you will do as I did when I made my first petshop and sell wealthy lady's in Waterdeep as mounts! :) Unlike shops and repairers the pet shop is based on the room and not the mobile. A pet shop will still work even if there is no mob selling them in the room. You can list and buy without a mobile in the room. However it is important for roleplay that you make sure there is a mobile in the room. The mobile is also handy to restrict who can buy from the shop if you want restrictions in place.
Let us say we have allocated vnums QQ50 and QQ51 to our petshop.
QQ50 is the room where the player types list to see what pets there are and buys the actual pet. This room needs to be flagged ROOM_PET_SHOP. This is the room that the mobile shopkeeper will load up into. Even though codewise he is not needed, he is needed roleplaywise.
QQ51 is the storeroom for the pets that will be for sale in the pet shop. This room should be flagged ROOM_NO_ASTRAL and ROOM_NO_SUMMON. It should also have no way of being got into or ways out. Basically it is a room that players have no business being in and it is up to you the builder to prevent that from happening.
Next you need to make the mobiles of the pets/mounts you want to sell in your shop. You will also need to make your seller mobile. Make the pets the level that you want players to able to buy them from. Note that flying pets should be higher level. Lets say for this example we have the following mobs to be involved with the petshop.
- QQ01 - Stable Master
- QQ02 - A large pony
- QQ03 - A small grey mule
You would have to set them up in resets as follows:
M 0 QQ01 1 QQ50; the stable master the Stables
M 0 QQ02 1 QQ51; a small pony in stables storeroom.
M 0 QQ03 1 QQ51; a large horse in stables storeroom.
Let us use a real example in the game , the Palace Stables in Waterdeep and put all the elements needed to make a working pet shop in below:
First the rooms. Note they are 2 consecutive vnums. The description of the storeroom warns players they should not be here and alert an imm. Note that only the first room is flagged petshop. It tells the code that the next vnum will be a pet storage room. Any mobiles loaded into the next vnum will be sold in the first room.
#8077 The Palace Stables~ {30}This is a reputable stable where a traveller can stable his horse safely. For a price of course. The stable master will sell good quality mounts and teach one how to ride. ~ 0 ROOM_INDOORS|ROOM_PET_SHOP SECT_INSIDE 0 0 0 DDIR_NORTH ~ ~ 0 -1 8122 1 DDIR_EAST ~ ~ 0 -1 8013 1 DDIR_SOUTH ~ ~ 0 -1 8113 0 S #8078 Petshop storeroom.~ {30}This is the petshop storeroom. You shouldnt be in here if you are. There is pet poop all over the ground and it will rise up and get you if you are in here without permission. ~ 0 ROOM_NO_MOB|ROOM_INDOORS|ROOM_NO_SUMMON|ROOM_NO_ASTRAL SECT_INSIDE 0 0 0 S
Then we add our seller. This one has programs on him to stable characters mounts. That requires another room. See the lesson about stabling mounts for more information.
8077 stable master~ {30}the stable master~ {30}The stable master tends to his horses here. ~ He is dressed simply in cloth leggings and tunic with long leather boots. He is a rider of some expertise and for a price he would be willing to teach one how to MOUNT and ride a horse. ~ U 25 CLASS_FIGHTERS RACE_HUMAN SEX_MALE POS_STANDING DEITY_NONE ACT_SENTINEL|ACT_NOSHOVE|ACT_CITIZEN 0 ARMOR_TYPE_BANDED MATERIAL_BRASS d15+15 500 13 13 13 18 13 18 13 0 0 0 0 0 LANG_COMMON LANG_COMMON RIS_NONE RIS_NONE RIS_NONE %8 1 mount~ >greet_prog 100~ sayto $n Can I interest you in a fine horse? sayto $n Or I can teach you how to ride a horse? sayto $n Or can I stable your mount for a small fee? ~ >intercept_prog sleep~ sayto $n You cannot sleep here. sayto $n Go pay for a room in an inn. ~ >speech_prog yes aye~ say Which do you want? ~ >speech_prog stable~ sayto $n I can stable your mount safely sayto $n for 4 gold pieces. ~ >bribe_prog 400~ mptransfer $n 8858 pet mpat 8858 mptransfer $n 8077 sayto $n Here you go. sayto $n Give me this bit of wood when you want your mount back. mpechoat $n $I hands you a piece of painted wood. mpechoaround $n $I hands $N a piece of painted wood. mpechoat $n $I leads your mount off to a private stall. mpechoaround $n $I leads $N's mount off to a private stall. mpoload 8619 mpgive i8619 $n ~ >give_prog i8619~ sayto $n Rightothen, let me get your mount. mpecho $I heads out to the back of the stables. mptransfer $n 8858 mpat 8858 mptransfer $n 8077 pet mpechoat $n $I leads your mount out to you. mpechoaround $n $I leads $N's mount out to $m. mpjunk i8619 ~ |
Then we need our pets/mounts to sell. We have a pony and a large horse for sale here. Note that they poop!
#8037 small pony~ {F0}a small pony~ {F0}A small pony is here. ~ It is a small white pony with a black patch on its rump and over one eye. ~ S 15 CLASS_MONSTER RACE_HORSE SEX_MALE POS_STANDING DEITY_NONE ACT_SENTINEL|ACT_MOUNTABLE|ACT_WIMPY >rand_prog 1~ if sector($i) == 1 mpecho $I cocks his tail and poops! mpoload 8580 mpquiet on drop i8580 mpquiet off endif ~ | #8038 large horse~ {30}a large horse~ {30}A large horse is here. ~ It is a brown large horse with a black tail and mane. ~ S 20 CLASS_MONSTER RACE_HORSE SEX_MALE POS_STANDING DEITY_NONE ACT_SENTINEL|ACT_MOUNTABLE|ACT_WIMPY >rand_prog 1~ if sector($i) == 1 mpecho $I cocks his tail and poops! mpoload 8580 mpquiet on drop i8580 mpquiet off endif ~ |
Then we need to place the seller and mounts into resets.
M 0 8037 1 8078; a small pony in Petshop storeroom. M 0 8038 1 8078; a large horse in Petshop storeroom. M 0 8077 1 8424; stable master in gentle rest stables