>Is this anything like the active mob hunters or is it just a way to >collect >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 mouse.van.ml.org? 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 bounty. DB.C ------ In the place where it sets players initial points, etc: ch->player_specials->saved.bounty = 0; UTILS.H ------ Add this macro: #define GET_BOUNTY(ch) ((ch)->player_specials->saved.bounty) STRUCTS.H ------ With all your spares, add: int bounty; ACT.OFFENSIVE.C ------- 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); WAIT_STATE(ch, PULSE_VIOLENCE + 2); in do_backstab: add the first chunk below above the else hit(ch, vict, skill_backstab); part(displayed 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); } else hit(ch, vict, SKILL_BACKSTAB); FIGHT.C -------- 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)) stop_fighting(ch); while (ch->affected) affect_remove(ch, ch->affected); if (killer) { if (death_mtrigger(ch, killer)) death_cry(ch); } else death_cry(ch); GET_GOLD(killer) += GET_BOUNTY(ch); GET_BOUNTY(ch) = 0; make_corpse(ch); extract_char(ch); } 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 Phillip Ames | Satisfaction is not guaranteed. kirk47@juno.com | -Ferengi Rule of Acquisition #19 ICQ: 8778335 | AOL IM: Grathol http://members.xoom.com/Gowron/index.html(Unfinished) ___________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com Or call Juno at (800) 654-JUNO [654-5866] +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST