Re: [NEWBIE] Races on who...

From: Dragon MUD Admin (reddragon@greatbasin.com)
Date: 12/14/96


Take a look at this piece of code from our do_who....


if (GET_LEVEL(wch) >= LVL_IMMORT) {
  sprintf(Imm_buf, "%s%s[%s (%s)] %s %s (%s)", Imm_buf, CCGRN(ch,
C_SPR),
    WizLevels[GET_LEVEL(wch)-LVL_IMMORT], CLASS_ABBR(wch),
    GET_NAME(wch), GET_TITLE(wch), pc_race_types[(int) GET_RACE(wch)]
				   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is part of a version of the enhanced do_who by Daniel Koepke,
available on the ftp site.  If you added races and used the doc from the
ftp site as a guide, then this should work.  

		
Nic Suzor wrote:
> 
> did u add a struct for RACE_ABBR[NUM_RACES+1] or something, with all the
> race names listed? looks sorta like this, look at the class_name struct in
> class.c. i dont have the code here, so this is probably wrong :)
> 
> struct char RACE_ABBR[NUM_RACES+1] {
> "Hum",
> "Dwa",
> "Elf",
> "Gia",
> "Pix",
> "Ogr",
> };
> 
> if you cant find it, try grep -i abbr *.[ch], and follow the CLASS_ABBR
> macro to its roots, and just copy all of it and rename it to suit
> yourself... thats how i did it anywayz :)
> 
> At 01:03 AM 1/1/90 +0000, Raf wrote:
> >I have RACE_ABBR(tch), like CLASS_ABBR(tch) , and yes, ive
> >put in a race abbrev thing in utils.c, just like the class abbrev.
> 
> +-----------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> |   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
> +-----------------------------------------------------------+
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST