GET_CLASS(ch) is a macro defined in utils.h
There is no function that I know of, other than using a constant [ such as
pc_class_list ] to retreive that data. If you really wish to write one you
can, but it will probably consist of you returning the value of
pc_class_list at GET_CLASS( ch ). :) If there is a function, it is
probably new, and I ripped all of the stock classes out of my mud and put
dynamic ones in so I can't reference anything for you.
To add races you will need to edit structs.h (adding races to the
character structures char_file_u and char_player_data. Then in Utils.h
you can make the macro
#define GET_RACE( ch ) ( ( ch )->player.race )
Then you will have to add menus, a parser, a pc_race_list, etc etc etc.
Just like classes. Look at all of the class code and you can probably
figure it out.
I hope I helped you out a little bit (which is a lot more than I get when
I ask a simple question).
_xian_
On Tue, 27 Jun 2000, Dereck Kozak wrote:
> I've summoned the courage to hack away at my mud's code, and I've
> decided to attack my do_score, cause it seemed easiest. I was wrong.
> I've been looking at some other score snippets, but it'd like to be
> original, and learn by doing it myself. I noticed there's a CLASS_ABBR()
> funtion to return a string, but GET_CLASS() does not (and I'd like the
> full class sting).
> Could I pull off a pc_class_list[GET_CLASS()] to get the whole class
> name? or is ther a function I can use, that I'm missing?
> Also, where is GET_CLASS, and all those nifty function defined? I would
> like to add a GET_RACE to supply me with the character's race name. It's
> alot nicer than pc_class_list[ch->chclass] :)
>
> I know I ask alot of questions, but newbies like me get lost easily.
>
> Dk.
>
>
> +------------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
> +------------------------------------------------------------+
>
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/10/01 PDT