Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Mon May 03, 2010 2:56 am   

%match() problems
 
Alright, here's the code
Code:

<class name="AGL-logging" enabled="false" id="1297">
  <trigger priority="12980" id="1298">
    <pattern>(.*)</pattern>
    <value>#IF (%match(%1, "%/^\[ (?:Southern|Northern|Western|Eastern|The Center of the) Coliseum(?: Wall)? \]/%")) {} {#gaglog}</value>
  </trigger>
  <trigger type="Command Input" priority="12990" regex="true" id="1299">
    <pattern>(.*)</pattern>
    <value>#say AGL-Logging Mode!!!!</value>
  </trigger>
  <trigger priority="13020" regex="true" enabled="false" id="1302">
    <pattern>\[ (?:Southern|Northern|Western|Eastern|The Center of the) Coliseum(?: Wall)? \]</pattern>
  </trigger>
</class>


The point of this trigger is to gag EVERYTHING from the log except anything happening in the arena. All lines in the arena are prefaced by one hte following:
[ Western Coliseum Wall ]
[ Eastern Coliseum Wall ]
[ Southern Coliseum Wall ]
[ Northern Coliseum Wall ]
[ The Center of the Coliseum ]

Hence why I have my %match set to the way it is. The problem is, even if a line matches, it is sometimes gagged from the log:


[ The Center of the Coliseum ] Malchaos's pierce wounds Izziael.

Matches, not gagged from the log

[ The Center of the Coliseum ] Izziael is struck by lightning from an eel tooth.

Matches, gagged from the log

Neither of these should be gagged from the log, but one is. And I have no idea why.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Mon May 03, 2010 3:54 am   
 
Here is some sample text from the MUD
Code:


AGL Logging turned on.

GO!!!
Ruck yells 'Th' be'in' window bae closed.'

<Name> <2087/2087hp 810/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 3:30pm [Day Time] [Common] [Defensive]>

[ Western Coliseum Wall ] Someone floats in.

<Name> <2087/2087hp 810/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 3:30pm [Day Time] [Common] [Defensive]>

[ Western Coliseum Wall ] Someone floats east.
[ The Center of the Coliseum ] Someone floats in.

<Name> <2087/2087hp 810/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 3:30pm [Day Time] [Common] [Defensive]>
TICK IN 5 SECONDS.

Carthus drinks water from a large grey stone fountain.

<Name> <2087/2087hp 810/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 3:30pm [Day Time] [Common] [Defensive]>

[ The Center of the Coliseum ] Someone floats north.
[ Northern Coliseum Wall ] Someone floats in.
Betha Boltbeard walks in.
Brockner walks in.
Izziael Skullbreaker floats in.

<Name> <2087/2087hp 810/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 3:30pm [Day Time] [Common] [Defensive]>

Betha sits down and rests.

<Name> <2087/2087hp 810/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 3:30pm [Day Time] [Common] [Defensive]>

Valdaglerion yells 'Do Raije Proud!'

<Name> <2087/2087hp 810/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 3:30pm [Day Time] [Common] [Defensive]>


You are thirsty.

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>
Timer now at 41 secs.
AGL-Logging Mode!!!!
Carthus utters the words, 'oculoinfra uizug'.

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

Betha gets an old dented and scratched decanter from a Robe of Many Pockets.

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

[ Northern Coliseum Wall ] Iulh gets A black serpent shaped vial, inscribed "Stoning" from a Robe of Many Pockets.
Azheri sits down and rests.
Betha drinks milk from an old dented and scratched decanter.

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

Betha drinks milk from an old dented and scratched decanter.

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

Betha drinks milk from an old dented and scratched decanter.
Carthus utters the words, 'oculoinfra pueoculoi'.

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

Betha puts an old dented and scratched decanter in a Robe of Many Pockets.

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

[ Northern Coliseum Wall ] Iulh quaffs A black serpent shaped vial, inscribed "Stoning".
[ Northern Coliseum Wall ] Iulh's skin turns to stone.
[ Northern Coliseum Wall ] Iulh makes the earth tremble and shiver.
[ Northern Coliseum Wall ] Iulh's earthquake misses Tyaethecal.
The earth trembles and shivers.

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

[ Northern Coliseum Wall ] Tyaethecal fades into existence.
[ Northern Coliseum Wall ] Tyaethecal's beating misses Iulh.
[ Northern Coliseum Wall ] Tyaethecal's beating misses Iulh.

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

[ Northern Coliseum Wall ] Tyaethecal floats south.
[ The Center of the Coliseum ] Tyaethecal floats in.
[ Northern Coliseum Wall ] Tyaethecal has fled!

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

[ The Center of the Coliseum ] Tyaethecal floats east.
[ Eastern Coliseum Wall ] Tyaethecal floats in.

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

[ The Center of the Coliseum ] Iulh looks all around.

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

[ Eastern Coliseum Wall ] Tyaethecal has summoned a diamond golem!
[ Eastern Coliseum Wall ] A diamond golem is bound to Tyaethecal's will.

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

[ Eastern Coliseum Wall ] Tyaethecal is blinded by the dirt in his eyes!

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

Cur'angelo yells 'wo't '

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

[ Eastern Coliseum Wall ] Iulh's flaming bite decimates Tyaethecal!
[ Eastern Coliseum Wall ] Tyaethecal is burned by ancient axe of Raije.
[ Eastern Coliseum Wall ] Tyaethecal's beating misses Iulh.
[ Eastern Coliseum Wall ] Tyaethecal's beating misses Iulh.
[ Eastern Coliseum Wall ] Tyaethecal's beating misses Iulh.
[ Eastern Coliseum Wall ] A diamond golem's stab injures Iulh.

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

[ Eastern Coliseum Wall ] A diamond golem's stab hits Iulh.
[ Eastern Coliseum Wall ] A diamond golem's kick grazes Iulh.
[ Eastern Coliseum Wall ] Iulh's pierce misses Tyaethecal.
[ Eastern Coliseum Wall ] Iulh's flaming bite decimates Tyaethecal!
[ Eastern Coliseum Wall ] Tyaethecal is burned by ancient axe of Raije.
[ Eastern Coliseum Wall ] Iulh's flaming bite misses Tyaethecal.
[ Eastern Coliseum Wall ] Tyaethecal's beating misses Iulh.
[ Eastern Coliseum Wall ] Tyaethecal's beating misses Iulh.

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

[ Eastern Coliseum Wall ] Iulh's kick injures Tyaethecal.
[ Eastern Coliseum Wall ] Iulh sends Tyaethecal's shield flying with a powerful kick.

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

[ Eastern Coliseum Wall ] A diamond golem rescues Tyaethecal!

<Name> <2087/2087hp 828/901m 396/396mv 19629tnl 0pq 644/1180w 3203g/1223s
 [The Northern Arena Stands (Upper Deck)] [D] 4:00pm [Day Time] [Common] [Defensive]>

[ Eastern Coliseum Wall ] Iulh's flaming bite MUTILATES a diamond golem!
[ Eastern Coliseum Wall ] A diamond golem is burned by ancient axe of Raije.
[ Eastern Coliseum Wall ] Iulh's pierce mauls a diamond golem.
[ Eastern Coliseum Wall ] A red burnished blade draws life from a diamond golem.
[ Eastern Coliseum Wall ] A diamond golem is struck by lightning from a red burnished blade.
[ Eastern Coliseum Wall ] Iulh's flaming bite DISEMBOWELS a diamond golem!
[ Eastern Coliseum Wall ] A diamond golem is burned by ancient axe of Raije.
[ Eastern Coliseum Wall ] Iulh's pierce mauls a diamond golem.
[ Eastern Coliseum Wall ] A red burnished blade draws life from a diamond golem.
[ Eastern Coliseum Wall ] A diamond golem is struck by lightning from a red burnished blade.
[ Eastern Coliseum Wall ] Iulh's pierce mauls a diamond golem.
[ Eastern Coliseum Wall ] A red burnished blade draws life from a diamond golem.
[ Eastern Coliseum Wall ] A diamond golem is struck by lightning from a red burnished blade.


Here is what was logged:
Code:

***** AGL Logging turned on *****

GO!!!












Valdaglerion yells 'Do Raije Proud!'




















[ Northern Coliseum Wall ] Tyaethecal has fled!






[ Eastern Coliseum Wall ] Tyaethecal has summoned a diamond golem!


[ Eastern Coliseum Wall ] Tyaethecal is blinded by the dirt in his eyes!


Cur'angelo yells 'wo't '


[ Eastern Coliseum Wall ] Iulh's flaming bite decimates Tyaethecal!


[ Eastern Coliseum Wall ] Iulh's flaming bite decimates Tyaethecal!




[ Eastern Coliseum Wall ] A diamond golem rescues Tyaethecal!


[ Eastern Coliseum Wall ] Iulh's flaming bite MUTILATES a diamond golem!
[ Eastern Coliseum Wall ] Iulh's flaming bite DISEMBOWELS a diamond golem!


My thoughts are that the lines from the MUD are coming in too fast, and the result is that it can't keep up. But I can't think of a better method to gaglog everything EXCEPT one type of line.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4692
Location: Pensacola, FL, USA

PostPosted: Mon May 03, 2010 9:24 am   
 
This seems to work

Code:
<trigger priority="890" id="89">
  <pattern>^({~[ Western Coliseum Wall ~]|~[ Eastern Coliseum Wall ~]|~[ Northern Coliseum Wall ~]|~[ Southern Coliseum Wall ~]|~[ The Center of the Coliseum ~]|})*</pattern>
  <value>#IF (%1=%null) {#GAG}</value>
</trigger>


Doesn't address the %match issue... but it does what you want.
_________________
Discord: Shalimarwildcat
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Mon May 03, 2010 10:03 am   
 
Well, #gaglog, not #gag. But I will test it out. Is that essentially saying "whenever this pattern doesn't match" ?
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon May 03, 2010 5:56 pm   
 
Chamenas, do you sill want to figure out why your original %match did not work 100%? If so, it looks to me like only the lines ending with an exclamation point were logged. I don't see why that should happen, with your pattern.

Why are you using %match instead of %regex?
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Mon May 03, 2010 6:54 pm   
 
%match is the one I've used and "know", I don't know anything about %regex. Getting mine to work would be nice as it will allow me more flexibility in allowing "acceptable" lines to be logged.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue May 04, 2010 2:36 pm   
 
%regex is just like %match, except the pattern is a regex--you don't need to use the construction %/ /%.

Oh, for heaven's sake. I just figured out the problem. Your gaglog trigger is pattern "(.*)", but its not a regex trigger! That means it's triggering on sentences with a period in them, and only capturing the period and anything after it. It's not triggering at all on sentences with an exclamation point and no period. Either make that trigger a regex trigger, or make the pattern "(*)".
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Tue May 04, 2010 8:05 pm   
 
Yeah, DraxDrax pointed it out to me last night and I wasn't awake enough to make the post here. Thanks Smile
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net