Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- numberCharcoal = 64
- function resetAll()
- for n=1,16 do
- turtle.select(n)
- turtle.dropUp()
- end
- end
- function suckToDEATHifNeeded()
- local data = turtle.getItemDetail()
- if data then
- if data.count ~= numberCharcoal then
- local restant = numberCharcoal - data.count
- os.sleep(10)
- turtle.suck(restant)
- suckToDEATHifNeeded()
- end
- else
- os.sleep(10)
- turtle.suck(numberCharcoal)
- suckToDEATHifNeeded()
- end
- end
- function run ()
- while true do
- local data2 = turtle.getItemDetail(1)
- if data2 then
- if data2.name == 'chisel:block_charcoal2' then
- resetAll()
- os.sleep(7200)
- end
- end
- local selectNum = {1,2,3,5,6,7,9,10,11}
- for i,v in ipairs(selectNum) do
- turtle.select(v)
- turtle.suck(numberCharcoal)
- suckToDEATHifNeeded()
- end
- turtle.select(1)
- turtle.craft()
- turtle.turnRight()
- turtle.turnRight()
- turtle.drop()
- turtle.turnRight()
- turtle.turnRight()
- local dataCheck = turtle.getItemDetail(16)
- if dataCheck then
- resetAll()
- end
- end
- end
- function remettre()
- local success, data = turtle.inspect()
- if success then
- if data.name == 'minecraft:log' then
- turtle.turnLeft()
- resetAll()
- run()
- end
- if data.name == 'minecraft:glowstone' then
- turtle.turnRight()
- resetAll()
- run()
- end
- if data.name == 'minecraft:chest' then
- turtle.turnRight()
- remettre()
- else
- run()
- end
- turtle.select(1)
- end
- end
- remettre()
Advertisement
Add Comment
Please, Sign In to add comment