Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chest = peripheral.wrap("top")
- modem = peripheral.wrap("back")
- modem.open(10)
- dir = "EAST"
- print(dir)
- while true do
- local _,_,_,_,msg = os.pullEvent("modem_message")
- if msg[1] == "PULL" then
- chest.pullItem(dir,1,1,msg[2])
- print("pulled into slot "..msg[2])
- elseif msg[1] == "PUSH" then
- chest.pushItem(dir,msg[2])
- print("pushed item from "..msg[2])
- end
- end
Add Comment
Please, Sign In to add comment