ldmud-3.3.719/
ldmud-3.3.719/doc/
ldmud-3.3.719/doc/efun.de/
ldmud-3.3.719/doc/efun/
ldmud-3.3.719/doc/man/
ldmud-3.3.719/doc/other/
ldmud-3.3.719/mud/
ldmud-3.3.719/mud/heaven7/
ldmud-3.3.719/mud/lp-245/
ldmud-3.3.719/mud/lp-245/banish/
ldmud-3.3.719/mud/lp-245/doc/
ldmud-3.3.719/mud/lp-245/doc/examples/
ldmud-3.3.719/mud/lp-245/doc/sefun/
ldmud-3.3.719/mud/lp-245/log/
ldmud-3.3.719/mud/lp-245/obj/Go/
ldmud-3.3.719/mud/lp-245/players/lars/
ldmud-3.3.719/mud/lp-245/room/death/
ldmud-3.3.719/mud/lp-245/room/maze1/
ldmud-3.3.719/mud/lp-245/room/sub/
ldmud-3.3.719/mud/lp-245/secure/
ldmud-3.3.719/mud/sticklib/
ldmud-3.3.719/mud/sticklib/src/
ldmud-3.3.719/mudlib/deprecated/
ldmud-3.3.719/mudlib/uni-crasher/
ldmud-3.3.719/pkg/
ldmud-3.3.719/pkg/debugger/
ldmud-3.3.719/pkg/diff/
ldmud-3.3.719/pkg/misc/
ldmud-3.3.719/src/
ldmud-3.3.719/src/autoconf/
ldmud-3.3.719/src/ptmalloc/
ldmud-3.3.719/src/util/
ldmud-3.3.719/src/util/erq/
ldmud-3.3.719/src/util/indent/hosts/next/
ldmud-3.3.719/src/util/xerq/
ldmud-3.3.719/src/util/xerq/lpc/
ldmud-3.3.719/src/util/xerq/lpc/www/
ldmud-3.3.719/test/generic/
ldmud-3.3.719/test/inc/
ldmud-3.3.719/test/t-0000398/
ldmud-3.3.719/test/t-0000548/
ldmud-3.3.719/test/t-030925/
ldmud-3.3.719/test/t-040413/
ldmud-3.3.719/test/t-041124/
ldmud-3.3.719/test/t-language/
int east_door_open;
int amiga_present;
int amiga_power;
object name;
int a;

void reset(int arg) {
    if (arg)
	return;
    set_light(1);
    east_door_open = 0;
    amiga_present = 0;
    amiga_power = 0;
    name = 0;
    a = 0;
}

void init() {
    add_action("open_door", "open");
    add_action("go_east", "east");
    add_action("sesam", "sesam");
    add_action("hit", "hit");
    write("You are in the computer room.\n");
}

void long() {
    if (east_door_open)
	write("An empty room with an open door to the east.\n");
    if (!east_door_open)
	write("An empty room with a closed door to the east.\n");
    if (amiga_present) {
	if (!amiga_power)
	    write("There is an amiga here.\n");
	if (amiga_power)
	    write("There is a powered on amiga here.\n");
    }
}

void open_door() {
    east_door_open = 1;
    write("Ok.\n");
}

void close_door() {
    east_door_open = 0;
    write("Ok.\n");
}

void go_east() {
    if (!east_door_open)
	write("The door is closed\n");
    if (east_door_open)
	move_object(this_player(), "room/rum2");
}

void sesam() {
    write("An amiga materialises!\n");
    amiga_present = 1;
    add_action("power", "power");
}

void power() {
    amiga_power = 1;
    write("The screen lights up.\n");
}

int door_open() {
    return east_door_open;
}

void summon() {
    name = clone_object("obj/player");
    write("Summoning a player...\n");
    write(name);
    write(", His hp is ");
    write(name->condition());
    write("\n");
}

void hit() {
    if (!name) {
	write("Hit what ?\n");
	return;
    }
    name->hit_player(3);
}

int fac(int n) {
    if (n <= 0)
	return 1;
    return n * fac(n-1);
}


void test() {
    a = a + 1;
    write("Fac "); write(a); write(" is "); write(fac(a)); write("\n");
}

string short() {
    write("Computer room\n");
    if (amiga_present) {
	if (amiga_power)
	    write("A powered amiga.\n");
	if (!amiga_power)
	    write("An amiga.\n");
    }
    return 0;
}