rungholt

tXYZcli

May 16th, 2022 (edited)
556
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local args = { ... }
  2. x = tonumber(args[1])
  3. y = tonumber(args[2])
  4. z = tonumber(args[3])
  5.  
  6. local function digY()
  7.     for i = 1, y - 1 do
  8.         turtle.digUp()
  9.         turtle.up()
  10.     end
  11.     for j = 1, y - 1 do
  12.         turtle.down()
  13.     end
  14. end
  15.  
  16. local function goBack()
  17.     for k = 1, x - 1 do
  18.         turtle.back()
  19.     end
  20.     turtle.turnLeft()
  21. end
  22.  
  23. local function startMine()
  24.     turtle.dig()
  25.     turtle.forward()
  26.     digY()
  27.     turtle.turnRight()
  28. end
  29.  
  30. local function digXY()
  31.     for l = 1, x - 1 do
  32.         turtle.dig()
  33.         turtle.forward()
  34.         digY()
  35.     end
  36. end
  37.  
  38. local function digXYZ()
  39.     for m = 1, z do
  40.         startMine()
  41.         digXY()
  42.         goBack()
  43.     end
  44. end
  45.  
  46. digXYZ()
  47.  
RAW Paste Data Copied