From: Phillip A. Ames (kirk47@JUNO.COM)
Date: 09/24/98

>Is this anything like the active mob hunters or is it just a way to
>a bounty on a PC by a PC?

It's a way for a PC to collect a bounty on anothe PC, and it will set a
bounty on them if they attack a non-bountied player...  What the hell, as
I just finished it, I may as well release it...  All I ask is that you
possibly, if you feel like it, drop me a line if you're using my code,
and, if you feel REALLY nice, add a line for me in the credits :)  For
your enjoyment, here's my bounty code...  Oh yeah, George, if you feel
like it, do ya mind putting it on  The other person was
right, it's very confusing.  Pls note, this code works FOR ME.  I have no
clue how it will turn out for you.
If you want, you can add code to set, and stat, to set/display the char's

In the place where it sets players initial points, etc:
ch->player_specials->saved.bounty = 0;

Add this macro:
#define GET_BOUNTY(ch)  ((ch)->player_specials->saved.bounty)


With all your spares, add:

int bounty;

In do_hit:
somewhere near the first line:
    if ((GET_POS(ch) == POS_STANDING) && (vict != FIGHTING(ch))) {
        if(!IS_NPC(vict) && GET_BOUNTY(vict) == 0){
      GET_BOUNTY(ch) = GET_LEVEL(vict) * number(15000000, 30000000);
        hit(ch, vict, TYPE_UNDEFINED);

in do_backstab:
add the first chunk below above the else hit(ch, vict, skill_backstab);
underneath for convenience in checking).  This is optional, if you don't
want bounties to occur through backstabbing.

  else if (!IS_NPC(vict) && GET_BOUNTY(vict) == 0){
                        GET_BOUNTY(ch) = GET_LEVEL(vict) *
number(1500000, 3000000);
                        hit(ch, vict, SKILL_BACKSTAB);
          hit(ch, vict, SKILL_BACKSTAB);

This is how my raw_kill looks, if yours doesn't look that way, try to
adapt my changes to
yours...  Ignore the trigger stuff if you don't have DG scripts in.

void raw_kill(struct char_data * ch, struct char_data * killer)
  if (FIGHTING(ch))

  while (ch->affected)
      affect_remove(ch, ch->affected);

  if (killer) {
    if (death_mtrigger(ch, killer))
  } else
    GET_GOLD(killer) += GET_BOUNTY(ch);
    GET_BOUNTY(ch) = 0;

Another side note, you may want to add a PLR_BOUNTY flag to add to your
do_who function...  Just use a SET_BIT on the player in each place where
it adds to their bounty.  Then, you can just add another if
(PLR_FLAGGED(ch, PLR_BOUNTY)) then have it add the (BOUNTY) on to do_who.


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