Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open('left')
- print("pinging")
- repeat
- local id, command = rednet.receive()
- if command == "ping" then
- rednet.send(id,"ping")
- end
- until command == "ping"
- print("Syncing.")
- repeat
- local id, command = rednet.receive(3)
- until command == "sync"
- id, fromId = rednet.receive()
- fromId = tonumber(fromId)
- rednet.send(fromId,os.getComputerID())
- print("Nothing to display xD")
- rednet.open('left')
- while true do
- local id, command = rednet.receive()
- if command == "ping" then
- sleep(1)
- rednet.send(id,"ping")
- else
- if id == fromId then
- if command == "forward" then
- turtle.forward()
- end
- if command == "back" then
- turtle.back()
- end
- if command == "left" then
- turtle.turnLeft()
- end
- if command == "right" then
- turtle.turnRight()
- end
- if command == "up" then
- turtle.up()
- end
- if command == "down" then
- turtle.down()
- end
- if command == "dig" then
- turtle.dig()
- end
- if command == "place" then
- turtle.place()
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement