daily pastebin goal
32%
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.loadAPI("ocs/apis/sensor")
  2. local sensor = sensor.wrap("left")
  3. local targets = sensor.getTargets()
  4.  
  5. while true do
  6.   local details = sensor.getTargetDetails("-1,0,0")
  7.   local item = targets.getStackInInternalSlot(1)
  8.   if item then
  9.     print("Item name: ", item.name)
  10.     print("Item count: ", item.size)
  11.     print("Item damage: ", item.damage)
  12.   else
  13.     print("Slot " .. slot .. " is empty")
  14.   end
  15. end
RAW Paste Data
Top