Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- nextAPI Development Tool --
- local function s(...) return sleep(...) end
- local function aw(...) return write(...) end
- local function p(...) return print(...) end
- local function tw(...) return term.write(...) end
- local function scp(...) return term.setCursorPos(...) end
- local function sbc(...) return term.setBackgroundColor(...) end
- local function stc(...) return term.setTextColor(...) end
- local function tc(...) return term.clear(...) end
- local function tcl(...) return term.clearLine(...) end
- local function sp(...) return textutils.slowPrint(...) end
- local function sw(...) return textutils.slowWrite(...) end
- local function fse(...) return fs.exists(...) end
- local function pul(...) return paintutils.loadImage(...) end
- local function pud(...) return paintutils.drawImage(...) end
- local function pfb(...) return paintutils.drawFilledBox(...) end
- local function su(...) return os.shutdown(...) end
- local function re(...) return os.reboot(...) end
- local function pdp(...) return paintutils.drawPixel(...) end
- local w, h = term.getSize()
- function apps()
- while true do
- sbc(colors.black)
- tc()
- sbc(colors.black)
- pfb(6, h, w, h, colors.blue)
- sbc(colors.green)
- stc(colors.white)
- scp(1,h)
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- aw("Start")
- pfb(1, 1, w, 1, colors.blue)
- pdp(w, 1, colors.red)
- pdp(w-1, h, colors.red)
- pdp(w-1, h, colors.orange)
- scp(1,1)
- sbc(colors.blue)
- stc(colors.white)
- p("Zarzadzanie aplikacjami")
- pfb(3, 3, 5, 3, colors.gray)
- pdp(3, 3, colors.lightGray)
- scp(6,3)
- stc(colors.white)
- sbc(colors.black)
- miejsce = math.ceil(fs.getFreeSpace("/")/1024)
- p("Dysk twardy Wolne miejsce: ", miejsce, "KB")
- scp(1,6)
- p("Aplikacje:")
- scp(6,8)
- stc(colors.white)
- sbc(colors.black)
- if fs.exists("/nshop/") then rozmiar = math.ceil(getSize("/nshop/")/1024) else
- scp(1,7) sbc(colors.black) stc(colors.white) p("Brak zainstalowanych aplikacji") end
- scp(1,5)
- p("Laczny rozmiar aplikacji na dysku: ", rozmiar, "KB")
- if fs.exists("/nshop/.exp") then pfb(3, 8, 5, 8, colors.blue) scp(6,8) stc(colors.white) sbc(colors.black) p("Eksplorator") scp(1,8) stc(colors.white) sbc(colors.red) p("X") end
- if fs.exists("/nshop/.dg") then pfb(3, 10, 5, 10, colors.gray) scp(6,10) stc(colors.white) sbc(colors.black) p("DGStatistics") scp(1,10) stc(colors.white) sbc(colors.red) p("X") end
- if fs.exists("/nshop/.tm") then pfb(3, 12, 5, 12, colors.green) scp(6,12) stc(colors.white) sbc(colors.black) p("TimeMachine") scp(1,12) stc(colors.white) sbc(colors.red) p("X") end
- if fs.exists("/nshop/.calc") then pfb(3, 14, 5, 14, colors.cyan) scp(6,14) stc(colors.white) sbc(colors.black) p("Kalkulator") scp(1, 14) stc(colors.white) sbc(colors.red) p("X") end
- local event, click, x, y = os.pullEvent("mouse_click")
- if x>0 and x<6 and y == h then start() end
- if x == 1 and y == 8 then fs.delete("/nshop/.exp") s(1) end
- if x == 1 and y == 10 then fs.delete("/nshop/.dg") s(1) end
- if x == 1 and y == 12 then fs.delete("/nshop/.tm") s(1) end
- if x == 1 and y == 14 then fs.delete("/nshop/.calc") s(1) end
- if x == w and y == 1 then nust() end
- end
- end
- function kolorw()
- scp(1,5)
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- p("Obecny kolor wiodacy: ", colr)
- p("Wybierz nowy kolor wiodacy:")
- pdp(1, 7, colors.orange)
- pdp(2, 7, colors.lightBlue)
- pdp(3, 7, colors.yellow)
- pdp(4, 7, colors.lime)
- pdp(5, 7, colors.pink)
- pdp(6, 7, colors.gray)
- pdp(7, 7, colors.lightGray)
- pdp(8, 7, colors.purple)
- pdp(9, 7, colors.blue)
- pdp(10, 7, colors.brown)
- pdp(11, 7, colors.green)
- pdp(12, 7, colors.red)
- pdp(13, 7, colors.black)
- pdp(14, 7, colors.white)
- local event, click, x, y = os.pullEvent("mouse_click")
- if x == 1 and y == 7 then fs.delete("rm /os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.orange") colw.close() end
- if x == 2 and y == 7 then fs.delete("/os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.lightBlue") colw.close() end
- if x == 3 and y == 7 then fs.delete("/os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.yellow") colw.close() end
- if x == 4 and y == 7 then fs.delete("/os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.lime") colw.close() end
- if x == 5 and y == 7 then fs.delete("/os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.pink") colw.close() end
- if x == 6 and y == 7 then fs.delete("/os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.gray") colw.close() end
- if x == 7 and y == 7 then fs.delete("/os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.lightGray") colw.close() end
- if x == 8 and y == 7 then fs.delete("/os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.purple") colw.close() end
- if x == 9 and y == 7 then fs.delete("/os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.blue") colw.close() end
- if x == 10 and y == 7 then fs.delete("/os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.brown") colw.close() end
- if x == 11 and y == 7 then fs.delete("/os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.green") colw.close() end
- if x == 12 and y == 7 then fs.delete("/os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.red") colw.close() end
- if x == 13 and y == 7 then fs.delete("/os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.black") colw.close() end
- if x == 14 and y == 7 then fs.delete("/os/.kol") local colw = fs.open("/os/.kol", "w") colw.writeLine("colors.white") colw.close() end
- end
- function deskust()
- while true do
- kolor()
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- tc()
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- pfb(1, 1, w, 1, colors.blue)
- scp(1,1)
- stc(colors.white)
- p("Ustawienia NextUI")
- pdp(w,1, colors.red)
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- scp(1,2)
- p("Styl graficzny: Domyslny NextUI")
- p("Brak dostepnych stylow")
- p("Wybierz kolor wiodacy")
- local event, click, x, y = os.pullEvent("mouse_click")
- if x>0 and x<25 and y == 4 then kolorw() end
- if x == w and y == 1 then nust() end
- end
- end
- function infust()
- while true do
- kolor()
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- tc()
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- pfb(1, 1, w, 1, colors.blue)
- scp(1,1)
- stc(colors.white)
- p("Ustawienia NextAPI")
- pdp(w,1, colors.red)
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- scp(1,2)
- p("NextAPI Powered Software")
- p("Wersja systemu: nextAPI 1.0")
- zajete = math.ceil(getSize("/")/1024)
- wolne = math.ceil(fs.getFreeSpace("/")/1024)
- p("Wolne miejsce na dysku:", wolne, "KB")
- p("Obecna nazwa komputera: ", os.getComputerLabel())
- if pass == "" then log = "nie" else log = "tak" end
- p("Logowanie wlaczone: ", log)
- p("Rozdzielczosc ekranu: ", w, h)
- p("Wersja CraftOS: ", os.version())
- local event, click, x, y = os.pullEvent("mouse_click")
- if x == w and y == 1 then nust() end
- end
- end
- function cmd()
- s(1)
- tc()
- sbc(colors.black)
- tc()
- sbc(colors.black)
- stc(colors.white)
- scp(1,1)
- p("MineCore Command Prompt")
- p("2018 Microcraft")
- p("Wpisz 'help', aby uzyskac pomoc")
- while true do
- write("./minecore/>")
- comm = read()
- if comm == "help" then
- p("'ver' - wersja MineCore")
- p("'next' - powrot do NextAPI")
- p("'nextver' - wersja NextAPI")
- p("'run' - uruchom plik")
- p("'log' - zmiana hasla")
- p("'reboot' - uruchom ponownie")
- p("'shutdown' - wylacz komputer")
- p("'craft' - powrot do CraftOS")
- p("'update' - aktualizuj NextAPI")
- p("'dir' - lista plikow w danym folderze")
- p("'res' - rozdzielczosc ekranu")
- p("'set' - Ustawienia NextAPI")
- p("'app' - Aplikacje NextAPI")
- p("'mon' - NextAPI Handoff Alpha")
- p("'clock' - Zegar NextAPI Beta")
- p("'setust'")
- end
- if comm == "reboot" then re() end
- if comm == "shutdown" then su() end
- if comm == "res" then p(w, h) end
- if comm == "set" then nust() end
- if comm == "app" then app() end
- if comm == "setust" then setust() end
- if comm == "mon" then bsodp() end
- if comm == "clock" then clock() end
- if comm == "ver" then
- p("Microcraft MineCore 2.0 2020.")
- p("Microcraft MineUI D 1.5 2018.")
- end
- if comm == "nextver" then
- p("Microcraft NextAPI 1.0 2020.")
- end
- if comm == "next" then system() end
- end
- end
- function setust()
- while true do
- kolor()
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- tc()
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- pfb(1, 1, w, 1, colors.blue)
- scp(1,1)
- stc(colors.white)
- p("Ustawienia NextUI")
- pdp(w,1, colors.red)
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- p("Zmien nazwe komputera")
- p("Wiersz polecen")
- p("Zegar NextUI |BETA|")
- local event, click, x, y = os.pullEvent("mouse_click")
- if x>0 and x<20 and y == 2 then
- scp(1,2)
- write("Wpisz nowa nazwe: ")
- nazwa = read()
- os.setComputerLabel(nazwa)
- setust()
- end
- if x>0 and x<20 and y == 3 then cmd() end
- if x>0 and x<20 and y == 4 then clock() end
- if x == w and y == 1 then nust() end
- end
- end
- function nust()
- while true do
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- tc()
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- pfb(1, h, w, h, colors.blue)
- scp(1,h)
- stc(colors.white)
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- write("Start")
- pdp(w-1,h, colors.red)
- pdp(w,h, colors.orange)
- pfb(1, 1, w, 1, colors.blue)
- scp(1,1)
- p("Ustawienia NextUI")
- pdp(w,1, colors.red)
- pfb(3, 4, 13, 6, colors.orange)
- scp(3,5)
- stc(colors.white)
- p("Informacje")
- pfb(27, 4, 37, 6, colors.cyan)
- scp(27,5)
- stc(colors.white)
- p("Biurko")
- pfb(15, 4, 25, 6, colors.green)
- scp(15,5)
- stc(colors.white)
- p("Ustawienia")
- pfb(39, 4, 49, 6, colors.red)
- scp(39,5)
- stc(colors.white)
- p("Aplikacje")
- local event, click, x, y = os.pullEvent("mouse_click")
- if x == w and y == 1 then system() end
- if x>0 and x<6 and y == h then start() end
- if x>2 and x<14 and y>3 and y<7 then infust() end
- if x>14 and x<26 and y>3 and y<7 then setust() end
- if x>26 and x<38 and y>3 and y<7 then deskust() end
- if x>38 and x<50 and y>3 and y<7 then apps() end
- end
- end
- if fs.exists("/os/.ver") then
- local wer = fs.open("/os/.ver", "r")
- ver = wer.readLine()
- wer.close()
- end
- function res()
- if w<51 and h<19 then tc() p("NextUI wymaga monitora o rozdzielczosci 51x19 lub wiekszej. System nie moze dzialac na Twoim urzadzeniu. Rozdzielczosc Twojego monitora to:", w, h) elseif w == 51 and h == 19 then tryb = 1 elseif w>65 and h>25 then tryb = 2 end
- end
- function kolor()
- local col = fs.open("/os/.kol", "r")
- colr = col.readLine()
- col.close()
- end
- function ikony()
- while true do
- tc()
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.green) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.white) elseif colr == "colors.black" then sbc(colors.black) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- tc()
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.green) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.white) elseif colr == "colors.black" then sbc(colors.black) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- stc(colors.white)
- pfb(1, 1, w, 1, colors.gray)
- pdp(w, 1, colors.red)
- sbc(colors.gray)
- scp(1,1)
- p("Tworzenie ikon NextUI 2.0 Beta")
- scp(1,2)
- stc(colors.white)
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- p("Witamy w kreatorze ikon. Wybierz miejsce na ikone:")
- if fs.exists("/os/iko/.ico1") then iko1 = "Zajete" else iko1 = "Wolne" end
- if fs.exists("/os/iko/.ico2") then iko2 = "Zajete" else iko2 = "Wolne" end
- if fs.exists("/os/iko/.ico3") then iko3 = "Zajete" else iko3 = "Wolne" end
- scp(1,6)
- p("Ikona 1: ", iko1)
- p("Ikona 2: ", iko2)
- p("Ikona 3: ", iko3)
- local event, click, x, y = os.pullEvent("mouse_click")
- if x == w and y == 1 then system() end
- if x>0 and x<20 and y == 6 and iko1 == "Wolne" then
- scp(1,10)
- p("Wpisz sciezke skrotu: ")
- write(".>")
- sciezka = read()
- p("Wpisz nazwe skrotu: ")
- nazwa = read()
- local iko1s = fs.open("/os/iko/.ico1", "w")
- iko1s.writeLine(sciezka)
- iko1s.close()
- local iko1n = fs.open("/os/iko/.ico1n", "w")
- iko1n.writeLine(nazwa)
- iko1n.close()
- end
- if x>0 and x<20 and y == 8 and iko3 == "Wolne" then
- scp(1,10)
- p("Wpisz sciezke skrotu: ")
- write(".>")
- sciezka = read()
- p("Wpisz nazwe skrotu: ")
- nazwa = read()
- local ikon3 = fs.open("/os/iko/.ico3", "w")
- ikon3.writeLine(sciezka)
- ikon3.close()
- local ikon3n = fs.open("/os/iko/.ico3n", "w")
- ikon3n.writeLine(nazwa)
- ikon3n.close()
- end
- if x>0 and x<20 and y == 7 and iko2 == "Wolne" then
- scp(1,10)
- p("Wpisz sciezke skrotu: ")
- write(".>")
- sciezka = read()
- p("Wpisz nazwe skrotu: ")
- nazwa = read()
- local ikon2 = fs.open("/os/iko/.ico2", "w")
- ikon2.writeLine(sciezka)
- ikon2.close()
- local ikon2n = fs.open("/os/iko/.ico2n", "w")
- ikon2n.writeLine(nazwa)
- ikon2n.close()
- end
- if x>0 and x<20 and y == 6 and iko1 == "Zajete" then
- fs.delete("/os/iko/.ico1")
- fs.delete("/os/iko/.ico1n")
- end
- if x>0 and x<20 and y == 7 and iko2 == "Zajete" then
- fs.delete("/os/iko/.ico2")
- fs.delete("/os/iko/.ico2n")
- end
- if x>0 and x<20 and y == 8 and iko3 == "Zajete" then
- fs.delete("/os/iko/.ico3")
- fs.delete("/os/iko/.ico3n")
- end
- end
- end
- function start()
- pfb(1, h-5, 20, h-1, colors.black)
- scp(1, h-5)
- sbc(colors.white)
- stc(colors.black)
- p("NextUI 1.91 Start ")
- sbc(colors.black)
- stc(colors.white)
- scp(1, h-4)
- p("nextStore 2.0 ")
- p("Powrot do CraftOS ")
- p("Ustawienia ")
- p("Ikony biurka ")
- local event, click, x, y = os.pullEvent("mouse_click")
- if x>0 and x<21 and y == h-1 then ikony() end
- if x>0 and x<21 and y == h-2 then nust() end
- if x>0 and x<21 and y == h-3 then
- tc()
- s(1)
- scp(1,1)
- error("Opuszczono NextUI 1.91")
- end
- end
- function pulpit()
- sbc(colors.cyan)
- tc()
- sbc(colors.cyan)
- local obraz = pul("/os/.pulpit")
- pud(obraz, 5, 3)
- stc(colors.white)
- if colr == "colors.orange" then pfb(1, 1, w, 1, colors.orange) elseif colr == "colors.magneta" then pfb(1, 1, w, 1, colors.magneta) elseif colr == "colors.lightBlue" then pfb(1, 1, w, 1, colors.lightBlue) elseif colr == "colors.yellow" then pfb(1, 1, w, 1, colors.yellow) elseif colr == "colors.lime" then pfb(1, 1, w, 1, colors.lime) elseif colr == "colors.pink" then pfb(1, 1, w, 1, colors.pink) elseif colr == "colors.gray" then pfb(1, 1, w, 1, colors.gray) elseif colr == "colors.lightGray" then pfb(1, 1, w, 1, colors.lightGray) elseif colr == "colors.purple" then pfb(1, 1, w, 1, colors.purple) elseif colr == "colors.blue" then pfb(1, 1, w, 1, colors.blue) elseif colr == "colors.brown" then pfb(1, 1, w, 1, colors.brown) elseif colr == "colors.green" then pfb(1, 1, w, 1, colors.green) elseif colr == "colors.red" then pfb(1, 1, w, 1, colors.red) elseif colr == "colors.black" then pfb(1, 1, w, 1, colors.black) stc(colors.white) elseif colr == "colors.white" then pfb(1, 1, w, 1, colors.white) stc(colors.black) end
- if colr == "colors.white" then stc(colors.black) else stc(colors.white) end
- scp(1,1)
- p("NextUI 1.91 Summer Update")
- scp(1,h)
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- write("Start")
- pfb(6, h, w, h, colors.blue)
- scp(w-12,h)
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- write("Aplikacje")
- pdp(w, h, colors.red)
- pdp(w-1, h, colors.orange)
- end
- function getSize(path)
- local size = 0
- for _, file in ipairs(fs.list(path)) do
- if fs.isDir(fs.combine(path, file)) then
- size = size + getSize(fs.combine(path, file))
- else
- size = size + fs.getSize(fs.combine(path, file))
- end
- end
- return size
- end
- function mysz()
- local event, button, x, y = os.pullEvent("mouse_click")
- if x == w and y == h then su() end
- if x == w-1 and y == h then re() end
- if x>0 and x<6 and y == h and button == 1 then start() end
- if x>0 and x<6 and y == h and button == 2 then cmd() end
- if x<w-1 and x>w-13 and y == h then obraz22() end
- end
- function clock()
- while true do
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- tc()
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- pfb(1,1,w,1,colors.blue)
- scp(1,1)
- p("Zegar NextUI Beta")
- pdp(w,1,colors.red)
- scp(1,2)
- if fse("/os/.false") then
- clo = "false"
- elseif fse("/os/.true") then clo = "true"
- else
- local op1 = fs.open("/os/.false", "w")
- op1.writeLine("false")
- op1.close()
- clo = "false"
- end
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- scp(1,2)
- p("Zmiany tutaj wprowadzone wymagaja ponownego uruchomienia, aby przyniosly oczekiwany efekt.")
- if clo == "false" then scp(1,5) sbc(colors.black) stc(colors.red) p("Wylaczony") elseif clo == "true" then scp(1,5) sbc(colors.black) stc(colors.green) p("Wlaczony") end
- local event, button, x, y = os.pullEvent("mouse_click")
- if x == w and y == 1 then setust() end
- if x>0 and x<20 and y == 5 and clo == "false" then
- fs.delete("/os/.false")
- local op2 = fs.open("/os/.true", "w")
- op2.writeLine("true")
- op2.close()
- clock()
- end
- if x>0 and x<20 and y == 5 and clo == "true" then
- fs.delete("/os/.true")
- local op3 = fs.open("/os/.false", "w")
- op3.writeLine("false")
- op3.close()
- clock()
- end
- end
- end
- function godz()
- while true do
- scp(w-6,1)
- stc(colors.white)
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- print( textutils.formatTime(os.time("local"), true ) )
- s(1)
- end
- end
- function z1()
- if fse("/os/.false") then
- clo = "false"
- elseif fse("/os/.true") then clo = "true"
- else
- local op1 = fs.open("/os/.false", "w")
- op1.writeLine("false")
- op1.close()
- clo = "false"
- end
- end
- function z2()
- if fse("/os/.false") then
- clo = "false"
- elseif fse("/os/.true") then clo = "true"
- else
- local op1 = fs.open("/os/.false", "w")
- op1.writeLine("false")
- op1.close()
- clo = "false"
- end
- end
- function sys1()
- while true do
- kolor()
- pulpit()
- parallel.waitForAny(godz, mysz)
- end
- end
- function sys2()
- while true do
- kolor()
- pulpit()
- mysz()
- end
- end
- function clo3()
- z1()
- if clo == "true" then
- local function system(...) return sys1(...) end
- elseif clo == "false" or clo == nil then
- local function system(...) return sys2(...) end
- end
- p(clo)
- s(2)
- end
- function system()
- z1()
- if clo == "true" then sys1()
- elseif clo == "false" then sys2()
- end
- end
- function obraz22()
- while true do
- tc()
- sbc(colors.black)
- tc()
- sbc(colors.black)
- pfb(1,1,w,1,colors.blue)
- pfb(1,h,w,h,colors.blue)
- scp(1,h)
- if colr == "colors.orange" then sbc(colors.orange) elseif colr == "colors.magneta" then sbc(colors.magneta) elseif colr == "colors.lightBlue" then sbc(colors.lightBlue) elseif colr == "colors.yellow" then sbc(colors.yellow) elseif colr == "colors.lime" then sbc(colors.lime) elseif colr == "colors.pink" then sbc(colors.pink) elseif colr == "colors.gray" then sbc(colors.gray) elseif colr == "colors.lightGray" then sbc(colors.lightGray) elseif colr == "colors.purple" then sbc(colors.purple) elseif colr == "colors.blue" then sbc(colors.blue) elseif colr == "colors.brown" then sbc(colors.brown) elseif colr == "colors.green" then sbc(colors.green) elseif colr == "colors.red" then sbc(colors.red) elseif colr == "colors.black" then sbc(colors.black) stc(colors.white) elseif colr == "colors.white" then sbc(colors.white) stc(colors.black) end
- write("Start")
- scp(1,1)
- sbc(colors.blue)
- stc(colors.white)
- p("Aplikacje NextUI")
- scp(1,2)
- sbc(colors.black)
- pfb(16,2,16,h,colors.blue)
- pdp(w,h,colors.red)
- pdp(w-1,h,colors.orange)
- pdp(w,1,colors.red)
- local event, button, x, y = os.pullEvent("mouse_click")
- if x == w and y == 1 then system() end
- if x>0 and x<6 and y == h then start() end
- end
- end
Add Comment
Please, Sign In to add comment