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


Joined: 06 Jul 2002
Posts: 7

PostPosted: Mon Aug 12, 2002 7:24 pm   

Multi-line troubles
 
I've been trying to set up a trigger to capture multi-line strings from the mud to a anothe window, and after scanning forums and trying a few things, im about at my wits end.

Here is a sample string that i want to be able to capture.

Bob>
a dire wolf yells 'Bob! Now you die!'

Im not sure if i should capture the Bob> part as well or not, but I would like to at least capture the second line.

thanks in advance for any help you might have.
Reply with quote
LEit
Novice


Joined: 27 Jul 2002
Posts: 38
Location: USA

PostPosted: Mon Aug 12, 2002 7:57 pm   
 
If the line always breaks at the end of Bob> you can match on:

Bob~>$a dire wolf yells ~'Bob~! Now you die~!~'

If it breaks at random parts of the line I think you're out of luck
Reply with quote
Sinema
Beginner


Joined: 14 Nov 2001
Posts: 27
Location: USA

PostPosted: Mon Aug 12, 2002 9:07 pm   
 
What if the line reads like this

(Acorn): Someone says, "Whatever?"

I use this for the trigger and capture window.. and it works

Trigger on Acorn
#WINDOW Acorn %trigger
#GAG

That captures 1 line but if it goes over I see it in the main window..

Also how do I stop the scroll of the #GAG lines?

is there a way to get rid of those?

~
Regards,

Sinema
Reply with quote
horks
Apprentice


Joined: 20 Jul 2001
Posts: 127
Location: USA

PostPosted: Mon Aug 12, 2002 10:17 pm   
 
Hmm, I'm not sure what you mean by "stop the scroll of the #GAG lines" Here is my trigger for capturing multi-lined chatlines .. it might work for you, and I am sure there is a better way to do it too ...

#TRIG {tells you} {#CAP {tells};#GAG}
#COND {^(%s)} {#CAP {tells};#GAG} {Dur|Param=1000}

OH! in order for this trigger to work, the second (or third, or fourth) line you are trying to match HAS TO start with some blank space (if it doesn't have blank space, then you have to come up with another way to define it as the same tell)

Also, I say there is a better way to do this, because this way isn't all that great of a solution. The problem comes when you have a slow connection. Since I'm using the 'duration' type state, the message has to be caputred in the designated time (i chose 1000 ms) if you find that the trigger is resetting before the entire message is captured, then turn up the duration. But remember that it will not capture a second message while it's in the duration time of a prior message.

Father Horks
The only problem with computer security, is when you think it exists.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Aug 13, 2002 12:01 am   
 
quote:

Hmm, I'm not sure what you mean by "stop the scroll of the #GAG lines"



I left a post in the Beta Forum that might better explain it, but in essence #GAG is limited to one line while non-prompt MUD output can only be 2 lines at minimum (one line of text and a blank line). In the case of apparent one-line MUD output, this means that #GAG never even sees the blank line and thus doesn't get rid of it. This will punch holes in the display buffer and make it hard to grasp the activity going on.

li'l shmoe of Dragon's Gate MUD
Reply with quote
LEit
Novice


Joined: 27 Jul 2002
Posts: 38
Location: USA

PostPosted: Tue Aug 13, 2002 2:52 pm   
 
There is an argument to #GAG that will gag more then one line, try #GAG 2
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Aug 13, 2002 7:00 pm   
 
I don't #GAG anything. When I capture lines to other windows, whether it's for ease of reading, highlighting essential information, or providing a record for things I might otherwise miss from battlescroll, I leave them in the main window also. They don't really take up that much room that there's any need to #GAG them.

LightBulb
Senior Member
Reply with quote
horks
Apprentice


Joined: 20 Jul 2001
Posts: 127
Location: USA

PostPosted: Tue Aug 13, 2002 7:41 pm   
 
Lightbulb is right, it doesn't take up too much space, and if (for some reason) your script gags out the wrong thing, it could be bad ...

... BUT if you still want to do it, try doing two #GAG commands in the same trigger, maybe that will work?

#GAG;#GAG

Father Horks
The only problem with computer security, is when you think it exists.
Reply with quote
Sinema
Beginner


Joined: 14 Nov 2001
Posts: 27
Location: USA

PostPosted: Thu Aug 15, 2002 5:15 am   
 
Hi,

I posted earlier on this topic but I think I mistyped the question.. and the problem..

Here is the problem..

in Achaea you have Guild Novice Tells, Guild Tells, Shouts.. Regular Tells.. and much more..

Basically, the Guild Novice Tells and Guild Tells are used for chatting and your not really allowed to turn them on so when a group gets into a deep conversation .. the people suffer with mass spam..

What I'm looking for help on is a Mult-Line Guild Novice Tell ( GNT ) and Guild tell ( GT ) catcher..

I made the above post Trigger but it seems not to work..

I have been trying to figure something that Removes the Text From the Main window.. and moves it to its own Private Window..

I have tried every which way .. but have been unable to do it.. and the above suggestions are great! but have not worked for me...

Here is some of the Text that is seen ..

(Druids): Druid says, "Testing here."
(Acorn): Acorn says, "Take care, acorns."

Now It doesn't work like the Help File shows.. since the Text is in ( )'s ..and in the above format..

I read the helpfile first.. and read past posts but I can't seem to get it to catch the above style..

I'm a novice at this stuff.. but learn as I go..



~
Regards,

Sinema
Reply with quote
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Thu Aug 15, 2002 6:17 am   
 
I no longer have my exact scripts, but this is how I handled this...

trigger on ^~((%w)~): (*)

use the commands to set a variable to %1, then turn on a capture class, which causes everything to be captured, put a trigger on your prompt line to turn the capture class off again.

Maybe tomorrow I'll have time to reconstruct my script. If so, I'll post it for you.

AzCowboy
Reply with quote
Sinema
Beginner


Joined: 14 Nov 2001
Posts: 27
Location: USA

PostPosted: Fri Aug 16, 2002 11:47 pm   
 
Thanks Az!

that worked.. Have not been able to see if it catches Mult-Lines.. but it catches all the (Things) and sends them to their own window!



~
Regards,

Sinema
Reply with quote
Sinema
Beginner


Joined: 14 Nov 2001
Posts: 27
Location: USA

PostPosted: Sat Aug 17, 2002 2:02 am   
 
*Dance*

Getting there and sooo close..

on Trigger ^~((%w)~): (*)

This is what I use
#WINDOW Tells %trigger
#GAG -1
#GAG

I read Rainchilds Tell Window script and it had a lot of %'s .. $'s .. all over.. I could not make head or tells

Now I'm just trying to get it to catch more then one line... and I tried to make the Tells indent when they come in.. but I could not get that feature of Word Wrap to work

~
Regards,

Sinema
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Aug 17, 2002 9:05 am   
 
Just thought I'd mention...
I created a character in Achaea and (as I expected) you can turn off Guild Novice Tells and Guild Tells. The commands are "gntoff" and "gtoff". Your guild leaders may frown on this, but the commands exist for the very purpose of giving you a means to eliminate the channels when you can't spare the time to pay attention to them. There are similar commands for the other channels.

LightBulb
Senior Member
Reply with quote
Sinema
Beginner


Joined: 14 Nov 2001
Posts: 27
Location: USA

PostPosted: Sat Aug 17, 2002 10:32 am   
 
True

We are not allowed to turn them off so we have to figure out other means of refocusing them to other windows..

~
Regards,

Sinema
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