  | 
	
	
	
		Trin Newbie
 
  Joined: 05 Dec 2004 Posts: 9
 
  | 
		
		  
			
			   Posted: Wed Dec 08, 2004 4:17 am   
  Damage Counter   | 
			 
			
				#TRIGGER {You * (%d) time[s, ]with (%x) (%w)!$} {#ADD @CharName %item( @DamVals, %ismember( "%1", @DamWords));#ADDITEM PlayerFighters @CharName;#COL 3}
 
 
okay what this trigger does is adds the damage done by myself to a variable that my char name is called, I have another alias that reports the damaeg and then removes the variable, but what I want it to do is count the numbre of hits,(%d) is the number of hits :p, but I want it to be in a variable close to @charname, is there anyway to put 2 vars into one variable with still using the #ADD function for both variablse? | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		Vijilante SubAdmin
  
  Joined: 18 Nov 2001 Posts: 5187
 
  | 
		
		  
			
			   Posted: Wed Dec 08, 2004 10:22 am      | 
			 
			
				The #ADD command only works with a basic numeric variable.  In order to combine the 2 sets of data into a single variable you would have to use a list or record, and #ADD won't work with them.  You would have to do a few more manipulations and use the %eval function.
  | 
			 
		  | 
	
	
	  
		  
		    
			  _________________ The only good questions are the ones we have never answered before.
 
Search the Forums | 
			       | 
			 
		   
		 | 
	
	
		  | 
	
	
		nexela Wizard
  
  Joined: 15 Jan 2002 Posts: 1644 Location: USA
  | 
		
		  
			
			   Posted: Wed Dec 08, 2004 1:19 pm      | 
			 
			
				Actually You can use #ADD with a record variable you just have to format it like %rec.key. I wrote a a how-to article for using record variables but never got around to adding it into the KB however doing a search for HOW-TO it should come up
 
 
syntax:
 
#ADD charname.varone 1 | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		Trin Newbie
 
  Joined: 05 Dec 2004 Posts: 9
 
  | 
		
		  
			
			   Posted: Sat Dec 11, 2004 3:27 am      | 
			 
			
				Thanks for the info, helped ALOT
 
 
I made an alias to report the damage but when I report it ONE variable gets messed up and is screwing with everything else
 
 
#ADD DamTotal {@(%i.damage)}
 
#ADD DamTotal {@{%i.damage}}
 
#ADD DamTotal {@%i.damage}
 
#ADD DamTotal @(%i.damage
 
 
Ive tried practically everything, but when it calls for the %i.damage (%i being the players name), it only brings @%i to DamTotal and makes the variable like this:
 
 
#VAR Damtotal {0Damage=17002|Hit=48}
 
 
I want it just to add the damage Number, not add everything | 
			 
		  | 
	
	
	  | 
		  
		 | 
	
	
		  | 
	
	
		| 
		
		 | 
	
	
		 |