Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- INFO: For this to work, you need a Advanced Computer and a Advanced Nuclear Information Reader with liquid sensor location cards in it
- -- code by Dezindzer
- -- peripheral
- nir = peripheral.wrap("left") --Nuclear Information Reader
- local mon = peripheral.wrap("top") --Advanced Monitor
- term.redirect(mon)
- mon.setTextScale(1)
- mon.setCursorPos(20,1)
- mon.clear()
- --- LOOP START--
- while true do --Always loop
- term.setTextColor( colors.purple)
- mon.setCursorPos(10,1)
- print("|Casio fx-2200z|")
- term.setTextColor( colors.white)
- mon.setCursorPos(20,3)
- print("Buckets")
- print("\n")
- --Basic function
- local function isempty(s)
- return s == nil or s == ''
- end
- local x = 1
- while x < 10 do
- mon.setCursorPos(6,4+x)
- id, state, title, data = nir.get(x)
- x= x+1
- -- liquid search starts here
- if isempty(data) then
- term.setTextColor( colors.white)
- print("prazno")
- elseif data.liquidId > 0 then
- if data.liquidId == 9 then
- term.setTextColor( colors.blue)
- print("Water: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidId == 11 then
- term.setTextColor( colors.red)
- print("Lava: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidId == 255 then
- term.setTextColor( colors.white)
- print("Oil: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidId == 4064 then
- term.setTextColor( colors.lime)
- print("Fuel: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidId == 7773 then
- term.setTextColor( colors.green)
- print("Creosite: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidId == 7776 then
- term.setTextColor( colors.lightGray)
- print("Steam: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidId == 8799 then
- term.setTextColor( colors.magenta)
- print("Liquid DNA: "..(data.amount/1000).." / "..(data.capacity/1000))
- -- MFR LIQUIDS start
- elseif data.liquidId == 12244 then
- term.setTextColor( colors.white)
- print("Milk: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidId == 12245 then
- term.setTextColor( colors.blue)
- print("Sludge: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidId == 12246 then
- term.setTextColor( colors.brown)
- print("Sewage: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidId == 12247 then
- term.setTextColor( colors.lime)
- print("Mob Essence: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidId == 12265 then
- term.setTextColor( colors.purple)
- print("BioFuel: "..(data.amount/1000).." / "..(data.capacity/1000))
- -- MFR LIQUIDS end
- -- FORESTRY LIQUIDS start
- elseif data.liquidId == 12390 then
- term.setTextColor( colors.white)
- print("Milk: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidId == 13267 then
- term.setTextColor( colors.lime)
- print("Apple Juice: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidId == 13273 then
- term.setTextColor( colors.orange)
- print("Biofuel: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidId == 13274 then
- term.setTextColor( colors.lime)
- print("Biomass: "..(data.amount/1000).." / "..(data.capacity/1000))
- -- bees? start
- elseif data.liquidId == 13387 then
- term.setTextColor( colors.orange)
- print("Honey: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidId == 13391 then
- term.setTextColor( colors.yellow)
- print("Seed Oil: "..(data.amount/1000).." / "..(data.capacity/1000))
- -- bees end
- -- FORESTRY LIQUIDS end
- elseif data.liquidId == 30103 then
- term.setTextColor( colors.cyan)
- print("Coolant: "..(data.amount/1000).." / "..(data.capacity/1000))
- -- test data & metdata
- -- 69
- elseif data.liquidId == 21269 then
- if data.liquidMeta == 4 then
- term.setTextColor( colors.gray)
- print("Wolframium: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidMeta == 5 then
- term.setTextColor( colors.lightBlue)
- print("Lithium: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidMeta == 7 then
- term.setTextColor( colors.brown)
- print("Silicon: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidMeta == 10 then
- term.setTextColor( colors.green)
- print("Berylium: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidMeta == 12 then
- term.setTextColor( colors.cyan)
- print("Sodium: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidMeta == 16 then
- term.setTextColor( colors.pink)
- print("Mercury: "..(data.amount/1000).." / "..(data.capacity/1000))
- end
- -- 70
- elseif data.liquidId == 21270 then
- if data.liquidMeta == 0 then
- term.setTextColor( colors.blue)
- print("Hydrogen: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidMeta == 1 then
- term.setTextColor( colors.yellow)
- print("Deuterium: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidMeta == 2 then
- term.setTextColor( colors.red)
- print("Tritium: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidMeta == 3 then
- term.setTextColor( colors.yellow)
- print("Helium: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidMeta == 6 then
- term.setTextColor( colors.yellow)
- print("Helium-3: "..(data.amount/1000).." / "..(data.capacity/1000))
- end
- -- 71
- elseif data.liquidId == 21271 then
- if data.liquidMeta == 3 then
- term.setTextColor( colors.yellow)
- print("Plasma: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidMeta == 1 then
- term.setTextColor( colors.yellow)
- print("Deuterium: "..(data.amount/1000).." / "..(data.capacity/1000))
- elseif data.liquidMeta == 2 then
- term.setTextColor( colors.red)
- print("Tritium: "..(data.amount/1000).." / "..(data.capacity/1000))
- end
- elseif data.liquidId == 0 then
- term.setTextColor(colors.white)
- print("Tank empty")
- else
- print("No card info in slot "..x)
- end -- kraj pretrage
- end -- break/isempty
- end -- while x
- os.sleep(2)
- mon.clear()
- end -- master loop
Add Comment
Please, Sign In to add comment