Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clear()
- term.clear()
- term.setCursorPos(1, 1)
- term.setBackgroundColour(colours.black)
- term.setTextColor( colors.white )
- end
- function link()
- term.setTextColour(colours.yellow)
- end
- function fineLink()
- term.setTextColour(colours.white)
- end
- function colore(sfumatura)
- term.setTextColour(sfumatura)
- end
- function fineColore()
- term.setTextColour(colours.white)
- end
- function sfondo(sfumaturaSfondo)
- term.setBackgroundColour(sfumaturaSfondo)
- end
- function fineSfondo()
- term.setBackgroundColour(colours.black)
- end
- colore(colours.black)
- sfondo(colours.yellow)
- print("BORSA DI NEW RADEON | QUOTAZIONI")
- fineColore()
- fineSfondo()
- quotazioni = textutils.unserialize(http.get("http://rest.rgbcraft.com/borsa/?richiesta=lua_totale").readAll())
- colore(colors.purple)
- print("\nSimb Nome società Quotaz. Scost.")
- fineColore()
- ypos = 4
- for k,v in pairs(quotazioni) do
- term.setCursorPos(1, ypos)
- term.write(k)
- term.setCursorPos(6, ypos)
- term.write(v["nome"])
- term.setCursorPos(36, ypos)
- term.write(v["quotazione"])
- term.setCursorPos(46, ypos)
- if v["segno"] == "+" then
- colore(colors.lime)
- else
- colore(colors.red)
- end
- term.write(v["scarto"])
- fineColore()
- ypos = ypos + 1
- end
- colore(colours.yellow)
- term.setCursorPos(1, 18)
- print("Torna alla homepage")
- fineColore()
Add Comment
Please, Sign In to add comment