Re: [NEWBIE] [CODE] Vampires

From: Chuck Reed (master@i-55.com)
Date: 05/15/99


>GET_IDNUM(ch) = GET_MAST_VAMP(vict);
>SET_BIT(PLR_FLAGS(vict), PLR_VAMPIRE);

Well, first off, don't assign the players ID number with the vampire's.
Make it
GET_MAST_VAMP(vict) = GET_IDNUM(ch);

Then, make a special routine that is triggered everytime a vampire in the
game dies.
This would be the psuedocode for ya:

for (every player offline)
  if (GET_MAST_VAMP(player) == GET_IDNUM(ch))
    {
    REMOVE_BIT(PLR_FLAGS(player), PLR_VAMPIRE);
    Save_Player_To_Pfile
    }
for (every player online)
  if (GET_MAST_VAMP(player) == GET_IDNUM(ch))
    {
     /*Messages to player telling them what's going on*/
     REMOVE_BIT(PLR_FLAGS(player), PLR_VAMPIRE);
    }


     +------------------------------------------------------------+
     | 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