Re: [plr_ghost] and [do_advance]

From: Daniel Koepke (dkoepke@CALIFORNIA.COM)
Date: 04/09/98


David Wiklund wrote:
>
>   if (PLR_FLAGGED(ch, PLR_GHOST)) {
>     if (!CMD_IS("who")   && !CMD_IS("north") &&
>         !CMD_IS("south") && !CMD_IS("east")  &&
>         !CMD_IS("west")  && !CMD_IS("down")  &&
>         !CMD_IS("up")    && !CMD_IS("gossip")) {
>     send_to_char("You cannot do that as a ghost!\r\n", ch);
>     return;
>     }
>   }
>
> My intention is for it to get the ghost only to do certain things...
> But it doesn't matter if the ghost type gossip or any of the commands above... they cant do it anyway.
> What's wrong??? I can't seem to figure it out.

Again, RTFC.  The CMD_IS macro cannot be used there; in fact, look
at the CMD_IS macro (in interpreter.h, I believe).  You'll see your
folly immediately.  What you should do is down at the bottom, before
the check for the special (or immediately after, depending upon your
preference), you should check what the value is.  Another problem
that could have been solved by "RTFC".

> gain_exp_regardless(victim,
>         level_exp(GET_CLASS(victim), newlevel) - GET_EXP(victim));

You want to compound the exp per level, then (and probably don't
want to subtract GET_EXP!).

  for (vv = GET_LEVEL(victim); vv < newlevel; v++)
    needed_exp = level_exp(GET_CLASS(victim), vv);
  gain_exp_regardless(victim, needed_exp);


-dak


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



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