|  | 
	
	
		| Venka Beginner
 
 
 Joined: 02 Aug 2007
 Posts: 10
 
 
 | 
			
			  |  Posted: Thu Aug 02, 2007 8:41 am 
 logging level gains
 
 |  
				| Hi :) 
 I am hoping someone can assist. I want to be able to create a file that records my level gains. This is probably very easy but I don't even know where to start. The message I get from the mud/trigger is:
 
 ^Your gain is: (%d)/%d hp, (%d)/%d m, %d/%d mv %d/%d prac
 
 All I want to do is get the actual line put into a text file named venka_gains.txt
 
 The trigger works because I use it for changing into level gear but I can't figure out how to make it record in the text file.
 
 Any help or suggestions would be appreciiated.
 
 Venka
 |  | 
	
	  |  | 
	
		|  | 
	
		| Fang Xianfu GURU
 
  
 Joined: 26 Jan 2004
 Posts: 5155
 Location: United Kingdom
 
 | 
			
			  |  Posted: Thu Aug 02, 2007 10:09 am 
 |  
				| Take a look at the #file and #write commands. You'll want something like this: 
 #file 1 venka_gains.txt
 #write 1 {%time(yyyy-mm-dd hh:mm:ss) %line}
 |  | 
	
	  |  | 
	
		|  | 
	
		| Venka Beginner
 
 
 Joined: 02 Aug 2007
 Posts: 10
 
 
 | 
			
			  |  Posted: Thu Aug 02, 2007 11:28 am 
 |  
				| oh - thank you. I'll give this a try :) 
 |  | 
	
	  |  | 
	
		|  | 
	
		| Venka Beginner
 
 
 Joined: 02 Aug 2007
 Posts: 10
 
 
 | 
			
			  |  Posted: Sat Aug 04, 2007 9:52 pm 
 |  
				| Hi :) 
 Ok I tried this but it's not recording the actual gains. Here's what it is recording in the text file:
 
 2007-08-03 21:20:39 Opened venka_gains.txt as file 1
 2007-08-03 21:32:42 Opened venka_gains.txt as file 1
 2007-08-03 21:46:50 Opened venka_gains.txt as file 1
 
 I really need it to record this line:
 
 Your gain is: 14/178 hp, 1/111 m, 5/526 mv 5/5 prac
 
 My trigger is: ^Your gain is: (%d)/%d hp, (%d)/%d m, (%d)/%d mv (%d)/%d prac
 
 Sorry I am just not getting this :/
 |  | 
	
	  |  | 
	
		|  | 
	
		| nexela Wizard
 
  
 Joined: 15 Jan 2002
 Posts: 1644
 Location: USA
 
 | 
			
			  |  Posted: Sat Aug 04, 2007 10:09 pm 
 |  
				| change %line to %trigger that should clear it up :P 
 also you should use
 #CLOSE 1
 as the last line in the script
 
 #file 1 venka_gains.txt
 #write 1 {%time(yyyy-mm-dd hh:mm:ss) %trigger}
 #close 1
 |  | 
	
	  |  | 
	
		|  | 
	
		| Venka Beginner
 
 
 Joined: 02 Aug 2007
 Posts: 10
 
 
 | 
			
			  |  Posted: Sat Aug 04, 2007 10:22 pm 
 |  
				| ah ok - I'll try that. 
 Thanks!
 |  | 
	
	  |  | 
	
		|  | 
	
		|  | 
	
		|  |