SHOW:
|
|
- or go back to the newest paste.
| 1 | function clear() | |
| 2 | term.clear() | |
| 3 | term.setCursorPos(1, 1) | |
| 4 | term.setBackgroundColour(colours.black) | |
| 5 | term.setTextColor( colors.white ) | |
| 6 | end | |
| 7 | function link() | |
| 8 | term.setTextColour(colours.yellow) | |
| 9 | end | |
| 10 | function fineLink() | |
| 11 | term.setTextColour(colours.white) | |
| 12 | end | |
| 13 | function colore(sfumatura) | |
| 14 | term.setTextColour(sfumatura) | |
| 15 | end | |
| 16 | function fineColore() | |
| 17 | term.setTextColour(colours.white) | |
| 18 | end | |
| 19 | function sfondo(sfumaturaSfondo) | |
| 20 | term.setBackgroundColour(sfumaturaSfondo) | |
| 21 | end | |
| 22 | function fineSfondo() | |
| 23 | term.setBackgroundColour(colours.black) | |
| 24 | end | |
| 25 | colore(colours.black) | |
| 26 | sfondo(colours.yellow) | |
| 27 | - | print("BORSA DI NEW RADEON | QUOTAZIONI")
|
| 27 | + | print("BORSA DI KILMAURS | QUOTAZIONI")
|
| 28 | fineColore() | |
| 29 | fineSfondo() | |
| 30 | - | quotazioni = textutils.unserialize(http.get("http://rest.rgbcraft.com/borsa/?richiesta=lua_totale").readAll())
|
| 30 | + | quotazioni = textutils.unserialize(http.get("http://rest.rgbcraft.com/borsakilmaurs/?richiesta=lua_totale").readAll())
|
| 31 | colore(colors.purple) | |
| 32 | print("\nSimb Nome società Quotaz. Scost.")
| |
| 33 | fineColore() | |
| 34 | ypos = 4 | |
| 35 | for k,v in pairs(quotazioni) do | |
| 36 | term.setCursorPos(1, ypos) | |
| 37 | term.write(k) | |
| 38 | term.setCursorPos(6, ypos) | |
| 39 | term.write(v["nome"]) | |
| 40 | term.setCursorPos(36, ypos) | |
| 41 | term.write(v["quotazione"]) | |
| 42 | term.setCursorPos(46, ypos) | |
| 43 | if v["segno"] == "+" then | |
| 44 | colore(colors.lime) | |
| 45 | else | |
| 46 | colore(colors.red) | |
| 47 | end | |
| 48 | term.write(v["scarto"]) | |
| 49 | fineColore() | |
| 50 | ypos = ypos + 1 | |
| 51 | end | |
| 52 | colore(colours.yellow) | |
| 53 | term.setCursorPos(1, 18) | |
| 54 | print("Torna alla homepage")
| |
| 55 | fineColore() |