home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- global guyX, guyY, olds, guyXX, guyYY, pillarname, wordList, posGN
- set s to olds
- set guyXX to 0
- set guyYY to 0
- repeat with y = -1 to 1
- repeat with x = -1 to 1
- set yy to guyY + y
- set xx to guyX + x
- if (xx < 1) or (xx > 5) or (yy < 1) or (yy > 7) then
- next repeat
- end if
- set ss to 44 - (yy * 5) - xx
- if rollOver(ss) then
- set s to ss
- set posGN to word 1 of the name of cast the castNum of sprite 41 && getAt(["left", "forward", "right"], x + 2)
- set realY to y + 1
- set y to 1
- exit repeat
- end if
- set s to 0
- end repeat
- end repeat
- if s then
- set text to getWord(xx, yy)
- if text = EMPTY then
- set text to " "
- end if
- if text = EMPTY then
- set text2 to " "
- end if
- put text into field "Text"
- put text into field "Text2"
- puppetSprite(48, 1)
- set the locH of sprite 48 to the mouseH - 123
- set the locV of sprite 48 to the mouseV - 22
- set guyXX to xx
- set guyYY to yy
- set oneSetAlready to s
- end if
- set curs to the number of cast ("cursor" && string(x) && string(realY))
- if curs > 0 then
- cursor([curs])
- else
- cursor([the number of cast "cursor 0"])
- end if
- if s <> olds then
- set olds to s
- end if
- if not s then
- put " " into field "Text"
- put " " into field "Text2"
- end if
- ruby()
- set t1 to the ticks
- go(the frame)
- end
-
- on mouseDown
- global guyX, guyY, guyXX, guyYY, checkList, posGN
- puppetSprite(48, 0)
- updateStage()
- put " " into field "text2"
- cursor(0)
- if (guyX = guyXX) and (guyY = guyYY) then
- exit
- end if
- if not guyXX or not guyYY then
- exit
- end if
- set text to getWord(guyXX, guyYY)
- if text = EMPTY then
- set text to " "
- end if
- if text <> field "text" then
- put text into field "Text"
- end if
- if text <> field "text2" then
- put text into field "Text2"
- end if
- if getCheck(guyXX, guyYY) then
- cursor(4)
- updateStage()
- goodJump()
- if guyY = 7 then
- set guyYY to guyY + 1
- goodJump()
- wonit()
- end if
- else
- badJump()
- end if
- set guyXX to 0
- set guyYY to 0
- end
-
- on goodJump
- global guyX, guyY, guyXX, guyYY, posGN
- set d to 2
- set dd to 1 / float(d)
- set cnum to the castNum of sprite 41
- set name to the name of cast cnum
- set the castNum of sprite 41 to the number of cast (word 1 of name && "takeoff")
- if word 1 of the name of cast the castNum of sprite 41 = "guy" then
- puppetSound("Grunt.wav")
- else
- puppetSound("Jengrunt.wav")
- end if
- updateStage()
- repeat with i = 0 to d
- set x to float(((guyXX - guyX) * i * dd) + guyX)
- set y to float(((guyYY - guyY) * i * dd) + guyY)
- if i < d then
- set the castNum of sprite 41 to the number of cast (name && "jump")
- else
- set the castNum of sprite 41 to the number of cast (word 1 of name && "land")
- end if
- placeguy(x, y)
- updateStage()
- end repeat
- set guyX to guyXX
- set guyY to guyYY
- placeguy(guyX, guyY)
- puppetSound("Thump.wav")
- updateStage()
- set t to the ticks
- repeat while the ticks < (t + 1)
- end repeat
- set the castNum of sprite 41 to cnum
- placeguy(guyX, guyY)
- repeat while soundBusy(1)
- end repeat
- puppetSound(0)
- end
-
- on badJump
- global guyX, guyY, guyXX, guyYY, olds
- goodJump()
- set s to 44 - (guyY * 5) - guyX
- puppetSound(0)
- puppetSound("Crumble.wav")
- puppetTransition(28, 1, 4, 1)
- set saveS to the castNum of sprite s
- set cast41 to the castNum of sprite 41
- set ink41 to the ink of sprite 41
- set forecolor41 to the foreColor of sprite 41
- set backcolor41 to the backColor of sprite 41
- set rect41 to the rect of sprite 41
- set the castNum of sprite s to 0
- updateStage()
- puppetTransition(0)
- repeat while soundBusy(1)
- end repeat
- puppetSound(0)
- if word 1 of the name of cast the castNum of sprite 41 = "guy" then
- puppetSound("fall.wav")
- else
- puppetSound("Jenfall.wav")
- end if
- set olds to 0
- set name to the name of cast the castNum of sprite 41
- set the castNum of sprite 41 to 0
- set the castNum of sprite s to the number of cast (word 1 of name && "fall")
- set the ink of sprite s to ink41
- set the foreColor of sprite s to forecolor41
- set the backColor of sprite s to backcolor41
- set the rect of sprite s to rect41
- set v to the locV of sprite s
- repeat with i = 1 to 13
- set the locV of sprite s to v + (i * 30)
- updateStage()
- end repeat
- set the castNum of sprite s to saveS
- set the castNum of sprite 41 to cast41
- set the locV of sprite 41 to 2000
- go("lost")
- end
-
- on wonit
- wintest()
- end
-
- on wait w
- set t to the ticks
- repeat while the ticks < (t + w)
- end repeat
- end
-