Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --lego11 ti v voglioo beneeeeee
- local lbl = "Hotel1"
- local tabr = {
- local m = peripheral.wrap("left")
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function cartaNonValida()
- clear()
- mon.write("Carta")
- monLinea2()
- mon.write("non")
- monLinea3()
- mon.write("valida!")
- print("Carta non valida o corrotta.")
- print("")
- print("Premere un tasto per uscire")
- os.pullEvent("key")
- clear()
- exit()
- end
- function cartaVuota()
- clear()
- mon.write("Carta")
- monLinea2()
- mon.write("vuota!")
- print("Carta smagnetizzata o vuota.")
- print("")
- print("Premere un tasto per uscire")
- os.pullEvent("key")
- clear()
- exit()
- end
- clear()
- print("Pagamento")
- print("")
- print("Inserire la carta")
- m.setInsertCardLight(true)
- za,rawcarta = os.pullEvent("mag_swipe")
- m.setInsertCardLight(false)
- if rawcarta == nil then
- cartaVuota()
- end
- tab = textutils.unserialize(rawcarta)
- if type(tab) ~= "table" then
- cartaNonValida()
- end
- if tab.t ~= "Hotel" then
- cartaNonValida()
- end
- print("Premere un tasto per uscire")
- os.pullEvent("key")
- clear()
- exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement