Advertisement
Guest User

modem

a guest
Oct 21st, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. rednet.open("left")
  2.  
  3. term.clear()
  4. term.setCursorPos(1,1)
  5. print("Ready To Receive Commands")
  6.  
  7. while true do
  8.   id,message = rednet.receive()
  9.   if id == 1 then
  10.     if message == "left" then
  11.       turtle.turnLeft()
  12.     end
  13.     if message == "right" then
  14.       turtle.turnRigt()
  15.     end
  16.     if message == "up" then
  17.       turtle.up()
  18.     end
  19.     if message == "down" then
  20.       turtle.down()
  21.     end
  22.     if message == "forward" then
  23.       turtle.forward()
  24.     end
  25.     if message == "back" then
  26.       turtle.back()
  27.     end
  28.     if message == "place" then
  29.       turtle.placeDown()
  30.     end
  31.     if message == "dig" then
  32.       turtle.dig()
  33.     end
  34.   end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement