#include <mudlib.h>
inherit MONSTER;
object apron;
void make_items();
void reset(status arg) {
  ::reset(arg);
  if(arg) make_items();
  set_name("igor");
  set_short("Igor, the goblin");
  set_gender(1);
  set_race("goblin");
  set_long(
	"He looks dirty and smells horrible, but thats only because \n"+
	"he collects compost for Milomoo the gardener. Igor is a good\n"+
	"helper, but just forgets what he is doing most of the time.\n");
  set_level(1);
  set_wander(10, 360);
  load_chat(2, ({ "Igor says: Hullo there.\n",
	"Igor asks: Why is the sky blue?\n",
	"Igor asks: Why are the flowers leaves green?\n",
	"Igor asks: Why are you here?\n",
	"Igor asks: Why is it dark at night?\n",
	"Igor asks: Who are you?\n",
	"Igor asks: Where is Milomoo?\n",
	"Igor asks: You haven't got any fertilizer have you?\n",
	"Igor asks: Have you seen the cows?\n",
	"Igor asks: Have you seen the squirrels?\n",
	"Igor asks: Are you married?\n",
	"Igor asks: Where is Angel? Have you seen him?\n",
	"Igor asks: Are you my friend?\n"
  }));
  load_a_chat(5, ({ "Igor shouts: Ouch! That hurt!\n",
	"Igor asks: Don't pick on me please?\n",
	"Igor says: You're a big meanie.\n",
	"Igor shouts: Help! Milomoo!\n",
	"Igor says: Milomoo will be angry if you kill me.\n",
	"Igor says: Go away...\n"
  }));
  add_money(30);
  make_items();
}
void make_items() {
  if(present("apron")) return;
  apron = clone_object(CLOTHING);
  apron -> set_name("apron");
  apron -> set_short("A gardening apron");
  apron -> set_long("It has a small pocket at the front\n");
  apron -> set_weight(1);
  apron -> set_value(20);
  apron -> set_sell_destruct(1);
  move_object(apron, this_object());
  command("wear apron",this_object());
}
void catch_tell(string str) {
  string tmp1, tmp2;
  if(sscanf(str, "%s says: hullo%s", tmp1, tmp2)) 
    tell_room(environment(), "Igor says: Hullo.\n");
  else
    if(sscanf(str, "%s says: shut%s", tmp1, tmp2))
      tell_room(environment(), "Igor says: I will not shut up.\n");
  else
    if(sscanf(str, "%s says: go away%s", tmp1, tmp2)) {
      tell_room(environment(), "Igor sulks.\n");
      run_away();
    }
}