Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Tank Reader by Muzze77
- ------------------------------------
- --You need--
- --1 OpenCCSensor
- --1 Tank Card(MK stands for Range)
- --9 Screens ( Advance Golden)
- --1 Advance Computer
- --1 Tank (Buildcraft)
- ------------------------------------
- --Blinking colors ? True = Yes | False = No
- col = false
- color = {
- [1] = colors.white,
- [2] = colors.gray,
- [3] = colors.red,
- [4] = colors.blue,
- [5] = colors.green,
- [6] = colors.yellow,
- [7] = colors.lime,
- [8] = colors.cyan,
- [9] = colors.orange,
- [10] = colors.purple,
- [11] = colors.lightGray,
- [12] = colors.gray,
- [13] = colors.brown,
- [14] = colors.pink,
- [15] = colors.lightBlue,
- }
- ------------------------------------
- os.loadAPI("ocs/apis/sensor")
- num = 16
- while true do
- m = sensor.wrap("back")
- t = m.getTargetDetails("-4,0,0")
- ran = math.random(1, 15)
- for v, k in pairs(t.Tanks) do
- term.clear()
- term.setCursorPos(1, 1)
- term.setTextColor(colors.green)
- print("Max Capacity")
- term.setTextColor(colors.white)
- term.setCursorPos(1, 16)
- term.setTextColor(colors.red)
- print("Min Capacity")
- term.setTextColor(colors.white)
- x = 1
- mid = 16
- num1 = num + 2
- while x ~= num1 do
- if col == true then
- term.setCursorPos(18, x)
- term.setTextColor(color[ran])
- print(mid .. "k Water")
- term.setTextColor(colors.white)
- x = x + 1
- mid = mid - 1
- elseif col == false then
- term.setCursorPos(18, x)
- term.setTextColor(colors.yellow)
- print(mid .. "k Water")
- term.setTextColor(colors.white)
- x = x + 1
- mid = mid - 1
- end
- end
- term.setTextColor(colors.yellow)
- print(k.Amount .. " Current")
- term.setTextColor(colors.white)
- r = k.Amount
- r = tonumber(r)
- if r ~= 0 then
- r1 = r / 1000
- y = num
- yn = y - r1
- else
- yn = num
- end
- term.setCursorPos(14, yn + 1)
- term.setBackgroundColor(colors.blue)
- print(" ")
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.blue)
- term.setCursorPos(15, yn + 1)
- print("-->")
- term.setTextColor(colors.white)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement