Advertisement
Guest User

EatForward

a guest
Aug 12th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.79 KB | None | 0 0
  1. local args = {...}
  2.  
  3. os.loadAPI("JApi")
  4.  
  5. function DropCobble()
  6.  
  7.   for it = 1, 15 do
  8.     turtle.select(it)
  9.     if turtle.compareTo(16) == true then
  10.       turtle.drop()
  11.     end --endif
  12.   end
  13.  
  14. end --fend
  15.  
  16. function deeg(x, y, z)
  17.   for depth = 1, z do
  18.     JApi.digAdv("front", 1)
  19.    
  20.       for height = 1, y do
  21.         if height % 2 == 1 then
  22.           JApi.digAdv("right", x - 1)
  23.         else
  24.           JApi.digAdv("left", x - 1)
  25.         end
  26.         if height < tonumber(y) then
  27.         JApi.digAdv("top", 1)
  28.         end
  29.       end
  30.     JApi.moveAdv("bottom", y)
  31.     if tonumber(y) % 2 == 1 then
  32.       JApi.moveAdv("left", x)
  33.     end --endif
  34.  
  35.    if tonumber(depth) % 5 == 0 then
  36.      DropCobble()
  37.    end --endif
  38.                        
  39.   end
  40. end
  41.  
  42. deeg(args[1], args[2], args[3])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement