Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- _____
- -- | ___| _ _ __ ___
- -- | |_ | | | | '_ \ / __|
- -- | _|| |_| | | | | (__
- -- |_| \__,_|_| |_|\___|
- --
- left = function()
- return turtle.turnLeft()
- end
- right = function()
- return turtle.turnRight()
- end
- select = function(id)
- return turtle.select(id)
- end
- count = function(id)
- return turtle.getItemCount(id)
- end
- move = function(id, nb)
- return turtle.transferTo(id, nb)
- end
- -- _____
- -- | ___| _ _ __ ___
- -- | |_ | | | | '_ \ / __|
- -- | _|| |_| | | | | (__
- -- |_| \__,_|_| |_|\___|
- --
- function init()
- return true
- end
- function clear_inventory()
- for i = 1,16 do
- if(count(i)>0)then
- turtle.select(i)
- if(turtle.dropDown()==false)then
- return false
- end
- end
- end
- select(1)
- return true
- end
- -- __ __ _ ____
- -- | \/ | __ _(_)_ __ / /\ \
- -- | |\/| |/ _` | | '_ \| | | |
- -- | | | | (_| | | | | | | | |
- -- |_| |_|\__,_|_|_| |_| | | |
- -- \_\/_/
- args = { ... }
- if( args[1]==null)then
- args[1] = 16
- --print("Début de 'tree', par defaut, "..args[1].." blocks")
- else
- --print("Début de 'tree', "..args[1].." blocks")
- end
- stop=false
- if(init()==false) then
- stop=true
- end
- select(1)
- while(stop==false)do
- turtle.suck()
- turtle.suckUp()
- if(turtle.detect() == true)then
- turtle.dig()
- turtle.suck()
- turtle.suckUp()
- sleep(3)
- turtle.suck()
- turtle.suckUp()
- else
- sleep(3)
- end
- turtle.turnLeft()
- if(count(1) > 0)then
- if(clear_inventory() == false)then
- print('chest full :(')
- stop = true
- end
- end
- redstone.setOutput("bottom", true)
- sleep(1)
- redstone.setOutput("bottom", false)
- end
- print('End')
- if(fuel() == 0) then
- --print('Ya plus de coco mon coco !')
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement