|
fizban Newbie
Joined: 09 Sep 2002 Posts: 7
|
Posted: Mon Sep 09, 2002 9:56 pm
Hidden text/escape codes in zMUD? |
I need to send escape codes specific to another client w/o having them be visible to zMUD. So far, I've been sending the code followed by a return, like:
<ESC><<em>long sequence</em>>...^M more normal text here...
So on normal connections, like telnet, the ^M returns the cursor to the beginning of the line and the following text overprints the unrecognized escape code. However, zMUD doesn't respect the ^M and shows the code and the following text on different lines.
Is there a way to get zMUD to overprint like this? or a sequence zMUD recognizes to temporarily suppress MUD output from showing on the screen? |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Mon Sep 09, 2002 11:18 pm |
#SEND {"<ESC><<em>long sequence</em>>"}
Would be adequate for handling the escape sequence you mentioned, but I have no clue what you mean to send in the "..." portion of your posted question so I have no idea whether to use that SEND in an alias, an input trigger,or something else. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Sep 10, 2002 12:57 am |
quote:
#SEND {"<ESC><<em>long sequence</em>>"}
Would be adequate for handling the escape sequence you mentioned, but I have no clue what you mean to send in the "..." portion of your posted question so I have no idea whether to use that SEND in an alias, an input trigger,or something else.
ZMud cannot process the escape character itself and has to use it's own little version, %e. I *think* this would mean that ^M would become %eM, but I'm probably off in center field on this one.
li'l shmoe of Dragon's Gate MUD |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Sep 10, 2002 3:24 am |
To comment on Matt's statement. ^M is an old DOS, UNIX, and generic ASCII shorthand for carrige-return. zMud provide the %cr function to insert the character, if you want a drawn out control you can also use %char(13).
It would be better it use seperate #SEND's though that way zMud will correctly append the ^M or ^M^L depending on your line feed preferences. |
|
|
|
fizban Newbie
Joined: 09 Sep 2002 Posts: 7
|
Posted: Tue Sep 10, 2002 5:20 pm |
Okay, I'm sorry, I think my original question was misunderstood. I'm not trying to get zMUD to SEND an escape code. I'm trying to get my MUD to send a sequence of special characters which zMUD will ignore or at least not show the player.
I originally thought I could send the special sequence, followed by a ^M (ASCII carriage-return character). In normal ASCII windows and raw telnet, that would return the cursor to column 0 without advancing to the next line, so any following text would just overprint the special text, so the user wouldn't see it.
However, it seems that zMUD takes the return (^M) character as a newline, advances the cursor to the next line, leaving the special stuff exposed.
So my question is: Is there a special sequence recognized by zMUD natively (without requiring special setup) which will tell zMUD to ignore the next line of text?
Again, this is from the point of view of the MUD system sending a string to zMUD which should be ignored, not trying to get zMUD to print a sequence into the game.
Thanks for your replies so far; I hope this clarifies my question. |
|
|
|
fizban Newbie
Joined: 09 Sep 2002 Posts: 7
|
Posted: Tue Sep 10, 2002 5:30 pm |
I meant to put this in my previous note, but forgot before hitting "Post". Here's a specific example of what I'm talking about.
One sequence I send is: $[K~~@I123456789~~
where the numbers could vary based on the specific situation. (Here I am using $ to represent the ASCII "escape" character.) Now, $[K is a standard ANSI code and zMUD should (I assume) either ignore or process it like any other ANSI code, but the ~~@I123456789~~ would look like regular text to the client. This is okay, but I'd like a way to get it to not show up in the client window.
In a normal plain ASCII window like telnet, I could just put a return at the end:
$[K~~@I123456789~~^Msome more text here...
and the "some more text here..." would overprint the other text so even though it technically printed out, the player would never see it.
If zMUD handled ^M (return) the same way this would not be a problem. An alternative would be if zMUD had some kind of special "ignore the rest of the line" escape code I could send. Say, for example, it used $[88z to mean that. Then I could say:
$[88z$[K~~@I123456789~~
and zMUD would happily not print any of that to the user. So... is there such a code in
zMUD?
Actually... now that I type this, it occurs to me that if zMUD implements all the ANSI codes, it ought to recognize $[1K for "erase to start of the current line". If so, I could use that. But at any rate, if there's a better approach I'd love to hear it.
Thanks. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Sep 10, 2002 10:20 pm |
Doing a quick test on zMUD it seems like <ESC>[1K does work.
Another way of doing this would be to not send these special control codes when a user has zMUD. I'm guessing that you want tho display this for some propietary client and that it should be of no interest to players using any other client. If so, you could determine at login time if the user has this client (or contrarily, determine if they have zMUD - zMUD sends terminal type "zmud" when requested) and then use this to determine if the control codes should be sent or not.
Kjata |
|
|
|
fizban Newbie
Joined: 09 Sep 2002 Posts: 7
|
Posted: Wed Sep 11, 2002 6:11 am |
Okay, I think I got the right answer on this (thanks, Zugg). Kjata is correct, the best thing is not to send codes except to the kind of client which can accept them. I haven't yet got to the point of getting my driver to negotiate that properly, so in the mean time was trying to do this.
Apparently zMUD supports the standard telnet protocol of sending ^M^@ to overprint the line. Glad to know that $[1K works too; now I have two things I can do until a more sophisticated terminal handler is ready.
thanks all for the help |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|