Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

Rainbow Echoes [Mudlet]

TydasTydas Member Posts: 232 ✭✭✭ - Distinguished
So some people on a clan wanted a rainbow crit thing for mudlet, and I gave them my rainbow echo script. They liked it, so I figured I'd share it here in case anyone else wants it.

http://pastebin.com/Y9BxYkwW

Put that into a script file, and call the function, passing the string you want to echo. It'll choose a random colour to start with, then cycle through the colours in order. It DOES try to colour spaces, which I liked because I use a fixed-width font and sort of makes sense in my head.

If you want to use it for crits (which is what I use it for), create a trigger for the crits, preferably in regex so you only need one. Then use this code:

selectCurrentLine()<br><span style="line-height: 19.2px;">deleteLine()<br></span><span style="line-height: 19.2px;">rainbow("\n"..matches[1])</span>

Colouring just the crit-type part is a little more complex, but doable, since the rainbow function doesn't automatically insert a new line.

Enjoy the rainbows!

Halos

Comments

Sign In to Comment.