SHOW:
|
|
- or go back to the newest paste.
1 | - | --[[ |
1 | + | local a,b,c,d,s,q,e,r={peripheral.find"modem"},65533,{},{},type,"transmit"e=function(f)for g,h in pairs(a)do f(h)end end;e(function(h)h.open(b)end)while true do local i,j,k,l,m=os.pullEvent()if i=="modem_message"then if k==b and s(m)=="table"then local n=m.nMessageID;local o=m.nRecipient;if n and o and(s(n)=="number"or s(n)=="string")and s(o)=="number"and o>=0 and o<=65535 then if not c[n]then c[n]=true;d[os.startTimer(30)]=n;e(function(h)h[e](b,l,m)h[e](o,l,m)end)end end end elseif i=="timer"then local p=j;local n=d[p]if n then d[p]=r;c[p]=r end end end |