Code Snippets

Each of the items, monsters and rooms is an object. Wizards creating the game code these objects using LPC programming language.

Here are the most basic examples of what the objects in game look like.

A room

#include <mudlib.h> inherit ROOM; void extra_create() { set_light(25); set_short("a small hut full of fishing tackles"); set_long ( wrap("The small wooden hut is made of wooden boards that have seen "+ "better days already. The two windows don't help much, as they "+ "are so dirty that it's impossible to see through them. A brass "+ "lantern is hanging on the wall, bringing some light to the room. "+ "Walls are full of fishing tackles, fishing rods, nets, fish traps "+ "and stuffed fishes take the most of the space. A small doorway "+ "leads out.\n")); set_item_desc ( ([ ({ "window", "windows" }) : "The two small windows are so dirty that it is impossible to "+ "see through them.\n", ({ "lantern", "brass lantern" }) : "The brass lantern has also seen it's better days a while ago. "+ "It is all sooty, but emits some light to the room. It has been "+ "attached firmly on the wall.\n", ({ "fishing tackles", "nets", "fish traps", "stuffed fishes" }): "The set of fishing tackle here is pretty impressive. It "+ "includes pretty much everything you can think of. Most of the "+ "stuff is used but there are new fishing rods, spring balances "+ "and bait boxes in the corner.\n", ({ "fishing rods", "spring balances", "bait boxes" }): "The fishing rods, spring balances and bait boxes are in a big "+ "wooden box in the corner. There is a 'For Sale' text written "+ "on the box, so obviously they are for sale.\n" ]) ); add_exit("out", "/d/world/rooms/770,669.world"); }

Navigation

Name:
Password:
Remember me:

Register »

Copyright © Jää Association and contributors.
Last modified: 2003-12-03 10:12:50