Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("back")
- os.loadAPI("button")
- local turtleID = 0
- local m = peripheral.wrap("top")
- function fillTable()
- button.clearTable()
- m.clear()
- button.setTable("Recharge", recharge, "", 8, 42, 16,18)
- button.screen()
- end
- function recharge()
- button.flash("Recharge")
- rednet.send(turtleID, "place")
- local id, msg, dist = rednet.receive()
- write("Done!")
- end
- function getClick()
- local event,side,x,y = os.pullEvent()
- if event=="monitor_touch" then
- if button.checkxy(x,y) then
- print("button")
- end
- end
- end
- fillTable()
- while true do getClick() end
Advertisement
Add Comment
Please, Sign In to add comment