Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --cutTree by djPtica v0.1.3
- --SETUP
- --put turtle in front of bottom left block of 2x2 tree
- --put chest behind turtle
- function cutUp()
- turtle.dig()
- turtle.digUp()
- turtle.up()
- j = j + 1
- end
- function cutDown()
- turtle.digDown()
- turtle.down()
- turtle.dig()
- end
- --GLAVNI PROGRAM
- j=0
- if turtle.dig() then
- print("Drvo pronadjeno, zapocinjem sijecu.")
- turtle.forward()
- while turtle.detectUp() do
- cutUp()
- end
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- turtle.dig()
- for i=1, j do
- cutDown()
- end
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- for i=1, 16 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- print("Sijeca gotova")
- else
- print("Drvo nije pronadjeno")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement