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
casethekid
Newbie


Joined: 13 Feb 2003
Posts: 2
Location: USA

PostPosted: Fri Mar 21, 2003 5:56 pm   

Channel Trigger
 
I want to do what everyone else is too..get channels to separate. The problem I am running into, is that the channels all don't have a specific name. The only thing that they do have is symbols like << <{ and such. I can't seem to figure out how to separate those from the brackets for the code..any help would be appreciated


Conquering another requires force; Conquering one's self requires strength
-Lao Tzu
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Mar 21, 2003 6:21 pm   
 
Post examples of real mud out put?

Ideas for fictious patterns:
<<Chat>> Blah: Blah blah
#TRIGGER {~<~<(%w)} {#CAP %1}

<{GOSSIP}> Blah blah
#TRIGGER {~<~{(%w)} {#CAP %1}

Ton Diening
Reply with quote
casethekid
Newbie


Joined: 13 Feb 2003
Posts: 2
Location: USA

PostPosted: Fri Mar 21, 2003 6:41 pm   
 
ok, here's some of real mud output.
<<vamp channel>> hello
<{Lich channel}> hi :)
[flame channel] you guys are all lame


basically it's all defined by the brackets..

And...would this be put into the class, Aliases or triggers area?




Conquering another requires force; Conquering one's self requires strength
-Lao Tzu
Reply with quote
Duindain
Novice


Joined: 14 Feb 2003
Posts: 31
Location: Perth, Australia

PostPosted: Sat Mar 22, 2003 3:39 pm   
 
this is the first time ive tried to help someone on this so might be wrong heh but anyway if u want output into diff windows
pattern ~<~<vamp channel~>~> %1
value #window vamp %1

pattern ~<~{Lich channel~}~> %1
value #window Lich %1
or u can use the #capture one to get channel txt u can keep all in one window by keeping wondow command same name if u want u can make it easier by
pattern ~<~{(%w) channel~}~> %2
value #window %1 %2
but if ur muds is all diff bracket infront of channels might not be worth it
all these examples r triggers hope it works
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Mar 22, 2003 5:01 pm   
 
Actually, we recommend AGAINST using %1, %2, etc. in the PATTERN of a trigger. Instead, use the various wildcards (such as *, %w, %d, etc.) to represent portions of the pattern which may change and place parentheses () around the parts of the pattern which will be used in the commands (value) section of the trigger. This actually provides greater flexibility, since wildcards can be substituted for portions of the pattern which won't be used in the trigger's commands while the parts which will be used in the commands can include specific text if desired.

Many of the non-alphanumeric characters have special meanings to zMUD, and therefore must be preceded by the ~ when you want to use them as actual characters. The ~ instructs zMUD not to parse the next character.

#CAPTURE is simpler than #WINDOW, and probably better suited for this purpose. It will capture the entire line (including the MUD's color output) which causes the trigger to fire.
Samples
For command line input:
#TR {^~<~<vamp channel~>~>} {#CAP Vamp}
#TR {^~<~{Lich channel~}~>} {#CAP Lich}

For Editor input:
Pattern: ^~[flame channel~]
Value: #CAP Flame

These are all triggers.

LightBulb
Advanced Member
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