Re: A crash bug and 2 questions

From: NITRO (
Date: 02/08/95

From:	IN%""  "Panama N. Red"  9-FEB-1995 11:44:38.70
To:	IN%""
CC:	IN%""
Subj:	A crash bug and 2 questions

>Lastly, I wanted to make player-killing impossible.  So I went to the 
>do_damage (I think that is what it is called)

>and put a little line of code after the shopkeeper protection code that 
>if (!IS_NPC(ch) && !IS_NPC(victim))
>send_to_char("You can't kill players here!\n\r", ch);
>This works GREAT except that if someone is poisoned it gives the 
>character that message every tick.  So if they quaff a poison 
> says every tick instead of you feel burning in your blood 
>and suffer.......You can't kill players here!
>I assume it is doing this because the ch is also the victim when you 
>quaff something.  So how do I fix this so that with objects poison works 
>but when someone casts the spell on another player it just plain doesn't 
> 1111

 From what i see, 

 (1) do a 

     if(!IS_NPC(ch) && !IS_NPC(victim) && !(is_affected(victim, AFF_POISON) )) 
      send_to_char("No player killing!\n\r",ch);


 Another better way would be to include in players' specials.act with

 #define PLR_NO_KILL_PLAYER   (1<<16)

 modify your functions accordingly and make all players unable to kill
 other players. In fact, it is more fool proof than have a checking
 statement above.....

 just my two pence worth...

 Nitro who could be wrong....:P

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