SHARE
TWEET
huber
a guest
Jan 29th, 2018
64
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- function checkFuel()
- if turtle.getFuelLevel() < 10 then
- turtle.select(1)
- turtle.refuel(1)
- end
- turtle.select(2)
- end
- function digMove()
- checkFuel()
- turtle.dig()
- turtle.forward()
- end
- function column()
- height = 0
- while turtle.digUp() do
- checkFuel()
- turtle.dig()
- turtle.up()
- height = height + 1
- end
- return height
- end
- function columnDown(height)
- for i=1,height do
- checkFuel()
- turtle.dig()
- turtle.digDown()
- turtle.down()
- end
- turtle.dig()
- end
- function chest()
- turtle.back()
- turtle.dig()
- turtle.back()
- turtle.dig()
- turtle.back()
- turtle.dig()
- turtle.turnLeft()
- for i=3,16 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.up()
- turtle.select(1)
- if turtle.getItemCount(1) == 0 then
- turtle.suck()
- end
- turtle.up()
- turtle.select(2)
- if turtle.getItemCount(2) < 4 then
- turtle.suck()
- end
- turtle.down()
- turtle.down()
- turtle.turnRight()
- end
- function replant()
- turtle.select(2)
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.place()
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.place()
- turtle.turnRight()
- turtle.back()
- turtle.place()
- turtle.turnLeft()
- turtle.back()
- turtle.place()
- end
- function chop()
- digMove()
- distance = column()
- turtle.turnRight()
- digMove()
- turtle.turnLeft()
- columnDown(distance)
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.back()
- chest()
- replant()
- end
- while true do
- turtle.select(2)
- if not turtle.compare() then
- chop()
- end
- end
RAW Paste Data

