home *** CD-ROM | disk | FTP | other *** search
- on GETDIR
- global DR, startMovie, GRIDVAL, TEMDR, HEAD, BFALL, BCC, SOLUTIONFLAG, SOLCNT, RBCNT, BUTGRID, TEMBUTGRID, SOL, DD, SOLUTION, TEMPBOARD, THEAD, MAN, TMAN, OPT, PUZZ, UPG
- set OPT to 0
- dontPassEvent()
- set DD to EMPTY
- if (the key = "Q") or (the key = "q") then
- set OPT to 5
- exit
- end if
- if (the key = "N") or (the key = "n") then
- set PUZZ to 0
- set SOLUTIONFLAG to 0
- set the keyUpScript to EMPTY
- dontPassEvent()
- go("SELECT")
- exit
- end if
- if (the key = "r") or (the key = "R") then
- set HEAD to 0
- set SOLUTIONFLAG to 0
- puppetSprite(34, 0)
- set the keyUpScript to "GETDIR"
- go("NEW")
- exit
- end if
- if SOLUTIONFLAG = 0 then
- if (the key = "o") or (the key = "O") then
- set OPT to 1
- exit
- end if
- if (the key = "D") or (the key = "d") then
- play frame "DIRECTIONS"
- exit
- end if
- if (the key = "S") or (the key = "s") then
- if (UPG = 0) and (PUZZ > 3) then
- go("RVONLY")
- end if
- if (UPG = 0) and (PUZZ > 3) then
- exit
- end if
- set SOLUTIONFLAG to 1
- set the keyUpScript to "EEMPTY"
- dontPassEvent()
- go("NEW")
- end if
- end if
- if (MAN <> 0) and (BUTGRID = MAN) then
- exit
- end if
- set BFALL to 0
- set LN to -100
- if (DR = 2) or (DR = 4) then
- set TEMDR to DR
- end if
- if SOLUTIONFLAG = 0 then
- set LT to the key
- set LN to charToNum(LT)
- end if
- if SOLUTIONFLAG = 1 then
- set SOLCNT to SOLCNT + 1
- set DD to char SOLCNT of SOL
- set DT to 1
- if DD = "U" then
- set LN to 30
- end if
- if DD = "R" then
- set LN to 29
- end if
- if DD = "D" then
- set LN to 31
- end if
- if DD = "L" then
- set LN to 28
- end if
- set LT to DD
- end if
- if (LN = 29) and (the castNum of sprite 30 = 28) then
- set the castNum of sprite 30 to 37
- updateStage()
- exit
- end if
- if (LN = 28) and (the castNum of sprite 30 = 37) then
- set the castNum of sprite 30 to 28
- updateStage()
- exit
- end if
- if LN = 29 then
- set DR to 2
- end if
- if LN = 28 then
- set DR to 4
- end if
- if DR = 2 then
- set the castNum of sprite 30 to 37
- end if
- if DR = 4 then
- set the castNum of sprite 30 to 28
- end if
- ANIMATEORACLE()
- if (DR = 2) and (HEAD = 0) then
- if getAt(GRIDX, MAN) = getAt(GRIDX, 14) then
- set DR to 0
- exit
- end if
- if (getAt(GRIDVAL, MAN + 1) = 0) or (getAt(GRIDVAL, MAN + 1) > 14) then
- WALKRIGHT()
- end if
- end if
- if (DR = 4) and (HEAD = 0) then
- if getAt(GRIDX, MAN) = getAt(GRIDX, 1) then
- set DR to 0
- exit
- end if
- if (getAt(GRIDVAL, MAN - 1) = 0) or (getAt(GRIDVAL, MAN - 1) > 14) then
- WALKLEFT()
- end if
- end if
- if (DR = 2) and (HEAD = 1) then
- if getAt(GRIDX, MAN) = getAt(GRIDX, 14) then
- set DR to 0
- exit
- end if
- if ((getAt(GRIDVAL, MAN + 1) = 0) and (getAt(GRIDVAL, MAN - 13) = 0)) or ((getAt(GRIDVAL, MAN + 1) > 14) and (getAt(GRIDVAL, MAN - 13) = 0)) then
- WALKRIGHTBLOCK()
- end if
- end if
- if (DR = 4) and (HEAD = 1) then
- if getAt(GRIDX, MAN) = getAt(GRIDX, 1) then
- set DR to 0
- exit
- end if
- if ((getAt(GRIDVAL, MAN - 1) = 0) and (getAt(GRIDVAL, MAN - 15) = 0)) or ((getAt(GRIDVAL, MAN - 1) > 14) and (getAt(GRIDVAL, MAN - 15) = 0)) then
- WALKLEFTBLOCK()
- end if
- end if
- if (DR = 2) and (HEAD = 1) then
- if getAt(GRIDX, MAN) = getAt(GRIDX, 14) then
- exit
- end if
- if ((getAt(GRIDVAL, MAN + 1) = 0) and (getAt(GRIDVAL, MAN - 13) <> 0)) or ((getAt(GRIDVAL, MAN + 1) > 14) and (getAt(GRIDVAL, MAN - 13) <> 0)) then
- set BFALL to MAN - 14
- WALKRIGHT()
- set HEAD to 0
- end if
- end if
- if (DR = 4) and (HEAD = 1) then
- if getAt(GRIDX, MAN) = getAt(GRIDX, 1) then
- exit
- end if
- if ((getAt(GRIDVAL, MAN - 1) = 0) and (getAt(GRIDVAL, MAN - 15) <> 0)) or ((getAt(GRIDVAL, MAN - 1) > 14) and (getAt(GRIDVAL, MAN - 15) <> 0)) then
- set BFALL to MAN - 14
- WALKLEFT()
- set HEAD to 0
- end if
- end if
- if (LN = 31) and (HEAD = 1) then
- set LN to 0
- if the castNum of sprite 30 = 37 then
- set DR to 2
- end if
- if the castNum of sprite 30 = 28 then
- set DR to 4
- end if
- if (DR = 2) and (getAt(GRIDX, MAN) <> getAt(GRIDX, 14)) then
- if getAt(GRIDVAL, MAN - 13) = 0 then
- DROPRIGHT()
- end if
- end if
- if (DR = 4) and (getAt(GRIDX, MAN) <> getAt(GRIDX, 1)) then
- if getAt(GRIDVAL, MAN - 15) = 0 then
- DROPLEFT()
- end if
- end if
- end if
- if (LN = 31) and (HEAD = 0) and (MAN > 14) then
- if getAt(GRIDVAL, MAN - 14) <> 0 then
- exit
- end if
- if the castNum of sprite 30 = 37 then
- set DR to 2
- end if
- if the castNum of sprite 30 = 28 then
- set DR to 4
- end if
- if (DR = 2) and (getAt(GRIDX, MAN) <> getAt(GRIDX, 14)) then
- if (getAt(GRIDVAL, MAN + 1) = 2) and (getAt(GRIDVAL, MAN - 13) = 0) then
- PICKUPBLOCKRGT()
- end if
- end if
- if (DR = 4) and (getAt(GRIDX, MAN) <> getAt(GRIDX, 1)) then
- if (getAt(GRIDVAL, MAN - 1) = 2) and (getAt(GRIDVAL, MAN - 15) = 0) then
- PICKUPBLOCKLFT()
- end if
- end if
- end if
- if (LN = 30) and (MAN > 14) and (HEAD = 0) then
- if getAt(GRIDVAL, MAN - 14) = 0 then
- if (the castNum of sprite 30 = 37) and (getAt(GRIDX, MAN) <> getAt(GRIDX, 14)) then
- if (getAt(GRIDVAL, MAN - 13) = 0) or (getAt(GRIDVAL, MAN - 13) > 14) then
- JUMPRIGHT()
- set DR to 2
- set LN to 0
- end if
- end if
- if (the castNum of sprite 30 = 28) and (getAt(GRIDX, MAN) <> getAt(GRIDX, 1)) then
- if (getAt(GRIDVAL, MAN - 15) = 0) or (getAt(GRIDVAL, MAN - 15) > 14) then
- JUMPLEFT()
- set DR to 4
- set LN to 0
- end if
- end if
- end if
- end if
- if (LN = 30) and (MAN > 14) and (HEAD = 0) then
- if getAt(GRIDVAL, MAN - 14) = 0 then
- if (the castNum of sprite 30 = 37) and (getAt(GRIDX, MAN) <> getAt(GRIDX, 14)) then
- if getAt(GRIDVAL, MAN - 13) <> 0 then
- JUMPRIGHTMISS()
- set DR to 2
- end if
- end if
- if (the castNum of sprite 30 = 28) and (getAt(GRIDX, MAN) <> getAt(GRIDX, 1)) then
- if getAt(GRIDVAL, MAN - 15) <> 0 then
- JUMPLEFTMISS()
- set DR to 4
- end if
- end if
- end if
- end if
- if (LN = 30) and (MAN > 28) and (HEAD = 1) then
- if getAt(GRIDVAL, MAN - 28) = 0 then
- if (the castNum of sprite 30 = 37) and (getAt(GRIDX, MAN) <> getAt(GRIDX, 14)) then
- if (getAt(GRIDVAL, MAN - 27) = 0) and (getAt(GRIDVAL, MAN - 13) = 0) then
- JUMPRIGHTBLOCK()
- set DR to 2
- end if
- end if
- if (the castNum of sprite 30 = 28) and (getAt(GRIDX, MAN) <> getAt(GRIDX, 1)) then
- if (getAt(GRIDVAL, MAN - 29) = 0) and (getAt(GRIDVAL, MAN - 15) = 0) then
- JUMPLEFTBLOCK()
- set DR to 4
- end if
- end if
- end if
- end if
- if MAN < 155 then
- if (getAt(GRIDVAL, MAN + 14) = 0) or (getAt(GRIDVAL, MAN + 14) = 15) then
- if HEAD = 0 then
- MANFALL()
- end if
- if HEAD = 1 then
- MANFALLBLOCK()
- end if
- if (DR = 2) or (DR = 20) then
- set the castNum of sprite 30 to 37
- end if
- if (DR = 4) or (DR = 40) then
- set the castNum of sprite 30 to 28
- end if
- updateStage()
- end if
- end if
- set DR to 0
- ANIMATEORACLE()
- if BFALL <> 0 then
- BLOCKFALLALONE()
- end if
- end
-