Oh my, that would work marvelously, wouldn't it?. How excellent. Thank you
for your assistance--I'll let you know how it turns out. I'm going to use
the first demonstration, because I have others coders working on the same
source, so if they decided to add a race and forgot to add the .vs and .vp,
well.. yeah. Using the switch case, if they forgot, the race would just
punch.
Again, thank you for your help.
Jeremy Hill
----- Original Message -----
From: "Michael Pittaway" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 11, 2002 12:30 AM
Subject: Re: QuickMUD, plus a question.
> Now, I'm not quite sure I understood what you wanted to do, but this is
what
> I would do.
>
> In fight.c, after all the other dam messages are assigned, there is a line
> that looks like this:
>
> punct = (dam <= 24) ? '.' : '!';
>
> Right before this line, I would put:
>
> if (get_eq_char(ch, WEAR_WIELD) == NULL)
> {
> switch(ch->race)
> {
> default: vs = "punch"; vp = "punches"; break;
> case 0: vs = "claw"; vp = "claws"; break; /* Race 0 */
> case 1: vs = "kick"; vp = "kicks"; break; /* Race 1 */
> /* Etc. Etc. Etc. Keep adding for all your races. */
> }
> }
>
> Or, as an alternative, you could add two new items to the pc_race_table,
one
> being "claw", the other being "claws" or whatever it would be for each
race,
> and then instead of the previous code, make it:
>
> if (get_eq_char(ch, WEAR_WIELD) == NULL)
> {
> vs = str_dup(race_table[ch->race].vs);
> vp = str_dup(race_table[ch->race].vp);
> }
>
> I hope that's what you wanted to accomplish. If not, give me another
example
> and I can try to help you.
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>