Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("top")
- function giveTankAmount()
- local s,m = rednet.receive()
- if s == 4 then
- local tank = peripheral.wrap("left")
- local x = tank.getTankInfo()
- local x = x[1]
- local x = x.contents.amount
- rednet.send(s,x)
- return s
- else
- rednet.send(s, "denied")
- end
- end
- local a = true
- repeat
- local b = giveTankAmount()
- print("Request from #"..b)
- until a == false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement