Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- while true do
- id,message = rednet.receive()
- if id == 62 then
- print ("Command Received")
- if message ~= nil then
- command = message[1]
- value = message[2]
- print("Command: " .. command)
- if command == "a" then
- turtle.turnLeft()
- end
- if command == "d" then
- turtle.turnRight()
- end
- if command == "q" then
- turtle.up()
- end
- if command == "e" then
- turtle.down()
- end
- if command == "w" then
- turtle.forward()
- end
- if command == "s" then
- turtle.back()
- end
- if command == "tunnel" then
- shell.run("tunnel " .. value)
- if value ~= 1 then
- for i=1,value - 1 do
- turtle.back()
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment