
Descriptions of 2.4.5 rooms come from these variables:
static string long_desc;
inherit "room/room";
reset(arg)
{
if (arg) return;
set_light(1);
short_desc = "Village green";
no_castle_flag = 1;
long_desc = "You are at an open green place south of the " +
"village church.\n" +
"You can see a road further to the east.\n";
dest_dir = ({"room/church", "north",
"room/hump", "west",
"room/vill_track", "east"});
}
static string short_html_desc;
/* Long HTML description of the room */
static string long_html_desc;
{
...
short_desc = "Village green";
short_html_desc = "Village <em>green</em>";
long_desc = "You are at an open green place south of the " +
"village church.\n" +
"You can see a road further to the east.\n";
long_desc = "You are at an open green place south of the " +
"village church.\n" +
"You can see a road further to the east.\n";
long_html_desc =
"You are at an open green place south of the " +
"<em>village church<em>. " +
"You can see a road further to the " +
"<a xch_cmd=\"go east\" xch_hint=\"Go east\">east</a>.\n ";
...
}
If you want a VRML document to be displayed when users enter the room, you can set this new
variable, also from room.c:
static string vrml_url;
{
...
short_desc = "Village green";
short_html_desc = "Village <em>green</em>";
long_desc = "You are at an open green place south of the " +
"village church.\n" +
"You can see a road further to the east.\n";
long_desc = "You are at an open green place south of the " +
"village church.\n" +
"You can see a road further to the east.\n";
long_html_desc =
"You are at an open green place south of the " +
"<em>village church<em>. " +
"You can see a road further to the " +
"<a xch_cmd=\"go east\" xch_hint=\"Go east\">east</a>.\n ";
vrml_url =
"http://www.chaco.com/pueblo/0.6/ChAnim/msw32/pueblo.wrl";
...
}
To determine whether a client is Pueblo-enhanced, use the query_is_html() function. For example, if you wanted to output pre-formatted HTML text for
HTML-enabled users, you might do this:
{
write_html("<pre>");
}
write("This text is preformatted.\n");
if (this_player()->query_is_html())
{
write_html("</pre>");
}
Building in LP-MUD