Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local p = peripheral.wrap("bottom")
- local mon = peripheral.wrap("monitor_1")
- --local pow = peripheral.wrap("tile_blockcapacitorbank_name_1")
- --local stored = peripheral.wrap
- local color = mon.setTextColor
- function red()
- color(colors.red)
- end
- function blue()
- color(colors.blue)
- end
- function newLineL()
- local cX,cY = mon.getCursorPos()
- mon.setCursorPos(1,cY+1)
- end
- function newLineR()
- local xX,yY = mon.getCursorPos()
- mon.setCursorPos(xX,yY+1)
- end
- --for i = 1, 10000, 2 do
- --mon.setBackgroundColor(i)
- --end
- while true do
- --mon.setBackgroundColor( math.random(5, 2050, 50))
- mon.setBackgroundColor( colors.black )
- mon.clear()
- for k,v in pairs(p.listAll()) do
- name = v[1]
- amount = v[3]
- gname = v[4]
- if v[3] == nil then
- mon.getCursorPos(cX,cY)
- mon.setCursorPos(cX,cY-1)
- elseif amount <= 9 then
- amount = (v[3].." ")
- elseif amount <= 99 then
- amount = (v[3].." ")
- elseif amount <=999 then
- amount = (v[3].." ")
- end
- local tcolor = mon.setTextColor
- --mon.getCursorPos()
- --mon.setCursorPos(1,1)
- --mon.setTextColor( colors.red )
- --print("[")
- --mon.setCursorPos(2,1)
- --mon.setTextColor( colors.blue )
- --mon.setCursorPos(4,1)
- --mon.write(amount)
- --mon.setCursorPos(5,1)
- --mon.write("] ")
- --
- mon.setTextScale(.8)
- mon.setCursorPos(1,1)
- -- LEFT SIDE WOOT WOOT
- if name == "minecraft:iron_ingot" then
- red()
- mon.write(amount.." ")
- blue()
- mon.write(gname)
- end
- newLineL()
- if name == "minecraft:diamond" then
- red()
- mon.write(amount.." ")
- blue()
- mon.write(gname)
- end
- newLineL()
- if name == "minecraft:diamond_block" then
- red()
- mon.write(amount.." ")
- blue()
- mon.write(gname)
- end
- newLineL()
- if name == "minecraft:ender_pearl" then
- red()
- mon.write(amount.." ")
- blue()
- mon.write(gname)
- end
- newLineL()
- if name == "minecraft:coal" then
- red()
- mon.write(amount.." ")
- blue()
- mon.write(gname)
- end
- --RIGHT SIDE WOO WOO
- mon.setCursorPos(20,1)
- if name == "minecraft:emerald" then
- red()
- mon.write(amount.." ")
- blue()
- mon.write(gname)
- end
- newLineR()
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement