Advertisement
Jeyjey0

check Inventory

Oct 31st, 2016
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. function check()
  2. drop = 0
  3. check = 0
  4. total = 0
  5. for i =1,16 do
  6. drop = drop + 1
  7. turtle.select(drop)
  8. items = turtle.getItemCount()
  9. total = total + items
  10. term.clear()
  11. term.setCursorPos(1,1)
  12. print("Count: ",total)
  13. if total >= 250 == true then
  14. print("VOLL")
  15. local check = 1
  16. print("Clearing ...")
  17. turtle.up()
  18. turtle.turnLeft()
  19. turtle.turnLeft()
  20. h = fs.open("/stripmineprogramm/number","r")
  21. distance3 = h.readAll()
  22. h.close()
  23. distance2 = distance3 * 3
  24. for i=1,distance2 do
  25. mine2.mine2()
  26. end
  27. if turtle.detectDown() == true then
  28. turtle.digDown()
  29. turtle.down()
  30. elseif turtle.detectDown() == false then
  31. turtle.down()
  32. end
  33. mine.clear()
  34. turtle.turnRight()
  35. turtle.turnRight()
  36. turtle.up()
  37. for i=1,distance2 do
  38. mine2.mine2()
  39. end
  40. turtle.down()
  41. break
  42. elseif total < 250 == true then
  43. end
  44. end
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement