Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sign In Create Account
- Logo
- Advanced
- Search...
- This topic
- View New Content
- News
- Forums
- Members
- Wiki
- ComputerCraft | Programmable Computers for Minecraft → ComputerCraft → Programs → Operating Systems
- 0
- [OS] DelOS [v1.4] [Internet, Downloading, Movies, And More!]
- Started by ComputerCraftFan11, Mar 24 2012 11:02 PM
- Page 1 of 2 1 2 NEXT
- This topic is locked This topic is locked Go to first unread post
- 34 replies to this topic
- #1ComputerCraftFan11
- Members
- 771 posts
- LocationHawaii
- Posted 24 March 2012 - 11:02 PM
- This is my first public OS and will be updated*
- DelOS v1.4
- Code:
- Password:
- Spoiler Hide
- os.pullEvent = os.pullEventRaw
- term.clear()
- term.setCursorPos(1,1)
- local selection = 1;
- local version = "1.3.1";
- local path = "";
- local page = 1;
- local function cPrint(text)
- local x,y = term.getSize()
- local x2,y2 = term.getCursorPos()
- term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2)
- print(text)
- end
- local function cWrite(text)
- local x,y = term.getSize()
- local x2,y2 = term.getCursorPos()
- term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2)
- write(text)
- end
- function dmenu()
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------")
- print("Type 'Downloads' to view downloads.")
- print("Type 'Download' to download files.")
- command = read()
- if command == "Downloads" then
- path = "downloads"
- filemanager()
- elseif command == "Download" then
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------")
- write("Please enter the file ID: ")
- code = read()
- write("Please enter the name: ")
- name = read()
- if fs.exists("downloads/" ..name) then
- write(name.. " already exists! Would you like to overwrite this file? ")
- option = read()
- if option == "Yes" then
- fs.delete("downloads/" ..name)
- shell.run("pastebin","get", code, "downloads/" ..name)
- sleep(2)
- dmenu()
- elseif option == "No" then
- print("Cancled...")
- sleep(2)
- dmenu()
- else
- print("Option does not exist! Say Yes or No.")
- sleep(2)
- dmenu()
- end
- else
- shell.run("pastebin","get", code, "downloads/" ..name)
- sleep(3)
- dmenu()
- end
- else
- print("Command does not exist!")
- sleep(2)
- dmenu()
- end
- end
- function BootOptions()
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------")
- cPrint("")
- if page == 1 then
- if selection == 1 then
- cPrint("--> File Manager <--")
- else
- cPrint("File Manager")
- end
- if selection == 2 then
- cPrint("--> Internet <--")
- else
- cPrint("Internet")
- end
- if selection == 3 then
- cPrint("--> Download Manager <--")
- else
- cPrint("Download Manager")
- end
- if selection == 4 then
- cPrint("--> Switch to monitor mode <--")
- else
- cPrint("Switch to monitor mode")
- end
- if selection == 5 then
- cPrint("--> Lua mode <--")
- else
- cPrint("Lua mode")
- end
- elseif page == 2 then
- if selection == 1 then
- cPrint("--> Game Library <--")
- else
- cPrint("Game Library")
- end
- if selection == 2 then
- cPrint("--> Change Password <--")
- else
- cPrint("Change Password")
- end
- if selection == 3 then
- cPrint("--> Blank <--")
- else
- cPrint("Blank")
- end
- if selection == 4 then
- cPrint("--> Blank <--")
- else
- cPrint("Blank")
- end
- if selection == 5 then
- cPrint("--> Blank <--")
- else
- cPrint("Blank")
- end
- end
- if selection == 6 then
- cPrint("--> Shutdown <--")
- else
- cPrint("Shutdown")
- end
- print("")
- if page == 1 then
- cPrint("Page " ..page.. " of 2. -->")
- elseif page == 2 then
- cPrint("< -- Page " ..page.. " of 2")
- end
- end
- function password()
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------")
- cPrint("")
- if fs.exists("/.pass") then
- cWrite("Password: ")
- file = fs.open("/.pass","r")
- correctpass = file.readAll()
- file.close()
- pass = read("*")
- if pass == correctpass then
- term.clear()
- term.setCursorPos(1,1)
- print("Welcome!")
- sleep(2)
- BootOptions()
- else
- print("")
- write("Incorrect! Rebooting!")
- sleep(2)
- os.reboot()
- end
- else
- cPrint("No password set. Set one now.")
- cWrite("New password: ")
- newPass = read("*")
- cWrite("Comfirm Password: ")
- comPass = read("*")
- if newPass == comPass then
- file = fs.open("/.pass","w")
- file.write(newPass)
- file.close()
- print("Password set, rebooting...")
- sleep(2)
- os.reboot()
- else
- print("Password does not match comfirm.")
- sleep(2)
- password()
- end
- end
- end
- function Loader()
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------")
- cPrint("")
- cPrint("Loading.")
- cPrint("[ ]")
- sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------")
- cPrint("")
- cPrint("Loading.")
- cPrint("[II ]")
- sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------")
- cPrint("")
- cPrint("Loading.")
- cPrint("[IIII ]")
- sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------")
- cPrint("")
- cPrint("Loading.")
- cPrint("[IIIIII]")
- sleep(1)
- --BootOptions()
- password()
- end
- Loader()
- while true do
- local e,key = os.pullEvent( "key" )
- if key == 17 or key == 200 then
- if selection > 1 then
- selection = selection - 1
- BootOptions()
- end
- elseif key == 31 or key == 208 then
- if selection < 6 then
- selection = selection + 1
- BootOptions()
- end
- elseif key == 203 then
- if page > 1 then
- page = page - 1
- BootOptions()
- end
- elseif key == 205 then
- if page < 2 then
- page = page + 1
- BootOptions()
- end
- elseif key == 28 then
- if selection == 6 then
- os.shutdown()
- elseif selection > 2 and page == 2 then
- BootOptions()
- else
- break
- end
- end
- end
- function filemanager()
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("C://" ..path)
- cPrint("---------------------")
- shell.run("dir", path)
- cPrint("---------------------")
- write("C://")
- directory = read()
- path = directory
- if fs.isDir( path ) then
- if path == "disk" then
- print("Browse or Label?")
- write("Do: ")
- command = read()
- if command == "Browse" then
- filemanager()
- elseif command == "Label" then
- write("Choose a side: ")
- diskside = read()
- write("Enter what you want to label it: ")
- diskname = read()
- shell.run("label", "set", diskside, diskname)
- print("Labeled!")
- sleep(1)
- path = ""
- filemanager()
- else
- print("Invalid Command!")
- sleep(1)
- path = ""
- filemanager()
- end
- else
- filemanager()
- end
- else
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------")
- print("Run, Copy, Delete, Edit, Move, or Upload?")
- write("Do: ")
- command = read()
- if command == "Run" then
- shell.run(path)
- elseif command == "Copy" then
- write("Copy to where?")
- copypath = read()
- fs.copy(path, copypath)
- print("Copied!")
- sleep(1)
- path = ""
- filemanager()
- elseif command == "Delete" then
- print("Deleted.")
- fs.delete(path)
- sleep(1)
- path = ""
- filemanager()
- elseif command == "Upload" then
- shell.run("pastebin","put", path)
- sleep(5)
- path = ""
- filemanager()
- elseif command == "Move" then
- write("Move where?")
- movepath = read()
- fs.move(path, movepath)
- print("Moved!")
- sleep(3)
- path = ""
- filemanager()
- elseif command == "Edit" then
- shell.run("edit", path)
- else
- print("Command does not exist.")
- sleep(1)
- path = ""
- filemanager()
- end
- end
- end
- function games()
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------")
- cPrint("Game Library: ")
- if fs.exists("games") then
- shell.run("dir", "games")
- else
- fs.makeDir("games")
- fs.copy("rom/programs/computer/worm", "games/Worm")
- shell.run("dir", "games")
- end
- write("C://games/")
- input = read()
- if fs.exists("games/"..input) then
- shell.run("games/" ..input)
- else
- print("This game does not exist, would you like to download it (y/n)?")
- input = read()
- if input == "n" then
- games()
- elseif input == "y" then
- write("Enter the pastebin game ID: ")
- fileid = read()
- write("Enter the game name: ")
- filename = read()
- shell.run("pastebin", "get", fileid, "games/" ..filename)
- games()
- else
- print("Unknown...")
- sleep(3)
- games()
- end
- end
- end
- function password()
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------")
- cPrint("")
- cWrite("Old Password: ")
- file = fs.open("/.pass","r")
- correctpass = file.readAll()
- file.close()
- pass = read("*")
- if pass == correctpass then
- cWrite("New Password: ")
- oldpass = read("*")
- fs.delete("/.pass")
- else
- print("")
- write("Incorrect! Rebooting!")
- sleep(2)
- os.reboot()
- end
- end
- if page == 1 then
- if selection == 1 then
- if fs.exists("movies") then
- else
- fs.makeDir("movies")
- fs.copy("rom/programs/secret/alongtimeago", "movies/starwars")
- end
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("C://" ..path)
- cPrint("---------------------")
- shell.run("dir", path)
- cPrint("---------------------")
- write("C://")
- directory = read()
- path = directory
- if fs.isDir( path ) then
- if path == "disk" then
- print("Browse or Label?")
- write("Do: ")
- command = read()
- if command == "Browse" then
- filemanager()
- elseif command == "Label" then
- write("Choose a side: ")
- diskside = read()
- write("Enter what you want to label it: ")
- diskname = read()
- shell.run("label", "set", diskside, diskname)
- print("Labeled!")
- sleep(1)
- path = ""
- filemanager()
- else
- print("Invalid Command!")
- sleep(1)
- path = ""
- filemanager()
- end
- else
- filemanager()
- end
- else
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------")
- print("Run, Copy, Delete, Edit, Move, or Upload?")
- write("Do: ")
- command = read()
- if command == "Run" then
- shell.run(path)
- elseif command == "Copy" then
- write("Copy to where?")
- copypath = read()
- fs.copy(path, copypath)
- print("Copied!")
- sleep(1)
- path = ""
- filemanager()
- elseif command == "Delete" then
- print("Deleted.")
- fs.delete(path)
- sleep(1)
- path = ""
- filemanager()
- elseif command == "Upload" then
- shell.run("pastebin","put", path)
- sleep(5)
- path = ""
- filemanager()
- elseif command == "Move" then
- write("Move where?")
- movepath = read()
- fs.move(path, movepath)
- print("Moved!")
- sleep(3)
- path = ""
- filemanager()
- elseif command == "Edit" then
- shell.run("edit", path)
- else
- print("Command does not exist.")
- sleep(1)
- path = ""
- filemanager()
- end
- end
- end
- if selection == 2 then
- if fs.exists("rn") then
- shell.run("rn")
- else
- shell.run("pastebin","get","Y320Z2K0","rn")
- shell.run("rn")
- end
- end
- if selection == 4 then
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------")
- print("Please choose a monitor side (left or right?): ")
- monitorside = read()
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------")
- shell.run("monitor", monitorside, "startup")
- end
- if selection == 5 then
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------")
- if fs.exists("newluacode") then
- shell.run("newluacode")
- else
- shell.run("pastebin", "get", "emFiR2kK", "newluacode")
- term.clear()
- term.setCursorPos(1,1)
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------")
- shell.run("newluacode")
- end
- end
- if selection == 3 then
- if fs.exists("downloads") then
- else
- fs.makeDir("downloads")
- end
- dmenu()
- end
- elseif page == 2 then
- if selection == 1 then
- games()
- end
- if selection == 2 then
- cPrint("---------------------")
- cPrint("DelOS v" ..version)
- cPrint("---------------------/n")
- cWrite("Old password: ")
- newPass = read("*")
- file = fs.open("/.pass","r")
- correctpass = file.readAll()
- file.close()
- if newPass == correctpass then
- cWrite("New password: ")
- comPass = read("*")
- fs.delete("/.pass")
- file = fs.open("/.pass","w")
- file.write(newPass)
- file.close()
- cPrint("Password set! Rebooting")
- sleep(2)
- os.reboot()
- else
- cPrint("Incorrect password!")
- sleep(2)
- os.reboot()
- end
- end
- end
- Screenshots:
- Spoiler Show
- With this OS, there is a File Manager, REX (Internet), Download Manager, movies (/movies in file manager), and a shutdown button (lol?)!
- More features are coming soon...
- (To make a new file, type the name/path of the file in the file manager and press Edit)
- Upcoming:
- * Turtle Manager
- * Stuff for rednet
- * More movies in the /movies folder
- * REX Server Hosting
- (Somethings are not listed and might be added.)
- #2ComputerCraftFan11
- Members
- 771 posts
- LocationHawaii
- Posted 25 March 2012 - 05:10 AM
- *Put code in spoilers
- *NEW in v1.1!
- Monitor Mode
- Disk Manager, when opening "disk" in file manager it will give you some options like browse and label
- There is now pages, but right now it only has 1 (Will add more when I get more programs).
- Screenshots:
- Posted Image
- Posted Image
- Posted Image
- Posted Image
- #3ComputerCraftFan11
- Members
- 771 posts
- LocationHawaii
- Posted 25 March 2012 - 08:21 PM
- DOes anyone have any feedback?
- #4Ian-Moone
- The Germ
- New Members
- 124 posts
- LocationLiverpool (no I am not a Scouser Im form Holland)
- Posted 25 March 2012 - 08:31 PM
- COOL
- would like to see pics of internet though
- #5BlackRa1n
- New Members
- 69 posts
- Posted 25 March 2012 - 08:33 PM
- I must ask, what are those blocks at the top of your images and why are they there? xD
- OT: Vandie, how did you edit your profile title? :o/>
- #6ComputerCraftFan11
- Members
- 771 posts
- LocationHawaii
- Posted 25 March 2012 - 08:35 PM
- View PostVandie, on 25 March 2012 - 08:31 PM, said:
- COOL
- would like to see pics of internet though
- I posted pics in my old internet post (along with a domain name host.) But that is outdated so as soon as I put a downloader for a domain server I'll add pics
- View PostBlackRa1n, on 25 March 2012 - 08:33 PM, said:
- I must ask, what are those blocks at the top of your images and why are they there? xD
- OT: Vandie, how did you edit your profile title? :o/>
- oh, those are the monitors from my media post (that's why the monitor looks like a computer)
- #7BlackRa1n
- New Members
- 69 posts
- Posted 25 March 2012 - 08:39 PM
- Ah, ok :o/>
- #8Wolvan
- New Members
- 384 posts
- LocationIn the TARDIS
- Posted 25 March 2012 - 08:46 PM
- What does Movies mean? Can u give an example?
- #9ComputerCraftFan11
- Members
- 771 posts
- LocationHawaii
- Posted 25 March 2012 - 09:40 PM
- View PostWolvan, on 25 March 2012 - 08:46 PM, said:
- What does Movies mean? Can u give an example?
- Its a folder for storing long animations (like secret/alon.....) based off of real movies.
- #10ComputerCraftFan11
- Members
- 771 posts
- LocationHawaii
- Posted 25 March 2012 - 09:58 PM
- View PostVandie, on 25 March 2012 - 08:31 PM, said:
- COOL
- would like to see pics of internet though
- Here:
- Posted Image
- Posted Image
- *NEW IN 1.2:
- Posted Image
- Posted Image
- Lua mode!: Test out your code
- Improved Internet!: You can now host websites in your client (I combined the client and the server)
- #11ComputerCraftFan11
- Members
- 771 posts
- LocationHawaii
- Posted 26 March 2012 - 07:50 AM
- To install this on a server, type this:
- pastebin get PtKEsVs3 startup
- #12Wolvan
- New Members
- 384 posts
- LocationIn the TARDIS
- Posted 26 March 2012 - 05:08 PM
- nice. But is there a program for downloading pastebin files in CC?
- #13Espen
- Curious Explorer
- Members
- 708 posts
- Posted 26 March 2012 - 05:27 PM
- View PostWolvan, on 26 March 2012 - 05:08 PM, said:
- nice. But is there a program for downloading pastebin files in CC?
- Yes there is, type 'help pastebin' for more info. :o/>
- #14BlackRa1n
- New Members
- 69 posts
- Posted 26 March 2012 - 05:57 PM
- This look pretty neat!
- #15Wolvan
- New Members
- 384 posts
- LocationIn the TARDIS
- Posted 26 March 2012 - 06:04 PM
- View PostEspen, on 26 March 2012 - 05:27 PM, said:
- View PostWolvan, on 26 March 2012 - 05:08 PM, said:
- nice. But is there a program for downloading pastebin files in CC?
- Yes there is, type 'help pastebin' for more info. :o/>
- so pastebin is an API? Or just a program?
- #16Espen
- Curious Explorer
- Members
- 708 posts
- Posted 26 March 2012 - 06:42 PM
- View PostWolvan, on 26 March 2012 - 06:04 PM, said:
- so pastebin is an API? Or just a program?
- The latter.
- #17ComputerCraftFan11
- Members
- 771 posts
- LocationHawaii
- Posted 26 March 2012 - 07:41 PM
- View PostBlackRa1n, on 26 March 2012 - 05:57 PM, said:
- This look pretty neat!
- Thanks, and for people that don't know how to exit the file manager:
- Select the file you saved DelOS in and press "Run" and the OS will reboot
- #18ComputerCraftFan11
- Members
- 771 posts
- LocationHawaii
- Posted 26 March 2012 - 10:09 PM
- *New update:
- v1.3
- Added functional pages (took the most time)
- Added Game Library
- The reason why this took so long is because I spent the most time making pages and a way to add new pages easily. And the other reason is the game library (didn't take long) because if you try to run a game that doesn't exist, it will ask you if you want to download it
- #19ComputerCraftFan11
- Members
- 771 posts
- LocationHawaii
- Posted 27 March 2012 - 01:03 AM
- View PostComputerCraftFan11, on 26 March 2012 - 10:09 PM, said:
- *New update:
- v1.3
- Added functional pages (took the most time)
- Added Game Library
- The reason why this took so long is because I spent the most time making pages and a way to add new pages easily. And the other reason is the game library (didn't take long) because if you try to run a game that doesn't exist, it will ask you if you want to download it
- *New minor update:
- v1.3.1
- Fixed lua mode to go back to the os when you type exit() instead of going to craftOS
- #20Ian-Moone
- The Germ
- New Members
- 124 posts
- LocationLiverpool (no I am not a Scouser Im form Holland)
- Posted 28 March 2012 - 08:10 PM
- thanks its probably my Favorited os yet
- Page 1 of 2 1 2 NEXT Back to Operating Systems · Next Unread Topic →
- 1 user(s) are reading this topic
- 0 members, 1 guests, 0 anonymous users
- ComputerCraft | Programmable Computers for Minecraft → ComputerCraft → Programs → Operating Systems
- Change Theme Mark Community Read Help
- Community Forum Software by IP.Board
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement