Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- glass = peripheral.wrap("right")
- chatbox = os.pullEvent("chatbox_command")
- if rednet.isOpen("top") == false then
- rednet.open("top")
- rednet.host("ruben","gafas")
- end
- local boolOrange = false
- local boolLightBlue = false
- local boolBlue = false
- local boolWhite = false
- glass.clear()
- local i = 0
- textbox = glass.addBox(1,1,100,55,0xFFFFFF,0.2)
- time = textutils.formatTime(os.time(), false)
- text = glass.addText(5,2,"HORA: " .. time, 0x00FF00)
- textOrange = glass.addText(5,12,"Naranja: " .. tostring(boolOrange), 0xFF8D00)
- textLightBlue = glass.addText(5,22,"Azul claro: " .. tostring(boolLightBlue), 0x00EFFF)
- textBlue = glass.addText(5,32,"Azul: " .. tostring(boolBlue), 0x0000FF)
- textWhite = glass.addText(5,42,"Blanco: " .. tostring(boolBlue), 0xFFFFFF)
- repeat
- local senderId, message, protocol = rednet.receive("ruben",0.8)
- if message == nil or message == "" then
- else
- if message == "Orange.false" then
- boolOrange = false
- elseif message == "Orange.true" then
- boolOrange = true
- elseif message == "LightBlue.false" then
- boolLightBlue = false
- elseif message == "LightBlue.true" then
- boolLightBlue = true
- elseif message == "Blue.false" then
- boolBlue = false
- elseif message == "Blue.true" then
- boolBlue = true
- elseif message == "White.false" then
- boolWhite = false
- elseif messsage == "White.true" then
- boolWhite = true
- else
- print(message)
- end
- end
- time = textutils.formatTime(os.time(), false)
- text.setText("HORA: " .. time)
- textOrange.setText("Naranja: " .. tostring(boolOrange))
- textLightBlue.setText("Azul claro: " .. tostring(boolLightBlue))
- textBlue.setText("Azul: " .. tostring(boolBlue))
- textWhite.setText("Blanco: " .. tostring(boolBlue))
- sleep(0.1)
- until i == 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement