SHOW:
|
|
- or go back to the newest paste.
| 1 | local mon = peripheral.wrap("back") -- S??lectionez le cot?? de votre ??cran :3
| |
| 2 | term.redirect(mon) | |
| 3 | os.loadAPI("json")
| |
| 4 | term.clear() | |
| 5 | term.setTextColor(colors.gray) | |
| 6 | print("Obtention des tweets en cours... Merci de patienter")
| |
| 7 | term.setCursorPos(3,1) | |
| 8 | Incr = 0 | |
| 9 | term.setBackgroundColor( colors.black ) | |
| 10 | ||
| 11 | while true do | |
| 12 | redstone.setOutput("top", false)
| |
| 13 | - | local contenu = http.get("http://theo33500.tech/toath/twitteroauth/test.php")
|
| 13 | + | local contenu = http.get("https://theo33500.xyz/toath/twitteroauth/test.php")
|
| 14 | --Ici changer Bill par le pseudo a surveiller. | |
| 15 | while contenu == nil do | |
| 16 | if Int == nil then | |
| 17 | Int = 0 | |
| 18 | end | |
| 19 | term.clear() | |
| 20 | term.setTextColor(colors.gray) | |
| 21 | term.setCursorPos(3,1) | |
| 22 | print("Impossible d'obtenir les tweets.. Nouvelle tentative")
| |
| 23 | Int = Int + 1 | |
| 24 | sleep(2) | |
| 25 | - | contenu = http.get("http://theo33500.tech/toath/twitteroauth/test.php")
|
| 25 | + | contenu = http.get("http://theo33500.xyz/toath/twitteroauth/test.php")
|
| 26 | if Int == 10 then | |
| 27 | - | redstone.setOutput("top", true)
|
| 27 | + | |
| 28 | end | |
| 29 | end | |
| 30 | ||
| 31 | local data = contenu.readAll() | |
| 32 | ||
| 33 | decode = json.decode(data) | |
| 34 | i = 10 | |
| 35 | ii = 0 | |
| 36 | ||
| 37 | while ii <= 10 do | |
| 38 | if decode.statuses[i] ~= null then | |
| 39 | local text = decode.statuses[i].text | |
| 40 | local from = decode.statuses[i].user.name | |
| 41 | local team = "null" | |
| 42 | text = text:gsub("u00e9","e")
| |
| 43 | text = text:gsub("u00e0","a")
| |
| 44 | text = text:gsub("u00a0"," ")
| |
| 45 | text = text:gsub("u00e8","e")
| |
| 46 | text = text:gsub("u00e1","a")
| |
| 47 | text = text:gsub("u00ea","e")
| |
| 48 | from = from:gsub("ud83dudd25","*flamme*")
| |
| 49 | local at = decode.statuses[i].user.screen_name | |
| 50 | local long = string.len(from) | |
| 51 | local I = 74 - long | |
| 52 | ||
| 53 | - | if Incr==0 then |
| 53 | + | |
| 54 | - | color = colors.orange |
| 54 | + | |
| 55 | - | elseif Incr == 1 then |
| 55 | + | |
| 56 | - | color = colors.orange |
| 56 | + | |
| 57 | - | elseif Incr == 2 then |
| 57 | + | |
| 58 | - | color = colors.magenta |
| 58 | + | if at == "Theo33500" then |
| 59 | - | elseif Incr == 3 then |
| 59 | + | team = "creative" |
| 60 | - | color = colors.yellow |
| 60 | + | |
| 61 | - | elseif Incr == 4 then |
| 61 | + | |
| 62 | - | color = colors.lime |
| 62 | + | if at == "TheNyoFR" then |
| 63 | - | elseif Incr == 5 then |
| 63 | + | team = "iliad" |
| 64 | - | color = colors.pink |
| 64 | + | |
| 65 | - | elseif Incr == 6 then |
| 65 | + | |
| 66 | - | color = colors.gray |
| 66 | + | if at == "leonekmi" then |
| 67 | - | elseif Incr == 7 then |
| 67 | + | team = "creative" |
| 68 | - | color = colors.cyan |
| 68 | + | |
| 69 | - | elseif Incr == 8 then |
| 69 | + | |
| 70 | - | color = colors.purple |
| 70 | + | if at == "Luclu7Gaming" then |
| 71 | - | elseif Incr == 9 then |
| 71 | + | team = "iliad" |
| 72 | - | color = colors.blue |
| 72 | + | |
| 73 | - | elseif Incr == 10 then |
| 73 | + | |
| 74 | - | color = colors.brown |
| 74 | + | if at == "ajen003" then |
| 75 | - | elseif Incr == 11 then |
| 75 | + | team = "flip flip crou" |
| 76 | - | color = colors.green |
| 76 | + | |
| 77 | - | else |
| 77 | + | |
| 78 | - | Incr = 0 |
| 78 | + | if at == "Satanpasmechant" then |
| 79 | team = "flip flip crou" | |
| 80 | end | |
| 81 | - | Incr = Incr + 1 |
| 81 | + | |
| 82 | - | if at == "theo33500" then |
| 82 | + | if at == "Lozzydud" then |
| 83 | team = "noteam" | |
| 84 | end | |
| 85 | ||
| 86 | if at == "r33int" then | |
| 87 | team = "iliad" | |
| 88 | - | write("+\n+ de : " ..from)
|
| 88 | + | |
| 89 | ||
| 90 | if at == "Mod_Friends" then | |
| 91 | team = "twitter" | |
| 92 | end | |
| 93 | ||
| 94 | if team == "creative" then | |
| 95 | color = colors.orange | |
| 96 | end | |
| 97 | - | sleep(45) |
| 97 | + | |
| 98 | if team == "capitaliste" then | |
| 99 | color = colors.green | |
| 100 | end | |
| 101 | ||
| 102 | if team == "iliad" then | |
| 103 | color = colors.red | |
| 104 | end | |
| 105 | ||
| 106 | if team == "flip flip crou" then | |
| 107 | color = colors.pink | |
| 108 | end | |
| 109 | ||
| 110 | if team == "noteam" then | |
| 111 | color = colors.white | |
| 112 | end | |
| 113 | ||
| 114 | if team == "twitter" then | |
| 115 | color = colors.blue | |
| 116 | end | |
| 117 | ||
| 118 | if team == "null" then | |
| 119 | color = colors.gray | |
| 120 | end | |
| 121 | ||
| 122 | term.setTextColor(color) | |
| 123 | print("+--------------------------------------------------------------------------------+")
| |
| 124 | print("+\n+ "..text)
| |
| 125 | write("+\n+ de : " ..from.." @"..at)
| |
| 126 | if team == "null" then | |
| 127 | ||
| 128 | else | |
| 129 | write("\n+ team : "..team)
| |
| 130 | end | |
| 131 | print("+--------------------------------------------------------------------------------+")
| |
| 132 | end | |
| 133 | ||
| 134 | i = i - 1 | |
| 135 | ii = ii + 1 | |
| 136 | sleep(0.1) | |
| 137 | end | |
| 138 | redstone.setOutput("top", true)
| |
| 139 | ||
| 140 | sleep(10) | |
| 141 | term.clear() | |
| 142 | term.setCursorPos(1,1) | |
| 143 | end |