SHOW:
|
|
- or go back to the newest paste.
| 1 | --Opzioni di configurazione | |
| 2 | posizioneMonitor = "left" | |
| 3 | --nomePlayer = "Keledan75" -- Nome su Minecraft | |
| 4 | --youtuberChannel = "" -- Nome su YouTube | |
| 5 | - | tempoApertura = 4 |
| 5 | + | youtuber = {
|
| 6 | - | durataAllarme = 7 |
| 6 | + | {"keledan75", "Keledan"},
|
| 7 | - | elencoAmmessi = {"Darkhim", "SurrealPower", "HEXEVIL", "Keledan", "Wr3nt" , "KIRIAIR", "Ulisse1996" }
|
| 7 | + | {"luke4316", "Luke 4316"},
|
| 8 | {"MoD3rNSt3pNy", "St3pny"}
| |
| 9 | - | function scanTable(table, search) |
| 9 | + | } |
| 10 | - | for i=1, #table do |
| 10 | + | |
| 11 | - | if table[i]==search then |
| 11 | + | |
| 12 | - | return true |
| 12 | + | |
| 13 | - | end |
| 13 | + | |
| 14 | colIscritti = colors.red | |
| 15 | - | return false |
| 15 | + | local headers = {
|
| 16 | - | end |
| 16 | + | ["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36", -- Overrides the default User-Agent. |
| 17 | } | |
| 18 | ||
| 19 | - | local monitor = peripheral.wrap("back")
|
| 19 | + | |
| 20 | local monitor = peripheral.wrap(posizioneMonitor) | |
| 21 | - | print("Premi C per cancellare la scritta a schermo")
|
| 21 | + | |
| 22 | - | print("Premi X per interrompere")
|
| 22 | + | |
| 23 | function mostraIscritti(youtuberChannel, youtuberName) | |
| 24 | - | function interfaccia(comando) |
| 24 | + | print ("Mostro Iscritti")
|
| 25 | - | if comando == "c" then |
| 25 | + | |
| 26 | monitor.setCursorPos(2,2) | |
| 27 | - | print ("\n\n Monitor cancellato")
|
| 27 | + | monitor.setTextScale(3.5) |
| 28 | - | sleep (2) |
| 28 | + | |
| 29 | monitor.write ("Benvenuto")
| |
| 30 | monitor.setCursorPos(2,4) | |
| 31 | - | if comando == "x" or comando =="X" then |
| 31 | + | monitor.setTextScale(3.5) |
| 32 | - | print ("Uscita in corso")
|
| 32 | + | |
| 33 | - | sleep(1) |
| 33 | + | monitor.write (youtuberName) |
| 34 | - | os.shutdown() |
| 34 | + | if youtuberChannel == "" then youtuberChannel = youtuberName end |
| 35 | - | end |
| 35 | + | print (youtuberChannel) |
| 36 | - | end |
| 36 | + | -- la variabili iscritti conterrà semplicemente il numero degli iscritti. |
| 37 | - | |
| 37 | + | local iscritti= http.get("http://keledan.altervista.org/iscritti.php?channel=" .. youtuberChannel .. "&funzione=iscritti", headers)
|
| 38 | - | function faiEntrare(player) |
| 38 | + | |
| 39 | - | local playerChannel = "null" |
| 39 | + | |
| 40 | - | playerChannel = player |
| 40 | + | |
| 41 | - | if player == "Keledan" then playerChannel = "Keledan75" end |
| 41 | + | |
| 42 | - | if player == "Darkhim" then playerChannel = "Darkhim85" end |
| 42 | + | |
| 43 | - | if player == "SurrealPower" then playerChannel = "SurreaIPower" end |
| 43 | + | |
| 44 | - | if player == "Ulisse1996" then playerChannel = "XUlisse1996" end |
| 44 | + | |
| 45 | - | if player == "HEXEVIL" then playerChannel = "EternaLoveLC" end |
| 45 | + | |
| 46 | for i=1, #youtuber do | |
| 47 | mostraIscritti(youtuber[i][1],youtuber[i][2] ) | |
| 48 | sleep(5) | |
| 49 | - | monitor.setTextScale(2.5) |
| 49 | + | end |
| 50 | end |