Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function dig()
- turtle.dig()
- turtle.up()
- turtle.dig()
- turtle.down()
- end
- rednet.open("right")
- while true do
- id,message = rednet.receive()
- print("ID:"..id.."Message: "..message)
- if id==10 then
- if message == "forward" then
- turtle.forward()
- elseif message == "left" then
- turtle.turnLeft()
- elseif message == "right" then
- turtle.turnRight()
- elseif message == "back" then
- turtle.back()
- elseif message == "attack" then
- turtle.attack()
- elseif message == "dig" then
- dig()
- elseif message == "switch" then
- succes = turtle.equipLeft()
- if not succes then
- rednet.send(10,"failed to equip")
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement