Re: [NEWBIE][HELP & QUESTIONS] Funny Error with Easycolor 2.2

From: Daniel Koepke (dkoepke@CALIFORNIA.COM)
Date: 05/03/98


On Mon, 4 May 1998, Owen Brodal-Robertson wrote:

->  sprintf(buf, "&n                 Character attributes for %s\r\n",
->  sprintf(buf, "&w%s\r\nLevel: [&r%d&w]   Class: [&r%3s&w]\r\n", buf,
                  ^^^^

You're corrupting the buffer here.  You cannot do,

  sprintf(buf, "Whatever");
  sprintf(buf, "Bad%s", buf);

It doesn't even make sense to try that.

->My other question was, I'd like to implement justice code in my mud
->(similar to the DURIS justice system, if anyone has seen it).
->What I was wondering is how could I implement this? I'd need a flag on my
->rooms/mobs to check if they were witnesses, and they'd have to walk to a
->room, and report the crime they saw. Has anyone done this with Circle? Or
->could anyone tell me how?

Rather simple system I can think of off of the top of my head...in
char_special_data add a "struct char_data * accused;" to hold a
pointer to the person to mobile is going to accuse of the crime, and
an "int crime;" to have an integer that signifiges what crime the
person is being accused of.  Create a macro for 'accused' and the
crime.  Go to mobact.c and when a mobile has 'accused' force them to
track to a mobile that is _always_ in the room where crimes are
reported.  When the mobile arrives, they can accuse the person and
other mobiles (cityguards) can be sent to hunt the accused person.
All it takes is the ability to have mobiles hunt people (easy to add,
but I think there's a patch already) and, of course, to recognize
crimes (not that difficult, when a crime is done, see if there is a
mobile in the room and figure out whether they saw it).

-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