Re: [NEWBIE] colors

From: Phillip A. Ames (kirk47@JUNO.COM)
Date: 10/28/98

On Wed, 28 Oct 1998 22:46:08 +0100 Igor <imestric@PUBLIC.SRCE.HR> writes:
>Problem #2: Can someone send me the code or at least instructions on
>how to write the damage # in combat ... that would mean that the
>players would see in ( ) the ammount that has damaged the

Function: int damage(struct char_data * ch, struct char_data * victim,
int dam, int attacktype)

Near the following lines, add the ones with +'s

  /* Set the maximum damage per round and subtract the hit points */
  dam = MAX(MIN(dam, 5000), 0);
  GET_HIT(victim) -= dam;
+ sprintf(buf2, "(%d)", dam);
+ send_to_char(buf2, ch);
  /* Gain exp for the hit */
  if (ch != victim)
    gain_exp(ch, GET_LEVEL(victim) * dam);


Phillip Ames    | Satisfaction is not guaranteed. | -Ferengi Rule of Acquisition #19
ICQ: 8778335    | AOL IM: Grathol

You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at
or call Juno at (800) 654-JUNO [654-5866]

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

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