local robot = require("robot") local component = require("component") local itemsCount = robot.count(1) function getItems() if robot.count(1) = 0 then robot.suckDown() end function expUse() local itemsCount = robot.count(1) if itemsCount > 0 then component.inventory_controller.equip() -- Doesn't work since what I want to do is get the itemsCount for i=1, itemsCount -- before I switch/equip the slot and use the value for the loop. do robot.use() end else getItems() end end -- The Robot should pull once a from a chest below it. -- After taking the items from the chest, It will check the stack size -- in the first slot with robot.count(1) and use that value -- in the next step, "robot.use()". -- The Robot will use component.inventory_controller.equip() to equip -- the items pulled from the chest. After that, the Robot will utilize the -- function robot.use() for the numbers of time returned when robot.count(1) -- was used. -- The Robot shouldn't pull items from the chest while it's using -- robot.use() function. -- This program while run in a loop. -- I have not added this part above yet.