Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local shell = require("shell")
- local timeapi = require("timeapi")
- local op = component.openprinter
- local args, options = shell.parse(...)
- local player = options.player
- local amt = options.amount
- function timestamp(zone)
- tostring(zone)
- return timeapi.date("%Y-%m-%d %H:%M", zone)
- end
- local timestamp = timestamp("utc")
- -- init printer
- op.clear()
- op.setTitle(" ")
- for x = 1,(amt or 1) do
- op.setTitle("Lotto Ticket")
- op.writeln(options.player .. "'s §1L§2o§3t§4t§5o§r Ticket")
- op.writeln(" ")
- op.writeln("Your randomly selected")
- op.writeln("numbers are as follows")
- op.writeln(" ")
- op.writeln(math.random(1,20) .. " - " .. math.random(1,20) .. " - " .. math.random(1,20),0x000000,true)
- op.writeln(" ")
- op.writeln("This lotto has been")
- op.writeln("brought to you by ")
- op.writeln("Miss Fortune and ")
- op.writeln("Sir Prize, and was")
- op.writeln("paid for by Soluna")
- op.writeln("Technologies.")
- op.writeln(" ")
- op.writeln("Soluna Technologies:")
- op.writeln("Innovation at the ")
- op.writeln("speed of light.")
- op.writeln(" ")
- op.writeln(timestamp)
- local prnt, err = op.print()
- if not prnt then
- io.stderr:write(err)
- end
- op.clear()
- op.setTitle(" ")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement