Advertisement
opencomputerstest2

concrete.lua

Apr 11th, 2024 (edited)
648
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. local input = peripheral.find("sc-goodies:gold_barrel_2299")
  2. local output = peripheral.find("sc-goodies:gold_barrel_2300")
  3. local myName = peripheral.find("modem").getNameLocal()
  4. turtle.select(1)
  5.  
  6. while true do
  7.     for i=1,input.size() do
  8.         print("Slot: " .. i)
  9.         local data = input.getItemDetail(i)
  10.         if data and data.name:match("concrete_powder") then
  11.             input.pushItems(myName, i, 1)
  12.             turtle.placeDown()
  13.             turtle.digDown()
  14.             output.pullItems(myName, 1)
  15.         end
  16.     end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement