|
Jah Wanderer
Joined: 11 Oct 2000 Posts: 52 Location: Sweden
|
Posted: 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. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
Evangelist Adept
Joined: 10 Oct 2000 Posts: 224 Location: USA
|
Posted: 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 |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
|
|