bindre12

Custom Command Turtles (Farmer)

Dec 10th, 2012
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. -- Farmmer
  2.  
  3. local unloaded = 0
  4. local collected = 0
  5. sleep(1)
  6. rednet.open("right")
  7. while true do
  8.  term.clear()
  9.  term.setCursorPos(1, 1)
  10.  print("Ready to Receve Commands")
  11.  local id, mgs, dis = rednet.receive()
  12.  if mgs == "4Forward" then
  13.   turtle.forward()
  14.  end
  15.  if mgs == "4Back" then
  16.   turtle.back()
  17.  end
  18.  if mgs == "4TurnLeft" then
  19.   turtle.turnLeft()
  20.  end
  21.  if mgs == "4TurnRight" then
  22.   turtle.turnRight()
  23.  end
  24.  if mgs == "4Up" then
  25.   turtle.up()
  26.  end
  27.  if mgs == "4Down" then
  28.   turtle.down()
  29.  end
  30.  if mgs == "4Dig" then
  31.   turtle.dig()
  32.  end
  33.  if mgs == "4DigDown" then
  34.   turtle.digDown()
  35.  end
  36.  if mgs == "4Place" then
  37.   turtle.place()
  38.  end
  39.  if mgs == "4PlaceDown" then
  40.   turtle.placeDown()
  41.  end
  42.  if mgs == "4Drop" then
  43.   for n=1,16 do
  44.    unloaded = unloaded + turtle.getItemCount(n)
  45.    turtle.select(n)
  46.    turtle.drop()
  47.   end
  48.   collected = 0
  49.   turtle.select(1)
  50.  end
  51. end
Advertisement
Add Comment
Please, Sign In to add comment