|  | 
	
	
		| Guinn Wizard
 
 
 Joined: 03 Mar 2001
 Posts: 1127
 Location: London
 
 | 
			
			  |  Posted: Mon Jan 29, 2007 1:40 am 
 Newline trigger
 
 |  
				| I have a trigger that forces a newline after the mud prompt 
 Pattern is
 ^(%d) (%d) >
 
 Action is
 cHealth = %1;cMana = %2;#SHOW %cr
 
 All fairly straightforward.  I've set it to trigger on prompt rather than newline, and the majority of the time it works fine.
 
 Sometimes though I don't see the newline, I guess occasionally the mud strings a shout or tell etc right after the prompt.
 
 
 
 
	  | Quote: |  
	  | 5120 3062 > You feel a twinge of homesickness. You want to visit home.
 5120 3062 >
 meditate
 You begin meditating...
 5120 3207 >Merick shouts, "Quiet fool."
 You break out of your meditation.
 |  
 The inconsistency then messes up some other triggers that rely on strings starting on a newline (one of the things I try to stick to so that people can't spoof output)
 
 I don't want to use #SUB because that'd stop other triggers firing on output.
 
 Cheers
 |  | 
	
	  | 
		    
			  | _________________ CMUD Pro, Windows Vista x64
 Core2 Q6600, 4GB RAM, GeForce 8800GT
 Because you need it for text... ;)
 |   |  | 
	
		|  | 
	
		| Arminas Wizard
 
 
 Joined: 11 Jul 2002
 Posts: 1265
 Location: USA
 
 | 
			
			  |  Posted: Mon Jan 29, 2007 2:06 pm 
 |  
				| There are other things to try but, first try using #say instead of #show. #say executes faster and could be the fix you need. 
 |  | 
	
	  | 
		    
			  | _________________ Arminas, The Invisible horseman
 Windows 7 Pro 32 bit
 AMD 64 X2 2.51 Dual Core, 2 GB of Ram
 |   |  | 
	
		|  | 
	
		| Larkin Wizard
 
  
 Joined: 25 Mar 2003
 Posts: 1113
 Location: USA
 
 | 
			
			  |  Posted: Mon Jan 29, 2007 2:45 pm 
 |  
				| From what I recall, problems such as this occur with prompt triggers when the MUD sends a batch of text including multiple prompts as a single packet. The "middle" prompts don't have the GA/EOR codes when this sort of batching happens, and zMUD/CMUD does not properly fire the trigger. I've tried setting both the newline and the prompt options in the triggers to make them fire on either/or, but it doesn't seem to work that way, either, probably because it then looks for both GA/EOR and CR/LF... 
 |  | 
	
	  |  | 
	
		|  | 
	
		| Guinn Wizard
 
 
 Joined: 03 Mar 2001
 Posts: 1127
 Location: London
 
 | 
			
			  |  Posted: Mon Jan 29, 2007 5:44 pm 
 |  
				| I've changed it to #SAY %cr;cHealth = %1;cMana = %2
 
 So it does the say before the variable assignments too.  But I thought CMUD would process a trigger before the next part of incoming text - hence the removal of the #PRIORITY command too?  Inclined to go with Larkin's explanation of weird output from the mud or weird handling by CMUD.
 Might flag it in the beta forum, see if Zugg knows for sure.
 
 Cheers both ;)
 |  | 
	
	  | 
		    
			  | _________________ CMUD Pro, Windows Vista x64
 Core2 Q6600, 4GB RAM, GeForce 8800GT
 Because you need it for text... ;)
 |   |  | 
	
		|  | 
	
		|  | 
	
		|  |