Re: Storing Spell Numbers

From: Administrator (amiga@tietgenmud.debedste.dk)
Date: 04/16/03


Hi Tenethor

I did this some years ago, and I can't remember all the details anymore,
but here are some pointers that might help you.

First off I created a new item type ex. ITEM_SPELLBOOK

I also made the decided that a spellbook consist of pages, and that
there can be a set number of spells on each page (I used 3)

#define SPELLS_PER_PAGE 3

struct page_data {
  int spells[SPELLS_PER_PAGE];
  struct page_data *next;
};

Then I added the following line to obj_data
   struct page_data *page;

You can now add and remove pages as desired, or just have one page with
all the spells you desire for one book.

Hope this can guide you in your desired direction.

Regards
        Amiga
--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/26/03 PDT