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
Jah
Wanderer


Joined: 11 Oct 2000
Posts: 52
Location: Sweden

PostPosted: Mon Dec 30, 2002 3:48 am   

Matching stars in a trigger
 
Iv got this trigger
~<~[(%1)~] ~[(%d)H *~]~>

It's meant to react to a prompt like
<[******] [44247H 25000M 43863V]>
And it does. But after the fight is over it's the ammount of exp i got instead of enemys hp.
So i was wondering. Is it possible for it to match only stars?


Fluff the puff.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Dec 30, 2002 4:19 am   
 
quote:

Iv got this trigger
~<~[(%1)~] ~[(%d)H *~]~>

It's meant to react to a prompt like
<[******] [44247H 25000M 43863V]>
And it does. But after the fight is over it's the ammount of exp i got instead of enemys hp.
So i was wondering. Is it possible for it to match only stars?


Fluff the puff.



First, you need to be warned off of using %1...%99 in your trigger patterns. These things work EXACTLY like * or perhaps even %*, which will match ANYTHING and could potentially get you into serious trouble.

As for your question, you can use this to match only stars:

~<~[([~*])~]

li'l shmoe of Dragon's Gate MUD
Reply with quote
Evangelist
Adept


Joined: 10 Oct 2000
Posts: 224
Location: USA

PostPosted: Mon Dec 30, 2002 4:06 pm   
 
I would suggest using something like

~<~[******~] ~[(%d)H (%d)M (%d)V~]~>

Just in case you want to do anything later that involve your current hp, mana, or whatnot. Also, only use that if there is always the same amount of stars.

Evangelist/Pernius
www.phidar.com/phidar.html
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Dec 31, 2002 12:32 am   
 
quote:

I would suggest using something like

~<~[******~] ~[(%d)H (%d)M (%d)V~]~>

Just in case you want to do anything later that involve your current hp, mana, or whatnot. Also, only use that if there is always the same amount of stars.

Evangelist/Pernius
www.phidar.com/phidar.html



That would work (if you put parentheses around the asterisk), but in that case you wouldn't need all those asterisks as * is a broad-range wildcard that works pretty much like it does in DOS (*.exe, for instance). If there is anything else besides stars in between the square brackets it would catch them as well.

li'l shmoe of Dragon's Gate MUD
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