Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Variables
- sap = 1 --Sapling slot
- bone = 2 --Bone meal slot
- fuel = 3 --Fuel slot
- sChest = 4 --Sapling chest slot
- bChest = 5 --Bone meal chest slot
- fChest = 6 --Fuel chest slot
- dump = 7 --Item export chest slot
- fuelLevel = turtle.getFuelLevel()
- sapLevel = turtle.getItemCount(1)
- boneLevel = turtle.getItemCount(2)
- --Functions
- function plant()
- turtle.select("sap")
- turtle.place()
- end
- function grow()
- turtle.select("bone")
- turtle.place()
- end
- function chop()
- while turtle.detectUp() do
- turtle.digUp()
- turtle.up()
- end
- end
- function resetPos()
- while not turtle.detectDown() do
- turtle.down()
- end
- end
- function dump()
- turtle.select("dump")
- turtle.place()
- turtle.select(3)
- turtle.drop()
- turtle.select(8)
- turtle.drop()
- turtle.select(9)
- turtle.drop()
- turtle.select(10)
- turtle.drop()
- end
- function getSap()
- if sapLevel < 16 then
- turtle.select("sChest")
- turtle.place()
- turtle.select("sap")
- turtle.suck()
- turtle.select("sChest")
- turtle.dig()
- end
- end
- function getBone()
- if boneLevel < 16 then
- turtle.select("bChest")
- turtle.place()
- turtle.select("bone")
- turtle.suck()
- turtle.select("bChest")
- turtle.dig()
- end
- end
- function fuelUp()
- if fuelLevel < 100 then
- turtle.select("fChest")
- turtle.place()
- turtle.select("fuel")
- turtle.suck()
- turtle.refuel()
- turtle.select("fChest")
- turtle.dig()
- end
- end
- --Main Program
- while true do
- turtle.getSap()
- turtle.fuelUp()
- turtle.getBone()
- turtle.plant()
- turtle.grow()
- turtle.dig()
- turtle.forward()
- turtle.chop()
- turtle.resetPos()
- turtle.back()
- turtle.dump()
- sleep(180)
- end
Advertisement
Add Comment
Please, Sign In to add comment