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


Joined: 15 Nov 2002
Posts: 52
Location: Las Vegas, Nevada

PostPosted: Sun Jul 06, 2003 7:19 am   

Capture Trigger Question
 
'k, how can I make a trigger where something in it may or may not be present?

One trigger for both of the following (with the 4 saved to a variable)
NRG:170/203(4-)
NRG:170/203(4)

Also, if something is tacked on to the end (enemy status) and I need to grab that too.

Any suggestions aside from multiple triggers would be appreciated.
Reply with quote
Death
Apprentice


Joined: 25 Jun 2002
Posts: 109
Location: USA

PostPosted: Sun Jul 06, 2003 7:32 am   
 
Where do you want to capture it to? What do you want that window to be known as? For sake of examples here, I'll just call it Capture.

#trigger {NRG:170/203(4-)} {#cap Capture}
#trigger {NRG:170/203(4)} {#cap Capture}

I believe that should do what you're looking for, let me know if it's not working.
Reply with quote
GaidinBDJ
Wanderer


Joined: 15 Nov 2002
Posts: 52
Location: Las Vegas, Nevada

PostPosted: Sun Jul 06, 2003 7:38 am   
 
Bah, my bad, I should have been more specific. I'm actually capturing variables from a hpbar.

ATM, I have two triggers;
NRG:&%d{curNRG}/&%d{maxNRG}~(&%d{curEmit}~)
NRG:&%d{curNRG}/&%d{maxNRG}~(&%d{curEmit}-~)

Also, for the enemy status, it's just an extra entry on the same line, it somes like this:

T:smur:bleeding

And I want to capture whatever is in the "bleeding" part, but it's only there when I'm actually in combat.
Reply with quote
Death
Apprentice


Joined: 25 Jun 2002
Posts: 109
Location: USA

PostPosted: Sun Jul 06, 2003 7:56 am   
 
I'm not seeing where there's a difference. #cap will capture the whole line, regardless of what is there, unless it is zmud special characters. So when you're not fighting it'll capture what's there, and when you're fighting it'll capture the added part because of being in a fight.
Reply with quote
GaidinBDJ
Wanderer


Joined: 15 Nov 2002
Posts: 52
Location: Las Vegas, Nevada

PostPosted: Sun Jul 06, 2003 8:03 am   
 
Alright, I'm still screwing this up. I'm not trying to capture the line to a window. What I'm trying to do is extract the values from the text hpbar the mud sends so I can use them as gauge values and in conditionals. I would use the square braces [], but the help files says I can't use pattern matching inside them.
Reply with quote
Death
Apprentice


Joined: 25 Jun 2002
Posts: 109
Location: USA

PostPosted: Sun Jul 06, 2003 8:17 am   
 
Well, use your existing triggers and capture the values into variables. You should then be able to use those variables for the gauge values. Sadly enough I'm not totally understanding what you want done, so I can't think of any examples to go with this.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Jul 06, 2003 8:23 am   
 
You "make a trigger where something in it may or may not be present" with wildcards or by not including that part of the line in the trigger.
#TR {NRG:(%d)/(%d)~((%d)} {#VAR curNRG %1;#VAR maxNRG %2;#VAR curEmit %3}
#TR {T:%w:(%w)} {#VAR enemystatus %1}

NOTE: Variable assignments moved to Value field for ease of reading
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