This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Spongy141's profile picture

DynationOS Version 0.01 [NOT FINISHED]

Started by Spongy141, 10 March 2013 - 09:25 AM
Spongy141 #1
Posted 10 March 2013 - 10:25 AM
Hello, as in the title, this new OS is not finished, the main reason I even released it was to basically get dibs on the name, feel free to try out the beta, but still its not finished…
SpoilerSadly, I suck at giving tutorials, so if you want to know how to use this code… then please look up a youtube video on how to.
 

function start()
  term.clear()
  term.setCursorPos(1,1)
  term.setTextColor(colors.yellow)
  print("DyntionOS")
  term.setTextColor(colors.lightBlue)
  textutils.slowPrint("DyntionOS, making things easy.")
  term.setTextColor(colors.white)
  setup()
end

function login()
  term.setTextColor(colors.magenta)
  term.write("Password to account: ")
  term.setTextColor(colors.white)
  local pass = read("*")
  if pass == ("0000") then
    UserSpongy()
elseif pass == ("000") then
UserBob()
else
term.setTextColor(colors.red)
print("Password failed")
sleep(2)
os.reboot()
  end
end
function setup()
  term.setTextColor(colors.lime)
  print("Welcome to DynationOS setup program, today you will be setting up your SimpleOS!")
  print("First, what is your name?: ")
  term.setTextColor(colors.white)
  local name = read()
  file = fs.open("Account","w")
  file.writeLine("local name = ("..name..")")
  term.setTextColor(colors.lime)
  print("Alright ",name,", what would you like your password to be?: ")
  term.setTextColor(colors.white)
  local pass = read()
  file.writeLine("local pass = ("..pass..")")
  term.setTextColor(colors.lime)
  print("Alright ",name,", would you like to use rednet (yes or no): ")
  term.setTextColor(colors.white)
  local ans = read()
  if ans == ("yes") then
    term.setTextColor(colors.lime)
print("Alright where is your wireless modem located?: ")
term.setTextColor(colors.white)
local side = read()
rednet.open(side)
file.writeLine("local rednet = true")
term.setTextColor(colors.lime)
print("Well this is the end of the setup, goodbye!")
file.save()
file.close()
   elseif ans == ("no") then
    term.setTextColor(colors.lime)
    print("Alright",name,", I will turn off rednet mode, NOTE: Call me Simple")
file.writeLine("local rednet = false")
print("Well this is the end of the setup, goodbye!")
sleep(1)
file.close()
start()
  end
end

function UserSpongy()
  term.setTextColor(colors.brown)
  print("Please enter: help  : if you need help")
  while true do
    term.setTextColor(colors.lime)
write("Command: ")
term.setTextColor(colors.white)
local cmd = read()
if cmd == ("help") then
 term.setTextColor(colors.brown)
 print("Commands are: ")
 write("help :")
 term.setTextColor(colors.lightBlue)
 print("This is the help command")
 term.setTextColor(colors.brown)
 print("No more commands ATM")
end
if cmd == ("Music.add") then
 term.setTextColor(colors.lightBlue)
 write("What side is the new music disk on?: ")
 term.setTextColor(colors.white)
 local sidesong = read()
 term.setTextColor(colors.blue)
 textutils.slowPrint("..............................",0.8)
 sleep(0.5)
 textutils.slowPrint("Testing new song")
 shell.run("dj","play ",side)
 sleep(3)
 shell.run("dj","stop")
 print("Test Complete, if no sound then please retry")
 print("If you heard sound then please enter the name (can be anything)")
 write("Name: ")
 term.setTextColor(colors.white)
 local name = read()
 file = fs.open("songs","w")
 file.writeLine("local song = (",name,")")
 file.close()
end
if cmd == ("exit") then
 os.exit()
end
  end
end
function UserBob()
  print("MORE TO ADD LATER, Bob")
end
start()
sleep(0.5)
login()
More info will be added in the future. Sorry guys.
Azhf #2
Posted 10 March 2013 - 10:34 AM
Good luck!
Dlcruz129 #3
Posted 10 March 2013 - 10:34 AM
Lets see here, misspelled Dynation multiple times, calling functions before defining them. 1/10
oeed #4
Posted 10 March 2013 - 11:08 AM
Yea, lots of problems.
Did you actually run this before posting? There are a few huge problems.
  1. It crashes when you set rednet to yes. (Correct me if I'm wrong, but 'file.save()' isn't a function)
  2. When you set rednet to no it just opens setup again.
  3. Once I actually can login my password doesn't work, looking at your code it doesn't use anything in setup.
  4. Every time you turn it on setup is run.
I mean really, please check that your code actually works.
SuicidalSTDz #5
Posted 10 March 2013 - 11:25 AM
The OS spam is getting ungodly ridiculous. When, and if, you make an OS, ask yourself these things:

Does it prevent termination? if not, it is not a "good" OS
Is it reliable; does it crash often?
How many bugs are there?
Does it look presentable?
Are there any options/settings?
Does it say it's loading when in reality it is just sleeping?

If anything in this list is answered "no", then don't post your OS. It clutters the forum and keeps the "good" programs from being seen and credited.
AfterLifeLochie #6
Posted 10 March 2013 - 11:34 AM
I'm really disappointed with everyone in this thread, again, and there are repeat offenders this time. I don't know how many times I've said this to you all, and I don't want to have to say it again. If you see something wrong, bad, vulgar or just in the wrong place, DO NOT POST, report it. This goes especially for things like "1/10 would not use", or anything else for that matter. You leave it alone for us to deal with, rather than being insulting and rude to the person who may or may not understand the rules. You need to learn the difference between "constructive criticism" and "rude".

Yes, this code may in fact be buggy. Irrespective, you need to be respectful to other members, and this is not how you do that. We should not be having to enforce your behaviour.

Regardless of this, everyone who has repeat offended in this thread is now on 56-hour preview. I'm really over trying to get this rule through your heads, and if this happens again, so help me, it'll go straight to something a lot more harsh - from losing privileges or account access for an arbitrary number of days. Either make the criticism constructive and follow the rules we've been trying to get into your heads, or report it and leave it alone for us to deal with. It is as simple as that.