Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function goUp()
- if not turtle.up() then
- turtle.digUp()
- goUp()
- end
- end
- function reset()
- turtle.select(16)
- if not turtle.compareDown() then
- print("Going Down")
- turtle.down()
- reset()
- end
- end
- function chop()
- turtle.select(2)
- reset()
- turtle.select(15)
- while turtle.compare() do
- print("Digging")
- turtle.select(2)
- turtle.dig()
- goUp()
- turtle.select(2)
- end
- reset()
- end
- function plant()
- turtle.select(1)
- if not turtle.detect() then
- print("Planting")
- turtle.place()
- end
- end
- function drop()
- reset()
- --goUp()
- for i=2, 14 do
- turtle.select(i)
- if turtle.getFuelLevel() < 100 then
- print("Fuel level: " .. turtle.getFuelLevel() .. " Burning Wood.")
- turtle.refuel()
- end
- turtle.drop()
- end
- end
- while true do
- reset()
- plant()
- chop()
- drop()
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment