Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 29th, 2012  |  syntax: Lua  |  size: 0.35 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function placeBlock(side)
  2.         if side == 1 then
  3.                 turtle.turnLeft()
  4.         else
  5.                 turtle.turnRight()
  6.         end
  7.         if turtle.detect() then
  8.                 turtle.dig()
  9.         end
  10.         turtle.place()
  11.                 if side == 1 then
  12.                 turtle.turnRight()
  13.         else
  14.                 turtle.turnLeft()
  15.         end
  16. end
  17.  
  18. while not turtle.detect() do
  19.         turtle.up()
  20.         placeBlock(1)
  21.  
  22.         for a=0, 3 do
  23.                 turtle.forward()
  24.         end
  25. end