Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- if fs.exists("panel") then
- file = fs.open("panel","r")
- panel = tonumber(file.readAll())
- file.close()
- else
- term.clear()
- term.setCursorPos(1,1)
- print("Make sure the Linking Book is in my top left slot then enter the ID of the computer with the touch screen attached.")
- write("Touch screen ID: ")
- id = read()
- file = fs.open("panel", "w")
- file.write(id)
- file.close()
- term.clear()
- turtle.select(1)
- turtle.dropDown()
- term.clear()
- term.setCursorPos(1,1)
- print("Complete!")
- end
- while true do
- id, slot = rednet.receive()
- print(slot)
- if id == tonumber(panel) and slot == "off" then
- if turtle.suckDown() then
- rednet.send(tonumber(panel), "true")
- else
- rednet.send(tonumber(panel), "false")
- end
- elseif id == tonumber(panel) then
- turtle.suckDown()
- --os.sleep(.5)
- turtle.select(tonumber(slot))
- if turtle.dropDown() then
- sleep(.1)
- rednet.send(panel, "true")
- else
- sleep(.1)
- rednet.send(panel, "false")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement