Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("bottom")
- count=0
- a=0
- b=0
- c=0
- d=0
- e=0
- f=0
- eingabe=0
- zugang=0
- --Funktion Rahmen
- function Rahmen()
- shell.run("clear")
- term.setBackgroundColor(colors.green)
- term.setCursorPos(2,3)
- print("1")
- term.setCursorPos(4,3)
- print("2")
- term.setCursorPos(6,3)
- print("3")
- term.setCursorPos(2,5)
- print("4")
- term.setCursorPos(4,5)
- print("5")
- term.setCursorPos(6,5)
- print("6")
- term.setCursorPos(2,7)
- print("7")
- term.setCursorPos(4,7)
- print("8")
- term.setCursorPos(6,7)
- print("9")
- term.setCursorPos(2,9)
- print("*")
- term.setCursorPos(4,9)
- print("0")
- term.setCursorPos(6,9)
- print("#")
- term.setCursorPos(2,10)
- print("")
- end
- --Hintergrund auf Schwarz Γ€ndern
- term.setBackgroundColor(colors.black)
- --Funktion der Eingabe
- function Eingabe()
- while count < 6 do
- event,side,x,y = os.pullEvent()
- if event =="monitor_touch" then
- if x == 2 and y == 3 then
- count = count +1
- if count == 1 then
- a = 1
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 2 then
- b = 1
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 3 then
- c = 1
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 4 then
- d = 1
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 5 then
- e = 1
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 6 then
- f = 1
- term.setBackgroundColor(colors.black)
- write("*")
- end
- end
- if x == 4 and y == 3 then
- count = count +1
- if count == 1 then
- a = 2
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 2 then
- b = 2
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 3 then
- c = 2
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 4 then
- d = 2
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 5 then
- e = 2
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 6 then
- f = 2
- term.setBackgroundColor(colors.black)
- write("*")
- end
- end
- if x == 6 and y == 3 then
- count = count +1
- if count == 1 then
- a = 3
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 2 then
- b = 3
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 3 then
- c = 3
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 4 then
- d = 3
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 5 then
- e = 3
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 6 then
- f = 3
- term.setBackgroundColor(colors.black)
- write("*")
- end
- end
- if x == 2 and y == 5 then
- count = count +1
- if count == 1 then
- a = 4
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 2 then
- b = 4
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 3 then
- c = 4
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 4 then
- d = 4
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 5 then
- e = 4
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 6 then
- f = 4
- term.setBackgroundColor(colors.black)
- write("*")
- end
- end
- if x == 4 and y == 5 then
- count = count +1
- if count == 1 then
- a = 5
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 2 then
- b = 5
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 3 then
- c = 5
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 4 then
- d = 5
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 5 then
- e = 5
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 6 then
- f = 5
- term.setBackgroundColor(colors.black)
- write("*")
- end
- end
- if x == 6 and y == 5 then
- count = count +1
- if count == 1 then
- a = 6
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 2 then
- b = 6
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 3 then
- c = 6
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 4 then
- d = 6
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 5 then
- e = 6
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 6 then
- f = 6
- term.setBackgroundColor(colors.black)
- write("*")
- end
- end
- if x == 2 and y == 7 then
- count = count +1
- if count == 1 then
- a = 7
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 2 then
- b = 7
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 3 then
- c = 7
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 4 then
- d = 7
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 5 then
- e = 7
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 6 then
- f = 7
- term.setBackgroundColor(colors.black)
- write("*")
- end
- end
- if x == 4 and y == 7 then
- count = count +1
- if count == 1 then
- a = 8
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 2 then
- b = 8
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 3 then
- c = 8
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 4 then
- d = 8
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 5 then
- e = 8
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 6 then
- f = 8
- term.setBackgroundColor(colors.black)
- write("*")
- end
- end
- if x == 6 and y == 7 then
- count = count +1
- if count == 1 then
- a = 9
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 2 then
- b = 9
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 3 then
- c = 9
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 4 then
- d = 9
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 5 then
- e = 9
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 6 then
- f = 9
- term.setBackgroundColor(colors.black)
- write("*")
- end
- end
- if x == 2 and y == 9 then
- count = count +1
- if count == 1 then
- a = x
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 2 then
- b = x
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 3 then
- c = x
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 4 then
- d = x
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 5 then
- e = x
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 6 then
- f = x
- term.setBackgroundColor(colors.black)
- write("*")
- end
- end
- if x == 4 and y == 9 then
- count = count +1
- if count == 1 then
- a = 0
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 2 then
- b = 0
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 3 then
- c = 0
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 4 then
- d = 0
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 5 then
- e = 0
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 6 then
- f = 0
- term.setBackgroundColor(colors.black)
- write("*")
- end
- end
- if x == 6 and y == 9 then
- count = count +1
- if count == 1 then
- a = #
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 2 then
- b = #
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 3 then
- c = #
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 4 then
- d = #
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 5 then
- e = #
- term.setBackgroundColor(colors.black)
- write("*")
- elseif count == 6 then
- f = #
- term.setBackgroundColor(colors.black)
- write("*")
- end
- end
- end
- end
- count = 0
- end
- while true do
- Rahmen()
- Eingabe()
- eingabe = (""..a..""..b..""..c..""..d..""..e..""..f.."")
- rednet.send(20,eingabe)
- y,x,z = rednet.receive()
- if y == "20" and x == "OK" then
- write("OK")
- rs.setOutput("top",true)
- sleep(3)
- rs.setOutput("top",false)
- else write ("FALSCH")
- end
- sleep(3)
- term.setBackgroundColor(colors.black)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement