Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local wood = 1
- local wood2 = 2
- local wood3 = 3
- local wood4 = 4
- local sapling = 13
- local sapling2 = 14
- local sapling3 = 15
- local bonemeal = 16
- local function chopTree()
- turtle.select(1)
- turtle.dig()
- turtle.forward()
- while turtle.detectUp() do
- turtle.digUp()
- turtle.up()
- end
- repeat
- turtle.down()
- until turtle.detectDown()
- end
- local function plantTree()
- turtle.select(sapling)
- turtle.place()
- repeat
- turtle.select(bonemeal)
- turtle.place()
- turtle.select(wood)
- until turtle.compare()
- end
- local tArgs = {...}
- if type(tArgs[1]) == "number" then
- for i = 1, tArgs[1] do
- plantTree()
- chopTree()
- end
- else
- while true do
- plantTree()
- chopTree()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment