Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function RCslave()
- while true do
- local scrap, message = rednet.receive()
- if message == "TS Forward" then
- print("Forward")
- if turtle.detect() == true then
- turtle.dig()
- end
- turtle.forward()
- elseif message == "TS Backward" then
- print("Backward")
- turtle.back()
- elseif message == "TS TurnLeft" then
- print("Turn Left")
- turtle.turnLeft()
- elseif message == "TS TurnRight" then
- print("Turn Right")
- turtle.turnRight()
- elseif message == "TS PlaceBlock" then
- if turtle.detect() == true then
- print("Block Present")
- else
- print("Place Block")
- turtle.place()
- end
- end
- end
- end
- rednet.open("right")
- textutils.slowPrint("TurtleReceive Initiated.")
- RCslave()
Add Comment
Please, Sign In to add comment