Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function affiche_etat()
- term.clear()
- term.setCursorPos(8,1)
- term.setTextColor(colors.yellow)
- print("Controle des flux")
- term.setTextColor(colors.white)
- term.setCursorPos(4,4)
- write("Macerator ")
- if redstone.getOutput("top") == true then
- term.setTextColor(colors.green)
- rednet.send(67,"true")
- else
- term.setTextColor(colors.red)
- rednet.send(67,"false")
- end
- write("<===> ")
- term.setTextColor(colors.white)
- write("Iron Furnace ")
- if redstone.getOutput("bottom") == true then
- term.setTextColor(colors.green)
- rednet.send(69,"true")
- else
- term.setTextColor(colors.red)
- rednet.send(69,"false")
- end
- write("<===> ")
- term.setTextColor(colors.white)
- write("Compressor")
- term.setCursorPos(15,5)
- print("(1)")
- term.setCursorPos(34,5)
- print("(2)")
- term.setCursorPos(1,9)
- end
- rednet.open("left")
- while true do
- affiche_etat()
- print("Flux a activer ou desactiver : ")
- local choix = read()
- if choix == "1" then
- if redstone.getOutput("top") == true then
- redstone.setOutput("top",false)
- rednet.send(67,"false")
- else
- redstone.setOutput("top",true)
- rednet.send(67,"true")
- end
- elseif choix == "2" then
- if redstone.getOutput("bottom") == true then
- redstone.setOutput("bottom",false)
- rednet.send(69,"false")
- else
- redstone.setOutput("bottom",true)
- rednet.send(69,"true")
- end
- else
- print("Mauvaix choix !!")
- sleep(2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement