Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function chop()
- turtle.dig()
- turtle.forward()
- while turtle.compareUp() do
- turtle.digUp()
- turtle.up()
- end
- while not turtle.detectDown() do
- turtle.down()
- end
- turtle.back()
- end
- function dropWood()
- turtle.back()
- turtle.back()
- turtle.turnRight()
- turtle.select(1)
- turtle.drop()
- turtle.suck(1)
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- end
- function suckSaplings()
- turtle.back()
- turtle.back()
- turtle.turnLeft()
- turtle.select(2)
- turtle.suck(60)
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- end
- function suckFuel()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.select(4)
- turtle.suck(60)
- turtle.refuel()
- turtle.back()
- turtle.back()
- turtle.turnRight()
- end
- function suckBnMl()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.select(3)
- turtle.suck(60)
- turtle.back()
- turtle.back()
- turtle.turnLeft()
- end
- --Main Program
- for i = 1, 10 do
- turtle.select(2)
- turtle.place()
- turtle.select(3)
- turtle.place()
- turtle.select(1)
- repeat
- until turtle.compare()
- chop()
- local w = turtle.getItemCount(1)
- local s = turtle.getItemCount(2)
- local f = turtle.getFuelLevel()
- local b = turtle.getItemCount(3)
- if w>56 then
- dropWood()
- end
- if s<2 then
- suckSaplings()
- end
- if f<100 then
- suckFuel()
- end
- if b<2 then
- suckBnMl()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement