|
rahennig Newbie
Joined: 27 Dec 2002 Posts: 3 Location: USA
|
Posted: Fri Dec 27, 2002 11:16 pm
Trigger on linefeed |
I am using ZMUD 5.55 and I play dsl-mud.org 4000. There is an option for the mud to send a linefeed on every tick. Since the ticks are of variable length, I want to make a trigger to approximate when the next tick is. Ticks average about 35 seconds.
I will need a trigger for a single linefeed.
I have tried:
#tr {$}{}
#tr {^$} {}
Neither one of those work. I have tried with all combinations (verbatim, newline, prompt, expression, pattern). Neither of these works.
Is there a way to trigger on a single linefeed?
dsl-mud.org:4000 |
|
|
|
AzCowboy Adept
Joined: 09 Nov 2000 Posts: 222 Location: USA
|
Posted: Fri Dec 27, 2002 11:30 pm |
#tr {$}{} Triggers on a blank line...
Maybe do a copy (highlight) to see if the mud is sending a space character before the linefeed....
I use #tr {$} {#gag} to gag blank lines in all the muds I play.... |
|
|
|
rahennig Newbie
Joined: 27 Dec 2002 Posts: 3 Location: USA
|
Posted: Sat Dec 28, 2002 12:55 am |
I have tried testing with:
#tr {$} {#echo Tick}
This will trigger after room descriptions,
command output, and the like. If the linefeed is sent, it will trigger twice.
Still have not figured out a way to make it
trigger on only the linefeed from the MUD.
I think what the MUD is doing is sending LF, as apposed to CRLF or CR.
dsl-mud.org:4000 |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sat Dec 28, 2002 11:59 am |
I logged into your MUD and used the exact same trigger that you tried:
#tr {$} {#echo Tick}
and it showed "Tick" right after every newline (which the MUD appears to send for every single thing that happens) and twice each tick (since the MUD appears the send one newline indicating the tick and another that comes after everything the MUD sends).
By the way, you should try upgrading, it's free and 6.40 is a lot better.
Kjata |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Dec 28, 2002 6:08 pm |
Using 6.40, this would be fairly simple.
#TR {$} {#NOOP}
#COND {$} {#ECHO Tick} {Within|Param=1}
For earlier versions, you'll probably need something along the lines of
#TR {$$} {#ECHO Tick}
or
#TR {^$^$} {#ECHO Tick}
or
#TR {$} {#IF ((%line = %null) AND (%line2 = %null)) {#ECHO Tick}}
In any case, the principle is the same -- limit your trigger to those times when you get two newlines in succession.
LightBulb
Senior Member |
|
|
|
rahennig Newbie
Joined: 27 Dec 2002 Posts: 3 Location: USA
|
Posted: Sat Dec 28, 2002 7:29 pm |
Thanks. Lightbulb had one that worked. It was : #TR {$} {#IF ((%line = %null) AND (%line2 = %null)) {#ECHO Tick}}
I tried using the %line variables but I was testing for length instead of them being null.
dsl-mud.org:4000 |
|
|
|
|
|