Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --local args = {...}
- --length = args[1]
- --high = args[2]
- treeintervall = 3
- length = 10
- high = 10
- --------------------------------------------------
- function forward()
- while turtle.forward()==false do
- os.sleep(0.1)
- turtle.dig()
- end
- end
- function up()
- while turtle.up()==false do
- os.sleep(0.1)
- turtle.digUp()
- end
- end
- function down()
- while turtle.down()==false do
- os.sleep(0.1)
- turtle.digDown()
- end
- end
- function tree()
- i=0
- j=0
- while turtle.digUp()==true do
- up()
- i=i+1
- end
- for x=1,i,1 do
- down()
- end
- if i>j then
- turtle.digDown()
- end
- turtle.select(slot)
- turtle.placeDown()
- end
- function next()
- for x=1,treeintervall,1 do
- forward()
- end
- end
- function line()
- for a=1,length-1,1 do
- tree()
- next()
- end
- tree()
- end
- function turnNextRight()
- turtle.turnRight()
- for x=1,treeintervall,1 do
- forward()
- end
- turtle.turnRight()
- end
- function turnNextLeft()
- turtle.turnLeft()
- for x=1,treeintervall,1 do
- forward()
- end
- turtle.turnLeft()
- end
- function back()
- turtle.turnRight()
- for d=1,u,1 do
- next()
- end
- turtle.turnLeft()
- down()
- end
- -------------------------
- up()
- u=0
- slot=1
- run=0
- for s=0.5,high/2,1 do
- run=run+1
- if run>3 then
- slot=slot+1
- run=0
- end
- turnNextLeft()
- line()
- turnNextRight()
- line()
- u=u+2
- end
- back()
Add Comment
Please, Sign In to add comment