|  | 
	
	
		| zema Wanderer
 
 
 Joined: 22 Jun 2005
 Posts: 79
 
 
 | 
			
			  |  Posted: Wed Jun 22, 2005 6:08 pm 
 question
 
 |  
				| #TRIGGER {^(%d) hps~|(%d) sp~|(%d)} {%1 = @hp;%2 = @sp;%3 = @mp} "" "prompt" #TRIGGER {^hp: (%d) sp: (%d) mp: (%d) {%1 = @hp;%2 = @sp;%3 = @mp}
 
 I am still fairly new too zmud i was wondering if you could explain the reason for this line of scripting cause i don't understand..i would appreate the explanation. :)
 |  | 
	
	  | 
		    
			  | _________________ There are 3 things i hate kids, animals, and women with attitudes..
 |   |  | 
	
		|  | 
	
		| DeReP Adept
 
 
 Joined: 14 Jun 2003
 Posts: 222
 Location: Chile
 
 | 
			
			  |  Posted: Wed Jun 22, 2005 6:16 pm 
 |  
				| 
 
	  | Code: |  
	  | #TRIGGER {^(%d) hps~|(%d) sp~|(%d)} {%1 = @hp;%2 = @sp;%3 = @mp} "" "prompt" #TRIGGER {^hp: (%d) sp: (%d) mp: (%d) {%1 = @hp;%2 = @sp;%3 = @mp}
 |  Basically what this does is store information from your prompt into variables: @hp, @sp, @mp
 So if you receive from the mud
 49 hps|50 sp|30
 the first trigger will fire and store those numbers into each variable
 If the prompt was
 hp: 49 sp:50 mp: 30
 It would do the same
 |  | 
	
	  |  | 
	
		|  | 
	
		| zema Wanderer
 
 
 Joined: 22 Jun 2005
 Posts: 79
 
 
 | 
			
			  |  Posted: Wed Jun 22, 2005 6:26 pm   question 
 |  
				| let me clarify i dont understand why the ^ (%d) hps~ if there is a helpfile that would help me with this i would appreate if ya posted it i may have over looked it. 
 |  | 
	
	  | 
		    
			  | _________________ There are 3 things i hate kids, animals, and women with attitudes..
 |   |  | 
	
		|  | 
	
		| GaidinBDJ Wanderer
 
 
 Joined: 15 Nov 2002
 Posts: 52
 Location: Las Vegas, Nevada
 
 | 
			
			  |  Posted: Wed Jun 22, 2005 6:48 pm 
 |  
				| You want "Special Characters" and "patterns" 
 The (%d) tell zMUD to match a number and keep the value for later use.
 The ~ is an escape character to tell zMUD that the next character is literal
 The ^ tell zMUD to only match the pattern at the beginning of the line.
 |  | 
	
	  | 
		    
			  | _________________ Barry
 Gaidin @ 3k.org
 |   |  | 
	
		|  | 
	
		|  | 
	
		|  |