Re: [CODE] get_alignment/get_ac and do_score at "Feb 7, 98 09:59:34 am"

From: AxL (axl@MINDWARP.PLYMOUTH.EDU)
Date: 02/07/98


> just do something like this in do_score where it shows alignment
>
> if (GET_ALIGN(ch) > 80)
>    strcat(buf, "You feel naked.\r\n");
> else if (GET_ALIGN(ch) > 60)
>    strcat(buf, "You are feeling quite unprotected.\r\n");
> else if (GET_ALIGN(ch) > 40)
>    strcat(buf, "You see where I'm going with this?\r\n");

        do_score will get cluttered with all that.  Try this: (can also do
for weight carried, stats, etc...)

In constants.c, make something like this:

const char *analog_alignment[] =
{
  "truly a master of evil deeds.",      /* -1000 */
  "demonic",

[...]  Fill in the your own values here, so there's a total of 20.

  "approaching  sainthood",
  "an absolute saint",                  /* +1000 */
  "\n"
};

        Then in do_score: (act.informative.c)

  sprintf(buf, "%sAlignment:   You are ", buf);
  sprinttype(10 + MIN(MAX((GET_ALIGNMENT(ch) / 100), -10), 10), analog_alignment
, buf2);
  strcat(buf, buf2);
  strcat(buf, ".\r\n");

        Oh yea, don't forget to prototype analog_alignment at the top of
act.informative.c
        But you knew that already... ;)
--
-AxL, axl@wpcr.plymouth.edu - SysOp, RPM Director, WPCR Plymouth, 91.7 FM
 "Discriminate against the next fashion sucker you meet....it's a raver!"


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