Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mon = peripheral.wrap("back") -- S??lectionez le cot?? de votre ??cran :3
- term.redirect(mon)
- os.loadAPI("json")
- term.clear()
- term.setTextColor(colors.gray)
- print("Obtention des tweets en cours... Merci de patienter")
- term.setCursorPos(3,1)
- Incr = 0
- term.setBackgroundColor( colors.black )
- while true do
- redstone.setOutput("top", false)
- local contenu = http.get("https://theo33500.xyz/toath/twitteroauth/test.php")
- --Ici changer Bill par le pseudo a surveiller.
- while contenu == nil do
- if Int == nil then
- Int = 0
- end
- term.clear()
- term.setTextColor(colors.gray)
- term.setCursorPos(3,1)
- print("Impossible d'obtenir les tweets.. Nouvelle tentative")
- Int = Int + 1
- sleep(2)
- contenu = http.get("http://theo33500.xyz/toath/twitteroauth/test.php")
- if Int == 10 then
- error("Impossible d'obtenir les tweets")
- end
- end
- local data = contenu.readAll()
- decode = json.decode(data)
- i = 10
- ii = 0
- while ii <= 10 do
- if decode.statuses[i] ~= null then
- local text = decode.statuses[i].text
- local from = decode.statuses[i].user.name
- local team = "null"
- text = text:gsub("u00e9","e")
- text = text:gsub("u00e0","a")
- text = text:gsub("u00a0"," ")
- text = text:gsub("u00e8","e")
- text = text:gsub("u00e1","a")
- text = text:gsub("u00ea","e")
- from = from:gsub("ud83dudd25","*flamme*")
- local at = decode.statuses[i].user.screen_name
- local long = string.len(from)
- local I = 74 - long
- --if from = ModFriends_
- -- color = colors.white
- --end
- if at == "Theo33500" then
- team = "creative"
- end
- if at == "TheNyoFR" then
- team = "iliad"
- end
- if at == "leonekmi" then
- team = "creative"
- end
- if at == "Luclu7Gaming" then
- team = "iliad"
- end
- if at == "ajen003" then
- team = "flip flip crou"
- end
- if at == "Satanpasmechant" then
- team = "flip flip crou"
- end
- if at == "Lozzydud" then
- team = "noteam"
- end
- if at == "r33int" then
- team = "iliad"
- end
- if at == "Mod_Friends" then
- team = "twitter"
- end
- if team == "creative" then
- color = colors.orange
- end
- if team == "capitaliste" then
- color = colors.green
- end
- if team == "iliad" then
- color = colors.red
- end
- if team == "flip flip crou" then
- color = colors.pink
- end
- if team == "noteam" then
- color = colors.white
- end
- if team == "twitter" then
- color = colors.blue
- end
- if team == "null" then
- color = colors.gray
- end
- term.setTextColor(color)
- print("+--------------------------------------------------------------------------------+")
- print("+\n+ "..text)
- write("+\n+ de : " ..from.." @"..at)
- if team == "null" then
- else
- write("\n+ team : "..team)
- end
- print("+--------------------------------------------------------------------------------+")
- end
- i = i - 1
- ii = ii + 1
- sleep(0.1)
- end
- redstone.setOutput("top", true)
- sleep(10)
- term.clear()
- term.setCursorPos(1,1)
- end
Advertisement
Add Comment
Please, Sign In to add comment