Re: [CODE] Adding/removing pfile flags?

From: Dana Luther (
Date: 10/16/00

-----Original Message-----
From: Adam Scriven <scriven@LORE.COM>

>Hey all.
>I've added the ASCII pfiles, and they seem to be OK (some wierd crashing,
>but I don't think that's the ASCII pfile stuff), but I wanted to change the
>player structure, to add a flag (boolean) that says whether they've been
>told they can level or not (took out auto-level).
>I removed the autolevelling code, and added in a spec_proc called Level
>that I've assigned to a mob, so you can only level at the mob.  In place of
>old level code, I've added a line "You feel more powerful.", which means
>can level.  The problem is, that line is displayed every time you get more
>exp (before you advance yourself).  I'd like to set a flag SHOWN_MESSAGE
>or something, so that it knows not to show the message more than once, even
>if the person quits before they level.

This is mailer snippet, so double check your syntaxes, don't copy/paste

Instead of adding something to the player struct, why not add another PLR_X
In structs.h, where all the other PLR_X flags are listed, add
#define PLR_SHOWN_CANLEVEL  23   /* this should not be 23, it should be
whatever your highest PLR flag is plus 1)

before showing them the message check for the flag with a quick
if ( /*whatever your criteria for level meesage*/ &&  !PLR_FLAGGED(ch,
  ... show message here....
  /* Set the message flag */

and when they do their level at the mob,

That's it, hope it helps,


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 04/10/01 PDT