This function should work with clients that support VT100. Unfortunately,
many of them do not....
/* clear the screen and place the cursor in default position */
void clear_screen(CHAR_DATA *ch, DESCRIPTOR_DATA *d)
{
if ( ch == NULL && d == NULL)
{
bug("Nothing to write to: clear_screen", 0);
return;
}
if( ch == NULL)
write_to_buffer(d, "\x01B[2J", 0);
else
send_to_char("\x01B[2J", ch);
}
----- Original Message -----
From: "Mike" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, May 27, 2002 9:58 AM
Subject: Terminal
> Hello again everyone,
> I have been working on fixing several things on my mud, and now that they
> are fixed, I am moving on to my next project: the EDM Terminal. As some
of
> you may remember, I am making a futuristic MUD (EverydayMUD.org:4000). I
> have added metro stations...many other things. Magic is gone, etc... But
I
> am adding a new form of "terminal" you could say. Through out the city,
> there will be small atm-like computer terminals here and there. They will
> allow players to use the terminals, get weather forecast, latest news
(which
> corperations are succeeding, etc...) and stuff like that. And for those
> trained in the way of the hacker, there will be certain commands that they
> can type while in the terminal that will be able to hack corperations, get
> personal information about someone, etc... all based on skill and chance.
I
> have screwed around with the prompt areas and added some COMM flags for
> players that are in the terminal. I've also messed around with interp.c so
> that if the command is not a terminal command, you get a "Excuse me?".
> Stuff like that was fairly simple. But I am curious if it would be
possible
> to do a screen clear? would I just have it print about 45 lines of nothing
> to the players screen or what? That would work...but it seems rather messy
> for what i want to do. If anyone has any ideas for this or if they have
any
> ideas for my terminal idea, all are welcome. Thanks a ton.
> -Tarian
>
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>