Prompt line parsing and output parsing.

Posted by Madjack on Fri 15 Apr 2005 10:50 PM — 7 posts, 34,526 views.

Ukraine #0
I need to set trigger for mud prompt. But triiger fires when prompt you send something to mud and prompt displays in output. For example:

<20/20 100/100 100/100> <--- HERE FIRES OK

say Hello
You saying: Hello
<20/20 100/100 100/100> <--- HERE FIRES OK

<20/20 100/100 100/100> <--- HERE NOT FIRES
------------------------------------------------

What i can do, to hook mud prompt?
USA #1
Does the prompt occur everytime you send something? (and other times on its own, of course)

Can you copy/paste some output from the server here? We'll need to see the exact spacing of the prompt (use the [code] [/code] tags to keep the forum from eating whitespace).
Ukraine #2
I'am not a newbie in programming :-) And problem in other things. I'am from russian, so sorry for bad english:-)

look
131/131 154/154 115/115 3 | evil | "Underground" | 11587 | UD# 

131/131 154/154 115/115 3 | evil | "Underground" | 11587 | UD# 


131/131 154/154 115/115 4 | evil | "Underground" | 11587 | UD# 


Mud address: aladon.sovintel.ru:9000

First bottom line is server prompt. When i send something to mud, prompt dublicates up to output and after that triggers fires. But! In this sample you can see, that in server prompt line time = 4, but triggers can't fire and set var to 4. When i send something to mud prompt sends to output and triggers fires.
Amended on Sat 16 Apr 2005 02:35 AM by Madjack
Australia Forum Administrator #3
Triggers are evaluated at the newline character (\n) so possibly your problem is that the line has not been terminated by a newline.
Ukraine #4
Yes. Prompt don't have new line symbol. And i don't think, that i can insert a new line symbol at the end of my prompt line. Can you add special trigger for hooking prompt line?
#5
One of the key changes in version 3.66 allows you to add a carriage return to the end of most MUD prompts. You'll find an option to replace the IAC GA/EOR bytes with CR/LF bytes. Try that and see if it helps you with your triggers.
USA #6
You can currently trigger the prompts (without the newline) with a plugin, and then either add the newline yourself, or just use the values.

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=5020
that should get you started.