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

Simple Rednet Doorlock Script

Started by LuckyLuke, 30 July 2015 - 04:15 AM
LuckyLuke #1
Posted 30 July 2015 - 06:15 AM
Hi Guys,

im currently working on a simple Rednet Doorlock with some additinal functionality like "Lockdown" or "Updates".

Current State of Work [Updated Daylie]At this moment (30.07 | 07:06) both versions are stable, of course i', trying to get every new version stable, but please dont "flame" if im in a working progress on another functionality :)/>

At this point i'm trying to add another little feature: On the screen, i would like to get "Auf", "Zu" and "Offline" in different colors. I created a function that is called in the "writing-loop", but it didnt work out, so i deleted it :/

Overview of the colors:
"Auf" => colors.green
"Zu" => colors.red
"Offline" => colors.orange

Maybe you can give me a hint, how i can improve my code and add this functionality, i might be blind at the moment cause i thougt this little thing would be much easyer …
KingofGamesYami #2
Posted 30 July 2015 - 04:14 PM

term.setTextColor( colors.green )
print( "Auf" )
term.setTextColor( colors.red )
print( "Zu" )
term.setTextColor( colors.orange )
print( "Offline" )
Edited on 30 July 2015 - 02:15 PM
LuckyLuke #3
Posted 30 July 2015 - 04:55 PM
I would like to get that on the screen as well, just like this part:

Compare Line 152: writeColorMonitor(x, y+i, colors.white, "|– ["..Clients[1].."] | "..Clients[4].." | "..Clients[3])