Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tArgs = {...}
- monitor = peripheral.wrap("left")
- if(tArgs[1]=="level") then
- level = 15-tonumber(tArgs[2])
- for i=0,15 do
- monitor.setCursorPos(2,i+5)
- if(level<=i) then
- monitor.setBackgroundColor(colors.red)
- else
- monitor.setBackgroundColor(colors.black)
- end
- monitor.write(" ")
- end
- elseif(tArgs[1]=="init") then
- monitor.setBackgroundColor(colors.white)
- monitor.clear()
- monitor.setTextScale(0.5)
- -- for i=1,24 do
- -- monitor.setCursorPos(1,i)
- -- monitor.write(" "..tostring(i))
- -- end
- -- monitor.setBackgroundColor(colors.white)
- -- monitor.setCursorPos(1,4)
- -- monitor.write(" ")
- -- monitor.setCursorPos(1,21)
- -- monitor.write(" ")
- -- for i=1,16 do
- -- monitor.setCursorPos(1,i+4)
- -- monitor.write(" ")
- -- monitor.setCursorPos(15,i+4)
- -- monitor.write(" ")
- -- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement