  | 
	
	
	
		snatch.xx Beginner
 
  Joined: 09 Jun 2007 Posts: 19
 
  | 
		
		  
			
			   Posted: Sat Apr 19, 2008 3:25 am   
  Whats wrong with this trigger?   | 
			 
			
				I am trying to set up some gauges off this HP bar
 
 
HP:492/534 SP:336/336 ST:100 HE:8 NU:0 CP:1/1 HT:1 
 
 GR:59 E:Guard ST:Death GXP:59.789 AM:0 JJ: LL:
 
 
I have to do one for each line correct? And here is what I tried
 
 
HP: (\d+)/(\d+) SP: (\d+)/(\d+) ST: (\d+) HE: (\d+) NU: (\d+) CP: (\d+)/(\d+) HT: (\d+)
 
 
GR: (\d+) E: (\d+) ST: (\d+) GXP: {{Don't know how to do the decimal point right}} AM: (\d+) JJ: (\d+) LL: (\d+)
 
 
I am not picking up the values when my hp bar goes off so I have something wrong but I am not sure what it is if someone could help please.
 
 
Thanks | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		charneus Wizard
  
  Joined: 19 Jun 2005 Posts: 1876 Location: California
  | 
		
		  
			
			   Posted: Sat Apr 19, 2008 3:39 am      | 
			 
			
				Not sure this is it, but you have spaces between the colon and digits. For example, you show:
 
 
HP:326/326
 
 
But your trigger is trying to capture
 
 
HP: 326/326
 
 
See the difference?
 
 
Charneus | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		Zhiroc Adept
 
  Joined: 04 Feb 2005 Posts: 246
 
  | 
		
		  
			
			   Posted: Sat Apr 19, 2008 4:22 am      | 
			 
			
				Yes, that for one. The second RE has more problems, like trying to match non-digits with \d, and JJ: and LL: need not be followed by a number. Try:
 
 
	  | Code: | 
	 
	
	  HP:(\d+)/(\d+) SP:(\d+)/(\d+) ST:(\d+) HE:(\d+) NU:(\d+) CP:(\d+)/(\d+) HT:(\d+)
 
GR:(\d+) E:(\w+) ST:(\w+) GXP:([\d.]+) AM:(\d+) JJ:(\d*) LL:(\d*) | 
	 
 
 
I'm presuming that E: and ST: are followed by single words, and that when JJ and LL have text following them, they are numbers. | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		snatch.xx Beginner
 
  Joined: 09 Jun 2007 Posts: 19
 
  | 
		
		  
			
			   Posted: Sat Apr 19, 2008 4:35 am      | 
			 
			
				Ok still having problems ok just with line one for a sec
 
 
{COPIED FROM MUD}
 
 
HP:424/534 SP:336/336 ST:47 HE:8 NU:0 CP:2/2 HT:0
 
 
{COPIED FROM EDITOR}
 
 
HP:(\d+)/(\d+) SP:(\d+)/(\d+) ST:(\d+) HE:(\d+) NU:(\d+) CP:(\d+)/(\d+) HT:(\d+)
 
 
This is what I have set for the first line 
 
#1 not returning values
 
#2 I put in #gag command and its not getting gaged ither
 
 
No spaces or special characters at the start of the line or anything
 
 
As for line 2 (E:) is enemy and can be a random ammount of words (ST:) is always 1 word and JJ:/LL: I actually dont have those 2 powers yet but I am pretty sure thier numeric | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		gamma_ray Magician
 
  Joined: 17 Apr 2005 Posts: 496
 
  | 
		
		  
			
			   Posted: Sat Apr 19, 2008 12:53 pm      | 
			 
			
				Are you sure you've got regex ticked in the trigger options panel? Also, try fooling around with selecting trigger on prompt instead of trigger on newline (but not both at once) sometimes it helps for prompt triggers.
  | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		snatch.xx Beginner
 
  Joined: 09 Jun 2007 Posts: 19
 
  | 
		
		  
			
			   Posted: Sat Apr 19, 2008 3:48 pm      | 
			 
			
				Ok still having no luck I reconfigured my hpbar to be consolidated to 1 line vs. 2 maby we can get it to work from here
 
 
MUD SAMPLE -
 
 
Hp:501/534 Sp:336/336 Stim:50 Heat:8 Nuke:0 Clan:1 Reset:63 Gxp:87.904 Hits:1 Ammo:0 E:Baby Chinchilla Status:Death
 
 
*Now for some reason when I cut and paste from CMUD to the package editor I get a $ after death (Status:Death$)
 
 
After searching tons of ideas I tried many setups but still not having any luck this is what I have at the moment
 
 
FROM EDITOR - 
 
 
Hp:(\d+)/(\d+) Sp:(\d+)/(\d+) Stim:(\d+) Heat:(\d+) Nuke:(\d+) Clan:(\d+) Reset:(\d+) Gxp:(\d)+.(\d)+\%  Hits:(\d+) Ammo:(\d+) E: (?:(\w*)|(\w*)\s(\w*)|(\w*)\s(\w*)\s(\w*)) Status:(\w*)$
 
 
I have regex checked and tried triggering off promt etc.. hopefully someone can figure it out from here | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		Dharkael Enchanter
  
  Joined: 05 Mar 2003 Posts: 593 Location: Canada
  | 
		
		  
			
			   Posted: Sat Apr 19, 2008 4:24 pm      | 
			 
			
				Orig
 
 
	  | Quote: | 
	 
	
	  | Hp:(\d+)/(\d+) Sp:(\d+)/(\d+) Stim:(\d+) Heat:(\d+) Nuke:(\d+) Clan:(\d+) Reset:(\d+) Gxp:(\d)+.(\d)+\% Hits:(\d+) Ammo:(\d+) E: (?:(\w*)|(\w*)\s(\w*)|(\w*)\s(\w*)\s(\w*)) Status:(\w*)$ | 
	 
 
 
Revised
 
 
	  | Quote: | 
	 
	
	  | Hp:(\d+)/(\d+) Sp:(\d+)/(\d+) Stim:(\d+) Heat:(\d+) Nuke:(\d+) Clan:(\d+) Reset:(\d+) Gxp:(\d)+\.(\d)+ Hits:(\d+) Ammo:(\d+) E:(?:(\w*)|(\w*)\s(\w*)|(\w*)\s(\w*)\s(\w*)) Status:(\w*)$ | 
	 
 
 
You added an extra percent sign that didn't appear anywhere in the text, and you also forgot to escape the period in the patterrn  for  capturing your float.
 
 
Alternate
 
 
	  | Quote: | 
	 
	
	  | ^Hp:(\d+)/(\d+) Sp:(\d+)/(\d+) Stim:(\d+) Heat:(\d+) Nuke:(\d+) Clan:(\d+) Reset:(\d+) Gxp:(\d*\.?\d+) Hits:(\d+) Ammo:(\d+) E:(.*) Status:(\w+)$ | 
	 
 
 | 
			 
		  | 
	
	
	  
		  
		    
			  _________________ -Dharkael-
 
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style." | 
			       | 
			 
		   
		 | 
	
	
		  | 
	
	
		snatch.xx Beginner
 
  Joined: 09 Jun 2007 Posts: 19
 
  | 
		
		  
			
			   Posted: Sat Apr 19, 2008 5:48 pm      | 
			 
			
				Thanks Dharkael I appreiciate it that fixed it.
 
 
I do have one more question to fix an in/out of combat problem. From in combat to out of combat my hpbar is changing.
 
 
In combat
 
 
Hp:433/534 Sp:336/336 Stim:100 Heat:12 Nuke:0 Clan:1 Reset:94 Gxp:11.665 Hits:1 Ammo:0 E:Baby Chinchilla Status:bruises
 
 
Out Combat
 
 
Hp:534/534 Sp:336/336 Stim:100 Heat:0 Nuke:0 Clan:1 Reset:4 Gxp:12.749 Hits:0 Ammo:0  Status:
 
 
So with E:xoxo removed completely when out of combat I need something like
 
 
(?: E:(.*)) ... but this does not work and thats because the E: is not even there anymore right? | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		Dharkael Enchanter
  
  Joined: 05 Mar 2003 Posts: 593 Location: Canada
  | 
		
		  
			
			   Posted: Sat Apr 19, 2008 6:07 pm      | 
			 
			
				
 
	  | Quote: | 
	 
	
	  | Hp:(\d+)/(\d+) Sp:(\d+)/(\d+) Stim:(\d+) Heat:(\d+) Nuke:(\d+) Clan:(\d+) Reset:(\d+) Gxp:(\d)+\.(\d)+ Hits:(\d+) Ammo:(\d+) (?:E:(?:(\w*)|(\w*)\s(\w*)|(\w*)\s(\w*)\s(\w*)) )?Status:(\w*)$ | 
	 
 
 
You had the right idea enclosing the #E:.... part in the (?:) construct you just have to follow it with a ? so that whole part becomes optional  
 
	  | Quote: | 
	 
	
	  | (?:E:(?:(\w*)|(\w*)\s(\w*)|(\w*)\s(\w*)\s(\w*)) )? | 
	 
 
 | 
			 
		  | 
	
	
	  
		  
		    
			  _________________ -Dharkael-
 
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
  Last edited by Dharkael on Sat Apr 19, 2008 6:09 pm; edited 1 time in total | 
			       | 
			 
		   
		 | 
	
	
		  | 
	
	
		charneus Wizard
  
  Joined: 19 Jun 2005 Posts: 1876 Location: California
  | 
		
		  
			
			   Posted: Sat Apr 19, 2008 6:08 pm      | 
			 
			
				Edit: Ninja'd!
 
 
Put a ? after your expression. So it would read (?: E:(.*))?. I believe that will solve the problem.
 
 
Charneus | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		| 
		
		 | 
	
	
		 |