Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print( "Put some barrels/chests in Slot 1..." )
- print( "...a stack of Oak Saplings in Slot 2" )
- print( "...a Hoe of Growth/Bonemeal in slot 3")
- print( "Press any key to continue..." )
- os.pullEvent("char")
- local lvl = 1
- turtle.digDown()
- turtle.select(1)
- turtle.placeDown()
- local function ascend()
- turtle.up()
- local lvl = lvl + 1
- end
- local function descend()
- turtle.down()
- local lvl = lvl - 1
- end
- local function grow()
- turtle.select(2)
- turtle.place()
- turtle.select(3)
- turtle.place()
- ascend()
- end
- local function chop()
- turtle.select(4)
- turtle.dig()
- turtle.forward()
- while turtle.detectUp() = true do
- turtle.digUp()
- ascend()
- end
- while lvl > 1 do
- while turtle.detectdown() = true do
- turtle.digDown()
- end
- while turtle.detectdown() = false do
- descend()
- end
- end
- turtle.back()
- end
- local function unload()
- for i = 3, 16 do
- turtle.select(i)
- turtle.dropDown()
- end
- end
- for t = 1, 64 do
- grow()
- chop()
- unload()
- end
Advertisement
Add Comment
Please, Sign In to add comment