LITTLEJAMO

Turtle w Fuel

Sep 22nd, 2015
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. term.write("How far shall i dig?: ")
  2. distance = read()
  3. print("Digging a 1x1 blocks for "..distance.." blocks...")
  4.  
  5. for i = 1, 16 do -- loop through the slots
  6. turtle.select(i) -- change to the slot
  7. if turtle.refuel(0) then -- if it's valid fuel
  8. turtle.refuel()
  9. end
  10.  
  11.  
  12. for i = 1, distance
  13. do
  14. turtle.dig()
  15. turtle.forward()
  16. turtle.digDown()
  17. turtle.digUp()
  18. end
  19.  
  20. end
Advertisement
Add Comment
Please, Sign In to add comment