Well since you "created" this I will just tell you how to add color around %nick, first you must be aware how to make the colors to start like ex:, CTRL + K will popup the color box then you can add a , with the follow color for background example

CTRL+K8,1 would be yellow text on black background

So in order to add this to the script wherever areas you want custom like %nick example you would so something like this

Hello CTRL+K8 $+ %nick $+ you are now colorful!

lol its just an example

Next to replace test whichever way its incoming you have to use the $replace routine which you can find in /help $replace

something simple would be this little test for you to play with

alias thistest { echo -a $replace($1-,lol,LauGh Out LoUD) }

so if you type /thistest That guy loves to lol all the time

the output would be That guy loves to LauGh Out LoUD all the time


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }