Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Item ={}
- local fin = false
- local i = 0
- Item.name = "0"
- Item.count = "0"
- while true do
- i=i+1
- if i==17 then
- i=1
- end
- if redstone.getInput("right") == true then
- redstone.setOutput("right",true)
- print("detection signal redstone")
- os.sleep(33)
- i=1
- if turtle.getItemCount(i) ~= 0 then
- Item=turtle.getItemDetail(i)
- print("detection Item")
- if Item.name == "PneumaticCraft:ingotIronCompressed" then
- print("detection Iron")
- while fin == true do
- if turtle.getItemCount(i) >= 10 then
- turtle.select(i)
- turtle.dropDown()
- redstone.setOutput("right",false)
- fin = true
- print("detection fin")
- end
- if (turtle.getItemCount(i) < 10) and (turtle.getItemCount(i) ~= 0) then
- redstone.setOutput("front",true)
- os.sleep(1)
- redstone.setOutput("front",false)
- print("detection manque")
- os.sleep(20)
- end
- end
- fin = false
- print("sortie de boucle")
- end
- end
- end
- os.sleep(1)
- print(i)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement