![](templates/Classic/images/spacer.gif) |
manbat Novice
Joined: 21 Mar 2009 Posts: 35
|
Posted: Tue Nov 03, 2009 3:50 pm
[3.12] Capture Trigger |
Code: |
<trigger priority="1260" case="true" ansi="true" regex="true" id="328">
<pattern>(.* (?:ask|answer|auction|quest|gossip|OOC|grat|\[Newbie\])s?\s?(?:\:|\').*)</pattern>
<value>#WINDOW Captures ~[%time(hh:nn)~] %1
#GAG</value>
</trigger> |
Example: Meje [Newbie]: 'is a nunchuk a mace?'
In the test pattern, it says %1 is exactly what it's supposed to be.. "Meje [Newbie]: 'is a nunchuk a mace?'" yet it doesn't actually fire. It doesn't capture... I'm thinking it has something to do with the [ ] brackets.. not sure.. any ideas?
EDIT: I turned on the script debug and show information check boxes, and found the trigger isn't firing at all when that line comes up. Also everything else works, just [Newbie] lines don't work... Is there a way to see all the commands the MUD is sending? I'm guessing that it's not just [Newbie] but probably more hidden codes to it... |
|
|
![](templates/Classic/images/spacer.gif) |
charneus Wizard
![](images/avatars/51564989746d852114da6d.jpg)
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Tue Nov 03, 2009 4:06 pm |
Try putting the brackets outside of the string list like so:
Code: |
\[?(?:ask|quest|Newbie|etc)\]?s?\s? etc |
Really shouldn't make a difference, but it's an option. I'd test it, but I can't right now :(
Charneus |
|
|
![](templates/Classic/images/spacer.gif) |
manbat Novice
Joined: 21 Mar 2009 Posts: 35
|
Posted: Tue Nov 03, 2009 4:16 pm |
hmmm... that worked.. but then started capturing ( ) too.... odd...
|
|
|
![](templates/Classic/images/spacer.gif) |
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Tue Nov 03, 2009 9:09 pm Re: [3.12] Capture Trigger |
manbat wrote: |
(.* (?:ask|answer|auction|quest|gossip|OOC|grat|[Newbie])s?\s?(?:\:|\').*)
|
Are you sure that highlighted part is correct? What exactly you want to match here? |
|
_________________ My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads |
|
|
![](templates/Classic/images/spacer.gif) |
manbat Novice
Joined: 21 Mar 2009 Posts: 35
|
Posted: Wed Nov 04, 2009 1:48 am |
I'm using it capture chat channels to another window... things like
Zhulem ask 'why did a blue diamond disappear from my inventory?'
Kohi answers 'Did you fight something with a shocking weapon?'
Ramias Kingdom: 'Sorry if I'm unable to hear you all at any point in time... The dwarves down in this mine are keen on deafening me often.'
You [Newbie]: 'does who helper show people who haven't toggled it too?'
Rassilon [Newbie]: 'I don't think so'
those are examples.. I'm doing it with a single trigger... because... I should be able to. All of those work except for the last 2. What it does it captures the text to %1, so I can timestamp it and then echo the timestamp to the window along with the message... |
|
|
![](templates/Classic/images/spacer.gif) |
manbat Novice
Joined: 21 Mar 2009 Posts: 35
|
Posted: Wed Nov 04, 2009 11:14 pm |
Anybody?
|
|
|
![](templates/Classic/images/spacer.gif) |
wrym Magician
Joined: 06 Jul 2007 Posts: 349 Location: The big palace, My own lil world
|
Posted: Thu Nov 05, 2009 11:10 pm |
i think you need to escape the [] characters, regex recognizes those as a character grouping it's saying "N" or "e" or "w" or "b" or "i" or "e", not "Newbie"
|
|
_________________ "To the engineer, all matter in the universe can be placed into one of two categories: (1) things that need to be fixed, and (2) things that will need to be fixed after you've had a few minutes to play with them" - Scott Adams, The Dilbert Principle |
|
|
![](templates/Classic/images/spacer.gif) |
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Fri Nov 06, 2009 7:08 am |
wrym
He already did it, I just quoted an older version of his regex.
manbat
I asked because ' is not a special character and there is no need to escape it.
Dunno, your trigger works fine for me capturing all your sample lines. If your trigger isn't firing, then your MUD sends different text. Turn on messages a, h, i, j, n in Debugger and go chat some on Newbie channel, then post your log here.
By the way, why don't you use auto timestamps? |
|
_________________ My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads |
|
|
![](templates/Classic/images/spacer.gif) |
manbat Novice
Joined: 21 Mar 2009 Posts: 35
|
Posted: Fri Nov 06, 2009 3:31 pm |
Code: |
0.3293 |
0.0082 | c DSL | [1] DSL Comline : start :
0.0156 | a DSL |newbie ....
0.0045 | h DSL |<ESC>[2Snewbie ....<ESC>[0m
0.0119 | i DSL >newbie ....<CR><LF>
0.0051 | d DSL | [1] DSL Comline : stopped
0.6119 | i DSL <You <ESC>[1;37m[<ESC>[1;31mNewbie<ESC>[1;37m]:<ESC>[0m '<ESC>[1;33m....<ESC>[0m'<LF><CR><LF><CR>
0.0001 | <ESC>[0m[9:30am] - Day Time<LF><CR>
0.0000 | <<ESC>[1;37m1095<ESC>[0m/<ESC>[1;37m1095<ESC>[0mhp <ESC>[1;37m1045<ESC>[0m/<ESC>[1;37m1045<ESC>[0mm <ESC>[1;37m406<ESC>[0mmv 6275g 2495s 79985xp><LF><CR>
0.0071 | a DSL |You [Newbie]: '....' |
It fires fine in the pattern test, but for some reason in practice, it doesn't fire.. I don't use the builtin timestamp because I don't want the normal mud window to be timestamped.. don't need it. But I do want the chat channels to be timestamped. |
|
|
![](templates/Classic/images/spacer.gif) |
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Fri Nov 06, 2009 7:26 pm |
manbat wrote: |
I don't use the builtin timestamp because I don't want the normal mud window to be timestamped.. don't need it. But I do want the chat channels to be timestamped. |
Each window has it's own timestamp setting. Click on the window you want it to have timestamps, then go Options\General\Session tab. |
|
_________________ My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads |
|
|
![](templates/Classic/images/spacer.gif) |
manbat Novice
Joined: 21 Mar 2009 Posts: 35
|
Posted: Mon Nov 09, 2009 1:36 am |
Well that works, but it still doesn't capture the [Newbie] text..
|
|
|
![](templates/Classic/images/spacer.gif) |
wheelman Novice
Joined: 30 Jan 2006 Posts: 41
|
Posted: Mon Nov 09, 2009 3:00 am |
Put a \ before the first bracket in Newbie.
Code: |
(.* (?:ask|answer|auction|quest|gossip|OOC|grat|\[Newbie])s?\s?(?:\:|\').*) |
|
|
|
![](templates/Classic/images/spacer.gif) |
manbat Novice
Joined: 21 Mar 2009 Posts: 35
|
Posted: Tue Nov 10, 2009 2:40 pm |
Still nothing... again works in the test pattern... but on the main window nothing....
|
|
|
![](templates/Classic/images/spacer.gif) |
manbat Novice
Joined: 21 Mar 2009 Posts: 35
|
Posted: Tue Nov 17, 2009 1:22 am |
Sorry just giving this a bump...
|
|
|
![](templates/Classic/images/spacer.gif) |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Nov 17, 2009 2:26 am |
Quote: |
(.* (?:ask|answer|auction|quest|gossip|OOC|grat|[Newbie])s?\s?(?:\:|\').*)
|
I'm guessing it's the S that's messing you up. It probably works when someone askS, answerS, auctionS, questS, gossipS, etc, but since nobody [Newbie]S it never matches. |
|
_________________ EDIT: I didn't like my old signature |
|
|
![](templates/Classic/images/spacer.gif) |
|
|