CODE: FAQ: Re: Wider range of Limiting player killing

From: Billy H. Chan (bhchan@po.EECS.Berkeley.EDU)
Date: 06/29/96


On Fri, 28 Jun 1996, Brian Williams - Nashak wrote:
> I was wondering.. I wanna make it so there is a flag like PLR_GUILD.. or 
> PRF_GUILD, whatever makes more sense.. and if yer PRF_FLAGGED, PRF_GUILD 
> or whatever, yer allowed to pkill... and if you have a title, yer flagged 
> guild
> anyone know how I would go about doing this?
> I know it's like if !(title(ch)) or something.. pk_allowed = NO; 
> anyways.. thats my question of the day.. thanks ahead

Q: I want to expand the ability to pk in my MUD, allowing ASSASSINS that'll
   be able to PK with out getting flagged... Or maybe races to war 
   against each other like in Lostlands1.0.5 (shameless plug)

A: The simple way to do this is to find all the pk_allowed checks and replace
   with a CAN_MURDER(ch, vict) function call.  Then, in utils.h, 
   register the new util function.  Then, finally, in utils.c, write
   CAN_MURDER(ch, vict) as something like:

  bool CAN_MURDER(struct char_data *ch, struct char_data *victim) {
	if (pk_allowed == TRUE)
		return TRUE;

	if (IS_NPC(ch) || IS_NPC(victim))
		return TRUE;   /* you can always kill these */
	if (PLR_FLAGGED(ch, PLR_ASSASSIN))
		return TRUE;   /* they can kill anyone */

	/* Add further checks here */
  }
-- Billy  H. Chan     bhchan@po.eecs.berkeley.edu  bhchan@csua.berkeley.edu
   CogSci/CompSci     http://www.csua.berkeley.edu/~bhchan     ResumeInside



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