Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ped = peripheral.wrap("top")
- local mod = peripheral.wrap("bottom")
- mod.open(13)
- function sendItem()
- local stack = ped.getStackInSlot(1)
- for k,v in pairs(stack) do
- print(v)
- if (v == null) then
- return null
- end
- print("Received Message... Sending: "..v)
- mod.transmit(20,25,v)
- return true
- end
- end
- while true do
- local event, modemSize, replyChannel, message, distance = os.pullEvent("modem_message")
- sendItem()
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement