Well I am somewhat a newb...
Been experimenting on stuff and I decided to try out a password thing. Well here it is.
correct_pass$="Click To Enter"
wrong_pass$="Password Wrong. Click Here To Try Again"
no_menu$="NO"
yes1_menu$="YES"
x=238
y=238
x1=238
y1=238
x2=340
y2=280
x3=240
y3=280
w=text width(correct_pass$)
h=text height(correct_pass$)
w1=text width(wrong_pass$)
h1=text height(wrong_pass$)
w2=text width(no_menu$)
h2=text height(no_menu$)
w3=text width(yes1_menu$)
h3=text height(yes1_menu$)
pass_start:
rem background for menu
Ink 400000,0
BOX 123,216,500,325
rem make menu raw
Ink 5000000,0
`left line
Line 125,325,125,217
Line 124,325,124,217
Line 123,325,123,217
`right line
Line 500,325,500,217
Line 499,325,499,217
Line 498,325,498,217
`middle line
Line 123,216.6,500,216.6
Line 123,217.6,500,217.6
Line 123,218.6,500,218.6
`bottom line
Line 123,325,500,325
Line 123,326,500,326
Line 123,327,500,327
` Text on Menu
Ink 999999999999999999999999999999,0
Perform checklist for fonts
Set text size 20
Set text font "Abaddon"
Text 190,230,"What Is The Correct Password?"
`note that the password is case sensitive
realPassword$="please"
set cursor 250,275
input "*";userPassword$
if realPassword$=userPassword$ then goto correct_pass else goto wrong_pass
` Goto and What happens on mouseclick
wrong_pass:
cls
rem background for menu
Ink 400000,0
BOX 123,216,500,325
rem make menu raw
Ink 5000000,0
`left line
Line 125,325,125,217
Line 124,325,124,217
Line 123,325,123,217
`right line
Line 500,325,500,217
Line 499,325,499,217
Line 498,325,498,217
`middle line
Line 123,216.6,500,216.6
Line 123,217.6,500,217.6
Line 123,218.6,500,218.6
`bottom line
Line 123,325,500,325
Line 123,326,500,326
Line 123,327,500,327
do
` Text on Menu
Ink 999999999999999999999999999999,0
Perform checklist for fonts
Set text size 20
Set text font "Abaddon"
Text 160,230,"Password Incorrect! Re-Type Password?"
` If Yes is Clicked
if mousex()>=x3 and mousex()<=x3+w3 and mousey()>=y3 and mousey()<=y3+h3
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto pass_start
else
ink rgb(255,255,255),0
rollover=1
endif
text x3,y3,yes1_menu$
` If No is Clicked
if mousex()>=x2 and mousex()<=x2+w2 and mousey()>=y2 and mousey()<=y2+h2
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then end
else
ink rgb(255,255,255),0
rollover=1
endif
text x2,y2,no_menu$
loop
end
` Goto and What happens on mouseclick
correct_pass:
cls
rem background for menu
Ink 400000,0
BOX 123,216,500,325
rem make menu raw
Ink 5000000,0
`left line
Line 125,325,125,217
Line 124,325,124,217
Line 123,325,123,217
`right line
Line 500,325,500,217
Line 499,325,499,217
Line 498,325,498,217
`middle line
Line 123,216.6,500,216.6
Line 123,217.6,500,217.6
Line 123,218.6,500,218.6
`bottom line
Line 123,325,500,325
Line 123,326,500,326
Line 123,327,500,327
do
` Text on Menu
Ink 999999999999999999999999999999,0
Perform checklist for fonts
Set text size 20
Set text font "Abaddon"
Text 135,230,"Password Correct! Do You Want To Continue?"
Text 240,280,"YES"
` If No is Clicked
if mousex()>=x2 and mousex()<=x2+w2 and mousey()>=y2 and mousey()<=y2+h2
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then end
else
ink rgb(255,255,255),0
rollover=1
endif
text x2,y2,no_menu$
loop
end
You do not need to have any extra files. Just copy and paste what I have here and it will work, or at least should. The password to the one is
please
The buttons do work.
Please comment on what I did. I would like to know if im getting learning progress.
Thanks
Nicolas
Future Company Name = Blazing Fire
Current Website Name = Blazing Fire
Future Number is Eleventy