i'm trying to get color into my greeting. after reading the faq about it i'm still kind of stumped. here's what it said to do.
i've tried messing with this and still haven't came up with much. i tried putting the CON_GET_WANT_RIPANSI into the login, but it didn't work. i also don't really understand the bool part. the descriptor_data is kind of weary too, but i just put DESCRIPTOR_DATA *ansi in mud.h and it did alright.
so if anyone can help me, that'd be great. i'm makin leaps and bounds in my C++ learning still just have a few more unsolved questions is all. i figure what better way then to ask all you nice people out there.
THanks so much for your help,
Ithildin
12d) I want to add color to the initial login screen, before players enter
their names.
This one is tough, because they won't have a character yet. You will also
need to add another CON_ state to ask whether or not they would like ANSI
color before the screen is displayed, and a bool to DESCRIPTOR_DATA to
record their answer. Probably the easiest would be to create a dummy character in
nanny(), such as the following:
CHAR_DATA dummy;
if (!d->character)
{
memset(&dummy, 0, sizeof(dummy));
d->character = &dummy;
dummy.desc = d;
if (d->ansi) /* The bool mentioned above */
SET_BIT(dummy.act, PLR_ANSI);
}
You can then replace all the write_to_buffer()s with send_to_char_color()s
in nanny(), the same as was done in act() in 12a.
** Make sure you NULL-terminate all your strings before you
send_to_char_color() them. The one in act() was NULL-terminated previously,
but there may be some in nanny() which aren't.i've tried messing with this and still haven't came up with much. i tried putting the CON_GET_WANT_RIPANSI into the login, but it didn't work. i also don't really understand the bool part. the descriptor_data is kind of weary too, but i just put DESCRIPTOR_DATA *ansi in mud.h and it did alright.
so if anyone can help me, that'd be great. i'm makin leaps and bounds in my C++ learning still just have a few more unsolved questions is all. i figure what better way then to ask all you nice people out there.
THanks so much for your help,
Ithildin