Advertisement
gpochy

nquartz

Nov 12th, 2013
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. function porovnej()
  2. if turtle.compareTo(16) then
  3.   turtle.transferTo(2)
  4.   else
  5.   turtle.drop()
  6. end
  7. end
  8.  
  9. function vykop()
  10.   if turtle.detectUp() then
  11.     turtle.digUp()
  12.     porovnej()
  13.   end
  14.   if turtle.detect() then
  15.     turtle.dig()
  16.     porovnej()
  17.   end
  18.   if turtle.detectDown() then
  19.     turtle.digDown()
  20.     porovnej()
  21.   end
  22. end
  23.  
  24. function rada()
  25.   for i = 1, 10 do
  26.   vykop()
  27.   turtle.forward()
  28.   end
  29. end
  30.  
  31. for a = 1, 5 do
  32.   rada()
  33.   turtle.turnRight()
  34.   vykop()
  35.   turtle.forward()
  36.   turtle.turnRight()
  37.   rada()
  38.   turtle.turnLeft()
  39.   vykop()
  40.   turtle.forward()
  41.   turtle.turnLeft()
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement