Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("left")
- rednet.open("right")
- while true do
- rednet.broadcast("GET","tankInfo")
- id,message = rednet.receive("tankOut")
- mon.clear()
- mon.setCursorPos(1,1)
- info = textutils.unserialize(message)
- amount = math.ceil(info[1].contents.amount)
- capacity = math.ceil(info[1].capacity)
- mon.setTextScale(1.5)
- mon.write(amount .. " XP")
- mon.setCursorPos(1,2)
- mon.write("----------")
- mon.setCursorPos(1,3)
- mon.write(capacity .. " XP")
- mon.setCursorPos(1,5)
- mon.write(math.ceil((amount/capacity)*100) .. "%")
- os.sleep(3)
- print(message)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement