vectrexevo Posted September 18, 2012 Posted September 18, 2012 I would like some help with locking the computer. I do not want to lock a door, just the computer with a screen behind the computer. I've looked and looked and tried all sorts of codes, but they dont work. Could someone please help me find something that will lock my computer, No I do not want to lock it using LWC
micecd Posted September 20, 2012 Posted September 20, 2012 use a while loop in the startup. And then when a person comes up to terminate it, make it repeat the startup file...so edit startup <- in the terminal But if you are using a monitor behind the pc, that's just funny. I'm serious. This is what you do edit enterProgram while true do while true do shell.run("enterProgram") end shell.run("startup") end Now, this is just if a person tries to terminate your computer program, and hack into it. They won't be able to local screen = peripheral.wrap("back") query = {} query.new = function() local self = {} local password = "Chinny Chin" self.ask = function() term.clear() term.setCursorPos(1,1) print("Enter Password") sleep(.5) local a = read("*") sleep(.5) if a == password then self.correct() return true else self.wrong() return false end end self.correct = function() term.clear() term.setCursorPos(1,1) print("Access Granted.") sleep(.2) end self.wrong = function() print("Access Denied") term.redirect(screen) sleep() end self.changePass = function(arg) password = arg end return self end q = query.new() function enterLoop() while true do local go = false if go == false then if q.ask() then go = true else trollLoop() enterLoop() end end while go do shell.run("program") end end --while loop end end function trollingLoop() while true do enterLoop() end enterLoop() end this should work if griefing is disallowed. They can't destroy blocks to place a disk drive and override your pc. I'm unsure about other methods like disabling the reboot function or implementing your own.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now