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/
#include "room.h"
object beggar;

#undef EXTRA_RESET
#define EXTRA_RESET extra_reset();

/*
 * Make these arrays global, so they only have to be initialized once.
 */
string *chat_str, *a_chat_str, *action, *type, *match;

void extra_reset() {
    no_castle_flag = 1;
    if (!present("knife")) {
        object weapon;
        weapon = clone_object("obj/weapon");
        weapon->set_name("knife");
        weapon->set_class(5);
        weapon->set_value(8);
        weapon->set_weight(2);
	move_object(weapon, this_object());
    }
    if (!beggar) {
	beggar = clone_object("obj/monster");
	beggar->set_name("beggar");
	beggar->set_level(3);
	beggar->set_al(200);
	beggar->set_race("human");
	beggar->set_long("A really filthy looking poor beggar.\n");
	beggar->set_hp(30);
	move_object(beggar, this_object());
	if (!action) {
	    action = allocate(1);
	    type = allocate(1);
	    match = allocate(1);
	    action[0] = "give_beggar";
	    type[0] = "gives";
	}
	beggar->set_match(this_object(), action, type, match);
	if (!chat_str) {
	    chat_str = allocate(3);
	    chat_str[0] =
		"Beggar says: Please, give money to a poor beggar!\n";
	    chat_str[1] =
		"Beggar says: Why can't I find any money ?\n";
	    chat_str[2] =
		"Beggar says: two coins please !\n";
	}
	if (!a_chat_str) {
	    a_chat_str = allocate(1);
	    a_chat_str[0] = "Beggar says: Why do you do this to me ?\n";
	}
	beggar->load_chat(1, chat_str);
	beggar->load_a_chat(20, a_chat_str);
    }
}

TWO_EXIT("room/vill_road1", "south",
	 "room/pub2", "east",
	 "Small yard",
	 "A small yard surrounded by houses.\n", 1)

void give_beggar(string str) {
    int money;
    string who;

    say("Beggar says: Thank you.\n");
    if (sscanf(str, "%s gives you %d gold coins.", who, money) != 2)
	return;
    if (beggar->query_money() >= 12 &&
	    environment(beggar) == this_object()) {
	beggar->init_command("east");
	beggar->init_command("buy beer");
	beggar->init_command("drink beer");
	beggar->init_command("west");
    }
}