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
alv
Newbie


Joined: 01 Feb 2002
Posts: 2

PostPosted: Fri Feb 01, 2002 11:15 am   

triggers and or patterns
 
how to make trigger such as
#trigger {{* test|* test2|* test3}}

work. Currently it seems zmud treats * as normal stars in or-lists, not as symbols that match any characters. Basically, I have a big list in variable that contains such patterns and would like to trigger on that.

And second question, how to register for Beta forum?
Reply with quote
Charbal
GURU


Joined: 15 Jun 2001
Posts: 654
Location: USA

PostPosted: Fri Feb 01, 2002 11:40 am   
 
quote:

how to make trigger such as
#trigger {{* test|* test2|* test3}}
work.



It won't work for precisely the reason you've mentioned. Regular Expressions have some features like this (in the current beta) but 6.16 and below must have their triggers rewritten:

#trigger {* {test|test2|test3}}

 - Charbal
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Feb 01, 2002 1:14 pm   
 
It is nice to condense things down to a
trigger but that brings up the question of speed.

Do you really want to have a trigger
that contains such a variety of possibilities
or do you want something that is discarded
or accepted quickly.

I'd be of the opinion that as soon as you
started the put expression content choices in
{a|b|c} you'd have a frightful slow pattern
matching experience.

TonDiening
Uses 6.16
Reply with quote
alv
Newbie


Joined: 01 Feb 2002
Posts: 2

PostPosted: Sat Feb 02, 2002 2:11 pm   
 
Hmm, I haven't got a slightest clue at zmud implementation, but the speed diffrence shouldn't be noticeable, basing on my experience with regular expressions... (and premature optimization sucks). And yea, i'd like to join beta forum to download new beta and try its regular expressions, but have no idea how...?

For convenience, I'm a healer and want to trigger on various death messages to automatically offer resurrection and similar stuff.

Hmm, I think I could just break this to multiple triggers, but I already typed all that stuff in variable and too lazy to convert it :D

Tried an approach like
#forall @death_msgs {
#trigger %i { ... }
}

but it didnt work actually :(
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sat Feb 02, 2002 3:22 pm   
 
To join the Beta Forum click on the Beta Forum Application link in the All Forums page. Fill out the necessary information, and accept the terms and contions.

Kjata
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