Advertisement
pablaud

modem

Mar 3rd, 2015
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. rednet.open("right")
  2.  
  3. while true do
  4.   id,message = rednet.receive()
  5.   if id == 7 then
  6.     if message == "a" then
  7.       turtle.turnLeft()
  8.     end
  9.     if message == "d" then
  10.       turtle.turnRight()
  11.     end
  12.     if message == "r" then
  13.       turtle.up()
  14.     end
  15.     if message == "f" then
  16.       turtle.down()
  17.     end
  18.     if message == "w" then
  19.       turtle.forward()
  20.     end
  21.     if message == "s" then
  22.       turtle.back()
  23.     end
  24.     if message == "g" then
  25.       turtle.dig()
  26.     end  
  27.     if message == "e" then
  28.       turtle.digDown()
  29.     end
  30.     if message == "q" then
  31.       turtle.digUp()
  32.     end
  33.   end
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement