Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Turtle de répartition bois -> charcoal
- function compare()
- marque = -1
- for j = 13, 16 do
- if turtle.compareTo(j) == true then
- marque = j
- end
- end
- return marque
- end
- function ItemCount()
- for i = 1, 16 do
- turtle.select(i)
- if turtle.getItemCount(i) >= 3 then
- print("Find item to dispatch in slot "..i)
- turtle.dropDown(1)
- turtle.dropUp(1)
- turtle.drop(1)
- end
- print("check slot "..i.."/16")
- --sleep (2)
- shell.run('clear')
- end
- ItemCount()
- end
- ----------------------------------------------------------------
- -- DEPLACEMENTS
- ----------------------------------------------------------------
- function g()
- turtle.turnLeft()
- end
- function d()
- turtle.turnRight()
- end
- function a()
- while turtle.detect() do
- turtle.dig()
- end
- moved = false
- while not(moved) do
- moved = turtle.forward()
- end
- end
- function h()
- turtle.digUp()
- moved = false
- while not(moved) do
- moved = turtle.up()
- end
- end
- function b()
- turtle.digDown()
- moved = false
- while not(moved) do
- moved = turtle.down()
- end
- end
- -------------PROGRAM------------
- ItemCount()
Advertisement
Add Comment
Please, Sign In to add comment