14 Feb, 2011, Eithon wrote in the 1st comment:
Votes: 0
Hello all, just joined but it looks like you all have a great community here.

I just downloaded QuickMUD (I am using Cygwin) and am having fun messing around with it. I know next to nothing about coding and I have just been customizing the login experience and things like that. Here is what I am having trouble doing:

Right after a new character selects a password and you go to the race menu, I would like the screen to clear and have the race options at the top of a brand new screen, instead of continuing on the same screen. I have looked around for "C++ clear screen" for a few hours and nothing has really helped. I got a system call of clear or cls to sort of work… but it cleared my cygwin window instead of inside the game. And from what I've read system calls are a huge security no no.

Can anyone help me to get a new screen going for the race menu? That's all I've been trying to do for hours and it's blowing my mind! Yeah I know it's sort of pointless but once I get going on something I have to figure it out before I can move on to something else. :) Thanks for your help.

Eithon
14 Feb, 2011, Scandum wrote in the 2nd comment:
Votes: 0
If you print \033If you print \033[2J it'll clear the screen on a VT100 terminal.
14 Feb, 2011, Eithon wrote in the 3rd comment:
Votes: 0
printf ("\033printf ("\033[2J");

send_to_desc ("What is your sex (M/F)? ", d);
d->connected = CON_GET_NEW_SEX;
break;

That's what I put in (I want it to clear right after password but before you begin choosing sex, race and class, etc). It didn't do anything. I tried this in Vista command prompt telnet with term set to vt100 and also MUSHClient.

I also tried enabling ANSI.SYS in config.nt and that didn't change anything either. :(
14 Feb, 2011, Kayle wrote in the 4th comment:
Votes: 1
MUSHClient doesn't support screen clearing, already asked Nick about it while working on something of my own similar to what you're doing. If it helps any though, this is how I managed to get it to work on most everything but GMUD and MUSHClient:

write_to_buffer( d, "\x1bwrite_to_buffer( d, "\x1b[2J\x1b[H", 0 );[/code]

This is from a SMAUG code, so your syntax might be different, but the clear screen should still be the same.
14 Feb, 2011, Eithon wrote in the 5th comment:
Votes: 0
Kayle said:
MUSHClient doesn't support screen clearing, already asked Nick about it while working on something of my own similar to what you're doing. If it helps any though, this is how I managed to get it to work on most everything but GMUD and MUSHClient:

write_to_buffer( d, "\x1bwrite_to_buffer( d, "\x1b[2J\x1b[H", 0 );[/code]

This is from a SMAUG code, so your syntax might be different, but the clear screen should still be the same.[/quote]

Absolutely brilliant. Thank you a thousand times!
15 Feb, 2011, jurdendurden wrote in the 6th comment:
Votes: 0
I'm sorry but why the hell are telnet/ansi/escape codes so damn mystic and foreign?
15 Feb, 2011, Kayle wrote in the 7th comment:
Votes: 0
jurdendurden said:
I'm sorry but why the hell are telnet/ansi/escape codes so damn mystic and foreign?


Because it's an old protocol, and you have to be a forensic anthropologist to figure it out. (Not really, Bones is just on in the background.)
15 Feb, 2011, Runter wrote in the 8th comment:
Votes: 0
Any time you're embedding codes of any kind into a single channel you have to balance human readability with brevity and ensuring it's not an accident being in the stream. An example is most mud color codes. If you have something like #R #b or {c or @g you're looking at a code that's easy to parse for a human, yet also easy to use on accident. Of course, some muds do long tags to prevent that somewhat. I've seen some like %DARKRED% or some-such. Or maybe [red]text[/red]. Well, for most of those escape sequences there are bigger consequences than an incorrect color on the screen. For example, it might clear your screen. Or it might do worse. But also back in those days there was concerns about the length of codes because of poor connectivity. You didn't want to have a lot of really long codes when they weren't required. Most of the time programmers enter them once as a definition and they're just parsed over anyways.
15 Feb, 2011, Tyche wrote in the 9th comment:
Votes: 0
jurdendurden said:
I'm sorry but why the hell are telnet/ansi/escape codes so damn mystic and foreign?


Because 1960 is mystic and foreign to most of us. Just for example…. Why is DELETE ASCII code 127?
Answer: the only way to delete a character already punched on a paper tape is to backspace the tape and punch all binary ones over the character in error. :-)

Probably about half the codes are for devices that no longer exist.
15 Feb, 2011, jurdendurden wrote in the 10th comment:
Votes: 0
Interesting, thanks for the replies :)
0.0/10