Author Topic: Outgoing Color Script  (Read 3100 times)


  • Full Member
  • ***
  • Posts: 135
  • Scripts for Praise
    • CorpseCorp
Outgoing Color Script
« on: January 12, 2009, 05:18:13 PM »
Be sure to save this as a Icechat 5 style script, or .ICE file.

Code: [Select]
Dim power
Dim Colorcode

colorcode = GetIniFile("misc.ini","colors","code","")
power = int(GetIniFile("misc.ini","colors","power","0"))

Function OUTTEXT(OutgoingText)
if left(OutgoingText,1)="" then
  OUTTEXT = Mid(OutgoingText,2) ' Temporarily Disable Script
elseif lcase(OutgoingText)="/colors on" then
  WriteIniFile "misc.ini","colors","power",1
  Echo "Color script now on.", "-a"
  power = 1
elseif lcase(OutgoingText)="/colors off" then
  WriteIniFile "misc.ini","colors","power",0
  Echo "Color script now off.", "-a"
  power = 0
elseif left(lcase(OutgoingText),8)="/colors " then
  WriteIniFile "misc.ini","colors","colorcode",Mid(OutgoingText,9)
  Echo "Color code set to " & Mid(OutgoingText,9), "-a"
  colorcode = Mid(OutgoingText,9)
elseif not left(OutgoingText,1) = "/" and power=1 then
  OUTTEXT = "" & colorcode & OutgoingText
  OUTTEXT = OutgoingText
End if
End Function

/colors on - Turns the script on
/colors off - Turns the script off
/colors 4,1 - Sets the script to use the color code 4,1 (red text on black baclground)

To temporarily disable the script, hit ctrl + o, then type your message
Script auto-disables itself for /commands

Bonus note: You can also use bold and underline control characters with this script. Just type /colors 4,1<ctrl +b><ctrl + u>
This message brought to you by the Wonderful Wizard of Oz.