Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SleepTime = 30
- if not fs.exists('json') then
- write("JSON API not found - Downloading")
- shell.run("pastebin get 4nRg9CHU json")
- end
- os.loadAPI("json")
- local m = peripheral.wrap("top")
- m.setCursorPos(1,1)
- while true do
- str = http.get("https://URLToAJSONListOfRecentSubs").readAll()
- obj = json.decode(str)
- m.setBackgroundColor(colors.white)
- m.setTextColor(colors.blue)
- m.setTextScale(3)
- m.clear()
- m.setCursorPos(1,1)
- m.write("Bacon_Donut's Last Subs!")
- m.setCursorPos(1,2)
- m.write("Welcome to the Party!")
- m.setCursorPos(1,3)
- m.write("=====================")
- for i=1,6,1 do
- m.setCursorPos(3,i+3)
- m.write(obj[i])
- end
- -- m.setCursorPos(3,4)
- -- m.write(obj[1])
- --
- -- m.setCursorPos(3,5)
- -- m.write(obj[2])
- --
- -- m.setCursorPos(3,6)
- -- m.write(obj[3])
- --
- -- m.setCursorPos(3,7)
- -- m.write(obj[4])
- --
- -- m.setCursorPos(3,8)
- -- m.write(obj[5])
- --
- -- m.setCursorPos(3,9)
- -- m.write(obj[6])
- --
- sleep(SleepTime)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement