Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("front")
- rednet.open("bottom")
- fail = 0
- while true do
- mon.setBackgroundColour(colours.black)
- mon.clear()
- count = 0
- mon.setTextScale(1)
- mon.setBackgroundColour(colours.orange)
- mon.setCursorPos(3,2)
- mon.write("1")
- mon.setBackgroundColour(colours.blue)
- mon.setCursorPos(4,2)
- mon.write("2")
- mon.setBackgroundColour(colours.orange)
- mon.setCursorPos(5,2)
- mon.write("3")
- mon.setBackgroundColour(colours.blue)
- mon.setCursorPos(3,3)
- mon.write("4")
- mon.setBackgroundColour(colours.orange)
- mon.setCursorPos(4,3)
- mon.write("5")
- mon.setBackgroundColour(colours.blue)
- mon.setCursorPos(5,3)
- mon.write("6")
- mon.setBackgroundColour(colours.orange)
- mon.setCursorPos(3,4)
- mon.write("7")
- mon.setBackgroundColour(colours.blue)
- mon.setCursorPos(4,4)
- mon.write("8")
- mon.setBackgroundColour(colours.orange)
- mon.setCursorPos(5,4)
- mon.write("9")
- mon.setBackgroundColour(colours.blue)
- mon.setCursorPos(2,5)
- mon.write("Enter")
- mon.setBackgroundColour(colours.black)
- event, click, p1, p2 = os.pullEvent("monitor_touch")
- if p1 >= 3 and p2 == 2 then
- count = count + 1
- end
- event, click, p1, p2 = os.pullEvent("monitor_touch")
- if p1 >= 3 and p2 == 2 then
- count = count + 1
- end
- event, click, p1, p2 = os.pullEvent("monitor_touch")
- if p1 >= 3 and p2 == 2 then
- count = count + 1
- end
- enter = false
- while enter == false do
- event, click, p1, p2 = os.pullEvent("monitor_touch")
- if p2 == 5 then
- enter = true
- end
- end
- if enter == true then
- rednet.broadcast("open")
- print("open")
- fail = 0
- rs.setOutput("top", false)
- else
- fail = fail + 1
- end
- if fail => 3 then
- rednet.send(32, "open")
- end
- if fail = 2 then
- rs.setOutput("top", true)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement