Re: NPC Classe

From: Cathy Gore (cheron@arcanerealms.org)
Date: 10/25/01


> Ok, tried that...still saying that medit_class is undeclared. There is a
> chunk in there that I cannot find anywhere that is most likely the
> source of my problems.
In oasis.h you should find a list of defines concerning MEDIT... if you open up that file and search on MEDIT_MAIN_MENU, you'll get to it.  Go to the end of the list and add
#define MEDIT_CLASS  27 (or whatever number you have next)

> SNIP><!--StartFragment-->Step 6.
>   A. Open up medit.c
>   B. At the top of the file with all the other extern stuff add,
>      extern char *npc_class_types[];
>   C. in medit_save_to_disk() after,
>      if (GET_CHA(mob) != 11)
>        fprintf(mob_file, "Cha: %d\n", GET_CHA(mob));
>      Add,
>      if(GET_CLASS(mob) != CLASS_NPC_OTHER)
>         fprintf(mob_file, "Class: %d\n", GET_CLASS(mob));

In 2.0, medit_save_to_disk is a one-liner which calls the save_mobiles function.  This is the one you'll have to edit, not medit_save_to_disk.  This function is in genmob.c.  You may have to look into some of the functions that this one calls, like write_mobile_espec or write_mobile_record.  I haven't done this class patch so I can't say for certain, but it LOOKS like you'll be adding that chunk of code to write_mobile_espec (also in genmob.c).  GET_CHA may not be there, but the other abilities are.

-Cheron

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST