home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global GRIDX, GRIDY, GRIDNUM, GRIDVAL, PUZZ, SOLUTIONFLAG, SOLCNT, SCOREBOARD, SCOREX, SCOREY, UPG, ALPH, CODEWORDP, FILELIST, REGTHERE, SCRTHERE, REGNAME, ALLSCORE, DUMMY
- set ALLSCORE to EMPTY
- set CODEWORDP to EMPTY
- set UPG to 0
- cursor(200)
- if objectp(GWRITEOBJECT) then
- GWRITEOBJECT(mdispose)
- end if
- if objectp(GREADOBJECT) then
- GREADOBJECT(mdispose)
- end if
- set ALPH to "ABCDEFGHIJKLMNOPQURSTUVWXYZabcdefghijklmnopqurstuvwxyz" & RETURN
- set the soundEnabled to 1
- set the exitLock to 1
- set REGTHERE to 0
- set SCRTHERE to 0
- set FILELIST to []
- repeat with i = 1 to the maxinteger
- set n to getNthFileNameInFolder(the pathName, i)
- if n = EMPTY then
- exit repeat
- end if
- append(FILELIST, n)
- end repeat
- repeat with n = 1 to count(FILELIST)
- if "RUNES.SKR" = getAt(FILELIST, n) then
- set SCRTHERE to 1
- end if
- if "RUNES.DAT" = getAt(FILELIST, n) then
- set REGTHERE to 1
- end if
- end repeat
- if REGTHERE = 0 then
- if objectp(GWRITEOBJECT) then
- GWRITEOBJECT(mdispose)
- end if
- set GWRITEOBJECT to FileIO(mnew, "WRITE", the pathName & "RUNES.DAT")
- set DUMMY to "R6TEHKE9G9$8N*E#R3O8U8XZY" & RETURN
- repeat with n = 1 to 5
- GWRITEOBJECT(mWriteString, DUMMY)
- end repeat
- GWRITEOBJECT(mdispose)
- end if
- CHECKUPG()
- if UPG = 0 then
- set the text of field "OWNERNAME" to "UNREGISTERED SHAREWARE VERSION"
- else
- set the text of field "OWNERNAME" to REGNAME & " " & "REGISTERED COPY"
- end if
- if SCRTHERE = 0 then
- WRITENEWSCORES()
- end if
- READSCORES()
- set SCOREX to []
- set SCOREY to []
- set M to 94 - 26
- repeat with n = 1 to 26
- set M to M + 26
- append(SCOREY, M)
- if n < 14 then
- append(SCOREX, 180)
- end if
- if n > 13 then
- append(SCOREX, 349)
- end if
- if n = 13 then
- set M to 94 - 26
- end if
- end repeat
- set SOLCNT to 0
- set PUZZ to 0
- set SOLUTIONFLAG to 0
- set GRIDVAL to []
- set GRIDNUM to []
- set GRIDX to []
- set GRIDY to []
- set X to 65
- set Y to 17
- repeat with n = 1 to 12
- set Y to Y + 32
- set X to 65
- repeat with NN = 1 to 14
- set X to X + 32
- append(GRIDX, X)
- append(GRIDY, Y)
- append(GRIDVAL, 0)
- end repeat
- end repeat
- end
-
- on WRITENEWSCORES
- global GWRITEOBJECT, ALLSCORE, SCOREFIL, SCOREP, CODEWORDP
- set SCOREP to []
- set SCOREFIL to "RUNES.SKR"
- set ALLSCORE to EMPTY
- repeat with n = 1 to 26
- set ALLSCORE to ALLSCORE & "0"
- end repeat
- set CODEWORDP to ALLSCORE
- CIPHER()
- set ALLSCORE to CODEWORDP
- if objectp(GWRITEOBJECT) then
- GWRITEOBJECT(mdispose)
- end if
- set GWRITEOBJECT to FileIO(mnew, "WRITE", the pathName & SCOREFIL)
- set ALLSCORE to ALLSCORE & RETURN & numToChar(10)
- GWRITEOBJECT(mWriteString, ALLSCORE)
- GWRITEOBJECT(mdispose)
- DECIPHER()
- set ALLSCORE to CODEWORDP
- end
-
- on WALKRIGHT
- global MAN, GRIDX, GRIDY, DT, MANH, MANC
- set DT to 5
- set MANX to getAt(GRIDX, MAN)
- set MANY to getAt(GRIDY, MAN)
- puppetSound("FOOTSTP.WAV")
- repeat with n = 1 to 4
- set the castNum of sprite 30 to 36 + n
- set MANX to MANX + 8
- set the locH of sprite 30 to MANX
- updateStage()
- COUNTTIME()
- end repeat
- set MAN to MAN + 1
- set the castNum of sprite 30 to 37
- set the locH of sprite 30 to getAt(GRIDX, MAN)
- set the locV of sprite 30 to getAt(GRIDY, MAN)
- updateStage()
- end
-
- on WALKLEFT
- global MAN, GRIDX, GRIDY, DT, MANH, MANC
- set DT to 5
- set MANX to getAt(GRIDX, MAN)
- set MANY to getAt(GRIDY, MAN)
- puppetSound("FOOTSTP.WAV")
- repeat with n = 1 to 4
- set the castNum of sprite 30 to 27 + n
- set MANX to MANX - 8
- set the locH of sprite 30 to MANX
- updateStage()
- COUNTTIME()
- end repeat
- set MAN to MAN - 1
- set the castNum of sprite 30 to 28
- set the locH of sprite 30 to getAt(GRIDX, MAN)
- set the locV of sprite 30 to getAt(GRIDY, MAN)
- updateStage()
- end
-
- on MANFALL
- global GRIDX, GRIDY, MAN, BDOWN, GRIDVAL, TMAN, DT, MANX, MANC, DR
- set DT to 1
- set TMAN to MAN
- set BDOWN to 0
- repeat while (getAt(GRIDVAL, TMAN + 14) = 0) or (getAt(GRIDVAL, TMAN + 14) = 15)
- set TMAN to TMAN + 14
- set BDOWN to BDOWN + 1
- if TMAN > 154 then
- exit repeat
- end if
- end repeat
- repeat with n = 1 to BDOWN
- ANIMATEORACLE()
- set MANX to getAt(GRIDX, MAN)
- set MANC to getAt(GRIDY, MAN)
- repeat with NN = 1 to 4
- set the castNum of sprite 30 to 48
- set the locV of sprite 30 to MANC + 4
- updateStage()
- COUNTTIME()
- set the castNum of sprite 30 to 47
- set the locV of sprite 30 to MANC + 8
- updateStage()
- COUNTTIME()
- set MANC to MANC + 8
- end repeat
- set MAN to MAN + 14
- end repeat
- puppetSound("MANDOWN.WAV")
- updateStage()
- end
-
- on JUMPRIGHT
- global MAN, GRIDX, GRIDY, DT, MANX, MANC
- set MANX to getAt(GRIDX, MAN)
- set MANC to getAt(GRIDY, MAN)
- set DT to 5
- set the castNum of sprite 30 to 43
- updateStage()
- COUNTTIME()
- set the castNum of sprite 30 to 44
- updateStage()
- COUNTTIME()
- set the castNum of sprite 30 to 43
- updateStage()
- COUNTTIME()
- set DT to 4
- set the castNum of sprite 30 to 37
- updateStage()
- puppetSound("MANFLIP.WAV")
- repeat with n = 1 to 4
- set MANC to MANC - 8
- set the locV of sprite 30 to MANC
- if n = 2 then
- set the castNum of sprite 30 to 55
- end if
- if n = 4 then
- set the castNum of sprite 30 to 56
- end if
- updateStage()
- COUNTTIME()
- end repeat
- set MAN to MAN - 14
- set MANX to the locH of sprite 30
- repeat with n = 1 to 4
- if n = 1 then
- set the castNum of sprite 30 to 56
- end if
- if n = 2 then
- set the castNum of sprite 30 to 57
- end if
- if n = 3 then
- set the castNum of sprite 30 to 58
- end if
- if n = 4 then
- set the castNum of sprite 30 to 43
- end if
- set MANX to MANX + 8
- set the locH of sprite 30 to MANX
- updateStage()
- COUNTTIME()
- end repeat
- set MAN to MAN + 1
- set the castNum of sprite 30 to 37
- end
-
- on JUMPLEFT
- global MAN, GRIDX, GRIDY, DT, MANX, MANC
- set MANX to getAt(GRIDX, MAN)
- set MANC to getAt(GRIDY, MAN)
- set DT to 5
- set the castNum of sprite 30 to 34
- updateStage()
- COUNTTIME()
- set the castNum of sprite 30 to 35
- updateStage()
- COUNTTIME()
- set the castNum of sprite 30 to 34
- updateStage()
- COUNTTIME()
- set DT to 4
- set the castNum of sprite 30 to 28
- updateStage()
- puppetSound("MANFLIP.WAV")
- repeat with n = 1 to 4
- set MANC to MANC - 8
- if n = 2 then
- set the castNum of sprite 30 to 60
- end if
- if n = 4 then
- set the castNum of sprite 30 to 61
- end if
- set the locV of sprite 30 to MANC
- updateStage()
- COUNTTIME()
- end repeat
- set MAN to MAN - 14
- set MANX to the locH of sprite 30
- repeat with n = 1 to 4
- set the castNum of sprite 30 to 60 + n
- if n = 4 then
- set the castNum of sprite 30 to 34
- end if
- set MANX to MANX - 8
- set the locH of sprite 30 to MANX
- updateStage()
- COUNTTIME()
- end repeat
- set MAN to MAN - 1
- set the castNum of sprite 30 to 28
- end
-
- on PICKUPBLOCKRGT
- global GRIDVAL, HEAD, GRIDX, GRIDY, MAN, DT
- set DT to 10
- set the trails of sprite 11 to 0
- set the locH of sprite 11 to getAt(GRIDX, MAN + 1)
- set the locV of sprite 11 to getAt(GRIDY, MAN + 1)
- set the castNum of sprite 30 to 51
- updateStage()
- COUNTTIME()
- puppetSound("UGG.WAV")
- setAt(GRIDVAL, MAN + 1, 0)
- set the locH of sprite 11 to getAt(GRIDX, MAN - 14)
- set the locV of sprite 11 to getAt(GRIDY, MAN - 14)
- set the castNum of sprite 30 to 52
- updateStage()
- set HEAD to 1
- COUNTTIME()
- set DT to 5
- set the castNum of sprite 30 to 51
- updateStage()
- COUNTTIME()
- set the castNum of sprite 30 to 37
- updateStage()
- end
-
- on PICKUPBLOCKLFT
- global GRIDVAL, HEAD, GRIDX, GRIDY, MAN, DT
- set DT to 10
- set the trails of sprite 11 to 0
- set the locH of sprite 11 to getAt(GRIDX, MAN - 1)
- set the locV of sprite 11 to getAt(GRIDY, MAN - 1)
- set the castNum of sprite 30 to 49
- updateStage()
- COUNTTIME()
- puppetSound("UGG.WAV")
- setAt(GRIDVAL, MAN - 1, 0)
- set the locH of sprite 11 to getAt(GRIDX, MAN - 14)
- set the locV of sprite 11 to getAt(GRIDY, MAN - 14)
- set the castNum of sprite 30 to 50
- updateStage()
- COUNTTIME()
- set DT to 5
- set the castNum of sprite 30 to 49
- updateStage()
- COUNTTIME()
- set the castNum of sprite 30 to 28
- updateStage()
- set HEAD to 1
- end
-
- on stopMovie
- cursor(-1)
- set the soundEnabled to 1
- if objectp(GWRITEOBJECT) then
- GWRITEOBJECT(mdispose)
- end if
- if objectp(GREADOBJECT) then
- GREADOBJECT(mdispose)
- end if
- if objectp(printer) then
- printer(mdispose)
- end if
- clearGlobals()
- end
-