SHARE
TWEET

Untitled

a guest Jul 19th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print("Enter length and width of digsite:")
  2. length = read("*n")
  3. width = read("*n")
  4.  
  5. for i = 1, width, 1 do
  6.   for j = 1, length, 1 do
  7.     while turtle.getFuelLevel() < 1 do
  8.       turtle.refuel()
  9.       os.sleep(0.05)
  10.     end
  11.     while turtle.dig() do
  12.     end
  13.     turtle.forward()
  14.     height = 0
  15.     while turtle.detectUp() do
  16.       turtle.digUp()
  17.       if turtle.up() then
  18.         height = height + 1
  19.       end
  20.     end
  21.     for k = height, 0, -1 do
  22.       turtle.down()
  23.     end
  24.   end
  25.   if i % 2 == 1 then   
  26.     turtle.turnLeft()
  27.   else
  28.     turtle.turnRight()
  29.   end
  30.   while turtle.dig() do
  31.   end
  32.   turtle.forward()
  33.   if i % 2 == 1 then
  34.     turtle.turnLeft()
  35.   else
  36.     turtle.turnRight()
  37.   end
  38. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top