|
SolarianKnight Newbie
Joined: 19 Sep 2005 Posts: 3
|
Posted: Mon Sep 19, 2005 8:08 pm
Non-terminating capture trigger |
Okay, I'm pretty new to zMUD. I've been working on adapting the StormFront XML-ish tags sent from the DragonRealms server (I say XML-ish because it doesn't follow conventions =/). My issue is with a trigger that doesn't stop storing data into a variable.
Consider the following output from the server:
Code: |
<roundTime value='1127163488'/><dialogData id='minivitals'><skin id='manaSkin' name='manaBar' controls='mana' left='25%' top='0%' width='25%' height='100%'/><progressBar id='mana' value='98' text='mana 98%' left='25%' customText='t' top='0%' width='25%' height='100%'/></dialogData> |
I have another trigger that handles dialogData. What I want to do is extract the value element of the roundTime tag without storing the rest of the line with it.
The trigger I have is as follows:
Code: |
#TRIGGER {~<roundTime value='(&roundtime_max)'~/~>} {#DOSTUFF} |
This is the content of the roundtime_max variable:
Code: |
1127164061'/><dialogData id='minivitals'><skin id='manaSkin' name='manaBar' controls='mana' left='25%' top='0%' width='25%' height='100%'/><progressBar id='mana' value='98' text='mana 98%' left='25%' customText='t' top='0%' width='25%' height='100% |
I would greatly appreciate any help in fixing this buggy trigger. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Mon Sep 19, 2005 8:49 pm |
#TRIGGER {~<roundTime value='(&%droundtime_max)'~/~>} {#DOSTUFF}
The * pattern is used by default when none is specified. It is a greedy pattern meaning it will try to match as many characters as possible. Using the more limited %d pattern for your match will give you the results you want. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
SolarianKnight Newbie
Joined: 19 Sep 2005 Posts: 3
|
Posted: Mon Sep 19, 2005 11:30 pm |
That got it, thanks.
|
|
|
|
|
|