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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Dugoth
Beginner


Joined: 18 Feb 2004
Posts: 10

PostPosted: Wed Feb 18, 2004 4:07 am   

Trigger problem on upgrade to 7.01 from 6.40
 
I had a trigger set up to capture certain types of text from my primary window and send it to a capture window, and to gag it from my main window. Of course, it started going wonky when I did the recent upgrade, everything seems to work alright except the trigger pattern match now. The pattern should match things like:

[ Bad PW: Alaura [126.0.0.1] ]
[ Ghasra force extracted (idle). ]

but not match things like:

[ Exits: e d ]
[ Page 1 of 2 - Options: (Q)uit, (R)e-read, (B)ack, or page number. ]

My original trigger pattern was ^~[{^Exit|GUILD|Page }*~]$ which didn't match any of the above patterns, and when I added a space to make it ^~[ {^Exit|GUILD|Page }*~]$ it matched all of the above patterns. This pattern worked fine for me in 6.40 but just doesn't want to work now, any help?
Reply with quote
Backu
Novice


Joined: 24 Feb 2003
Posts: 36
Location: USA

PostPosted: Wed Feb 18, 2004 7:13 am   
 
I'm having a similar problem in where I use trigs with Wildcards like %A, but on my recent upgrade to 7.01, EVERYTHING using Wildcards has broken, and I can't figure out how to fix it for the life of me... Love ya Zugg, but what the heck did you do?
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Wed Feb 18, 2004 9:39 am   
 
The new version of zMUD uses a regular expression library to handle pattern matching. The benefit of this is that you can make more complicated pattern matchers, and that they are likely to run a lot faster that Zugg's own matching algorithm.

To get the speed increase the standard zMUD patterns are always translated to perl regexp's. It is likely that the translation didn't go very well in your case or that Zugg has another view on the semantics. I have written a note containing a link to this post on the beta testing forum so that it gets Zugg's attention.

I understand if you feel frustrated right now. We should have faster pattern matching now though. Hopefully this issue gets fixed sooner than later Smile.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Feb 18, 2004 7:30 pm   
 
You guys need to post the EXACT triggers that are causing problems. The original post in this thread is using a very complex {^a|b|c} syntax that I'm looking into. Wildcards are NOT completely broken or else none of my triggers would work. So, don't jump to the conclusion that something is completely broken and post more useful information to help me track down the problem please.
Reply with quote
Dugoth
Beginner


Joined: 18 Feb 2004
Posts: 10

PostPosted: Wed Feb 18, 2004 8:51 pm   
 
Do you need the full trigger from me then Zugg? The remainder of the trigger get's more complicated with some ifs and such to kill the extra blank lines when something get's cut to another window, without killing or chewing up by buffer. All of that seems to be working though, even if it's snatching lines it shouldn't be from the pattern match. If you need it I can put it up. Thanks for looking into it Smile
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Wed Feb 18, 2004 9:47 pm   
 
quote:
Originally posted by Zugg

You guys need to post the EXACT triggers that are causing problems. The original post in this thread is using a very complex {^a|b|c} syntax that I'm looking into. Wildcards are NOT completely broken or else none of my triggers would work. So, don't jump to the conclusion that something is completely broken and post more useful information to help me track down the problem please.


The issue is that your matcher is very greedy. Let's take a look at a trigger and how zMUD translates it:

{^a|b|c} ----> (?:w+(?<!c|b|a))

This states that we want to match one or more words, NOT follow by c or b or a.

Text: somethinga

Now let's take a look at the action. In the old version of zMUD this would not match, would it? In the new version we are very greedy so we read it all using "w+" and return a match.
Reply with quote
Dugoth
Beginner


Joined: 18 Feb 2004
Posts: 10

PostPosted: Thu Feb 19, 2004 8:05 am   
 
Additional oddity it seems, for some reason the following pattern doesn't match the previous trigger and it used to/should.

[ (GC) Faerid forced Someone to save ]
Reply with quote
Backu
Novice


Joined: 24 Feb 2003
Posts: 36
Location: USA

PostPosted: Thu Feb 19, 2004 4:49 pm   
 
okay, this is breaking -> "You have 60 seconds to type ~<party join (%A)~>", and convert changed it to "<party join ()>". I'd really like to use 7.01, but if I can't get my trigs working, it's not worth my time.
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Thu Feb 19, 2004 5:03 pm   
 
quote:
Originally posted by Backu

okay, this is breaking -> "You have 60 seconds to type ~<party join (%A)~>", and convert changed it to "<party join ()>". I'd really like to use 7.01, but if I can't get my trigs working, it's not worth my time.


Try to change the trigger into: "~<party join (%a)~>". Notice the lower case 'a'. If you look in the pattern helpfile you'll see that all patterns are lower case. I don't think it is mentioned that there is support for upper case. So just change that %A to %a and it should work.

If you still believe this to be an error in zMUD then you should send an email to support@zuggsoft.com
Reply with quote
Backu
Novice


Joined: 24 Feb 2003
Posts: 36
Location: USA

PostPosted: Thu Feb 19, 2004 5:39 pm   
 
Okay, ya, sure, works with lowercase letters. Zugg, might want to fix it so it works with Upper and Lowercase as the previous versions have. Thanks!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Feb 20, 2004 1:19 am   
 
No, patterns have ALWAYS been documented as being lowercase. Just because something undocumented worked in previous versions doesn't mean I have to kludge new versions to have the same bugs. Use the patterns the way they are documented and they will work fine.

Back to the original post issue, the Perl regex stuff by default *is* "greedy" (a regex technical term) and that might be causing the issue. It's possible that I didn't determine the correct pattern to convert the {^a|b|c} triggers into. I'm certainly no expert in regex myself. If someone is an expert and can suggest the proper way to convert the zMUD {^a|b|c} syntax into a working regex trigger, let me know. Otherwise I'll play with it and see what I can learn myself.
Reply with quote
Tornhelm
Beginner


Joined: 24 Nov 2002
Posts: 20
Location: Australia

PostPosted: Fri Feb 20, 2004 3:59 am   
 
I am having a problem with the zmud 7.01 database too. The trigger I am using is:

^{A|*}{ |*}{p|*}{r|*}{i|*}{c|*}{k|*}{l|*}{y|*}{ |*}{s|*}{t|*}{i|*}{n|*}{g|*}{i|*}{n|*}{g|*}{ |*}{o|*}{v|*}{e|*}{r|*}{c|*}{o|*}{m|*}{e|*}{s|*}{ |*}{y|*}{o|*}{u|*}{r|*}{ |*}{b|*}{o|*}{d|*}{y|*}{,|*}{ |*}{f|*}{a|*}{d|*}{i|*}{n|*}{g|*}{ |*}{a|*}{w|*}{a|*}{y|*}{ |*}{i|*}{n|*}{t|*}{o|*}{ |*}{n|*}{u|*}{m|*}{b|*}{n|*}{e|*}{s|*}{s|*}{.|*}$

I don't know if this is a problem with the database like everyone else has had or its just some wierd problem with my settings, but that trigger is firing off every line now, instead of only when a certain message is received.
Reply with quote
maddyn
Newbie


Joined: 20 Feb 2004
Posts: 1
Location: USA

PostPosted: Fri Feb 20, 2004 4:34 am   
 
quote:
Originally posted by Zugg

You guys need to post the EXACT triggers that are causing problems. The original post in this thread is using a very complex {^a|b|c} syntax that I'm looking into. Wildcards are NOT completely broken or else none of my triggers would work. So, don't jump to the conclusion that something is completely broken and post more useful information to help me track down the problem please.



Ok then. Here's my triggers complete.
#TRIGGER {(%w) tells you 'brew (%y)'} {get empty extra;hold empty;brew %2;hold storm;put empty extra;give %2 %1;trance}
#TRIGGER {(%w) tells you 'brew (%y) (%z)'} {get empty extra;hold empty;brew %2 %3;hold storm;put empty extra;give %2 %1;trance}

Before I upgraded to 7.01 I had both of these two triggers on about 5 characters and they worked great.
Here's the wierd part. Neither of these triggers now worked EXCEPT the first one worked on one of my chars. I imported it to a different char, and now it works for both chars.

The second one doesn't work at all, and doesn't pass test script.

Advice, emails, input here... all are welcome. Otherwise I gotta go back to previous version soon.

Maddyn
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Feb 20, 2004 4:58 am   
 
Tornhelm, I just entered your trigger and it works fine here. It does not trigger on every line. Make sure you posted the exact trigger. Also make sure you don't have the Regular Expression option selected since that's a zMUD trigger syntax and not a regex syntax.

maddyn, what the heck are you trying to do with the %y and %z patterns? The %z isn't anywhere in the help file and my guess is the %y isn't what you want either. If you are trying to match words, the use %w to match a word, like this:

#TRIGGER {(%w) tells you 'brew (%w)'} {get empty extra;hold empty;brew %2;hold storm;put empty extra;give %2 %1;trance}
#TRIGGER {(%w) tells you 'brew (%w) (%w)'} {get empty extra;hold empty;brew %2 %3;hold storm;put empty extra;give %2 %1;trance}
Reply with quote
Dugoth
Beginner


Joined: 18 Feb 2004
Posts: 10

PostPosted: Thu Feb 26, 2004 11:31 pm   
 
7.03 seems to have fixed this particular trigger problem for the most part, thanks Zugg Smile. I did have to adjust the trigger slightly to:

^~[ {^Exit|Page }*{^~[GUILD~: ~<none~>}~]$

so that it wouldn't match something like:

[ 104] The Realm of the Weaponmasters [ !MOB INDOORS !TRACK NOGATE ] [Inside] [GUILD: <none>]

which used to work fine with the original trigger. Hopefully there aren't many rooms without associated guilds as variables can't be used in exclusion groups unfortunately. Thanks though, think I'm good to go now :)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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