- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
-
Content Count
10 -
Joined
-
Last visited
Posts posted by thedukeofcrawley
-
-
Hi everybody i was working on a program and i just get stuck every time i try something
i wanted a program with multiple usernames and passwords in total 2 usernames and 2 passwords, but i cant get it working,
i put the code in if somebody want to look at it then it would be awesome
local component=require("component") local r=component.redstone local gpu=component.gpu local term=require("term") local text=require("text") local computer=require("computer") local os=require("os") ---- config section local badgenumber="001" local password="reserve" local delay=1 --time the door stays open local side=5 --side of the door, test this ----- local wrong=false while true do term.clear() gpu.set(1,1,"Unity City Federal Reserve") term.setCursor(1,2) gpu.set(1,3,"Please enter badgenumber") if wrong then gpu.set(1,1,"Unity City Federal Reserve") term.setCursor(1,2) gpu.set(1,3,"Please enter badgenumber") wrong=false end term.setCursor(24,3) else term.clear() gpu.set(1,1,"Unity City Federal Reserve") term.setCursor(1,2) gpu.set(1,3,"Please enter password") if wrong then gpu.set(1,1,"Unity City Federal Reserve") term.setCursor(1,2) gpu.set(1,3,"Please enter password") wrong=false end term.setCursor(24,3) input = text.trim(term.read(nil, false, nil, "*")) if input==password then r.setOutput(side,15) -- check if this is the correct function os.sleep(delay) if input==password then r.setOutput(side,0) -- same here else term.clear() gpu.set(1,1, "Unity City Federal Reserve") gpu.set(1,3, "Acces Denied") os.sleep(delay) computer.shutdown(true) end end
-
today i was trying to put usernames in the program to but i cant get it to work anybody that can help me?
-
can i use this for the mekanism fusion reactor?
-
thanks greas monkey
and how do i use oc ext editor?
-
i searched bu i couldent find them
Sorry but my programming skills arent that good that i can make one myself, otherwise i wouldent ask it here
-
Hi guys,
i have a town in a minecraft server and i wanted to use opencomputers screens to put some information on,
but i cant get any program to write and i cant find one to use,
this is what i need,
- the possibility to put a title in the middle of the screen.
- under the title on the left side of the screen,
- changing the colors of the text easily.
- and not terminiatible so nobody can shut it off,
- and the possiblity to make a list with rules and people,
- that list needs to be so i can make different list for the staff the members and member+
i hope somebody can help because i cant get it done
sincerely yours The Duke of Crawley
-
thanks for the help,
i cant get much out from the program terminiation you had send, but its starts up from boot right now i will send the new code with this message
i hope sombody else can help me with the prevent termination
local component=require("component") local r=component.redstone local gpu=component.gpu local term=require("term") local text=require("text") local computer=require("computer") local os=require("os") ---- config section local password="ucisrrc876" local delay=1 --time the door stays open local side=5 --side of the door, test this ----- local wrong=false while true do term.clear() gpu.set(1,1,"UCIS Rocket Control Centre") term.setCursor(1,2) gpu.set(1,3,"Please enter password") if wrong then gpu.set(1,1,"UCIS Rocket Control Centre") term.setCursor(1,2) gpu.set(1,3,"Please enter password") wrong=false end term.setCursor(24,3) input = text.trim(term.read(nil, false, nil, "*")) if input==password then r.setOutput(side,15) -- check if this is the correct function os.sleep(delay) r.setOutput(side,0) -- same here else term.clear() gpu.set(1,1, "UCIS Rocket Control Centre") gpu.set(1,3, "Acces Denied") os.sleep(delay) computer.shutdown(true) end end
-
(edit) "i said to early it worked you where right about the text.trim because he is not accepting my password, but now icant get the text.trim to work, i would love if you share the program"
(edit 2) "its working righ now
Thanks man after i tryed somethings with the piece of code you gave me its working now
and there is no extra newline. the only 2 things i now want know is how do i make sure nobody can shut the program off with ctrl+alt+c and how do i make sure its starts upon boot
for people who wants the somewhat renewed code for a password door
thanks to kevinkk525 for providing the base code that i used
the new code is now:
local component=require("component") local r=component.redstone local gpu=component.gpu local term=require("term") local text-require("text") ---- config section local password="ucisrrc876" local delay=1 --time the door stays open local side=5 --side of the door, test this ----- local wrong=false while true do term.clear() gpu.set(1,1,"UCIS Rocket Control Centre") term.setCursor(1,2) gpu.set(1,3,"Please enter password") if wrong then gpu.set(1,1,"UCIS Rocket Control Centre") term.setCursor(1,2) gpu.set(1,3,"Please enter password") wrong=false end term.setCursor(24,3) input = text.trim(term.read(nil, false, nil, "*")) if input==password then r.setOutput(side,15) -- check if this is the correct function os.sleep(delay) r.setOutput(side,0) -- same here else wrong=true end end
-
Hi guys i have a question for you,
i have used a program of the forum and changed it a little bit and its working fine, but i cant get the password hidden with *
i tried the pwchar but the it will not start anymore, and also how do i start it upon boot?
The pwchar parameter, when given, causes input to be masked using the first char of the given string. For example, providing "*" will make all entered characters appear as stars. The returned value will still be the actual text inserted, of course.
i hope one of you guys can help me or implement it in the code i use
Here is the code
local component=require("component") local r=component.redstone local gpu=component.gpu local term=require("term") ---- config section local password="ucisrrc876" local delay=1 --time the door stays open local side=5 --side of the door, test this ----- local wrong=false while true do term.clear() gpu.set(1,1,"UCIS Rocket Control Centre") term.setCursor(1,2) gpu.set(1,3,"Please enter password") if wrong then gpu.set(1,1,"UCIS Rocket Control Centre") term.setCursor(1,2) gpu.set(1,3,"Please enter password") wrong=false end term.setCursor(24,3) local input=io.read() if input==password then r.setOutput(side,15) -- check if this is the correct function os.sleep(delay) r.setOutput(side,0) -- same here else wrong=true end end
Sincerly
The Duke of Crawley
Program with multiple usernames and passwords
in Programming
Posted
shit now you now my idea XD