Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkredstone()
- while true do
- if redstone.getInput("left") then
- print("Sleeping...")
- sleep(10)
- else
- break
- end
- end
- end
- function forward()
- if not turtle.forward() then
- turtle.dig()
- turtle.attack()
- end
- end
- function forwardtest()
- while true do
- if not forward() then
- turtle.back()
- break
- end
- end
- end
- function forwardturn()
- while true do
- if not turtle.forward() then
- turtle.turnLeft()
- break
- end
- end
- end
- function drop()
- for d=1,14 do
- turtle.select(d)
- turtle.dropDown()
- end
- end
- function cut()
- turtle.dig()
- turtle.forward()
- while true do
- if turtle.digUp() then
- turtle.up()
- else if not turtle.down() then
- break
- end
- end
- end
- end
- function tree()
- plant()
- bonemeal()
- cut()
- forward()
- forward()
- end
- function movetodrop25trees()
- turtle.turnRight()
- for g=1,16 do
- if not turtle.back() then
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.attack()
- turtle.dig()
- turtle.turnRight()
- turtle.turnRight()
- end
- end
- end
- function check4trees()
- if turtle.getFuelLevel()<175 then
- refuel()
- end
- end
- function check25trees()
- if turtle.getFuelLevel()<600 then
- refuel()
- end
- end
- function refuel()
- turtle.select(16)
- turtle.turnRight()
- turtle.turnRight()
- while true do
- if not turtle.suck() then
- print("No fuel. Sleeping.")
- else
- turtle.refuel(64)
- turtle.select(1)
- turtle.turnLeft()
- turtle.turnLeft()
- break
- end
- end
- end
- function plant()
- turtle.select(14)
- while true do
- if not turtle.place() then
- turtle.dig()
- turtle.attack()
- else
- turtle.select(1)
- break
- end
- end
- end
- function getsaplings()
- turtle.select(14)
- turtle.turnRight()
- while true do
- if not turtle.suck() then
- print("No saplings. Sleeping.")
- else
- turtle.select(1)
- turtle.turnLeft()
- break
- end
- end
- end
- function getbonemeal()
- turtle.select(15)
- turtle.up()
- turtle.turnRight()
- while true do
- if not turtle.suck() then
- print("No bonemeal. Sleeping.")
- else
- turtle.select(1)
- turtle.turnLeft()
- turtle.down()
- break
- end
- end
- end
- function bonemeal()
- turtle.select(15)
- while true do
- if not turtle.place() then
- turtle.select(1)
- break
- end
- end
- end
- function firstrow()
- for y=1,4 do
- tree()
- end
- cut()
- forward()
- turtle.turnRight()
- forward()
- forward()
- forward()
- turtle.turnRight()
- end
- function secondrow()
- for y=1,4 do
- tree()
- end
- cut()
- forward()
- turtle.turnLeft()
- forward()
- forward()
- forward()
- turtle.turnLeft()
- end
- function thirdrow()
- for y=1,4 do
- tree()
- end
- cut()
- forward()
- turtle.turnRight()
- forward()
- forward()
- forward()
- turtle.turnRight()
- end
- function fourthrow()
- for y=1,4 do
- tree()
- end
- cut()
- forward()
- turtle.turnLeft()
- forward()
- forward()
- forward()
- turtle.turnLeft()
- end
- function fifthrow()
- for y=1,4 do
- tree()
- end
- cut()
- turtle.turnLeft()
- for t=1,12 do
- forward()
- end
- movetodrop25trees()
- end
- while true do
- checkredstone()
- check25trees()
- getsaplings()
- getbonemeal()
- for o=1,3 do
- forward()
- end
- firstrow()
- secondrow()
- thirdrow()
- fourthrow()
- fifthrow()
- drop()
- turtle.select(15)
- turtle.up()
- turtle.turnRight()
- turtle.drop()
- turtle.turnLeft()
- turtle.down()
- sleep(90)
- end
Advertisement
Add Comment
Please, Sign In to add comment