hi, im sorta new to DB, i got off to the wrong start with it, i was trying to make lots of big stuff and now im all in a tangle...
anyhoo, i wanna make a pass word protection thing, this is what ive got so far..
`¯_Password Protection System_¯
`Created by Alastair Zotos 11:2:2005
`Password: Because_elephants_are_blue
`______________________________
Sync on
Sync Rate 300
start:
`Screen Properties
Set display mode 1024,768,32
width=screen width()/2
height=screen height()/2
cls rgb(0,0,50)
ink rgb(150,150,150),1
`Create a box for password
ink rgb(150,150,150),1
box width-300,height-100,width+300,height+100
ink rgb(0,0,0),0
box width-200,height-14,width+200,height+14
ink rgb(0,0,200),0
box width-300,height-120,width+300,height-100
`Create boxes for decoration
ink rgb(200,200,200),0
box width-303,height-100,width-300,height+100
box width+300,height-100,width+303,height+100
box width-303,height+100,width+303,height+103
box width-202,height-14,width-199,height+14
box width+199,height-14,width+202,height+14
box width-202,height+13,width+202,height+16
box width-202,height-16,width+202,height-13
ink rgb(255,255,255),0
box width-303,height-102,width+303,height-100
box width-303,height-122,width+303,height-121
box width-303,height-122,width-300,height-99
box width+300,height-122,width+303,height-99
`Text
Ink rgb(255,255,255),0
Set text font "Comic Sans MS"
Set Text to Bold
Set text size 20
Text width-290,height-122,"Please Enter Your Password."
`grab screen image
get image 1,0,0,screen width(),screen height()
`stuff
pass$="Because_elephants_are_blue"
`MAIN LOOP ->
`¯¯¯¯¯¯¯¯¯¯
Do
`attend to a few needed things
paste image 1,0,0
`___________________________________________
`Build line string
new$=entry$()
for n=1 to len(new$)
if asc(mid$(new$,n))=8
line$=left$(line$,len(line$)-1)
else
line$=line$+mid$(new$,n)
endif
next n
clear entry buffer
`Make simple cursor
if flash$=" " then flash$="|" else flash$=" "
`Show Entry Buffer
ink rgb(255,255,255),0
center text width-1,height-8,line$+flash$
if line$=pass$
text 722,384,"Correct"
center text 722,399,"Click anywhere to end"
passed=1
else
text 722,384,"Uncorrect"
passed=0
endif
`Verify that you have passed
if passed=1
if mouseclick()=1
cls rgb(0,200,255)
ink rgb(255,255,255),0
Set text size 50
set text font "comic sans MS"
set text to bold
Center text width,height,"...Exiting..."
gosub end
endif
endif
`__________________________________________
`Create a button so you can exit
buttonselected=0
clickselected=0
if makebutton(width+292,height-112,"X")>0 then buttonselected=1
if buttonselected=1
cls rgb(0,200,255)
ink rgb(255,255,255),0
Set text size 50
set text font "comic sans MS"
set text to bold
Center text width,height,"...Exiting..."
gosub end
endif
`End Loop
Sync
cls
Loop
`End program
end:
wait 1000
end
Return
`Create Button
function makebutton(x,y,desc$)
buttonpressed=0
ink rgb(130,130,130),0 : box x-7,y-7,x+7,y+7
ink rgb(55,55,0),0
myx=mousex() : myy=mousey()
if myx>x-20 and myx<x+20
if myy>y-10 and myy<y+10
buttonpressed=1
endif
endif
if buttonpressed=0
ink rgb(0,0,0),0
endif
if buttonpressed=1
ink rgb(255,0,0),0
endif
set text size 18 : center text x,y-8,desc$
if mouseclick()=0 then buttonpressed=0
endfunction buttonpressed
but i spent more time making buttons and the centered texts, and all the decoration, so i didnt do much with the password thing, and i wanna find out about encryption..
long story short: Whats encryption, what do u do with it, how do u make it, etc....? if you could answer this ill make u a rich man/woman/intersex.
bye
"Well, if he dies, it'll teach him not to do it again." - Me