|  | 
	
	
		| Adelante Beginner
 
 
 Joined: 01 Feb 2005
 Posts: 10
 
 
 | 
			
			  |  Posted: Sat Feb 05, 2005 2:22 am 
 Channel logging.
 
 |  
				| Okey, anyone know why this won't work? 
 #tr {(*) tells the CLAN:} {#cap clantells}
 
 
 Is there another way to save chat log?
 |  | 
	
	  |  | 
	
		|  | 
	
		| jessew Apprentice
 
 
 Joined: 03 Mar 2003
 Posts: 141
 
 
 | 
			
			  |  Posted: Sat Feb 05, 2005 7:33 am 
 |  
				| That should work (capture the line it just fired on and put it in a window called clantells), most likely your trigger is incorrect and is not firing. Can you post an exact example of a clan talk on your mud?
 |  | 
	
	  | 
		    
			  | _________________ I love deadlines. I like the whooshing sound they make as they fly by.
 |   |  | 
	
		|  | 
	
		| Full Throttle Wanderer
 
 
 Joined: 07 Dec 2004
 Posts: 65
 
 
 | 
			
			  |  Posted: Sat Feb 05, 2005 8:26 am 
 |  
				| 
 
	  | Adelante wrote: |  
	  | Is there another way to save chat log? |  
 Here is my channel logging script as an example. It shows the message time stamp - useful if you are AFK a lot.
 
 
 
 
	  | Code: |  
	  | #alias {capon} {#clr Public #window Public %concat(%ansi(5)Public Channels,%cr)}
 
 #alias {capoff} {#close Public}
 
 #trigger {^(%w) gossips-- '(*)'} {#if (%window(Public)=1) {#window Public %concat(%ansi(6)G %ansi(7),%time(hh:nn),%ansi(4) %1 %ansi(6)%char(34)%trim(" %2 ")%char(34))}}
 
 #trigger {^(%w) auctions-- '(*)'} {#if (%window(Public)=1) {#window Public %concat(%ansi(2)A %ansi(7),%time(hh:nn),%ansi(4) %1 %ansi(2)%char(34)%trim(" %2 ")%char(34))}}
 
 #trigger {^You gossip-- '(*)'} {#if (%window(Public)=1) {#window Public %concat(%ansi(6)G %ansi(7),%time(hh:nn),%ansi(4) @character %ansi(6)%char(34)%trim(" %1 ")%char(34))}}
 
 #trigger {^You auction-- '(*)'} {#if (%window(Public)=1) {#window Public %concat(%ansi(2)A %ansi(7),%time(hh:nn),%ansi(4) @character %ansi(2)%char(34)%trim(" %1 ")%char(34))}}
 
 note: @character is my character name, use %char if you use that instead
 |  
 Example Input:
 
 Deekin gossips-- 'hello mud'
 You gossip-- 'morning, Deekin :)'
 Aribeth auctions-- 'wts diamond plate armor'
 
 Example Output:
 
 Public Channels
 
 G 07:00 Deekin "hello mud"
 G 07:00 Adelante "morning, Deekin :)"
 A 07:00 Aribeth "wts diamond plate armor"
 |  | 
	
	  |  | 
	
		|  | 
	
		| Adelante Beginner
 
 
 Joined: 01 Feb 2005
 Posts: 10
 
 
 | 
			
			  |  Posted: Sat Feb 05, 2005 1:17 pm 
 |  
				| Okey, so here is a Full capture from Clan. 
 Thirstan (Corundum) tells the CLAN: 'Hi'
 
 I get the tab called clantells and everything using this #tr {(*) tells the CLAN:} {#cap clantells}
 altho it's empty. Heh..that's no log to me :D
 |  | 
	
	  |  | 
	
		|  | 
	
		| Adelante Beginner
 
 
 Joined: 01 Feb 2005
 Posts: 10
 
 
 | 
			
			  |  Posted: Sat Feb 05, 2005 2:11 pm 
 |  
				| Okey, got it to work... The right trigger should be:
 
 #tr {(*) (%1) tells the CLAN:} {#cap clanlog}
 |  | 
	
	  |  | 
	
		|  | 
	
		| MattLofton GURU
 
 
 Joined: 23 Dec 2000
 Posts: 4834
 Location: USA
 
 | 
			
			  |  Posted: Sat Feb 05, 2005 3:28 pm 
 |  
				| Actually, that's not the right trigger.  You should only use the defined wildcards in your pattern, and %1 is a system variable.  Using it in your pattern is going to result in somewhat unpredictable or unintended results.  Also, parentheses are special characters used to capture wildcard portions of a pattern match.  If they come from the mud and you want to match on them, use the quote character: 
 #trigger {(*) ~((%w)~) tells the CLAN: '*'} {}
 |  | 
	
	  | 
		    
			  | _________________ EDIT: I didn't like my old signature
 |   |  | 
	
		|  | 
	
		| LightBulb MASTER
 
 
 Joined: 28 Nov 2000
 Posts: 4817
 Location: USA
 
 | 
			
			  |  Posted: Sat Feb 05, 2005 3:40 pm 
 |  
				| Actually, you could use a simpler pattern. Both * and %1 match anything, so they aren't needed at the beginning or end of a trigger Pattern unless the portion of the line they match will be used in the trigger's Value (its commands). You don't use them so they aren't needed: 
 
	  | Code: |  
	  | #TR { tells the CLAN:} {#CAP clanlog} |  We really don't recommend ever using %1 in trigger patterns and this is a prime example of why. Enclosing portions of the trigger pattern in parentheses makes them available to the trigger value as numbered parameters, from %1 to %99, with the numbers normally being assigned by the order they appear in the pattern. However, in your pattern (*) SHOULD become %1 in the pattern and (%1) SHOULD become %2, so you are likely to cause errors by having %1 come SECOND!
 |  | 
	
	  | 
		    
			  | _________________ LightBulb
 Senior member
 
 Most scripts in this forum are written for Command Line entry.
 Don't even open the Settings Editor unless its use is specified or obvious.
 |   |  | 
	
		|  | 
	
		| Adelante Beginner
 
 
 Joined: 01 Feb 2005
 Posts: 10
 
 
 | 
			
			  |  Posted: Sat Feb 05, 2005 10:36 pm 
 |  
				| Ahh...tis working. But, can i save it into a .txt file instead of having it in another 'window' ? 
 And only to a specific channel. Like say, the clan channel again for example. ?
 |  | 
	
	  |  | 
	
		|  | 
	
		| jessew Apprentice
 
 
 Joined: 03 Mar 2003
 Posts: 141
 
 
 | 
			
			  |  Posted: Sun Feb 06, 2005 7:06 am 
 |  
				| You can do something like 
 #TR {(*tells the CLAN:*)} {#FILE 1 clanlog.txt;#WRITE 1 %1;#close 1}
 |  | 
	
	  | 
		    
			  | _________________ I love deadlines. I like the whooshing sound they make as they fly by.
 |   |  | 
	
		|  | 
	
		|  | 
	
		|  |