Advertisement
dezindzer

Tank samo jedan FINAL

Feb 17th, 2016
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.39 KB | None | 0 0
  1. -- INFO: For this to work, you need a Advanced Computer and a Advanced Nuclear Information Reader with liquid sensor location cards in it
  2.  
  3. -- peripheral
  4.  
  5. nir = peripheral.wrap("left") --Nuclear Information Reader
  6. local  mon = peripheral.wrap("top")  --Advanced Monitor
  7. mon.setTextScale(1)
  8. term.redirect(mon)
  9.  
  10. --Basic function
  11. id, state, title, data = nir.get(1)
  12.  
  13. term.setTextColor( colors.purple)
  14. print("Dezinliquidator 3000")
  15. print("--------------------")
  16.  
  17. -- liquid search starts here
  18.  
  19. if data.liquidId == 8 then
  20. term.setTextColor( colors.blue)
  21. print("Water: "..(data.amount/1000).." / "..(data.capacity/1000))
  22. elseif data.liquidId == 10 then
  23. term.setTextColor( colors.red)
  24. print("Lava: "..(data.amount/1000).." / "..(data.capacity/1000))
  25. elseif data.liquidId == 255 then
  26. term.setTextColor( colors.white)
  27. print("Oil: "..(data.amount/1000).." / "..(data.capacity/1000))
  28. elseif data.liquidId == 4064 then
  29. term.setTextColor( colors.lime)
  30. print("Fuel: "..(data.amount/1000).." / "..(data.capacity/1000))
  31. elseif data.liquidId == 7773 then
  32. term.setTextColor( colors.green)
  33. print("Creosite: "..(data.amount/1000).." / "..(data.capacity/1000))
  34. elseif data.liquidId == 7776 then
  35. term.setTextColor( colors.lightGray)
  36. print("Steam: "..(data.amount/1000).." / "..(data.capacity/1000))
  37. elseif data.liquidId == 8799 then
  38. term.setTextColor( colors.magenta)
  39. print("Liquid DNA: "..(data.amount/1000).." / "..(data.capacity/1000))
  40. -- MFR LIQUIDS start
  41. elseif data.liquidId == 12244 then
  42. term.setTextColor( colors.white)
  43. print("Milk: "..(data.amount/1000).." / "..(data.capacity/1000))
  44. elseif data.liquidId == 12245 then
  45. term.setTextColor( colors.blue)
  46. print("Sludge: "..(data.amount/1000).." / "..(data.capacity/1000))
  47. elseif data.liquidId == 12246 then
  48. term.setTextColor( colors.brown)
  49. print("Sewage: "..(data.amount/1000).." / "..(data.capacity/1000))
  50. elseif data.liquidId == 12247 then
  51. term.setTextColor( colors.lime)
  52. print("Mob Essence: "..(data.amount/1000).." / "..(data.capacity/1000))
  53. elseif data.liquidId == 12265 then
  54. term.setTextColor( colors.purple)
  55. print("BioFuel: "..(data.amount/1000).." / "..(data.capacity/1000))
  56. -- MFR LIQUIDS end
  57. -- FORESTRY LIQUIDS start
  58. elseif data.liquidId == 12390 then
  59. term.setTextColor( colors.white)
  60. print("Milk: "..(data.amount/1000).." / "..(data.capacity/1000))
  61. elseif data.liquidId == 13267 then
  62. term.setTextColor( colors.lime)
  63. print("Apple Juice: "..(data.amount/1000).." / "..(data.capacity/1000))
  64. elseif data.liquidId == 13273 then
  65. term.setTextColor( colors.orange)
  66. print("Biofuel: "..(data.amount/1000).." / "..(data.capacity/1000))
  67. elseif data.liquidId == 13274 then
  68. term.setTextColor( colors.lime)
  69. print("Biomass: "..(data.amount/1000).." / "..(data.capacity/1000))
  70. -- bees? start
  71. elseif data.liquidId == 13387 then
  72. term.setTextColor( colors.orange)
  73. print("Honey: "..(data.amount/1000).." / "..(data.capacity/1000))
  74. elseif data.liquidId == 13391 then
  75. term.setTextColor( colors.yellow)
  76. print("Seed Oil: "..(data.amount/1000).." / "..(data.capacity/1000))
  77. -- bees end
  78. -- FORESTRY LIQUIDS end
  79. elseif data.liquidId == 30103 then
  80. term.setTextColor( colors.cyan)
  81. print("Coolant: "..(data.amount/1000).." / "..(data.capacity/1000))
  82.  
  83. -- test data & metdata
  84. -- 69
  85. elseif data.liquidId == 21269 then
  86.     if     data.liquidMeta == 0 then
  87.         term.setTextColor( colors.Blue)
  88.         print("Hydrogen: "..(data.amount/1000).." / "..(data.capacity/1000))
  89.     elseif data.liquidMeta == 4 then
  90.         term.setTextColor( colors.gray)
  91.         print("Wolframium: "..(data.amount/1000).." / "..(data.capacity/1000))     
  92.     elseif data.liquidMeta == 5 then
  93.         term.setTextColor( colors.lightBlue)
  94.         print("Lithium: "..(data.amount/1000).." / "..(data.capacity/1000))
  95.     elseif data.liquidMeta == 7 then
  96.         term.setTextColor( colors.brown)
  97.         print("Silicon: "..(data.amount/1000).." / "..(data.capacity/1000))    
  98.     elseif data.liquidMeta == 10 then
  99.         term.setTextColor( colors.green)
  100.         print("Berylium: "..(data.amount/1000).." / "..(data.capacity/1000))       
  101.     elseif data.liquidMeta == 12 then
  102.         term.setTextColor( colors.cyan)
  103.         print("Sodium: "..(data.amount/1000).." / "..(data.capacity/1000)) 
  104.     elseif data.liquidMeta == 16 then
  105.         term.setTextColor( colors.pink)
  106.         print("Mercury: "..(data.amount/1000).." / "..(data.capacity/1000))        
  107.     end
  108. -- 70
  109. elseif data.liquidId == 21270 then  
  110.     if     data.liquidMeta == 1 then
  111.         term.setTextColor( colors.yellow)
  112.         print("Deuterium: "..(data.amount/1000).." / "..(data.capacity/1000))  
  113.     elseif data.liquidMeta == 2 then
  114.         term.setTextColor( colors.red)
  115.         print("Tritium: "..(data.amount/1000).." / "..(data.capacity/1000))
  116.     elseif data.liquidMeta == 3 then
  117.         term.setTextColor( colors.yellow)
  118.         print("Helium: "..(data.amount/1000).." / "..(data.capacity/1000)) 
  119.     elseif  data.liquidMeta == 6 then
  120.         term.setTextColor( colors.yellow)
  121.         print("Helium-3: "..(data.amount/1000).." / "..(data.capacity/1000))
  122.     end
  123. -- 71
  124. elseif data.liquidId == 21271 then
  125.     if     data.liquidMeta == 3 then
  126.         term.setTextColor( colors.yellow)
  127.         print("Helium Plasma: "..(data.amount/1000).." / "..(data.capacity/1000))
  128.        
  129.     elseif data.liquidMeta == 1 then
  130.         term.setTextColor( colors.yellow)
  131.         print("Deuterium: "..(data.amount/1000).." / "..(data.capacity/1000))
  132.     elseif data.liquidMeta == 2 then
  133.         term.setTextColor( colors.red)
  134.         print("Tritium: "..(data.amount/1000).." / "..(data.capacity/1000))
  135.     end
  136. elseif data.liquidId == 0 then
  137. print("Tank empty")
  138. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement