natie3

Clear

Nov 29th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.loadAPI("moveAPI.lua")
  2.  
  3. print("how far?")
  4. local far = tonumber(read())
  5. print("how wide?")
  6. local wide = tonumber(read())
  7.  
  8. function cleanInventory()
  9.     if(turtle.getItemCount(10) > 0) then
  10.         turtle.select(1)
  11.         turtle.placeDown()
  12.         for slot = 2, 16 do
  13.             turtle.select(slot)
  14.             turtle.dropDown()
  15.         end
  16.         turtle.select(1)
  17.         turtle.digDown()
  18.     end
  19. end
  20.  
  21. local right = true
  22.  
  23. for i = 1, wide do
  24.     moveAPI.repeatMoves("f dd du", far - 1)
  25.     if right and i ~= wide then
  26.         moveAPI.move("r dd du tr")
  27.     elseif (not right) and i ~= wide then
  28.         moveAPI.move("l dd du tl")
  29.     end
  30.     right = not right
  31.     cleanInventory()
  32. end
Add Comment
Please, Sign In to add comment