|
JoshJiggler Newbie
Joined: 12 Aug 2013 Posts: 2
|
Posted: Sun Aug 18, 2013 8:52 pm
Problems with color coding |
Ok, I've searched all over the web, and I haven't come across a reason why I'm unable to get my code to do what I would like. I'm new to cMUD and am seeing if I can even get it to do what I wish before I switch over to using it full time. So here's what I'm trying to accomplish...
A separate window for Tells, or in this case, Pages. The output should look like so...
------ CHARNAME ------
What's up?
This part I have down. Where I'm having issue is trying to get each line to display as a different color. I'm having zero luck with this. My code is set up like so...
Using the pattern (%w) pages: (*)
Under the general connection tab I have
Code: |
#CAPTURE Pages;#GAG |
I then go to the Pages tab and set up this.
Code: |
#GAG
#CW "under,italic,bold,#2C84E8"
#SAY ------ {%1} ------
#CW "white"
#PRINT {%2} |
What happens is it all prints in my Pages window as aqua, which is not a color I've set it up to do anywhere. It isn't even a forced color from the MUSH I'm attempting to use this with. I've checked and rechecked my syntax on the #CW lines, I've even attempted with #COLOR and with using 'blue' as opposed to the hex code. Where am I going wrong here? Is there a limitation regarding colors in captured windows? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Aug 19, 2013 12:01 am |
1)Commands in CMud are executed in sequential order
2)#CW only applies to trigger patterns
3)#SAY, #PRINT, #ECHO, and #WINDOW all use the Information Messages style as found in Style Properties (default is bright cyan)
Given these three items, this is how your trigger code executes:
1)the line "Word pages: this is a page" gets matched in the main window
2)this entire line gets sent to the Pages window
3)this line is removed from the main window
4)this line is removed from the Pages window
5)this line is colored as RGB color 2C84E8, and is made bold, italic, and underlined
6)the line "------ Word ------" is printed in the Pages window in bright cyan
7)the line "Word pages: this is a page" gets reformatted (no longer underlined, no longer italic, no longer bold, changed to white)
8)a third line of "this is a page" gets printed in the Pages window in bright cyan
If you wish to apply formatting to #SAY and #PRINT, use %ansi() or an MXP tag equivalent (ie, b for bold, i for italic, color for fore/back color, etc). The MXP specs can be found in the Zmud Support section of the Support menu shown at the top of this page. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
JoshJiggler Newbie
Joined: 12 Aug 2013 Posts: 2
|
Posted: Mon Aug 19, 2013 3:55 pm |
Thanks, Matt.
I'll have to look up the syntax tonight when I get home and make the adjustments.
I haven't coded anything in a long time, so this is all a big learning experience for me, and I appreciate your help. (C: |
|
|
|
|
|
|
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
|
|