bigbadtom

placeglow

Oct 17th, 2021 (edited)
118
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local slot = 1
  2.  
  3. function checkstock()
  4. turtle.select(slot)
  5. return turtle.getItemCount(slot)
  6. end
  7.  
  8. local stock = checkstock()
  9.  
  10. function nextslot()
  11.     if slot == 1 then
  12.         slot = 2
  13.     elseif slot == 2 then
  14.         slot = 1
  15.     end
  16. end
  17.  
  18. if stock == 0 then
  19.     while stock == 0 do
  20.     nextslot()
  21.     stock = checkstock()
  22.     end
  23. end
  24. print(stock)
  25.  
  26. turtle.forward()
  27. turtle.placeDown()
  28. shell.run("items")
RAW Paste Data