Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pass=""
- local s=false
- local p=false
- rednet.open("left")
- rednet.send(24,"415408")
- rednet.send(22,"HujeBetoB")
- function UI()
- term.clear()
- term.setCursorPos(2,2)
- print("Control de Reactor")
- term.setCursorPos(4,4)
- print("1. Encender Reactor")
- term.setCursorPos(4,5)
- print("2. Apagar Reactor")
- term.setCursorPos(4,6)
- print("3. Abrir Puertas")
- term.setCursorPos(4,7)
- print("4. Cerrar Puertas")
- term.setCursorPos(20,11)
- print("Reactor:")
- term.setCursorPos(20,12)
- if s then
- print("Encendido")
- else
- print("Apagado")
- end
- term.setCursorPos(10,11)
- print("Puertas:")
- term.setCursorPos(10,12)
- if p then
- print("Abierto")
- else
- print("Cerrado")
- end
- end
- while true do
- UI()
- local a,b = os.pullEvent()
- if a=="key"then
- if b==2 then
- rednet.send(24,"808825")
- s=true
- elseif b==3 then
- rednet.send(24,"415408")
- s=false
- elseif b==4 then
- rednet.send(22,"HujeBetoA")
- p=true
- elseif b==5 then
- rednet.send(22,"HujeBetoB")
- p=false
- end
- elseif a=="redstone" then
- if rs.getInput("right") then
- rednet.send(24,"415408")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment