Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("left")
- while true do
- local senderID, action, protocol = rednet.receive()
- print(action)
- if action == "forward" then
- turtle.forward()
- elseif action == "back" then
- turtle.back()
- elseif action == "right" then
- turtle.turnRight()
- elseif action == "left" then
- turtle.turnLeft()
- elseif action == "mine" then
- turtle.dig()
- elseif action == "up" then
- turtle.up()
- elseif action == "down" then
- turtle.down()
- elseif action == "keepForward" then
- repeat
- turtle.forward()
- until action ~= "keepForward"
- elseif action == "keepUp" then
- repeat
- turtle.up()
- until action ~= "keepUp"
- elseif action == "keepDown" then
- repeat
- turtle.down()
- until action ~= "keepDown"
- elseif action == "mineUp" then
- turtle.digUp()
- elseif action == "mineDown" then
- turtle.digDown()
- elseif action == "attack" then
- turtle.attack()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement