This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
augustas656's profile picture

How could I design a colour code system?

Started by augustas656, 22 May 2014 - 02:54 PM
augustas656 #1
Posted 22 May 2014 - 04:54 PM
I'd like to make a colour code system that prints and writes values according to color codes that you input in the middle of the string anywhere you want. So let's say you type \c1 and it sets colour to white but doesn't print the \c1. So like in a minecraft server &4Hello and Welcome To The Server, &cMy Name is John. And this will print the first statement in dark red and the second in light red. How could I do this?

Regards,
Augustas
apemanzilla #2
Posted 22 May 2014 - 05:19 PM
Use string pattern matching to break the strings into chunks, and save each chunk in a table along with their color.