Advertisement
djPtica

partCut

Jul 4th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function cutUp()
  2.    turtle.dig()
  3.    turtle.digUp()
  4.    turtle.up()
  5.    j = j + 1
  6. end
  7.  
  8. function cutDown()
  9.    turtle.digDown()
  10.    turtle.down()
  11.    turtle.dig()
  12. end
  13.  
  14. --GLAVNI PROGRAM
  15. j=0
  16. if turtle.dig() then
  17.    turtle.forward()
  18.    while turtle.detectUp() do
  19.       cutUp()
  20.    end
  21.    turtle.turnRight()
  22.    turtle.dig()
  23.    turtle.forward()
  24.    turtle.turnLeft()
  25.    turtle.dig()
  26.    for i=1, j do
  27.       cutDown()
  28.    end
  29.    turtle.turnLeft()
  30.    turtle.forward()
  31.    turtle.turnLeft()
  32.    turtle.forward()
  33.    for i=1, 16 do
  34.       turtle.select(i)
  35.       turtle.drop()
  36.    end
  37. else
  38.    print("Drvo nije pronadjeno")
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement