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: Wed Jun 22, 2005 3:39 pm   

HP Bar trigger...
 
Alright, I'm tryin' to capture my whole HP bar (so I can reformat it and for general usefulness), but here's the thing. When I'm in combat, there's a bit appended to the end for enemy condition, but it only appears when I'm in combat. Now, I know I can do {Blah|} for optional bits, but it has to pattern match as well. Is there any way to do this with a single trigger? I've got all the rest parsed out.

Normal HP Bar
Code:

 HP:842/842 C:100%  NRG:311/311(3)  SP:180/180  B:1(9%) G2N:206


Combat HP Bar
Code:

 HP:803/842 C:99%  NRG:308/311(3)  SP:180/180  B:1(21%) G2N:197 T:Chick:perfect
_________________
Barry
Gaidin @ 3k.org
Reply with quote
Mortis
Beginner


Joined: 10 Feb 2004
Posts: 21
Location: Sweden

PostPosted: Wed Jun 22, 2005 3:53 pm   
 
Why don't you put (*) in the end on your normal HP bar

like.. "G2N:(%n)(*)"

Then in the value of the trigger you could add something like

#VAR Mob %word(%12,2,":")
#VAR MobHealth %word(%12,3,":")

Try this out.

Code:
#TRIGGER {HP:(%n)/(%n) C:(*) NRG:(%n)/(%n)~((%n)~) SP:(%n)/(%n) B:(%n)~((*)~) G2N:(%n)(*)} {
  #SAY %word( %12, 2, ":")
  #SAY %word( %12, 3, ":")
  } "" {nocr|prompt|case}
_________________
When you lose, dont lose the lesson.
Reply with quote
GaidinBDJ
Wanderer


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

PostPosted: Wed Jun 22, 2005 4:07 pm   
 
Excellent. That works perfectly. Thanks. Back on track now.
_________________
Barry
Gaidin @ 3k.org
Reply with quote
GaidinBDJ
Wanderer


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

PostPosted: Wed Jun 22, 2005 6:05 pm   
 
Got another question.

Is there a way to capture ansi along with text. The condition in the end has different colors for the same text string for different qualities. I didn't create the trigger with the "color" option to begin with, and I'm not really sure how to set it after the fact. I actually don't need all the values, just that one bit of text. Any help would be appreciated.
_________________
Barry
Gaidin @ 3k.org
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