|
Qyrios Beginner
Joined: 04 Apr 2009 Posts: 11
|
Posted: Sat Apr 04, 2009 5:28 pm
Sending tells to a seperate window. |
Hello,
I'd like to be able to send tells to a seperate window. I've been searching the internet, and the forum on how to do this, but I can't seem to
figure it out completely.
What I've got are the following two triggers:
Code: |
Pattern: (%w) tells you
Value: #CAP tell
#GAG
|
And:
Code: |
Pattern: You tell (%w)
Value: #CAP tell
#GAG
|
But this only works for very short messages, since the #CAPTURE command will only capture one line of text.
Could somebody assist me in sorting this out, or maybe point me to some resource where I might find the answer?
I am using zMud 7.21 and I'm playing Achaea.
Thank you,
Qyrios |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Apr 04, 2009 6:18 pm |
CONFIG SCREENWIDTH 0
Rejoice.
If you want to make it look like it used to, set Auto Wrap off, Word Wrap on, Wrap Column 80 and Wrap Indent 0 in CMUD's preferences. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sat Apr 04, 2009 6:19 pm |
you might wanna look at #C+/- .. if you have a prompt after the block you can use that to stop capturing
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Qyrios Beginner
Joined: 04 Apr 2009 Posts: 11
|
Posted: Sat Apr 04, 2009 6:42 pm |
How would I create a script that would use #C+ and #C- to start and stop capturing? Should I just create a seperate trigger to stop reading it, or is there a more efficient way?
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sat Apr 04, 2009 7:39 pm |
#TR {{you tell|tells you}} {#C+ Tells}
#COND {*} {#C- Tells} "" "prompt" |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Qyrios Beginner
Joined: 04 Apr 2009 Posts: 11
|
Posted: Sat Apr 04, 2009 8:03 pm |
Could you please explain a bit clearer what I have to enter in the trigger window? I'm not very familiar with this.
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sat Apr 04, 2009 8:30 pm |
enter that whole segment in at the command line actually, and its all done, might want to disable your current one til you test this
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Apr 05, 2009 1:03 pm |
Seriously, just change the screenwidth and all your problems will be solved :P Using #c+ is so annoying and using screenwidth will help you solve all kinds of wrap-related problems.
|
|
|
|
rhombur Beginner
Joined: 13 Oct 2005 Posts: 24 Location: Illinois
|
Posted: Mon Apr 06, 2009 5:03 pm |
pattern: You tell (*)
value: #cap Tells;#gag
that'll capture everything on the line following the YOU TELL part of the trigger.
using %w will only capture 1 instance of word text.
also, if you're in a mud where peoples name's can change in TELLS or what have you, the (*) is your best bet.
I would also suggest anchoring your trigger using the ^ key, this makes it so it only works if it's at the start of a line. |
|
_________________ Niax Rhasu |
|
|
|
Sylmannemo Beginner
Joined: 20 Oct 2006 Posts: 18
|
Posted: Fri Apr 10, 2009 9:09 pm |
Didn't write these, but I'm more than willing to share, and not all functions of them work entirely properly so you'd have to poke around a bit, but...
Code: |
#CLASS {Shadow|Communication}
#TRIGGER {^~((%w)~):(*)} {
#class cap 1
#var cap "%1"
#gag
}
#TRIGGER {^(%w) tells you,} {
#T+ cap
#gag
}
#TRIGGER {^You tell} {
#T+ cap
#gag
}
#CLASS 0
|
Code: |
#CLASS {Shadow|Communication|Cap} {disable}
#REGEX {^<(\d+)/(\d+)h (\d+)/(\d+)m (?:\d+)e (?:\d+)w (?:\d+)x <(.*?)>>} {
#t- Cap
#gag
}
#TRIGGER {*} {#CAPTURE Channels}
#TRIGGER {^~<(%d)~/(%d)h (%d)~/(%d)m~> } {
#t- Cap
#gag
}
#REGEX {^<(\d+)/(\d+)h (\d+)/(\d+)m (?:\d+)e (?:\d+)w (?:\d+)x (?:\d+)k <(.*?)>} {
#t- Cap
#gag
}
#CLASS 0
|
This one works for most aspects of Imperian stuff where the Regex prompt is designed off of Whytes.
This second one I don't use, but it would be a more complex version where it tracks the word-wrapping properly based on the width of the screen and such. The first one has problems with multi-line tells where not all of the tell is gagged in your main window.
Code: |
#CLASS {Shadow|chat}
#REGEX {\w+ has been .+\.} {#MAKEWINDOW Deathsight "scrolling=yes|height=25c|width=80c|persistant|floating"}
#CLASS 0
#CLASS {Shadow|chat|chattrig}
#TRIGGER {^~(*~)~:*} {
#MAKEWINDOW Channels "scrolling=yes|height=25c|width=80c|persistant|floating"
#VARIABLE lineend {%rightback( %trigger, 1)}
#IF (@lineend = %char( 34)) {
#CAPTURE Channels
#GAG
} {
#T+ chattext
#T- chattrig
}
}
#TRIGGER {^~<~<*~>~>~:*} {
#MAKEWINDOW Channels "scrolling=yes|height=25c|width=80c|persistant|floating"
#VARIABLE lineend {%rightback( %trigger, 1)}
#IF (@lineend = %char( 34)) {
#CAPTURE Channels
#GAG
} {
#CAPTURE chat
#GAG
#T+ chattext
#T- chattrig
}
}
#TRIGGER {^(%w) tells you,} {
#MAKEWINDOW Channels "scrolling=yes|height=25c|width=80c|persistant|floating"
#VARIABLE lineend {%rightback( %trigger, 1)}
#IF (@lineend = %char( 34)) {
#CAPTURE Channels
#GAG
} {
#CAPTURE Channels
#GAG
#T+ chattext
#T- chattrig
}
}
#TRIGGER {^You tell} {
#MAKEWINDOW Channels "scrolling=yes|height=25c|width=80c|persistant|floating"
#VARIABLE lineend {%rightback( %trigger, 1)}
#IF (@lineend = %char( 34)) {
#CAPTURE Channels
#GAG
} {
#CAPTURE Channels
#GAG
#T+ chattext
#T- chattrig
}
}
#REGEX {The colour fades from your \w+\ tattoo, rendering it useless\.} {
#MAKEWINDOW Channels "scrolling=yes|height=25c|width=80c|persistant|floating"
#VARIABLE lineend {%rightback( %trigger, 1)}
#IF (@lineend = %char( 34)) {
#CAPTURE Channels
#GAG
} {}
}
#CLASS 0
#CLASS {Shadow|chat|chattext}
#TRIGGER {*} {
#VARIABLE lineend {%rightback( %trigger, 1)}
#IF (@lineend <> %char( 34)) {
#CAPTURE Channels
#GAG
} {
#CAPTURE Channels
#GAG
#T+ chattrig
#T- chattext
}
}
#REGEX {^<(\d+)/(\d+)h (\d+)/(\d+)m (?:\d+)e (?:\d+)w (?:\d+)x <(.*?)> <(.*?)>>} {#gag}
#CLASS 0
|
Creation rights go to Shadow for one or the other, unfortunately I stored both of them relatively close and don't recall which on he actually created or where I got the other. The second one doesn't really work at all, but you can use it for ideas. |
|
|
|
|
|