wiz_book.c

./lib/objects/wiz_book.c · 2.4 KB

From the archive h7v3.0a.tar.gz

Download the archive   « Back to the archive contents

inherit "inherit/treasure";

void reset(status arg) {
   if(arg) return;
   set_name("book");
   set_alias("manual");
   set_long(
  "A large, hard covered book about six inches think. Its pages are old and\n"+
  "yellowed, with words scribbled all over them. The cover has the words \n"+
  "'Newbie Creator Instruction and General Practice Manual' written in heavy\n"+
  "black letters. You can read the introduction with <read intro>!\n");

   set_weight(1);
   set_short(
	"Newbie Creator Instruction and General Practice Manual");
   set_value(0);
}

query_auto_load() {return ("/objects/wiz_book:");}

void init() {
   ::init();
   add_action("read", "read");
   add_action("move", "move");
}

status read(string str) {
   object obj;
   if(str == "intro") {
      obj = clone_object("obj/more");
      move_object(obj, this_player());
      obj -> more("/open/serepion/intro");
      return 1;
   }
   if(str == "chapter 1") {
      obj = clone_object("obj/more");
      move_object(obj, this_player());
      obj -> more("/doc/guidelines/room.doc");
      return 1;
   }
   if(str == "chapter 2") {
      obj = clone_object("obj/more");
      move_object(obj, this_player());
      obj -> more("/doc/guidelines/monster.doc");
      return 1;
   }
   if(str == "chapter 3") {
      obj = clone_object("obj/more");
      move_object(obj, this_player());
      obj -> more("/doc/guidelines/weapon.doc");
      return 1;
   }
   if(str == "chapter 4") {
      obj = clone_object("obj/more");
      move_object(obj, this_player());
      obj -> more("/doc/guidelines/armour.doc");
      return 1;
   }
   if(str == "chapter 5") {
      obj = clone_object("obj/more");
      move_object(obj, this_player());
      obj -> more("/doc/guidelines/clothing.doc");
      return 1;
   }
   if(str == "chapter 6") {
      obj = clone_object("obj/more");
      move_object(obj, this_player());
      obj -> more("/doc/guidelines/door.doc");
      return 1;
   }
   if(str == "chapter 7") {
      obj = clone_object("obj/more");
      move_object(obj, this_player());
      obj -> more("/doc/guidelines/wiz/dosanddonts");
      return 1;
   }
   if(str == "chapter 8") {
      obj = clone_object("obj/more");
      move_object(obj, this_player());
       obj -> more("/open/serepion/tables");
      return 1;
   }
}

status drop(string quit) { return 1; }

status move(string str) {
   if(find_living(str)) {
       move_object(this_object(), find_living(str));
       return 1;
   }
}

Site Stats

Snippets: 1791
Codebases: 571