Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function piszCyfre(str, licz)
- local o = 0
- if licz == 0 then o = 119 end -- 1110111
- if licz == 1 then o = 36 end -- 0100100
- if licz == 2 then o = 93 end -- 1011101
- if licz == 3 then o = 109 end -- 1101101
- if licz == 4 then o = 46 end -- 0101110
- if licz == 5 then o = 107 end -- 1101011
- if licz == 6 then o = 123 end -- 1111011
- if licz == 7 then o = 37 end -- 0100101
- if licz == 8 then o = 127 end -- 1111111
- if licz == 9 then o = 111 end -- 1101111
- rs.setBundledOutput(str, o)
- end
- local function piszLiczbe(liczba)
- local cyfra1 = (liczba-(liczba%10))/10 --liczba/10 zaokraglone w dol
- local cyfra2 = liczba%10
- piszCyfre("left", cyfra1)
- piszCyfre("right", cyfra2)
- end
- while true do
- while not rs.testBundledInput("front", colors.white) do
- rs.setBundledOutput("left", colors.lightBlue)
- rs.setBundledOutput("right", colors.lightBlue)
- sleep(0.5)
- rs.setBundledOutput("left", 0)
- rs.setBundledOutput("right", 0)
- sleep(0.5)
- end
- rs.setBundledOutput("left", 0)
- rs.setBundledOutput("right", 0)
- rs.setBundledOutput("front", colors.magenta)
- local czas = 35
- local sek = 60
- while czas > 1 do
- piszLiczbe(czas)
- rs.setBundledOutput("front", colors.combine(colors.magenta, colors.orange))
- sleep(0.1)
- rs.setBundledOutput("front", colors.magenta)
- sleep(59.9)
- czas = czas - 1
- end
- rs.setBundledOutput("front", colors.combine(colors.magenta, colors.orange))
- sleep(0.1)
- rs.setBundledOutput("front", colors.magenta)
- while sek > 0 do
- piszLiczbe(sek)
- rs.setBundledOutput("front", 0)
- sleep(0.5)
- rs.setBundledOutput("front", colors.magenta)
- sleep(0.5)
- sek = sek - 1
- end
- rs.setBundledOutput("front", 0)
- rs.setBundledOutput("left", 0)
- rs.setBundledOutput("right", 0)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement