Guest User

Turtle pyramid building

a guest
Aug 9th, 2014
291
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -----------------------------
  2. -- Turtle pyramid building --
  3. -- by Est                  --
  4. -----------------------------
  5.  
  6. s=1
  7. turtle.select(s)
  8. while true do
  9.   for i=1,4 do
  10.     repeat
  11.       turtle.turnLeft()
  12.       turtle.place()
  13.       turtle.turnRight()
  14.       turtle.forward()
  15.       while turtle.getItemCount(s)=0 do
  16.         s=s+1
  17.         if s>16 then
  18.       exit()
  19.     end
  20.     turtle.select(s)
  21.       end
  22.     until not turtle.compareDown()
  23.     turtle.turnLeft()
  24.     turtle.forward()
  25.     turtle.turnLeft()
  26.     turtle.dig()
  27.     turtle.forward()
  28.     turtle.turnRight()
  29.   end
  30.   turtle.up()
  31.   turtle.turnLeft()
  32.   turtle.foward()
  33.   turtle.turnRight()
  34.   turtle.forward()
  35. end
RAW Paste Data