Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- local sideOrange = "front"
- local sideLightBlue = "left"
- local sideBlue = "back"
- local sideWhite = "right"
- local Opened = rednet.isOpen("top")
- if Opened == false then
- rednet.open("top")
- rednet.host("ruben","solars")
- end
- function checkAllCables()
- boolOrange = redstone.getInput(sideOrange)
- boolLightBlue = redstone.getInput(sideLightBlue)
- boolBlue = redstone.getInput(sideBlue)
- boolWhite = redstone.getInput(sideWhite)
- end
- function display()
- term.setCursorPos(5,5)
- term.clearLine()
- term.setTextColor(colors.orange)
- term.write("Naranja(N): " .. tostring(boolOrange))
- term.setCursorPos(5,6)
- term.clearLine()
- term.setTextColor(colors.lightBlue)
- term.write("Azul Claro(C): " .. tostring(boolLightBlue))
- term.setCursorPos(5,7)
- term.clearLine()
- term.setTextColor(colors.blue)
- term.write("Azul(A): " .. tostring(boolBlue))
- term.setCursorPos(5,8)
- term.clearLine()
- term.setTextColor(colors.white)
- term.write("Blanco(B): " .. tostring(boolWhite))
- end
- function whenPressKey()
- local event, scancode = os.pullEvent("key")
- if scancode == 49 then
- if boolOrange == true then
- redstone.setOutput(sideOrange, false)
- else
- redstone.setOutput(sideOrange, true)
- end
- elseif scancode == 46 then
- if boolLightBlue == true then
- redstone.setOutput(sideLightBlue, false)
- else
- redstone.setOutput(sideLightBlue, true)
- end
- elseif scancode == 30 then
- if boolBlue == true then
- redstone.setOutput(sideBlue, false)
- else
- redstone.setOutput(sideBlue, true)
- end
- elseif scancode == 48 then
- if boolWhite == true then
- redstone.setOutput(sideWhite, false)
- else
- redstone.setOutput(sideWhite, true)
- end
- else
- end
- end
- local i = 0
- repeat
- checkAllCables()
- display()
- whenPressKey()
- rednet.send(rednet.lookup("ruben","gafas"),tostring(boolOrange) .. "," .. tostring(boolLightBlue) .. "," .. tostring(boolBlue) .. "," .. tostring(boolWhite),"ruben")
- sleep(0.1)
- until i == 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement