Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.find("modem")
- m.open(200)
- comn = {"forward","back","right","left","up","down"}
- while true do
- e = {os.pullEvent()}
- if e[1] == "modem_message" then
- --for i=1,#comn do
- --if e[5] == comn[i] then
- --print(e[5])
- if e[5] == "forward" then
- --print(e[5])
- turtle.forward()
- elseif e[5] == "back" then
- turtle.back()
- elseif e[5] == "left" then
- turtle.turnLeft()
- elseif e[5] == "right" then
- turtle.turnRight()
- elseif e[5] == "up" then
- turtle.up()
- elseif e[5] == "down" then
- turtle.down()
- elseif e[5] == "dig" then
- turtle.dig()
- elseif e[5] == "place" then
- turtle.place()
- elseif e[5] == "digDN" then
- turtle.digDown()
- elseif e[5] == "placeDN" then
- turtle.placeDown()
- elseif e[5] == "digUP" then
- turtle.digUp()
- elseif e[5] == "placeUP" then
- turtle.placeUp()
- end
- --end
- --end
- end
- sleep(0)
- end
Advertisement
Add Comment
Please, Sign In to add comment