Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right", 50) -- Left is the side of the modem and 50 is the channel were using
- rednet.broadcast("Im connected")
- print("Now running rednet connection")
- while true do
- rednet.receive(msg)
- print(msg) -- This will print the message you have send from the pocket computer onto the turtle screen
- if msg == "tunnel" then
- local length = 0
- rednet.broadcast("How long?")
- rednet.receive(length)
- rednet.broadcast "Turtle will return when finished!"
- for length = length,2,-1 do
- turtle.digUp()
- turtle.dig()
- turtle.forward()
- end
- for length = length,2,-1 do
- turtle.turnRight()
- turtle.turnRight()
- turtle.forward()
- end
- turtle.turnRight()
- turtle.turnRight()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement