Skip to content

Instantly share code, notes, and snippets.

@boq
Last active August 29, 2015 14:18
Show Gist options
  • Select an option

  • Save boq/871256095179084cd651 to your computer and use it in GitHub Desktop.

Select an option

Save boq/871256095179084cd651 to your computer and use it in GitHub Desktop.
while true do
local evt, slot, side = os.pullEvent()
if evt == 'slot_click' then
if slot ~= 5 then
local p = peripheral.wrap(side)
local item = p.getSlot(slot)
print(item.raw_name)
p.setSlot(5, item)
else
peripheral.call(side, "setSlot", 5)
end
else
break
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment