basic treasure

basic treasure

Postby Suhis » 26.08.2011 20:59:44

Code: Select all
/* this can be books, jewelries, torch, etc things like that */

#include <mudlib.h>

inherit TREASURE;

void reset(status arg)
{
  ::reset(arg);
  if(arg) return;
 
  set_name("book");
  set_alt_name("logbook");
 
  set_short("Book\n");
  set_long(sprintf("\n%-=*s\n", 78,"EXAMPLE BOOK. ")); //this sprintf thing wraps lines to about 78 marks.
                     
  set_weight(1);
  set_value(0);
}

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

status read_book(string arg)
{
      if(arg != "book" && arg != "logbook")
      {
                notify_fail("Read what?\n");
                return 0;
    }
    write("You open the book and start reading...\n"+
          "You quickly turn the pages and read some notes from the book.\n"+
    return 1;
}

string query_creator() { return "Suhis"; }
status query_no_save() { return 1; }
Suhis
 
Posts: 180
Joined: 31.01.2004 13:31:16

Return to Manuals

Who is online

Users browsing this forum: No registered users and 1 guest

cron