Re: Prompt

From: Admin of The Keep (dkoepke@california.com)
Date: 10/11/96


On Fri, 11 Oct 1996, Thomas Pedersen wrote:

> I'd like to elimite the showing of the prompt as often (like each
> time you do any command ...etc..), and only show it when its actually
> changing (when hit, heal ticks..etc..)

  Never done it, but I know how.  Create a struct and place it in
  char-data that will hold all the information for the player that
  you want in your prompt.

  Then if the current hitpoints don't match those in the struct print
  out the hitp, if the current movements don't match print those out,
  and so on.  For example:

    struct player_prompt_stats {
       int hitp;
       int move;
       int mana;
       int exp_to_lev;
    };

    /* in the prompt code (show_prompt?) */
    if (PRF_FLAGGED(d->character, PRF_DISP_H))
      if (d->character->prompt_status.hitp != GET_HIT(d->character)) {
        d->character->prompt_status.hitp = GET_HIT(d->character);
        sprintf(prompt, "%d ", GET_HIT(d->character);
      }

  IMHO, though, this is really inconvient for players.  I only do this for
  my status bar, and not the normal prompt because it's too useful to not
  have it printed out with every prompt (eg., if you are fighting, the
  fight messages will scroll it off the screen; you could have 10 hitp
  and not know it until the next tick or you're hit again).


  <*=-+Daniel+-=*>
  "Forgive me father, for I am sin."


+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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