Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor")
- rednet.open("top")
- print("Enviando sinal...")
- while true do
- prox = peripheral.wrap("left")
- --print(textutils.serialize(prox.getTargets()))
- local targets = prox.getTargets()
- for name, basicDetails in pairs(targets) do
- local moreDetails = prox.getTargetDetails(name)
- if moreDetails.RawName == "net.chest" then
- local T = {}
- T[0] = moreDetails.InventoryPercentFull
- T[1] = moreDetails.ItemCount
- T[2] = moreDetails.TotalSpace
- local Table = textutils.serialize(T)
- --rednet.send(18, moreDetails.ItemCount)
- rednet.send(18, Table)
- end
- end -- Fecha o FOR in Pairs
- sleep(4)
- end -- fecha o While
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement