Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("twitchapi")
- m = peripheral.find("monitor")
- m.setTextScale(2) --Getting around a CC bug
- m.setTextScale(1)
- liveX = 5
- notLiveX = 1
- startY = 1
- streamers = {
- "lokbatch",
- }
- function nextY()
- x,y = m.getCursorPos()
- newY = y + 1
- end
- function streamerloop(streamer)
- nextY()
- m.setCursorPos(notLiveX,newY)
- if twitchapi.checkLive(streamer) then
- --m.setTextColor(colors.green)
- m.write(streamer.." is live!")
- --m.setTextColor(colors.white)
- nextY()
- m.setCursorPos(liveX,newY)
- m.write(streamer.."'s Most Recent Viking: "..twitchapi.lastFollower(streamer))
- nextY()
- m.setCursorPos(liveX,newY)
- m.write(streamer.."'s Viewer Count: "..twitchapi.viewerCount(streamer))
- else
- --m.setTextColor(colors.red)
- m.write(streamer.." is not live!")
- --m.setTextColor(colors.white)
- end
- end
- function main()
- while true do
- m.clear()
- for k,v in pairs(streamers) do
- streamerloop(streamers[k])
- sleep(5)
- end
- sleep(30)
- m.setCursorPos(1,1)
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement