Okay. This is a brief sample of my code for pk vs pk kills...it's set for
players that are flagged (PK), which is a flag in TimeTraveller that allows
players to kill other players within 15 levels... beh..it's a long story that
you don't want to hear. ;)
Now, also in this code, that I took out...is the code to remove a bounty off
of a players head and transfer it to the (ch), and the code that creates a
trophy for defeating (victim)... (an object), that is put into the winner's
inventory.
This code is snippet from damage() in fight.c :
Right after the check in damage() for POS_DEAD (below the whole section), but
before the call to mudlog to tell that a player died.
--- snip ---
if(!IS_NPC(victim) && PLR_FLAGGED(ch, PLR_PK)){
sprintf(buf2, ">>> &R%s&r defeated by &g%s&r at %s&n >>> \r\n",
GET_NAME(victim), GET_NAME(ch), world[victim->in_room].name);
send_to_all(buf2);
sprintf(buf2, "%s defeated by %s at %s", GET_NAME(victim), GET_NAME(ch),
world[victim->in_room].name);
mudlog(buf2, BRF, LVL_IMMORT, TRUE);
GET_HIT(victim) = GET_MAX_HIT(victim);
GET_MANA(victim) = GET_MAX_MANA(victim);
GET_MOVE(victim) = GET_MAX_MOVE(victim);
GET_POS(victim) = POS_STANDING;
char_from_room(victim);
char_to_room(victim, r_mortal_start_room);
look_at_room(victim, 0);
act("$n arrives from a puff of smoke.", FALSE, victim, 0, 0, TO_ROOM);
--- end snip ---
(below is the code just below the last act statement in my snippet)
} else { if (!IS_NPC(victim)) {
sprintf(buf2, "%s killed by %s at %s", GET_NAME(victim), GET_NAME(ch),
world[victim->in_room].name);
Hope that helps,
---
B. Brown
WebMaster, CircleMUD WTFaq
http://developer.circlemud.org/docs/wtfaq/
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST