Submit Your Own Code

PSP Lua CodeBase : Parental Control Password Protect

Description:
this is a revamped edition of one of the other password codes here i have made it so you must enter your
parental control password and then you just change the bottom bit of the code so if the passord is correct
it does this if its incorrect it does this (see comments at bottom of code)
also i extracted this from my app and i had to change a few things so that it would
work without the other files in my app so you might have
to change a few thing but im pretty sure i got it all

-- EVILMANA.COM PSP LUA CODEBASE
-- www.evilmana.com/tutorials/codebase
-- Chair In/Out
-- SUBMITTED BY: emcp

white = Color.new(255,255,255)
yellow = Color.new(255,255,0)
blue = Color.new(128,128,255)



PasswordEntry = { 0, 0, 0, 0}

CurrentPasswordNumber = 1

TextGap = 20
TextStart = 184

LastPadState = Controls.read()


pass = io.open("flash1:/registry/system.dreg","r")
pass:seek("set", 0x11E0)
FlashPassword = pass:read(4)
pass:close()

while true do

if CurrentPadState:right() and not LastPadState:right()then
CurrentPasswordNumber = CurrentPasswordNumber + 1
if CurrentPasswordNumber > 4 then
CurrentPasswordNumber = 1
end
end

if CurrentPadState:left() and not LastPadState:left() then
CurrentPasswordNumber = CurrentPasswordNumber - 1
if CurrentPasswordNumber < 0 then
CurrentPasswordNumber = 4
end
end

if CurrentPadState:up() and not LastPadState:up() then
PasswordEntry[CurrentPasswordNumber] = PasswordEntry[CurrentPasswordNumber] + 1

if PasswordEntry[CurrentPasswordNumber] > 9 then
PasswordEntry[CurrentPasswordNumber] = 0
end
end

if CurrentPadState:down() and not LastPadState:down() then
PasswordEntry[CurrentPasswordNumber] = PasswordEntry[CurrentPasswordNumber] - 1

if PasswordEntry[CurrentPasswordNumber] < 0 then
PasswordEntry[CurrentPasswordNumber] = 9
end
end
local password = ""

for i=1,table.getn(PasswordEntry) do
password = password .. PasswordEntry[i]
end

LastPadState = CurrentPadState

screen:clear(blue)

screen:fontPrint(164,89,"Enter your password",white)

for i=1,table.getn(PasswordEntry) do
if i == CurrentPasswordNumber then
screen:fontPrint(TextStart+i*20, 109, PasswordEntry[i], yellow)
else
screen:fontPrint(TextStart+i*20, 109, PasswordEntry[i], white)
end
end
screen.waitVblankStart()
screen.flip()
screen:clear()
pad = Controls.read()
if password == FlashPassword and pad:cross()
then
screen:clear()
-----Enter Your Code Here If Password Is Correct-----
end

if password ~= FlashPassword and pad:cross()
then
-----Enter Your Code Here If Password Is Incorrect
end
end

Back to CodeBase
 

Please welcome anthonyjee, our newest member.

Who's Online:

Total Members: 522
Total Posts: 13085
Total Topics: 1515
Total Categories: 7
Total Boards: 42

Recent Posts:

Re: Hello every body... by DeniseVera
Need help please by Robbynator
Re: Hello every body... by horvathann
Re: background criminal record check by backgroundchecker
background criminal record check by backgroundchecker
Intro to Perl Part 2: What are Scalars? & Examples by Chi Kitory
Intro to Perl Part 1 About Perl and Hello World by Chi Kitory
Re: Trying To Get Rid of the Spammers by Charlie


 
Copyright © 2006-2009 www.EvilMana.com All rights reserved.
EvilMana Logo by emcp and Charlie