Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The Reset Section

Once you have learned to build rooms, objects and NPCs, you will find one main missing thing - while you have created NPCs and objects they don’t exist in the game unless you load them. When developing the VME we found that logging on and loading everything for the players to interact with became a very difficult thing to do when we got over 30 items. After many seconds of thought we came up with the idea of a reset section that would do all of this work for us. In fact the reset takes care of closing doors after players have opened them, loading NPCs and their equipment, loading objects by themselves in rooms or even loading objects in objects.

Everything inside the reset section activates once at boot time and then again when the reset time is up and the reset flag is true. These two fields were described in the Zone Source File chapter and are included in the zone header. The reset section is denoted by the symbol %reset and can be placed anywhere but we try to keep it at the end of our zone files. There is no set order you must reset your doors, objects, and NPCs in but I like to do doors first, special reset commands second, objects in rooms third, objects with objects in them fourth, and finally NPCs. You may find that you have a better way of sorting them and again it is up to you.

Door Resets

To show how the door resets work we will revisit an old room example from the Rooms chapter. The following two rooms are linked with a door and at boot time they are reset to closed. When the mud boots the door flags set on the room are the door flags that are used. After boot up time the reset section is where the VME gets its information about what to do with the door.

hallway
title "Module tunnel"
descr "The hallway is about 50 meters long and around 100 meters from
side to side and top to bottom...."

movement SECT_INSIDE
ALWAYS_LIGHT
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

west to chamber descr
"The hallway opens up into a chamber.";

east to office descr
"You see what looks to be an office."
keyword {"air lock door","air lock","door"}
open {EX_OPEN_CLOSE, EX_CLOSED};

end

office
title "The station office"
descr
"Large paintings fill the walls of this part of the station...."

movement SECT_INSIDE
ALWAYS_LIGHT
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

west to hallway descr
"You see what looks to be a hallway."
keyword {"air lock door","air lock","door"}
open {EX_OPEN_CLOSE, EX_CLOSED};
end

Now that we have two rooms let’s define the reset command and how it works. All reset commands have a keyword and then a set of arguments. The door reset command is simply door followed by a set of arguments that tell the VME where the door is, which door in that location, and what you want to do with the door. The command looks like this:

door <room symbol> <Direction number> {<door flags>}

Door Argument Explanation

room symbolic: As the name indicates this is the room that the door is located in. If you are resetting a door not in the zone the reset command is in you will need to use a full symbolic name with the zone extension.

// room symbolic in this zone
door myroom ...

// room symbolic in another zone
door out_room@frogwart ...

direction number: The direction number can be one of the pre-defined direction numbers in the file vme.h:

#define NORTH 0
#define EAST  1
#define SOUTH 2
#define WEST  3
#define UP    4
#define DOWN  5
#define NORTHEAST 6
#define NORTHWEST 7
#define SOUTHEAST 8
#define SOUTHWEST 9

door flags: These flags, surrounded by {}, describe the state of the door after the reset:

FlagDescription
EX_OPEN_CLOSESet this if you can open and close this exit, be it a door, gate or otherwise
EX_CLOSEDSet this if you want the exit to be closed at reset time
EX_LOCKEDSet this if you want the exit to be locked at reset time
EX_PICKPROOFUsing this flag renders the ‘pick’ skill and ‘unlock’ spell unusable on the lock
EX_HIDDENIf this bit is set, the exit is hidden until the mobile has successfully searched for it

Note: If you do not specify a key, you can only unlock this door with the ‘pick’ skill, ‘unlock’ spell or from DIL with UnSet().

Now that we have all the information we need we can close the door after the reset time expires. For our two rooms the door reset would look like this:

door hallway EAST {EX_OPEN_CLOSE, EX_CLOSED}
door office WEST {EX_OPEN_CLOSE, EX_CLOSED}

Note: As you can see from the example it is very important to close both sides of the door. If you do not close both sides you will get very weird and undefined errors when players are trying to open and close them.

Another thing that you can do with the door reset command is change the door’s status. In our previous example we reset the door to its status that it has when it first is loaded into the game. If however we wanted to change the door to a locked door we could do that by adding the locked flag like this:

door hallway EAST {EX_OPEN_CLOSE, EX_CLOSED, EX_LOCKED}
door office WEST {EX_OPEN_CLOSE, EX_CLOSED, EX_LOCKED}

Loading Objects and NPCs

Time to start loading your zone with its life and all the other strange things you have built. There are two commands that do all the loading and equipping of objects. Oddly enough the commands are called load and equip. The format of the commands are almost the same but equip must be used inside a NPC grouping. With that in mind let’s start with simple loads and work our way up.

The command to load an object or an NPC into a room is as follows:

load <object or NPC> [into] [<room>] [<load amount>]
  [{Other loads and equip commands}]

Load Command Arguments

object or NPC: The first argument to the load command is the object or NPC symbolic name that you want to load. The first argument is the only one that must be included in all load commands.

into: This is just a symbol that tells the reset that we are loading the object or NPC into some other unit.

object, NPC, and room: The third argument is the symbolic name of the place where you are loading the object and the NPC.

load amount: The fourth argument is an optional argument that tells the reset how many of the objects are allowed in the world, zone, or locally. The possible values for this field are:

ModifierDescription
max <num>At reset time the entire world is scanned for occurrences of the loaded unit - only if the currently existing number is less than <num> will the command be executed
local <num>At reset time the location where the unit is to be loaded is scanned for occurrences - only if the currently existing number is less than <num> will the command be executed
zonemax <num>At reset time the entire zone being reset is scanned for occurrences - only if the currently existing number is less than <num> will the command be executed

Optional grouping: Any reset command may be followed by a pair of curly brackets {} containing more reset commands. The commands inside the brackets will only be executed in case the associated command was successful.

Load Examples

Don’t be alarmed if this sounds a bit hard. It all gets much more clear as some examples are explained.

load udgaard/fido into midgaard/temple max 1

This example is pretty simple - it says load the fido into the temple only if there isn’t already 1 in the world. Now let’s get a bit more complicated:

load udgaard/fido into midgaard/temple max 1
{
   load bone
   load excrement into midgaard/temple
}

Now we have said again load the fido into the temple if there is not already one in the world. Then if fido loads fill his inventory with a bone and load excrement into the temple as well.

We can get even more complicated but still just using the load commands by doing the following:

load udgaard/fido into midgaard/temple max 1
{
   load bone
   load excrement into midgaard/temple
   load bag
   {
      load apple max 1
   }
}

Now we still have the fido loading if there isn’t one already in the world then the bone and the excrement and finally we load a bag. If there isn’t an apple already in the world we load the bag with an apple in it otherwise the bag will be empty.


The Equip Command

The equip command works a lot like load but has much simpler arguments. The equip command is as follows:

equip <symbol> position [load amount <num>]

symbol: The first argument is just the symbolic name of the item being worn by the NPC.

position: The position is any of the positions available in vme.h:

PositionDefine(s)
headWEAR_HEAD
handsWEAR_HANDS
armsWEAR_ARMS
bodyWEAR_BODY
legsWEAR_LEGS
feetWEAR_FEET
cloakWEAR_ABOUT
shieldWEAR_SHIELD
holdWEAR_HOLD
wieldWEAR_WIELD
earWEAR_EAR_R and WEAR_EAR_L
neckWEAR_NECK_1 and WEAR_NECK_2
wristWEAR_WRIST_R and WEAR_WRIST_L
fingerWEAR_FINGER_R and WEAR_FINGER_L
chestWEAR_CHEST
backWEAR_BACK
waistWEAR_WAIST
ankleWEAR_ANKLE_R and WEAR_ANKLE_L
faceWEAR_FACE
shouldersWEAR_SHOULDERS
haloWEAR_HALO (not for general use)
auraWEAR_AURA (not for general use)

load amount: The optional load amount works the same as with the load command (max, local, zonemax).

Equip Examples

Now with the equipment command you can now get your NPCs dressed and ready for battle:

load guard into jail
{
   equip helmet WEAR_HEAD
   equip plate WEAR_BODY
   equip pants WEAR_LEGS
   equip specialsword WEAR_WIELD max 1
   load brass_key
}

This is how you would equip a NPC with all items from the current zone. As you can see we didn’t need full symbolics because the server knows to grab the items from the zone the resets are in.

load guard into safe_room max 2
{
   equip plate WEAR_BODY
   load powersword max 1
   {
      load silver_pile into safe_room
   }
}

In this example we only load the silver pile if the guard loads and if the power sword loads which may or may not happen since there is only a max of one sword allowed while there is a max of 2 guards allowed. What will happen in this case is at the first reset there will be one guard and one pile of silver. The next reset there will still only be one pile of silver but now there will be two guards.


Special Reset Functions

Now that we have gone over the basic load and equip commands we have some special commands that you can add to them to make them do more interesting things. Sometimes when doing resets you don’t always want items or NPCs to load or sometimes you want them to load but only if a certain amount of other things correctly load. There are also times you want to clear the rooms or reload an entire object after removing the old one. All these things and more can be accomplished with the reset section.

The Complete Directive

The load and equip commands have one more argument that can be placed at the end of them to make them act a bit differently - the complete directive. In the case where this directive is placed at the end of a load or equip command, the unit is only loaded in case all immediate commands inside its nesting are executed successfully. In other words, if one item does not load when the complete directive is used, then nothing will load on that item.

load captain into jail_room complete
{
   equip magic_sword WEAR_WIELD max 1
   load bag
   {
      load ruby_ring max 1
   }
}

In this case the captain is only loaded if the objects magic_sword and bag are successfully loaded. If the ruby_ring is not loaded, it will have no affect on the complete directive. To make the ruby_ring affect the captain’s complete directive, the bag must also have specified a complete directive (because the bag would then not be complete, and thus the captain would not be complete).

The Follow Command

Once you load a NPC you may want that NPC to follow another NPC. That is what the follow command is for:

follow <symbol> <load amount #> <complete>

symbol: The first argument to the follow command is the symbolic name of the NPC to follow the NPC of the outer grouping.

load amount: The optional load amount works the same as with other commands.

complete: This only makes the NPC follow if all the other things in the grouping finish completely.

The follow command is always used nested inside a loaded NPC to force the NPC <symbol> to follow the NPC of the outer grouping:

load captain into jail
{
   follow guard max 4
   {
      equip guard_helmet WEAR_HEAD
      equip guard_plate WEAR_BODY
      equip guard_legs WEAR_LEGS
      equip guard_boots WEAR_FEET
   }
   follow guard max 4
   {
      equip guard_helmet WEAR_HEAD
      equip guard_plate WEAR_BODY
      equip guard_legs WEAR_LEGS
      equip guard_boots WEAR_FEET
   }
}

This example would load two guards that are fully dressed and they would start following the captain which is also loaded.

The Purge Command

There are times when you want to clean up a room. This can be done very easily by using the purge command:

purge <symbol>

The symbol is the room you want to empty of all objects and NPCs. If you wanted to get rid of all objects and NPCs from a room with the symbolic name of jail it would look like this:

purge jail

The Random Command

If you ever want to load something only some of the time, there is a built-in random command that allows you to pick the percentage of the time that the item will load:

random <num>
{group or single set of resets}

It is important to point out this is done by a random percentage chance where 1% of the time would be almost not at all and 100% of the time would be all the time. If we wanted to load a group of things only 80% of the time it would look like this:

random 80
{
   load captain into jail_room complete
   {
      equip magic_sword WEAR_WIELD max 1
      load bag
      {
         load ruby_ring max 1
      }
   }
}

The Remove Command

Many times players take items out of containers like chests or steal items from your NPCs and leave them naked. If the NPC is not dead the resets don’t reload them therefore, your NPCs will stand there empty and so will your chests. This is fine, if that is what you want, but sometimes you want them to get dressed or refilled again at reset time. That is what the remove command is for:

remove <symbol1> in <symbol2>

Again, the remove command is a simple command and it only has two arguments - the item and where it is to remove it from. If you wanted to have a cabinet that at every reset would have a knife and a bag of sugar in it, it would look like this:

remove cabinet in kitchen
load cabinet into kitchen
{
   load sugarbag
   load knife
}

Reset Walk Through

The dragon station is almost finished. All you have to do now is create the resets for it. We don’t have a lot of stuff in the zone but we have enough to make a decent example of how the resets work. As I mentioned at the start of the chapter on resets I like to do the doors first, the objects in rooms second, then the NPCs. Again this is nothing we force you to do but I find it helps me keep track of my items and NPCs.

Door Resets Example

With that in mind, we will start by resetting our doors. In the zone there are two doors. One is a regular door that is closed when the mud reboots and the other is a hidden and locked door when the mud reboots. The resets for these doors would look like this:

// Office door reset
door hallway EAST {EX_OPEN_CLOSE, EX_CLOSED, EX_LOCKED}
door office WEST {EX_OPEN_CLOSE, EX_CLOSED, EX_LOCKED}

// Secret door reset
door office SOUTH {EX_OPEN_CLOSE, EX_CLOSED, EX_LOCKED, EX_HIDDEN}
door portal_room NORTH {EX_OPEN_CLOSE, EX_CLOSED, EX_LOCKED}

Note: Both sides of the door don’t have to have the exact same flags - the door in the office is hidden but the one on the ship is not.

Object Resets Example

The next thing to build resets for is the two items we are loading directly into rooms and their contents if they have any. The two items we are loading into rooms are the board and the weapons locker. I am just going to stick the board in the main chamber and the weapons locker in the office. The reset for these two items looks like this:

load info_board into chamber

load wpn_locker into office
{
   load w_stiletto
}

Notice we also loaded a stiletto into the weapons locker and it will only load once a reboot since the cabinet will never be removed and unless the cabinet reloads the stiletto will not reload.

NPC Resets Example

Finally we get to the NPCs and their equipment. We only have 3 NPCs in our zone so it shouldn’t be any problem especially since we don’t have that much clothes. I am going to load the dragon into the ship on a percentage chance basis and then load the Janitor into the station so he can get to cleaning it up. Finally I will load Bob into the office so he can sit and count his money.

load bob into office
{
   equip pol_plate WEAR_BODY
}

load janitor into chamber
{
   equip pol_plate WEAR_BODY
}

random 50
{
   load bldragon into ship
   {
      load maskwa
   }
}

Only a couple final things to point out. It doesn’t matter if you load the same type of plate or same type of clothing on every NPC. It would look pretty silly if everyone was wearing the same clothes but I wanted to make sure you understood you didn’t have to make one set for everyone. Also you don’t have to equip wearable things - you can load them into the inventory like we did with the ring on the dragon. That about covers it all. The resets are now done and we can now put them all together with the zone and complete our dragon station.


The Complete Dragon Station

#include <composed.h>
%zone dragonst
lifespan 20
reset RESET_ANYHOW
creators {"whistler"}

notes
"This is the dragon station I shortened it to dragonst for ease in
loading.  If you have any questions email me at admin@example.com"

help
"Not sure what could help you now.  You are stuck on one of the
weirdest space stations you have ever seen and you smell burning
sulfur."

%rooms

chamber
title "The middle chamber of the station"
descr
"This chamber seems to have the entire station rotating around it.  It is
unbelievably large the ceiling seems to be a good 200 meters high and
the room is perfectly cubic. Small human size ornate chairs with dragon
designs scrawled on the arms and back are arranged in a triangle like
setting with one large chair at the front.  This must be where all
station meetings are held. Large pictures cover the walls depicting
dragons in all kinds of situations.  Large passages lead off to the west
and the east."

extra {"chair","chairs"}
"The chairs are made of some metal you don't recognize and every inch is covered
with some kind of dragon."

extra  {"dragon picture","picture"}
"Thousands of dragons dot the skies of this rather life like picture.  In the
center you see something move.  It looks to be a little green dragon."

extra {"green dragon","dragon","green"}
"An intelligent looking dragon is sitting perched on a large chair watching you."

movement SECT_INSIDE
ALWAYS_LIGHT
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}


west to disposal_room descr
"You see a small room.";

east to hallway descr
"You see what looks to be a hallway.";

end

hallway
title "Module tunnel"
descr "The hallway is about 50 meters long and around 100 meters from
side to side and top to bottom.  The hallway seems to be dust free.  The
walls and the floors seem to be made out of the same sterile
metal-plastic that all space agencies uses.  There are large plate glass
windows that open up into space.  The hallway is filled with a dim light
that seems to come from everywhere yet no where all at once.  You notice
a glimmer of bright light coming from the windows.  To the east you see
an air lock and to the west the hallway opens up into a larger room."

extra {"windows","window"}
"Your eyes are drawn to a large ship lit up with running lights sitting
about 1 kilometer from the station."

extra {"floor","walls","wall"}
"Well what can be said it looks to be in perfect condition.  What else would
you want to know?"

extra {"large ship" ,"ship"}
"The ship looks really big and is shaped like a dragon.  The scales
sparkle and seem to be multiple colors."

movement SECT_INSIDE
ALWAYS_LIGHT
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

west to chamber descr
"The hallway opens up into a chamber.";

east to office descr
"You see what looks to be an office."
keyword {"air lock door","air lock","door"}
open {EX_OPEN_CLOSE, EX_CLOSED};

end

office
title "The station office"
descr
"Large paintings fill the walls of this part of the station.  The room
is as large as the other rooms big enough for Dragons to lounge while
still having a desk in one corner small enough for a humanoid.  The
floor along the north wall is lined with some kind of fabric and seems
very soft to walk on, it may be some kind of dragon lounge judging by
how large an area it covers.  There is a passage to the west."

movement SECT_INSIDE
ALWAYS_LIGHT
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"paintings","painting"}
"The paintings are of many dragons and riders in all kinds of tasks from
combat to look out.  All the figures seem to be staring at a staff
being held by a depiction of a wizard on the south wall."

extra {"wizard","staff"}
"The wizard has his hand stretched out and it seems there is a place
you can almost grab the staff. Maybe if you searched the staff you would
find it."

extra {"desk"}
"It's a desk alright but there doesn't seem to be any drawers and it
seems totally empty."

extra {"fabric"}
"Wussshhhhh you bound across the comfortable floor wasn't that fun."

west to hallway descr
"You see what looks to be a hallway."
keyword {"air lock door","air lock","door"}
open {EX_OPEN_CLOSE, EX_CLOSED};

south to portal_room descr
"You see what looks to be a portal room."
keyword {"air lock door","air lock","staff","door"}
key nokey
difficulty 50
open {EX_OPEN_CLOSE, EX_CLOSED, EX_LOCKED, EX_HIDDEN};

end

portal_room
title "Green field room"
descr
"Like the other rooms on the station this one is large enough for
dragons to comfortably fit in.  The strange thing about this room though
is it is totally empty except for a green field right in the center.
there is a door that leads to another room to the north."

movement SECT_INSIDE
ALWAYS_LIGHT
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"green field","field"}
"The field looks to be a green fog shifting and churning as you watch.
if you are nuts you could probably enter it."

north to office descr
"You see what looks to be an office."
keyword {"air lock door","air lock","door"}
key nokey
difficulty 50
open {EX_OPEN_CLOSE, EX_CLOSED, EX_LOCKED};

//A link to the portal is also here from room_port
end

ship_port
names {"green field", "field"}
title "Green field"
descr
"Green Mist swirls about you."

movement SECT_INSIDE
ALWAYS_LIGHT
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

in ship

dilcopy force_move@function(
//Time in ticks (PULSE_SEC*seconds), minimum 12 ticks (3 sec)
PULSE_SEC*4,
//room and act
"portal_room@dragonst!You feel your body dissolving for lack of a better
description.&nYou appear on the deck of a ship.",
//True or False for randomizing or not
FALSE);


end

room_port
names {"green field", "field"}
title "Green field"
descr
"Green Mist swirls about you."
movement SECT_INSIDE
ALWAYS_LIGHT
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

in portal_room

dilcopy force_move@function(
//Time in ticks (PULSE_SEC*seconds), minimum 12 ticks (3 sec)
PULSE_SEC*4,
//room and act
"ship@dragonst!You feel your body dissolving for lack of a better
description.&nYou appear on the deck of a ship.",
//True or False for randomizing or not
FALSE);


end

disposal_room
title "Red field room"
descr
"Like the other rooms on the station this one is large enough for
dragons to comfortably fit in.  The strange thing about this room though
is it is totally empty except for a red field right in the center.
there is a door that leads to another room to the east."

movement SECT_INSIDE
ALWAYS_LIGHT
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"red field","field"}
"The field looks to be a red fog shifting and churning as you watch.
if you are nuts you could probably enter it."

east to chamber descr
"You see the main chamber.";

//A link to the portal is also here from dis_port
end

dis_port
names {"red field","field"}
title "Red field"
descr
"Red Mist swirls about you."

movement SECT_INSIDE
ALWAYS_LIGHT
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
dilcopy force_move@function(
//Time in ticks (PULSE_SEC*seconds), minimum 12 ticks (3 sec)
PULSE_SEC*4,
//room to force move to and act
"deathspace@dragonst!You feel your body dissolving for lack of a better
description.",
//true or false random move or not
0);
in disposal_room

end

ship
title "War dragon"
descr
"Blue light softly glows from con duets that line the walls of this ship.
The floors beside the east and west wall have what looks to be soft
fabric covering.  The south wall has small controls that seem to be made
for humanoids with two small chairs that look to be pilot seats.  View
portals are about 50 meters up the side of the ship on the west and east
wall and some kind of electronic screen covers the south wall.  The ship
seems to be a one room ship but there is a green field by the north
wall."

movement SECT_INSIDE
ALWAYS_LIGHT
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"view port"}
"Sorry you're not 50 meters tall maybe it is made for a dragon?"

extra {"view screen","screen"}
"It seems to be the pilot's view screen but you can't seem to see a way
to turn it on."

extra {"controls","control"}
"The controls are in some weird language and you're afraid if you start
pushing buttons you might rocket in to the station or worse slam into
a planet."

extra {"soft fabric","fabric"}
"It looks to be a dragon lounge area."

//A link to the portal is also here from ship_port
end

deathspace
title "Open space"
descr
"You see the ship and the station far off in the distance and you are in Space!"

movement SECT_INSIDE
ALWAYS_LIGHT
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

dilcopy death_room@function (
//Time in ticks (PULSE_SEC*seconds), minimum 12 ticks (3 sec)
PULSE_SEC*4,
//damage
400,
//act for the damage.
"You realize too late that was the trash disposal transporter and you feel
your lungs explode.");


end

%mobiles

bldragon

title "a black dragon"
descr "A big ugly black dragon is clawing the ground here."
names {"big ugly black dragon","ugly black dragon","big black dragon",
"black dragon","dragon"}

extra {}
"The black dragons scales glitter like black granite that has been
polished for years by water.  He has a large neck and huge bat like
wings.  His eyes watch you as you stand before him.  One claw seems to be
tapping slightly on the ground as if the dragon is waiting for
something."

extra {"eye","eyes"}
"The dragon's eyes seem to follow you no matter where you go in the room
nothing seems to escape the dragon's attention."

extra {"claws","claw"}
"The claw is big black and it looks very deadly.  It seems like the
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
to say means the claws are about the size of short swords and long
swords."

extra {"scales","scale"}
"It's a scale!  Haven't you ever seen a dragon before!"

extra {"bat wings","wings"}
"The dragon sees you looking and flaps his wings creating one heck of a
wind blast."

M_DRAGON_BLACK_OLD(SEX_MALE)

end

janitor
names {"ugly janitor", "janitor", "hobgoblin"}
title "an ugly janitor"
descr "an ugly janitor is walking around, cleaning up."

extra {}
"This ugly green thing looks more goblin than hobgoblin but he seems intent
on cleaning everything around him."

M_AVG_HOBGOBLIN(6, SEX_MALE)

// he is sort of good for cleaning so much
alignment 900

//give him some money
money 5 IRON_PIECE

dilcopy janitor@clashut("disposal_room@dragonst");

// only want him cleaning the station
dilcopy wander_zones@function("dragonst", 20, 1, 1);

end

bob

names {"Bob"}
title "Bob"
descr "Bob the Banker is here, sitting behind the counter."
extra {}
"He has a very serious look on his face."

// define from composed.h
M_SHOP_KEEPER(4, SEX_MALE, RACE_HUMAN)

//discourage people from killing banker
exp -500

flags {UNIT_FL_NO_TELEPORT}

special SFUN_BANK
end

%objects

info_board

title "a merchant information board"
descr "A merchant information Board is mounted on a wall here."
names {"merchant information board","information board","merchant board","board"}

extra {}
"A large flashy black steal board."

MATERIAL_METAL("A very fine quality black steel")
type ITEM_BOARD
dilcopy board@boards("info","","rem_res@boards","",100);

end

w_stiletto
title "a stiletto"
names {"deadly looking stiletto","deadly stiletto","stiletto", "dagger"}
descr "A deadly looking stiletto has been left here."

MATERIAL_METAL("A very fine quality steel")
manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD}
WEAPON_DEF(WPN_DAGGER, 1, 2)
weight 2
cost 2 GOLD_PIECE
rent 1 COPPER_PIECE

SKILL_TRANSFER(SKI_BACKSTAB, 2)
dilcopy abi_restrict@function (ABIL_DEX,10,0,25,"");

extra {}
"This looks like a thieves dream come true. "

extra {"$identify"}
"The stiletto looks magical in nature and seems really sharp.  You can
tell if you wield it you would be able to backstab someone really easy."

extra {"$improved identify"}
"The stiletto gives you a magical bonus of +1 and has a quality of +2.
It also raises your back stabbing skill  by 2%.  You have to have at
least 10% in dex before you can wield this magical weapon."

end

wpn_locker

title "a weapons locker"
names {"weapons locker","weapon locker","locker"}

descr "a small weapons locker hangs on the wall here."
manipulate {MANIPULATE_ENTER}
CONTAINER_DEF(500)
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
weight 400
MATERIAL_METAL("A very fine quality steel")

extra {}
"It is an ordinary weapons locker that looks like it holds any illegal
weapons that are taken on the station."

end

pol_plate
names {"polished breast plate","polished plate","breast plate","plate"}
title "a polished breast plate"
descr "A polished breast plate has been left here."
extra {}
"This is one shiny plate it seems to be made out of one perfect piece of
metal.  There doesn't even seem to be any markings of owner ship."

MATERIAL_METAL("A high luster silver colored metal")

manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY}
ARMOUR_DEF(ARM_PLATE,5,9)
dilcopy abi_restrict@function (ABIL_STR,40,0,25,"");
cost 2 GOLD_PIECE
rent 3 COPPER_PIECE
weight 25

extra {"$identify"}
"This is a high quality plate with a magical feeling."

extra {"$improved identify"}
"The plate has a magical bonus to your defence of a +5 and a quality of
+9.  You need 40% in strength to be able to wear it."
end

liq_ration
names {"red bag", "bag", "wine"}
title "a red bag"
descr "A red bag has been gently placed here."

MATERIAL_ORGANIC("a soft plastic")
manipulate {MANIPULATE_TAKE}

LIQ_WINE(1,2,2,0)
cost 2 IRON_PIECE
extra {}
"A small label reads Tassel Grove's finest.  Year 321"

extra {"$identify"}
"It's the special wine from Tassel grove a small halfling village on the
planet Valhalla.  It seems like a great vintage wine."

end

beef_stick

title "a tough leathery stick"
descr "A tough leathery looking stick is laying here."
names {"tough leathery stick","tough leather stick","leathery stick",
"leather stick","tough stick","stick"}

extra {}
"This has the word BEEF burnt into it."

manipulate {MANIPULATE_TAKE}
FOOD_DEF(5,0)
weight 1
cost 1 COPPER_PIECE
MATERIAL_ORGANIC("tough beef")
end

  maskwa

names {"maskwa platinum ring", "platinum ring","maskwa ring","maskwa","ring"}
title "a Maskwa ring"
descr "A Maskwa platinum ring is laying here."
MATERIAL_METAL("Platinum, and other precious metals")
extra {}
"The ring has a large bear head.  Could this be the legendary head of
Maskwa?  Any thing formed with its head on it is said to strengthen the
wearer."
type ITEM_WORN
manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD, MANIPULATE_WEAR_FINGER}
cost 100 COPPER_PIECE
rent 50 IRON_PIECE
weight 1
STR_TRANSFER(+1)
end

%reset

//Office door reset
door hallway EAST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
door office WEST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}


//secret door reset
door office SOUTH {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN}
door portal_room   NORTH {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}


load info_board into chamber

load wpn_locker into office
  {
  load w_stiletto
  }

  load bob into office
  {
  equip pol_plate WEAR_BODY
  }

  load janitor into chamber
    {
equip pol_plate WEAR_BODY
}



random 50
  {
  load bldragon into ship
      {
  load maskwa
  }
  }

%end