Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.wrap("right")
- local channel = 42
- local channelbps = 43
- local numtank = 1
- while true do
- local tank = peripheral.wrap("back").getTanks()[1]
- local capacity = tank.capacity
- local amount = tank.amount
- local percent = math.floor(amount/capacity*100)
- local bOne = math.floor(amount/1000)
- sleep(1)
- local amount2 = peripheral.wrap("back").getTanks()[1].amount
- local bTwo = math.floor(amount2/1000)
- local bps = bTwo - bOne
- modem.transmit(channel,numtank, percent)
- print("Send on :"..channel.." I'm :"..numtank.." Value:"..percent.."%")
- modem.transmit(channelbps,numtank, bps)
- print("Send on :"..channelbps.." I'm :"..numtank.." Value:"..string.sub(tostring(bps), 0,4).." bps")
- end
Add Comment
Please, Sign In to add comment