Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Slot 1: Fuel
- Slot 15: Dirt
- Slot 16: Sapling
- --]]
- function plant (curSlot)
- turtle.select(16)
- turtle.place()
- turtle.select(curSlot)
- end
- function fell (curSlot)
- -- Climbing
- while turtle.detect() do
- turtle.digUp()
- turtle.up()
- end
- turtle.forward()
- -- Digging
- turtle.select(15)
- while not turtle.compareDown() do
- turtle.digDown()
- turtle.down()
- end
- end
- function storage ()
- -- Making sure to contact ground
- while not turtle.detectDown() do
- turtle.down()
- end
- turtle.turnRight()
- turtle.turnRight()
- for slot=2,14 do
- turtle.select(slot)
- turtle.drop()
- end
- turtle.turnRight()
- turtle.turnRight()
- end
- function fuelManage (curSlot)
- if turtle.getFuelLevel() < 3 then
- turtle.select(1)
- turtle.refuel()
- turtle.select(curSlot)
- end
- end
- function getSapling ()
- --Boundary: 5
- end
- function main ()
- fell()
- storage()
- plant()
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement