Re: [Circle] Victim HP

From: Jens Malare (raidell@dalnet.se)
Date: 07/26/96


>Durring a fight i need to get the victims HP.  I don't know where to get
>this from.  I am going to use this in the prompt. Can someone point me
>in the right direction.

Yes.

Do something like this:

1) Add a line at the top of function make_prompt in comm.c:

  struct char_data *vict;

2) To get the char_data from the person/mob you're fighting, do:

  vict = FIGHTING(ch);

Then you can use vict the same way as you use ch. Something like:

  int percent;

  [...]

  percent = (100 * GET_HIT(vict) / GET_MAX_HIT(vict))

I hope this helped a tiny bit anyway.. :)

---
Regards, Jens Malare <raidell@dalnet.se>

+-----------------------------------------------------------+
| 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/07/00 PST