Discussion Index

Coders-- Help a newbie

______
1996 Topic Archives

Posted by WareWolf on 12/03/96

It's cool yer reading this little scribble on 'da board

Ok, well I'm new to C, and I wanna custom-tailor a mud (MERC) to look (kinda) like LegendMUD. Legend is a good mud to look up to from my point of view-- It has a LOT of people working on it, and it has ANSi color graphics in it..

One question coders, -Where- did you put that in the source, and how did you add all of those actions????

--Live long and prosper
:)
WareWolf

______

From: Ptah Tuesday, December 03, 12:38AM

Not sure what you are asking as far as the actions--if you mean socials, we ripped out the standard way of doing them and made our own.

What we did for those was to add a secondary parser that the regular parser falls through to when no standard commands match. It checks through a text table that holds social commands, and matches the specific case (social alone, social to self, social to mobile, social to object) and simply looks up the relevant strings in a table. It makes adding socials very very simple.

Color code processing is placed in write_to_buffer, which is in our comm.c file. We loop through the text looking for the pipe and U that define our color codes. Depending on your color type selection (ANSI, AVATAR, or RAW) we then generate a new string which is a copy of the old one but with the appropriate color codes embedded in place of the internal system. In adding color support, we chose this route because we wanted to filter out all actual ANSI codes being sent in so that we could prevent the nasty tricks you can pull on other people with them. :)

-Ptah

From: Haul Tuesday, December 03, 01:56AM

mmm... *nods as if he understands* ah... *ah's as if he really knows what's going on* mmm...times like this, i feel totally outta place..

______

1996 Topic Index