home *** CD-ROM | disk | FTP | other *** search
- on GETUSERNAME
- global NMLETTERS, NLET, USERNAME
- dontPassEvent()
- set NMLETTERS to "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz. "
- set NLET to EMPTY
- set NLET to the key
- if (the key = RETURN) and (length(USERNAME) < 6) then
- set USERNAME to EMPTY
- set the text of cast "CODENAME" to USERNAME
- updateStage()
- beep()
- exit
- end if
- if charToNum(the key) = 8 then
- set USERNAME to EMPTY
- set the text of cast "CODENAME" to USERNAME
- updateStage()
- exit
- end if
- if length(USERNAME) > 30 then
- beep()
- exit
- end if
- if NMLETTERS contains NLET then
- set USERNAME to USERNAME & NLET
- set the text of cast "CODENAME" to USERNAME
- end if
- if (the key = RETURN) and (length(USERNAME) > 5) then
- if char 1 of USERNAME = " " then
- set USERNAME to EMPTY
- set the text of cast "CODENAME" to USERNAME
- updateStage()
- beep()
- exit
- end if
- dontPassEvent()
- set the keyDownScript to "GETCODENAME1"
- go("GETCODE")
- end if
- end
-
- on GETCODENAME1
- global NMLETTERS, NLET, startMovie, SCRAMBLENAME, USERNAME, CODEUSERNAME, CODENUMBER, UPG, ZW, ZWW
- set SCRAMBLENAME to EMPTY
- set CODEUSERNAME to EMPTY
- set UPG to 0
- dontPassEvent()
- set NMLETTERS to "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890$"
- set NLET to EMPTY
- set NLET to the key
- if (charToNum(the key) = 8) or (length(CODENUMBER) > 18) then
- set CODENUMBER to EMPTY
- set the text of cast "CODENAME" to CODENUMBER
- updateStage()
- exit
- end if
- if NMLETTERS contains NLET then
- set CODENUMBER to CODENUMBER & NLET
- set the text of cast "CODENAME" to CODENUMBER
- end if
- if the key = RETURN then
- dontPassEvent()
- set the keyDownScript to "EEMPTY"
- set the mouseDownScript to EMPTY
- repeat with n = 1 to length(CODENUMBER)
- set ZW to char n of CODENUMBER
- set ZWW to charToNum(ZW) + 57 + n
- set CODEUSERNAME to CODEUSERNAME & numToChar(ZWW)
- end repeat
- set CODENUMBER to CODEUSERNAME
- put CODENUMBER
- repeat with n = 1 to length(USERNAME)
- set ZW to char n of USERNAME
- set ZWW to charToNum(ZW) + 57 + n
- set SCRAMBLENAME to SCRAMBLENAME & numToChar(ZWW)
- end repeat
- WRITEUPG()
- CHECKUPG()
- if UPG = 0 then
- go("NOUPG")
- end if
- if UPG = 1 then
- go("YESUPG")
- end if
- end if
- end
-