|
Deadlok Newbie
Joined: 08 Jul 2004 Posts: 3 Location: USA
|
Posted: Thu Jul 08, 2004 6:33 am
Capturing Tells that are longer than 1 line long. |
I have a tellwindow that obviously captures tells and sends them to a window above the main mud interface. Also have a similar trigger that i use to have my tells read back to me using the plugin MudReader. Thing is both mudreader and the tellwindow will not capture more than 1 line of a single tell. Thus the first line goes to the window leaving the rest in the main window, and the Mudreader says half the tell.
Thanks for any help that can be provided.
[8D][:I][:p][}:)][:o)][8][:0][:(!][xx(][|)][V][^][:X] |
|
|
|
Cbisazza Wanderer
Joined: 27 Feb 2003 Posts: 69 Location: Australia
|
Posted: Thu Jul 08, 2004 6:55 am |
Ideally your MUD will have a mode where it sends all the tell in one line - This is the easy solution.
Otherwise you'll have to match the start of the tell and the end of the tell, and process all lines in the tell manually.
Paste a sample 'tell' if you need help in this. |
|
|
|
Deadlok Newbie
Joined: 08 Jul 2004 Posts: 3 Location: USA
|
Posted: Thu Jul 08, 2004 7:19 am |
here is a sample tell. My script is pretty shoddy so a new one would be nice. but ill show you what i have for my tellwindow script.
2 triggers:
1st trig: ^ (%*)
2nd trig: ^(%w) tells you: (%*)
value: #IF (%1 != Alexa) {
#IF (%1 != Laryn) {
#CAP TellHist
#GAG
}
}
Alexa and Laryn's Ifs are to gag them. They are auctioners on my mud that i didnt want in my tellhist window.
Fofester tells you: Thranduil's Kingdom at A Large Cavern. room: lower
chamber |
|
|
|
madman Newbie
Joined: 08 Jul 2004 Posts: 2
|
Posted: Thu Jul 08, 2004 11:34 pm |
I am going to piggy back on this topic as well because I am having a heck of a time with this same type of problem
Here's what I got.
Pattern:
^(*) tells you: (*)$
Value:
#GAG
#WINDOW Channel {%1 tells you: %2}
Works great and nice and simple. But when the tell is over a line long, it only does the first line. (Seems like a lot of people have this problem)
The only way to know that its a tell on the next line is that the second line on the screen has 3 spaces in front of it.
So basically the tell fills up the first line, works fine, but the second line of the tell is indented 3 spaces and shows up on the main window (obviously).
Any advice would be greatly appreicated!
-M- |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Fri Jul 09, 2004 1:00 am |
Do a search for tell capturing shuold get you on the right track for multiline tells
|
|
|
|
Zorprime Newbie
Joined: 01 Feb 2003 Posts: 4 Location: USA
|
Posted: Fri Jul 09, 2004 4:17 am |
This is what I am using at 3Kingdoms. I have a window called Chats.
#REGEX "Tell_Trigger" {^(?:>s|)(You tell w+|w+ tells you|w+ LTs (.+)|You LT (.+)):?(.*)$$(.*)$$} {
#GAG
:Chats:#SAYPROMPT {%cr%ansi( bold, red)"["%time( hh:mm)"] "%ansi( bold, cyan)"["%1"]: "%ansi( bold, grey)%2}
}
#COND {^ +(?:LT:)?(.*)$$} {
#GAG
:Chats:#SAYPROMPT {%ansi( bold, grey)" "%1}
} {looppat|prompt|regex} |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Jul 09, 2004 4:37 pm |
LightBulb's standard multiline approach:
Starting pattern - enable main trigger
* - main trigger to color, capture, gag, add to database variable, etc
Ending pattern - disable main trigger
#TR {(%w) tells you: } {#IF (("%1" != "Alexa") AND ("%1" != "Laryn")) {#T+ tellcapture}}
#TR tellcapture {*} {#CAP TellHist;#GAG} {} {disable}
#TR {{.|?|!}$} {#T- tellcapture}
Sorry, Deadlok, but I can't tell from your sample output how you would know that you reached the end of the line, so I don't know what to use for an ending pattern. I've assumed an ending period, question mark, or exclamation point and used that. |
|
|
|
Falan Wanderer
Joined: 17 Aug 2004 Posts: 98 Location: OK, USA
|
Posted: Sun Aug 22, 2004 11:04 am |
(wrong thread)
|
|
_________________ zMUD 7.05a |
|
|
|
a5hi5m Beginner
Joined: 04 Mar 2004 Posts: 24 Location: Australia
|
Posted: Thu Dec 02, 2004 9:47 pm |
Sorry to railroad someone elses thread/posts, but with Lightbulb's script, is there a way to store what is captured into (a) variable, rather than sending it to another window?
|
|
_________________ Smoking@BatMUD |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Fri Dec 03, 2004 11:57 am |
Intead of this line:
Code: |
#TR tellcapture {*} {#CAP TellHist;#GAG} {} {disable} |
change it to:
Code: |
#TR tellcapture {*} {#var cTells %1} {} {disable} |
The above isn't tested, but it should just put all of the above line(s) into the cTells variable |
|
_________________ Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian) |
|
|
|
Kiasyn Apprentice
Joined: 05 Dec 2004 Posts: 196 Location: New Zealand
|
Posted: Sun Dec 05, 2004 10:56 pm |
#TRIGGER {(%w) tells you '(*)'} {#capture Channels} always worked for me O.o
|
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Tue Dec 07, 2004 5:59 pm |
Orrrr, you could do this:
#trigger {(%w) tells you: *} {#capture TellHist %line}
#cond {%match(%line,"^ *$")} {#capture TellHist %line} {loopexp|param=2}
This will catch a tell that extends over 3 lines, and will stop as soon as it encounters a line without the 3 spaces at the front. |
|
|
|
|
|