home *** CD-ROM | disk | FTP | other *** search
- on detecter
- global shortlist, miceCaught
- cursor(200)
- repeat with x = 1 to the number of items in shortlist
- set thesprite to value(item x of shortlist)
- if rollOver(thesprite) then
- alarm()
- end if
- end repeat
- set the castNum of sprite 25 to the number of cast "detectoff"
- set the locH of sprite 25 to the mouseH
- set the locV of sprite 25 to the mouseV
- updateStage()
- end
-
- on select
- global myroom, shortlist, spritelist, theselsprite, mysound
- repeat with x = 1 to the number of items in shortlist
- set mysprite to value(item x of shortlist)
- if rollOver(mysprite) then
- set theselsprite to mysprite
- set myroom to line mysprite - 4 of field "roomlist"
- set mysound to line mysprite - 4 of field "soundlist"
- puppetSprite(25, 0)
- put spritelist
- go("room")
- set the mouseDownScript to EMPTY
- end if
- end repeat
- end
-
- on musicon
- global music
- set music to 1
- set the castNum of sprite 5 to the number of cast "m1"
- end
-
- on musicoff
- global music
- set music to 0
- set the castNum of sprite 5 to the number of cast "m2"
- end
-
- on slow
- global mytempo, numtraps
- set numtraps to 10
- set mytempo to 8
- set the castNum of sprite 4 to the number of cast "l1"
- end
-
- on medium
- global mytempo, numtraps
- set numtraps to 5
- set mytempo to 12
- set the castNum of sprite 4 to the number of cast "l2"
- end
-
- on fast
- global mytempo, numtraps
- set numtraps to 0
- set mytempo to 16
- set the castNum of sprite 4 to the number of cast "l3"
- end
-
- on mainstart
- global spritelist, thehdpath, music, mytempo, WhereAmI
- set spritelist to list(7, 17)
- buildorchestra()
- set music to 1
- set mytempo to 8
- set WhereAmI to "menu"
- end
-
- on startmenu
- global myroom
- set myroom to line random(19) of field "roomlist"
- cursor(200)
- selectlist()
- end
-
- on selectlist
- global spritelist, shortlist, thecdpath
- set templist to value(string(spritelist))
- set shortlist to EMPTY
- if count(templist) = 0 then
- go(1, "credits")
- exit
- end if
- if count(templist) = 2 then
- put getAt(templist, 1) into item 1 of shortlist
- put getAt(templist, 2) into item 2 of shortlist
- else
- if count(templist) = 1 then
- put getAt(templist, 1) into item 1 of shortlist
- else
- repeat with x = 1 to 3
- set listnum to count(templist)
- set mynum to random(listnum)
- put getAt(templist, mynum) into item x of shortlist
- deleteAt(templist, mynum)
- end repeat
- end if
- end if
- end
-
- on alarm
- set the castNum of sprite 25 to the number of cast "detecton"
- updateStage()
- if not (the soundBusy of 1) then
- puppetSound("short siren")
- end if
- wait(10)
- end
-
- on gotomovie
- global myroom, thecdpath, mysound
- go(1, the pathName & myroom)
- cursor(200)
- end
-
- on interfacehelp
- go("help")
- set the timeoutLapsed to 0
- puppetSprite(25, 0)
- end
-
- on loadgame
- global thehdpath, savename, saveinfo
- put EMPTY into field "savelist"
- set myfile to FileIO(mnew, "read", thehdpath & "saveinfo.txt")
- if objectp(myfile) then
- set saveinfo to myfile(mReadFile)
- myfile(mdispose)
- if saveinfo = EMPTY then
- alert("no games saved")
- go("start")
- else
- repeat with x = 1 to the number of lines in saveinfo
- put char 1 to 32 of item 1 of line x of saveinfo & RETURN after field "savelist"
- end repeat
- end if
- set savename to field "savelist"
- updateStage()
- else
- go("start")
- end if
- end
-
- on selectedgame
- global saveinfo, miceCaught, spritelist, mytempo, theBuild, playList, music, numtraps, trapsdone
- set myline to the mouseLine
- if line myline of saveinfo <> EMPTY then
- set miceCaught to value(item 2 of line myline of saveinfo)
- set mytempo to value(item 3 of line myline of saveinfo)
- set numtraps to value(item 4 of line myline of saveinfo)
- set music to value(item 5 of line myline of saveinfo)
- set theBuild to item 6 of line myline of saveinfo
- set thelist to item 7 to 25 - miceCaught of line myline of saveinfo
- set spritelist to value(thelist)
- set tot to the number of items in line myline of saveinfo
- if music then
- set theplay to item 26 - miceCaught to 25 of line myline of saveinfo
- set playList to value(theplay)
- set trapsdone to item 26 to tot of line myline of saveinfo
- else
- set trapsdone to item 27 - miceCaught to tot of line myline of saveinfo
- end if
- if music then
- rebuildorchestra()
- end if
- go("options")
- end if
- end
-
- on wait n
- repeat with x = 1 to n * 60
- end repeat
- end
-