|
McDeathue Newbie
Joined: 16 Feb 2007 Posts: 7 Location: UK
|
Posted: Fri Feb 16, 2007 10:05 pm
Old Topic, new user Tells in a new window |
I am using the following to capture tells
#TR {You tell (%w):} {#CAPTURE Tells;#GAG;#SAY %1 "(%2)" %time(tt)} #TRIGGER CapLines {*} {#CAPTURE Tells;#IF (%ends(%trigger,%char(62)) {#UNTRIGGER CapLines};#GAG}}
It DOES work with several issues and they are BIG
1) It does not actually post the time against the tell
2) I have put in charcter code 62 which I think is > should terminate CapLines which captures the text.. > is the prompt in my MUD which appears and is a suitable point to end the capture
3) As the capture does not terminate.. all my MUD output goes to the Tell windows until I type #UNTRIGGER CapLines
any assitance for mutliline TELL capturing appreciated with the character > as the stopping point |
|
|
|
McDeathue Newbie
Joined: 16 Feb 2007 Posts: 7 Location: UK
|
Posted: Fri Feb 16, 2007 10:08 pm |
sorry my mistake.. it DOES output to a seperate window now and terminate OK... but the TIME appears in my MAIN mud window
the original code which was screwey was #TR {You tell (%w):$} {#CAPTURE Tells;#GAG;#SAY %1 "(%2)" %time(tt)} #TRIGGER CapLines {*} {#CAPTURE Tells;#IF (%ends(%trigger,%char(62)) {#UNTRIGGER CapLines};#GAG}}
wth the additional $sign.. so now its works ok.. but I want the TIME in the Tells window as well |
|
|
|
McDeathue Newbie
Joined: 16 Feb 2007 Posts: 7 Location: UK
|
Posted: Fri Feb 16, 2007 10:11 pm |
CRAP.. ok.. the line without the $ only does one line.. I give up.. HELP
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Feb 16, 2007 11:16 pm |
Can you change the wrap column in your MUD? MUD wrapping uses carriage returns/linefeeds for wrapping. This method is known as a hard wrap, and is basically indistinguishable from true multiple lines. ZMud keeps an original unwrapped copy of the output, and this method is known as a soft wrap. ZMud does all its pattern-matching before it does the word-wrapping, so there's no need to worry about issues like this if you can set your wrap column far enough away to not mess with anything.
Assuming you can't change the mud wrap column, try something like this:
#trigger {^You tell (%w): (*)} {Tells = "%3";#T+ tMultiLineTell}
#condition {>} {#T- tMultiLineTell;#window Tells {%time(tt) You tell %t2~: @Tells}} {prompt|nocr}
#trigger "tMultiLineTell" {(*)} {Tells = %concat(@Tells,"%1")}
#CAPTURE does not modify the line at all, which is why you were having troubles getting the time on the same line. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Feb 17, 2007 5:11 am |
The reason the #say is coming out in the main window is because you haven't told it not to. The #cap command doesn't change focus to the window it's capturing to, so focus will still be on the main MUD window when you execute the #say command. Try using:
:WindowName:#say whatever
to manually say things in a window. |
|
|
|
McDeathue Newbie
Joined: 16 Feb 2007 Posts: 7 Location: UK
|
Posted: Sun Feb 18, 2007 12:39 am |
Matt your code works an absolute treat.. however.. I would love now to take this OUT of the main window.. GAG it? but the capture is perfect
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Feb 18, 2007 4:04 am |
Yep. Just throw a few gags in there.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|