Rem Project: test
Rem Created: 1/17/2008 3:46:16 AM
Rem ***** Main Source File *****
d = 0
X = 0
Set display mode 1024, 768, 32
autocam off
Sync on
sync rate 60
rem font color
ink rgb(255,25,25),0
rem Background color
color backdrop rgb(0,0,0)
backdrop on
REM Backgroun music
LOAD SOUND "C:Program FilesDark Basic SoftwareDark Basic ProfessionalMediaMusicwav1.wav", 1
REM Denied sound
LOAD SOUND "C:Program FilesDark Basic SoftwareDark Basic ProfessionalMediaMusicwavdenied.wav", 2
REM Granted sound
LOAD SOUND "C:Program FilesDark Basic SoftwareDark Basic ProfessionalMediaMusicwavaccess.wav", 3
REM Play Sound 1
PLAY SOUND 1
Position camera 0, -5, 30
Point camera 0, -2, 0
REM load .x model
LOAD OBJECT "C:Program FilesDark Basic SoftwareDark Basic ProfessionalMediaModelsHOnlinelogo.x", 1
Make light 1
Position light 1, 30, -30, 0
do
If S = 28 then Z = 28
YROTATE OBJECT 1,OBJECT ANGLE Y(1)+2
S = Scancode()
TEXT 10, 0, "Hackers Online Alpha 0.01"
if S = 59 then TEXT 0, 40, "MouseX : "+str$(mousex())
if S = 59 then TEXT 0, 60, "MouseY : "+str$(mousey())
If d = 0 then TEXT 438, 494, "Login : " + CurrentInput$
If d = 1 then TEXT 415, 494, "Password : " + CurrentInput$
TEXT 932, 750, "Cyberw0rm"
TEXT 870, 20, "Login$ : " + Login$
TEXT 870, 40, "Pass$ : " + Pass$
sync
NewMessage$ = InputUserMessage()
loop
global CurrentInput$ as string
global Login$ as string
global Pass$ as string
global d as integer
function InputUserMessage()
local Result as string
local Char as string
local i as integer
` If anything is in the keyboard entry buffer we add the characters one by one to the current input string
if entry$() <> ""
for i = 1 to len( entry$() )
Char = mid$( entry$(), i )
` If it's a backspace, remove the last character
if Char = chr$( 8 )
if CurrentInput$ <> "" then CurrentInput$ = left$( CurrentInput$, len(CurrentInput$)-1 )
else
` If it's a valid character add it to the buffer
if asc( Char ) >= 32 && asc( Char ) < 128 then CurrentInput$ = CurrentInput$ + Char
` If it's a Tab, pass on what we got and start again
if asc( Char ) = 13
d = d + 1
if d <=1
Login$ = Result
Login$ = CurrentInput$
CurrentInput$ = ""
else
PLAY SOUND 3
Pass$ = Result
Pass$ = CurrentInput$
CurrentImput$ = ""
endif
endif
endif
next i
` Clear out the buffer
clear entry buffer
endif
endfunction Result
This is an exemple of a login screen with a 3d animation in the background. The username is stuck in Login$ and the password in Pass$. I have a question how could I compare those Strings to an existing Mysql database? Thank you.