Jump to content




2 Passwords for 1 Computer

computer help

5 replies to this topic

#1 Keego

  • New Members
  • 9 posts

Posted 08 December 2012 - 09:27 AM

Hello I <3 this mod because I can learn with fun but I got a problem and I cant fix it. (Its the startup) Sry that i postet it in here!!!!!!!! Here the link if you want to help me http://www.computerc...for-1-computer/
shell.run("clear")
print("Passwort eingeben")
local input = read ("*")
if input == "k1iller5" then
shell.run("clear")
I = 0
while I < 100 do
sleep(0.5)
I =(I + 10)
shell.run("clear")
print(I)
end
shell.run("clear")
print("------------------------------")
print("")
print("	   Wilkommen Keego		")
print("	Windows XP Professional   ")
print("------------------------------")
else if input == "1234" then
shell.run("clear")
B = 0
while B < 100 do
sleep(0.5)
B =(B + 5)
shell.run("clear")
print(B)/>/>/>/>/>/>
end
print("------------------------------")
print("")
print("		   Wilkommen		  ")
print("	 Windows XP Professioal   ")
print("------------------------------")
else
os.shutdown
end


#2 BigSHinyToys

  • Members
  • 1,001 posts

Posted 08 December 2012 - 10:23 AM

It is great to hear you like this mod so could you please post questions in the ask a pro section.

That taken care of when posting a request for help it is useful to post as much information about the program you are trying to make and and error codes that are displayed. We here are happy to help new forums members .

Could you please post more information about what this program is indented to do and where the errors are.

#3 rhyleymaster

  • Members
  • 186 posts
  • LocationCanada

Posted 08 December 2012 - 04:23 PM

I see your new here. I've learned quite a bit with passwords before.
When doing this, at the top to make it nicer try this:
os.pullEvent = os.pullEventRaw -- prevents ctrl + t
user = ("") -- Put username here.
pass = ("") -- Put pass here.

This is so when input is called, you can just put:

if input = user

to get rid of constantly typing the same password over again.

#4 rhyleymaster

  • Members
  • 186 posts
  • LocationCanada

Posted 08 December 2012 - 04:25 PM

Also your problem appears to be this shell.run("clear")
clear is not a program. Instead to:
term.clear()
term.setCursorPos(1,1)


#5 basdxz

  • Members
  • 116 posts

Posted 08 December 2012 - 06:39 PM

os.pullEvent = os.pullEventRaw -- prevents ctrl + t
pass0 = ("k1iller5") -- Put pass 1 here.
pass1 = ("1234") -- Put pass 2 here.
term.clear()
term.setCursorPos(1,1)
print("Passwort eingeben")
local input = read ("*")
if input == pass0 then
term.clear()
term.setCursorPos(1,1)
I = 0
while I < 100 do
sleep(0.5)
I =(I + 10)
term.clear()
term.setCursorPos(1,1)
print(I.."%")
end
term.clear()
term.setCursorPos(1,1)
print("------------------------------")
print("")
print("    Wilkommen Keego			  ")
print(" Windows XP Professional   ")
print("------------------------------")
elseif input == pass1 then
term.clear()
term.setCursorPos(1,1)
B = 0
while B < 100 do
sleep(0.5)
B =(B + 5)
term.clear()
term.setCursorPos(1,1)
print(B.."%")
end
term.clear()
term.setCursorPos(1,1)
print("------------------------------")
print("")
print("		    Wilkommen			  ")
print("  Windows XP Professioal   ")
print("------------------------------")
else
term.clear()
term.setCursorPos(1,1)
print("Falsches Passwort! Herunterfahren!")
sleep(2)
os.shutdown()
end
Fixed, improved and tested :).

#6 rhyleymaster

  • Members
  • 186 posts
  • LocationCanada

Posted 08 December 2012 - 10:17 PM

View Postbasdxz, on 08 December 2012 - 06:39 PM, said:

os.pullEvent = os.pullEventRaw -- prevents ctrl + t
pass0 = ("k1iller5") -- Put pass 1 here.
pass1 = ("1234") -- Put pass 2 here.
term.clear()
term.setCursorPos(1,1)
print("Passwort eingeben")
local input = read ("*")
if input == pass0 then
term.clear()
term.setCursorPos(1,1)
I = 0
while I < 100 do
sleep(0.5)
I =(I + 10)
term.clear()
term.setCursorPos(1,1)
print(I.."%")
end
term.clear()
term.setCursorPos(1,1)
print("------------------------------")
print("")
print("	Wilkommen Keego			  ")
print(" Windows XP Professional   ")
print("------------------------------")
elseif input == pass1 then
term.clear()
term.setCursorPos(1,1)
B = 0
while B < 100 do
sleep(0.5)
B =(B + 5)
term.clear()
term.setCursorPos(1,1)
print(B.."%")
end
term.clear()
term.setCursorPos(1,1)
print("------------------------------")
print("")
print("			Wilkommen			  ")
print("  Windows XP Professioal   ")
print("------------------------------")
else
term.clear()
term.setCursorPos(1,1)
print("Falsches Passwort! Herunterfahren!")
sleep(2)
os.shutdown()
end
Fixed, improved and tested :).
All that really needed to be changed was the shell.run("clear"). and instead of constantly rebooting, It should be changed to a loop.
ex)
while true do
print("fuudge")
sleep(0)
end





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users