Here's a simple set of rooms and doors. It only allows me to refer to 'east door' from room420, not 'west door'. Not sure why.
/* /domains/dungeons/room/one/rm420.c
* 2011-Dec-08 T. Cook
* -----------
* 2011-Dec-10 T. Cook added 400 to x-coordinate
*/
#include <lib.h>
#include <terrain_types.h>
#include ROOMS_H
inherit LIB_ROOM;
static void create(){
room::create();
SetClimate( "temperate" );
SetTerrainType( T_INDOORS );
SetAmbientLight( 25 );
SetShort( "a dungeon" );
SetCoordinates( "404,2,0" );
SetLong( "This is the north end of a corridor in a dungeon." );
SetWorld( "Dungeon" );
SetTown( "One" );
SetExits( ([
"east" : "/domains/dungeons/room/one/rm520",
"west" : "/domains/dungeons/room/one/rm320"
]) );
SetDoor( "east", "/domains/dungeons/doors/one/door1-3" );
SetDoor( "west", "/domains/dungeons/doors/one/door1-2" );
}
void init(){ ::init(); }
/* EOF */
/* /domains/dungeons/room/one/rm520.c
* 2011-Dec-08 T. Cook
* -----------
* 2011-Dec-10 T. Cook added 400 to x-coordinate
*/
#include <lib.h>
#include <terrain_types.h>
#include ROOMS_H
inherit LIB_ROOM;
static void create(){
room::create();
SetClimate( "temperate" );
SetTerrainType( T_INDOORS );
SetAmbientLight( 25 );
SetShort( "a dungeon" );
SetCoordinates( "405,2,0" );
SetLong( "This is a dungeon." );
SetWorld( "Dungeon" );
SetTown( "One" );
SetExits( ([
"west" : "/domains/dungeons/room/one/rm420"
]) );
SetDoor( "west", "/domains/dungeons/doors/one/door1-3" );
}
void init(){ ::init(); }
/* EOF */
/* /domains/dungeons/room/one/rm320.c
* 2011-Dec-08 T. Cook
* -----------
* 2011-Dec-10 T. Cook added 400 to x-coordinate
*/
#include <lib.h>
#include <terrain_types.h>
#include ROOMS_H
inherit LIB_ROOM;
static void create(){
room::create();
SetClimate( "temperate" );
SetTerrainType( T_INDOORS );
SetAmbientLight( 25 );
SetShort( "a dungeon" );
SetCoordinates( "403,2,0" );
SetLong( "This is a dungeon." );
SetWorld( "Dungeon" );
SetTown( "One" );
SetExits( ([
"east" : "/domains/dungeons/room/one/rm420"
]) );
SetDoor( "east", "/domains/dungeons/doors/one/door1-2" );
}
void init(){ ::init(); }
/* EOF */
/* /domains/dungeons/doors/one/door1-2.c
* 2011-Dec-09 T. Cook
*/
#include <lib.h>
inherit LIB_DOOR;
static void create(){
door::create();
SetSide( "east", ([
"id" : ({ "door", "heavy door", "east door" }),
"short" : "a door",
"long" : "This is a heavy wooden door.",
"lockable" : 1
]) );
SetKeys( "east", ({ "copper key", "master key" }) );
SetSide( "west", ([
"id" : ({ "door", "heavy door", "west door" }),
"short" : "a door",
"long" : "This is a heavy wooden door.",
"lockable" : 1
]) );
SetKeys( "west", ({ "copper key", "master key" }) );
SetClosed( 1 );
SetLocked( 1 );
}
void init(){ ::init(); }
/* EOF */
/* /domains/dungeons/doors/one/door1-3.c
* 2011-Dec-09 T. Cook
*/
#include <lib.h>
inherit LIB_DOOR;
static void create(){
door::create();
SetSide( "east", ([
"id" : ({ "door", "heavy door", "east door" }),
"short" : "a door",
"long" : "This is a heavy wooden door.",
"lockable" : 1
]) );
SetKeys( "east", ({ "copper key", "master key" }) );
SetSide( "west", ([
"id" : ({ "door", "heavy door", "west door" }),
"short" : "a door",
"long" : "This is a heavy wooden door.",
"lockable" : 1
]) );
SetKeys( "west", ({ "copper key", "master key" }) );
SetClosed( 1 );
SetLocked( 1 );
}
void init(){ ::init(); }
/* EOF */
/* /domains/dungeons/obj/one/key1.c
* 2011-Dec-10 T. Cook
*/
#include <lib.h>
inherit LIB_ITEM;
static void create(){
item::create();
SetKeyName( "key" );
SetId( ({ "key", "copper key" }) );
SetAdjectives( ({ "copper" }) );
SetShort( "a copper key" );
SetLong( "This is a plain copper key with no markings." );
SetMass( 1 );
SetBaseCost( 10 );
SetDisableChance( 100 );
}
void init(){ ::init(); }
/* EOF */