Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modem = peripheral.find("modem")
- monitor = peripheral.find("monitor")
- modem.open(700)
- numbots = 1
- function resetmonitor()
- monitor.clear()
- monitor.setCursorPos(1,1)
- monitor.setTextScale(1)
- monitor.write("Click")
- monitor.setCursorPos(1,2)
- monitor.write("me to")
- monitor.setCursorPos(1,3)
- monitor.write("descend")
- end
- resetmonitor()
- while true do
- event, side, xPos, yPos = os.pullEvent("monitor_touch")
- monitor.clear()
- modem.transmit(700, 700, "descend")
- monitor.setCursorPos(1,1)
- monitor.write("Waiting...")
- x = 0
- while x < numbots do
- event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
- x = x + 1
- end
- resetmonitor()
- end
Advertisement
Add Comment
Please, Sign In to add comment