Difference between revisions of "User:Arumi/Colored OOC"

From City of Hope MUSH
Jump to navigation Jump to search
(Undo revision 215623 by Arumi (talk))
Tag: Undo
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
==Code==
 +
 
This is my draft of an attempt to get custom colors into OOC game-wide, without breaking my logger.
 
This is my draft of an attempt to get custom colors into OOC game-wide, without breaking my logger.
  
<code><pre>
+
<pre>
 
&CMD-OOC_EMIT SGP - Main Globals=$ooc *: @pemit/contents %l=[setq(1,get(%#/ooc_color_1))][setq(2,get(%#/ooc_color_2))][ansi(%q1,<)][ansi(%q2,OOC)][ansi(%q1,>)] %N[switch(mid(%0,0,1),:,%b[delete(%0,0,1)],;,[delete(%0,0,1)],%bsays\, "%0")]
 
&CMD-OOC_EMIT SGP - Main Globals=$ooc *: @pemit/contents %l=[setq(1,get(%#/ooc_color_1))][setq(2,get(%#/ooc_color_2))][ansi(%q1,<)][ansi(%q2,OOC)][ansi(%q1,>)] %N[switch(mid(%0,0,1),:,%b[delete(%0,0,1)],;,[delete(%0,0,1)],%bsays\, "%0")]
</pre></code>
+
</pre>
  
Instructions:
+
==User Instructions==
  
 
Set your <code>ooc_color_1</code> and <code>ooc_color_2</code> attributes on yourself to the ansi codes you want for the <code>&lt;&gt;</code> and the <code>OOC</code> respectively, according to <code>help ANSI CODES</code>. For example:
 
Set your <code>ooc_color_1</code> and <code>ooc_color_2</code> attributes on yourself to the ansi codes you want for the <code>&lt;&gt;</code> and the <code>OOC</code> respectively, according to <code>help ANSI CODES</code>. For example:
  
 
Red and Blue:
 
Red and Blue:
<code><pre>
+
<pre>
 
&ooc_color_1 me=r
 
&ooc_color_1 me=r
 
&ooc_color_2 me=b
 
&ooc_color_2 me=b
</pre></code>
+
</pre>
  
 
Bold Cyan and Magenta:
 
Bold Cyan and Magenta:
<code><pre>
+
<pre>
 
&ooc_color_1 me=h<#5fffff>
 
&ooc_color_1 me=h<#5fffff>
 
&ooc_color_2 me=<#ff00ff>
 
&ooc_color_2 me=<#ff00ff>
</pre></code>
+
</pre>
 +
 
 +
==Coder instructions==
 +
 
 +
Just replace that attribute on SGP - Main Globals with this one. I made changes versus the [http://www.gwen-morse.com/wiki/index.php/SGP_Base_Globals baseline SGP Base Globals]. If there were already house changes, those would need to be re-applied to my code.

Latest revision as of 04:38, 31 August 2020

Code

This is my draft of an attempt to get custom colors into OOC game-wide, without breaking my logger.

&CMD-OOC_EMIT SGP - Main Globals=$ooc *: @pemit/contents %l=[setq(1,get(%#/ooc_color_1))][setq(2,get(%#/ooc_color_2))][ansi(%q1,<)][ansi(%q2,OOC)][ansi(%q1,>)] %N[switch(mid(%0,0,1),:,%b[delete(%0,0,1)],;,[delete(%0,0,1)],%bsays\, "%0")]

User Instructions

Set your ooc_color_1 and ooc_color_2 attributes on yourself to the ansi codes you want for the <> and the OOC respectively, according to help ANSI CODES. For example:

Red and Blue:

&ooc_color_1 me=r
&ooc_color_2 me=b

Bold Cyan and Magenta:

&ooc_color_1 me=h<#5fffff>
&ooc_color_2 me=<#ff00ff>

Coder instructions

Just replace that attribute on SGP - Main Globals with this one. I made changes versus the baseline SGP Base Globals. If there were already house changes, those would need to be re-applied to my code.