ldmud-3.4.1/doc/
ldmud-3.4.1/doc/efun.de/
ldmud-3.4.1/doc/efun/
ldmud-3.4.1/doc/man/
ldmud-3.4.1/doc/other/
ldmud-3.4.1/mud/
ldmud-3.4.1/mud/heaven7/
ldmud-3.4.1/mud/lp-245/
ldmud-3.4.1/mud/lp-245/banish/
ldmud-3.4.1/mud/lp-245/doc/
ldmud-3.4.1/mud/lp-245/doc/examples/
ldmud-3.4.1/mud/lp-245/doc/sefun/
ldmud-3.4.1/mud/lp-245/log/
ldmud-3.4.1/mud/lp-245/obj/Go/
ldmud-3.4.1/mud/lp-245/players/lars/
ldmud-3.4.1/mud/lp-245/room/death/
ldmud-3.4.1/mud/lp-245/room/maze1/
ldmud-3.4.1/mud/lp-245/room/sub/
ldmud-3.4.1/mud/lp-245/secure/
ldmud-3.4.1/mud/morgengrauen/
ldmud-3.4.1/mud/morgengrauen/lib/
ldmud-3.4.1/mud/sticklib/
ldmud-3.4.1/mud/sticklib/src/
ldmud-3.4.1/mudlib/uni-crasher/
ldmud-3.4.1/pkg/
ldmud-3.4.1/pkg/debugger/
ldmud-3.4.1/pkg/diff/
ldmud-3.4.1/pkg/misc/
ldmud-3.4.1/src/autoconf/
ldmud-3.4.1/src/hosts/
ldmud-3.4.1/src/hosts/GnuWin32/
ldmud-3.4.1/src/hosts/amiga/
ldmud-3.4.1/src/hosts/win32/
ldmud-3.4.1/src/ptmalloc/
ldmud-3.4.1/src/util/
ldmud-3.4.1/src/util/erq/
ldmud-3.4.1/src/util/indent/hosts/next/
ldmud-3.4.1/src/util/xerq/
ldmud-3.4.1/src/util/xerq/lpc/
ldmud-3.4.1/src/util/xerq/lpc/www/
ldmud-3.4.1/test/t-030925/
ldmud-3.4.1/test/t-040413/
ldmud-3.4.1/test/t-041124/
int gived;

int id(string str) {
    return str == "stone" || str == "black stone";
}

string short() {
    return "A black stone";
}

void long() {
    write("The stone is completely black, and feels warm to the touch.\n");
    write("There seems to be somthing magic with it.\n");
}

int query_weight() { return 1; }

/* Prevent giving away this object */
int drop() {
    gived += 1;
    if (gived == 2)
	return 1;
    else
	return 0;
}

int get() { return 1; }

void init() {
    add_action("list_peoples", "people");
    add_action("list_files", "ls");
    add_action("cat_file", "cat");
    add_action("drop_object", "drop");
}

int list_files(string path)
{
    ls(path);
    return 1;
}

int cat_file(string path)
{
    if (!path)
	return 0;
    cat(path);
    return 1;
}

int list_peoples() {
    object * list;
    int i, a;

    list = users();
    write("There are now " + sizeof(list) + " players");
    for (i=0, a=0; i < sizeof(list); i++)
	if (query_idle(list[i]) >= 5 * 60)
	    a++;
    if (a)
	write(" (" + (sizeof(list) - a) + " active)");
    write(". " + query_load_average() + "\n");
    for(i=0; i<sizeof(list); i++) {
	string name;
	name = list[i]->query_real_name();
	if (!name)
	    name = list[i]->query_name();
	if (!name)
	    name = "logon";
	name = capitalize(name);
	if (list[i]->short() == 0)
	    name = "(" + name + ")";
	if (strlen(name) < 8)
	    name = name + "\t";
	write(query_ip_number(list[i]) + "\t" + name + "\t" +
	      list[i]->query_level() + "\t");
	a = list[i]->query_age();
	if (a / 43200 > 9)
	    write(a / 43200 + " D");
	else if (a / 43200 > 0)
	    write(a / 43200 + "  D");
	else if (a / 1800 > 9)
	    write(a / 1800 + " h");
	else if (a / 1800 > 0)
	    write(a / 1800 + "  h");
	else if (a / 30 > 9)
	    write(a / 30 + " m");
	else
	    write(a / 30 + "  m");
	if (query_idle(list[i]) >= 5 * 60)
	    write(" I\t");
	else
	    write("\t");
	if (environment(list[i]))
	    write(object_name(environment(list[i])));
	write("\n");
    }
    return 1;
}

int drop_object(string str) {
    if (str == "all") {
	drop_object("black stone");
	return 0;
    }
    if (!str || !id(str))
	return 0;
    write("The stone dissapears.\n");
    say(this_player()->query_name() + " drops a black stone. It dissapears.\n");
    this_player()->add_weight(-1);
    destruct(this_object());
    return 1;
}