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

Joined: 18 Mar 2007
Posts: 39

PostPosted: Tue Dec 22, 2009 8:21 pm   

Capture all colors? ... and speed walk issue
I have a series of triggers to capture all text into a variable, but im wondering if there is a way to also store the color codes so i dont have to manually color them in with a load of triggers once i display the variable again?

As for speedwalk, if i set one off and i click on my capture windows it sends the rest of the speed walk in one to the mud and it messes up, im not sure if this is a setting ive put in wrong, or if this is a known issue anyone know?

                                                        SW     S     SE


<1276hp 1333sp 995st> +0hp +0sp -1st

 The Forest Road                                        NW     N     NE
(-------------------------------------------------)     W <---(M)---> E

For example.
Reply with quote

Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Tue Dec 22, 2009 8:37 pm   
For the color issue, it's simple if you're using the latest beta. There's a function called %colorsyntax that allows you to convert ansi codes into colorcodes defined by your MUD, as defined by you in the Ansi tab under preferences.

The problem is, you'll probably want to create a function to change all the escape codes into the colorsyntax equivalent so that you preserve spacing. Otherwise, it'll do %colorsyntax(%e[37mTesting %e[36msomething) and instead of coming out @DTesting @wsomething, it'll come out as @DTesting@wsomething.

As for the second issue, I don't know what you're talking about...

Reply with quote

Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Dec 22, 2009 9:08 pm   
For the second problem, tell me if I am understanding you correctly. It sounds like you are typing into your main window,
you initiate a speedwalk (presumably in Safe or Slow mode), it execute one move, you click in the capture window, and all
the rest of the speedwalk gets sent to the mud at once. Is that correct?

The first thing I would check is the settings on your capture window. Click on Settings to open the Package Editor. In the
Package Editor, highlight the capture window. Make sure that the window does NOT have a checkmark on "Command Line",
and the radio button is set to "No Network Connection".
Reply with quote

Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Dec 22, 2009 10:11 pm   
Since he's not using the beta, he'll just have to use ANSI triggers. Anything that gets captured into a %1...%99 variable will contain ansi codes if present. Any difficulties will come in trying to get the pattern right, because ansi codes will now be part of the matched line (so ^[%w%s] that worked without ansi will no longer match).

For example, let's say our line is "This line is red."

This trigger will match regardless of the line color:

#trigger {This line is (%w).} {#print %1}

However, as an ansi trigger, the above pattern doesn't match because the word red is preceded by the ansi color code for the color red (%e[0;31;40m). Therefore, the pattern has to be like so:

#trigger {This line is (%e[0;31;40m%w).} {#print %1}

You don't need to literally enter every particular ansi code, but you do need to use something to match them (ie, "[%e~[%d;m]") or else the pattern won't match.
EDIT: I didn't like my old signature
Reply with quote

Joined: 18 Mar 2007
Posts: 39

PostPosted: Tue Dec 22, 2009 10:16 pm   
Thank you :X

Still having the issues with the speedwalk and selecting a capture window, i have every single option unchecked on them apart from the visable window one now.
Reply with quote

Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Dec 23, 2009 1:26 pm   
Can you describe more precisely what you are doing and what happens when you speedwalk?
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