Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. local Item ={}
  2. local fin = false
  3. local i = 0
  4. Item.name = "0"
  5. Item.count = "0"
  6.  
  7. while true do
  8. i=i+1
  9. if i==17 then
  10. i=1
  11. end
  12. if redstone.getInput("right") == true then
  13. redstone.setOutput("right",true)
  14. print("detection signal redstone")
  15. os.sleep(33)
  16. i=1
  17. if turtle.getItemCount(i) ~= 0 then
  18. Item=turtle.getItemDetail(i)
  19. print("detection Item")
  20. if Item.name == "PneumaticCraft:ingotIronCompressed" then
  21. print("detection Iron")
  22. while fin == true do
  23. if turtle.getItemCount(i) >= 10 then
  24. turtle.select(i)
  25. turtle.dropDown()
  26. redstone.setOutput("right",false)
  27. fin = true
  28. print("detection fin")
  29. end
  30. if (turtle.getItemCount(i) < 10) and (turtle.getItemCount(i) ~= 0) then
  31. redstone.setOutput("front",true)
  32. os.sleep(1)
  33. redstone.setOutput("front",false)
  34. print("detection manque")
  35. os.sleep(20)
  36. end
  37. end
  38. fin = false
  39. print("sortie de boucle")
  40. end
  41. end
  42. end
  43. os.sleep(1)
  44. print(i)
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement