Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
atcbdEjp
Newbie


Joined: 05 Dec 2001
Posts: 4

PostPosted: Tue Dec 18, 2001 7:07 am   

nocr and ptompt options for triggers
 
I'm a little confused does nocr mean that the trigger WON"T be tested on any line that doesn't end in a CR?

does prompt mean it's only tested when a prompt is recive?


I hope one of these can prodive with a problem I had

I made GAG trigger for excess info that I NORMALY don't want but sometimes do, so here what I did:

made triggers and put them in class gag;

then I made alias for times I WANT the info like this:

#T- gag
<command>
#+ gag


but with re-enabling it , it goes back and gags it
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Tue Dec 18, 2001 8:32 am   
 
nocr means it will test on a line that doesnt end in a CR.
prompt means same as nocr.

when you want the feedback from a particular command not gagged, try this:

#t- gag
<command>
#wait
#t+ gag

Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Dec 18, 2001 1:39 pm   
 
Actually, nocr and prompt are different.

The nocr option specifies whether zMUD will check for a match on a line after a CR is received. If the option is not set, zMUD will not check for matching tirggers when a CR is received. If it is set, it will.

The prompt option specifies whether zMUD will check for a match with some pattern when a buffer of text is received. The MUD sens text to zMUD in chunks of text and zMUD receives MUD outpout in these chunks. When zMUD receives one of these chunks and the prompt option is checked, it tests to see if anything in the buffer of text recieved matches the trigger. The catch is, that these buffers of text do not necessarily have to contain a CR (just like when the MUD sends your prompt) and hence you can match trigger patterns "on the fly" instead of waiting for a CR to appear.

If both the newline and prompt options are unchecked (that is nocr is set, and prompt is not) the trigger won't ever fire. In reality, for this to happen, the Trigger on Line Color option must also be unchecked, but this option is not part of this discussion.

Kjata
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Dec 18, 2001 3:23 pm   
 
Actually, the nocr option works the other way around. If the option is not set, zMUD will not check for matching triggers when a CR is received. If it is set, it will won't. Nocr turns off (disables) the "trigger on newline" option of the trigger editor.

Nocr is a command line option, trigger on newline is an editor option. They are opposites.


LightBulb
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Dec 19, 2001 4:49 pm   
 
Yeah, you're right. I was talking about nocr and looking at Trigger on Newline while writing that reply. Thanks for catching that.

Kjata
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net