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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Neuro
Beginner


Joined: 22 Feb 2007
Posts: 19

PostPosted: Fri Feb 15, 2008 5:40 am   

Help with #CAP
 
So I'm fairly new to scripting in CMUD. Actually, I never really managed to do much in ZMUD as well.

I'm not asking for an exact "THIS IS HOW YOU DO IT" response, but maybe some key terms to look in to.

I want to #CAPTURE tells from the main window, and display in a new. I know how that works:

Code:
#trigger {^(%w) tells you} {COLOR 15;#CAP Tells;#GAG}


What I want to learn how to do is, take that information and display it differently. Like.. instead of:

Soandso tells you 'hi!'

Soandso: hi

What should I look into, to accomplish that?

Oh, and another quick question..

By gagging my tells from the main window, when I capture them to the TELL window.. even though it gags, it still shows a line break.. like..


<Entei> <1549:1549> <1113:1183> <YHT> <$2,820,262>

<Entei> <1549:1549> <1113:1183> <YHT> <$2,820,262>

<Entei> <1549:1549> <1113:1183> <YHT> <$2,820,262>

Would display if I received three tells (dumb example).

Anyways, thanks for any help I may receive!
Reply with quote
Neuro
Beginner


Joined: 22 Feb 2007
Posts: 19

PostPosted: Fri Feb 15, 2008 5:56 am   
 
Oh, it appears that this thread would do something similar, but for ZMUD.. because I tried it in CMUD and it definitely didn't capture right.

http://forums.zuggsoft.com/forums/viewtopic.php?t=27527
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri Feb 15, 2008 7:35 am   
 
That thread you posted is a good start. Take a look at the #WIN command. You can do something similar to this:

#TRIGGER {(%w) tells you '(*)'} {#WIN tells %1: %2}

That's just a rough example, but gives you a starting point.

Charneus
Reply with quote
Neuro
Beginner


Joined: 22 Feb 2007
Posts: 19

PostPosted: Fri Feb 15, 2008 7:39 am   
 
Ahhh, beautiful man! You pushed me in the right direction. Much thanks!
Reply with quote
Surma
Newbie


Joined: 18 Jan 2008
Posts: 3

PostPosted: Fri Feb 15, 2008 5:05 pm   
 
Also, #GAG can block multiple lines, not just the one right after the trigger. So for example, if you had
blah tells you: stuff

prompt>

you could use #gag 3 to disregard three lines including the line that triggered the trigger. You may have to play around with the number to get it to the correct length though.
Reply with quote
Caldur0
Newbie


Joined: 12 Feb 2008
Posts: 5

PostPosted: Sat Feb 16, 2008 6:28 am   
 
An easier method to gag multiple lines is with #gagblock.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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