home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Special: Spiele Hits
/
Hits-CD.iso
/
aminet
/
spiele
/
ammud1_1.lha
/
AmigaMUD
/
Src
/
Building
/
bguild.m
next >
Wrap
Text File
|
1997-01-30
|
30KB
|
677 lines
/*
* Amiga MUD
*
* Copyright (c) 1997 by Chris Gray
*/
/*
* bguild.m - set up the builder's guild.
*/
private tp_bguild CreateTable()$
use tp_bguild
use t_streets
define tp_bguild BGUILD_ID NextEffectId()$
define tp_bguild proc drawGuild()void:
if not KnowsEffect(nil, BGUILD_ID) then
DefineEffect(nil, BGUILD_ID);
GSetImage(nil, "Town/bguild");
IfFound(nil);
ShowCurrentImage();
Else(nil);
GSetPen(nil, C_TAN);
GAMove(nil, 0.386, 0.26);
GADraw(nil, 0.386, 0.16);
GADraw(nil, 0.448, 0.16);
GADraw(nil, 0.448, 0.26);
GAMove(nil, 0.0, 0.26);
GADraw(nil, 0.495, 0.26);
GADraw(nil, 0.495, 0.86);
GADraw(nil, 0.0, 0.86);
GADraw(nil, 0.0, 0.26);
GAMove(nil, 0.158, 0.26);
GADraw(nil, 0.158, 0.86);
GAMove(nil, 0.158, 0.48);
GADraw(nil, 0.339, 0.48);
GAMove(nil, 0.158, 0.64);
GADraw(nil, 0.339, 0.64);
GAMove(nil, 0.248, 0.26);
GADraw(nil, 0.248, 0.48);
GAMove(nil, 0.248, 0.64);
GADraw(nil, 0.248, 0.86);
GAMove(nil, 0.339, 0.26);
GADraw(nil, 0.339, 0.48);
GAMove(nil, 0.339, 0.64);
GADraw(nil, 0.339, 0.86);
GSetPen(nil, C_BROWN);
GAMove(nil, 0.186, 0.48);
HorizontalDoor();
GAMove(nil, 0.277, 0.48);
HorizontalDoor();
GAMove(nil, 0.186, 0.64);
HorizontalDoor();
GAMove(nil, 0.277, 0.64);
HorizontalDoor();
GAMove(nil, 0.402, 0.26);
HorizontalDoor();
GAMove(nil, 0.158, 0.52);
VerticalDoor();
GAMove(nil, 0.495, 0.52);
VerticalDoor();
GAMove(nil, 0.283, 0.86);
GADraw(nil, 0.3, 0.86);
GSetPen(nil, C_GOLD);
GAMove(nil, 0.08, 0.56);
GRMovePixels(nil, -12, 3);
GText(nil, "LIB");
GAMove(nil, 0.204, 0.37);
GRMovePixels(nil, -4, 3);
GText(nil, "A");
GAMove(nil, 0.294, 0.37);
GRMovePixels(nil, -4, 3);
GText(nil, "B");
GAMove(nil, 0.204, 0.75);
GRMovePixels(nil, -4, 3);
GText(nil, "W");
GAMove(nil, 0.294, 0.75);
GRMovePixels(nil, -4, 3);
GText(nil, "M");
Fi(nil);
EndEffect();
fi;
CallEffect(nil, BGUILD_ID);
corp;
define tp_bguild GUILD_MAP_GROUP NextMapGroup()$
define tp_bguild r_buildEntry CreateThing(r_indoors)$
SetupRoom(r_buildEntry, "in the foyer of the builder's guild",
"The floor in here is an expensive-looking black and white tile. Potted "
"plants abound, as do black leather upholstery and brass fixtures. A long "
"hallway leads off to the west, a small door half-hidden behind a palm "
"tree leads north, and the doors out to the street are to the east.")$
r_buildEntry@p_rNoMachines := true$
Connect(r_sw2, r_buildEntry, D_WEST)$
Connect(r_sw2, r_buildEntry, D_ENTER)$
ExtendDesc(r_sw2,
"There is a fancy entryway here, complete with a somewhat worn red carpet "
"and overhead marquee. Double glass doors lead into a large entry hall. "
"There are potted shrubs to either side of the door, and a brass sign "
"beside the door reads \"Builder's Guild\".")$
RoomGraphics(r_buildEntry, "Foyer", "", GUILD_MAP_GROUP,
0.417, 0.56, drawGuild)$
Sign(r_sw2, "sign;brass.door;brass,sign,beside,the",
"The brass sign is one of those expensive things carved from a hunk of "
"brass. The resulting raised letters are brass coloured, and the "
"carved-out areas are painted flat black.",
"\"Builder's Guild\"")$
Scenery(r_sw2,
"entryway,entry;fancy."
"carpet;somewhat,worn,red."
"marquee;overhead."
"door;double,glass."
"hall;large,entry."
"shrub;potted")$
Scenery(r_buildEntry,
"floor;expensive,black,and,white,tiled."
"tile;expensive,black,and,white."
"plant;potted."
"upholstery;black,leather."
"fixture;brass."
"hallway;long."
"tree;palm."
"door;small,wooden")$
define tp_bguild r_buildHall1 CreateThing(r_indoors)$
SetupRoom(r_buildHall1, "in an east-west hallway",
"On each side of the hall are simple wooden doors. Beside each is a sign "
"which reads \"Members Only\". The entry hall is to the east.")$
Connect(r_buildEntry, r_buildHall1, D_WEST)$
RoomGraphics(r_buildHall1, "East", "Hallway", GUILD_MAP_GROUP,
0.293, 0.56, drawGuild)$
Scenery(r_buildHall1, "door;simple,wooden")$
Sign(r_buildHall1, "sign", "", "\"Members Only\"")$
define tp_bguild r_buildHall2 CreateThing(r_indoors)$
SetupRoom(r_buildHall2, "in an east-west hallway",
"On each side of the hall are simple wooden doors. Beside each is a sign "
"which reads \"Members Only\". A set of double doors to the west marks "
"the end of the hallway. Beside those doors is a sign which reads "
"\"Library\".")$
Connect(r_buildHall1, r_buildHall2, D_WEST)$
RoomGraphics(r_buildHall2, "West", "Hallway", GUILD_MAP_GROUP,
0.202, 0.56, drawGuild)$
Scenery(r_buildHall2, "door;simple,wooden,double")$
Sign(r_buildHall2, "sign", "", "")$
Sign(r_buildHall2, "sign", "", "")$
define tp_bguild r_buildLibrary CreateThing(r_indoors)$
SetupRoom(r_buildLibrary, "in the builder's library",
"Rows and rows of shelves here are filled to overflowing with plans, "
"blueprints, permits, announcements, etc. Most of the material is of no "
"interest, but one set of volumes bears investigation. Double doors lead "
"out to the east.")$
Connect(r_buildHall2, r_buildLibrary, D_WEST)$
UniConnect(r_buildLibrary, r_buildHall2, D_EXIT)$
RoomGraphics(r_buildLibrary, "Library", "", GUILD_MAP_GROUP,
0.079, 0.56, drawGuild)$
Scenery(r_buildLibrary,
"shelves,shelf;rows,and,of."
"plan."
"blueprint."
"announcement."
"material")$
Sign(r_buildLibrary, "volume;set,of.set",
"The volumes you see are the ones you should read.",
"Read the volumes by name, one at a time.")$
define tp_bguild o_buildBook1 CreateThing(nil)$
SetupObject(o_buildBook1, r_buildLibrary, "introduction,intro;book,of.book",
"This tattered volume is right at the beginning of the heap. It is "
"securely attached to the shelf by a brass chain, so you can't take it "
"out. The text inside describes the miscellaneous building commands.")$
o_buildBook1@p_oNotGettable := true$
o_buildBook1@p_oReadString :=
"The following miscellaneous build (@) commands exist:\n"
" @showtable <table> - show the symbols defined in the table.\n"
" @describesymbol <table> <symbol> - describe the given symbol.\n"
" @deletesymbol <table> <symbol> - delete the given symbol. You must be the\n"
"\towner of the symbol in order to delete it.\n"
" @movesymbol <fromtable> <totable> <symbol> - move a symbol from one table\n"
"\tto another.\n"
" @renamesymbol <table> <old-symbol> <new-symbol> - rename a symbol.\n"
" @flag <table> <symbol> - define a new flag property.\n"
" @counter <table> <symbol> - define a new counter property.\n"
" @string <table> <symbol> - define a new string property.\n"
" @table <table> <symbol> - define a new private table.\n"
" @use <table> - add table to set used for symbol lookup.\n"
" @unuse <table> - remove table from set used for symbol lookup.\n"
" @symbolhere <table> <symbol> - define the given symbol for this room.\n"
" @poof <symbol> - poof to your given named room.\n"
"Use table name 'private' to refer to your main private symbol table.\n"
"Only an Apprentice or Wizard can make you an official builder."$
define tp_bguild o_buildBook2 CreateThing(nil)$
SetupObject(o_buildBook2, r_buildLibrary, "rooms,room;book,of.book",
"This book shows much sign of wear. If it wasn't attached to the wall "
"with an iron chain, it probably wouldn't be here anymore! Inside, it "
"details the basic methods for building rooms.")$
o_buildBook2@p_oNotGettable := true$
o_buildBook2@p_oReadString :=
"The following forms of the @room (@r) command exist:\n"
" @room new <dir> <kind> <room-name> - create a new room with a two-way\n"
"\tlink in the indicated direction. <kind> is one of: indoors, forest\n"
"\toutdoors, field, road, path, sidewalk or park. <room-name> is the\n"
"\tstring which will be printed after the 'You are'. E.g.\n"
"\t\t@room new north indoors in a new room\n"
" @room newname <room-name> - rename the current room.\n"
" @room same <old-dir> <new-dir> - make a one-way link in di