Please check out RetroMUD !

Member Discussions

terms



[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]


1. Prompt Help Wed Jun 30, 2004 [4:39 PM]
ghaleon69
tfransen@brensoncorp.com
member since: Jul 25, 2001
Reply
Is there anyway to make it so that if someone starts typing, nothing is displayed until they press enter?

So that this wont happen

Ghaleon says, "hello"
[HP=50/MA=30]: sa
Ghaleon says, "how you doing?"
y hello

Instead it would look like this

Ghaleon says, "hello"
[HP=50/MA=30]: say hello
Ghaleon says, "how you doing?"
You say, "hello"
[HP=50/MA=30]:


2. RE: Prompt Help Wed Jun 30, 2004 [5:32 PM]
Lodren
Email not supplied
member since: Feb 18, 2004
In Reply To
Reply
Easiest way is to use a real mu* client instead of telnet.

Otherwise, you'd need to use ANSI control sequences to separate the mu*'s text from the user's input. I have no experience doing this, but it's my understanding that it isn't a trivial problem. It will also cause some mu* clients, including mine, to mash everything together and make quite a mess.


3. RE: Prompt Help Wed Jun 30, 2004 [7:05 PM]
SoulWynd
Email not supplied
member since: May 28, 2004
In Reply To
Reply
You can create a non-scrollable area using ansi(vt) codes and put the prompt in there along with the typing area. It works well if the client is fully compatible with the vt* protocol.

If you're interested in implementing that for real, just post again and I will try to help you.

(Comment added by SoulWynd on Wed Jun 30 20:07:19 2004)

Forgot to mention, you can also send the turn local echo off ansi code and let the mud handle the echo, it works but it's kinda silly to implement something like that while most clients either support ansi/vt or have their own typing areas.


4. RE: Prompt Help Wed Jun 30, 2004 [8:12 PM]
Not_I
Email not supplied
member since: Mar 3, 2000
In Reply To
Reply
I've seen the control sequences in action in the early 90s on a mud called silcon realms. It was really slick but occasionally it would mess up and you would have to refresh. It had a static stat display and enemy health bar. You may still have problems after implementing it with fast typers who press a key at the exact moment output is being drawn on thier screen in a place not used for character input.
Here is a list of the ansi controls:

Cursor Controls:
ESC[#;#H or ESC[#;#f Moves cusor to line #, column #
ESC[#A Moves cursor up # lines
ESC[#B Moves cursor down # lines
ESC[#C Moves cursor forward # spaces
ESC[#D Moves cursor back # spaces
ESC[#;#R Reports current cursor line & column
ESC[s Saves cursor position for recall later
ESC[u Return to saved cursor position

Hopefully the forum doesnt mangle it. Enjoy.

(Comment added by Not_I on Wed Jun 30 21:59:18 2004)

Just realized i didnt give you enough codes.


TSTATE_ESC : < ESC >+?

< ESC > [ to TSTATE_CSI Change State to TSTATE_CSI
< ESC > c Reset Device Reset all terminal settings to default
< ESC > ( Set G0 Set default font
< ESC > ) Set G0 Set alternate font
< ESC > 7 Save Cursor & Attrs Save current curosr position
< ESC > 8 Restore Cursor & Attrs Restore current curosr position
< ESC > D Scroll Down Scroll display down one line
< ESC > M Scroll Up Scroll display up one line
< ESC > H Set Tab Set a tab at the current position
TSTAE_ESC : < ESC >[+?

< ESC >[c Query Device Code(Server Side) Request a Report Device Code response
< ESC >[{code}c Report Device Code Generated in response to Query Device Code request
< ESC >[5n Query Device Status Request a Report Device Status
< ESC >[0n Report Device OK Generated by Query Device Status; Indicate Device OK
< ESC >[3n Report Device Failure Generated by Query Device Status; Indicate Device Fault
< ESC >[6n Query Cursor Position(Server Size) Request a Report Cursor Position
< ESC >[{ROW};{COLUMN}R Report Cursor Position Generated by Query Cursor Position; Report Cursor Position
< ESC >[7h Enable Line Wrap Text wraps to next line if length of text is longer than display area
< ESC >[7l Disable Line Wrap Disable line wrapping
< ESC >[{Row};{Column}H Set Cursor Position Set Cursor Position to({Row}, {Column}); if {Row},{Column} is not specified, Move Cursor to Home
< ESC >[{Count}A Cursor Up Move the cursor Up by {Count} Rows; if {Count} is not specified, Move Up by 1.
< ESC >[{Count}B Cursor Down Move the cursor Down by {Count} Rows; if {Count} is not specified, Move Down by 1.
< ESC >[{Count}C Cursor Forward Move the cursor Forward by {Count} Rows; if {Count} is not specified, Move Forward by 1.
< ESC >[{Count}D Cursor Backward Move the cursor Backward by {Count} Rows; if {Count} is not specified, Move Backward by 1.
< ESC >[{Row};{Column}f Force Cursor Position Same as Set Cursor Position
< ESC >[s Save Cursor Save current cursor position
< ESC >[u Unsave Cursor Restore cursor position after a Save Cursor
< ESC >[{start};{end}r Scroll Screen Enable scrolling from row{start} to row{end}; if {start}, {end} is not specified enable scrolling for entire screen
< ESC >[g Clear Tab Clear tab at the current position
< ESC >[3g Clear All Tab Clear all tabs
< ESC >[K Erase End of Line Erases form the current cursor position to the end of the current line
< ESC >[1K Erase Start of Line Erase from the current cursor position to the start of the current line
< ESC >[2K Erase Line Erase entire line of Cursor
< ESC >[J Erase Down Erase the screen from the current line down to the bottome of the screen
< ESC >[1J Erase Up Erase the screen from the current line up to the top of the screen
< ESC >[2J Erase Screen Erases the screen with the background color and moves the cursor to home
< ESC >[i Print Screen Print the current screen
< ESC >[1i Print Line Print the current line
< ESC >[4i Stop Print Log Stop log
< ESC >[5i Start Print Log Start log; all received text is echoed to a printer
< ESC >[{key};"{string}"p Set Key Definition Associates a {string} of text to a keyboard key; {key} indicates the key by its ASCII value in decimal
< ESC >[{attr1};...;{attrn}m Set Attribute Mode Sets multiple display settings. Refer Standard Attributes


-taken from Java VT100-ANSI, TN3270 Terminal Technical Reference.htm
Also i HIGHLY suggest a toggle so players who use a client can recieve the standard prompt and text. Hope it helps.




[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]