home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha 2006 April / SGP.iso / dema / Keepsake-Demo-en-li-v1.0.exe / res / scripts / basement.tcl next >
Text File  |  2005-12-07  |  33KB  |  1,084 lines

  1. ################################################################################
  2. #                                                                             ##
  3. #    file   basement.tcl                                                      ##
  4. #    brief  Events for the Basement.                                          ##
  5. #                                                                             ##
  6. ################################################################################
  7.  
  8.  
  9. ## ===================================================== ##
  10. ##   Loading script from source                          ##
  11. ## ===================================================== ##
  12.  
  13. source "[PUZZLES]/basement.camera.tcl"
  14. source "[AUTO]/basement.mvwrap.tcl"
  15. source "[PUZZLES]/basement.puzzle.tcl"
  16.  
  17.  
  18. ## ===================================================== ##
  19. ##   Initialization                                      ##
  20. ## ===================================================== ##
  21.  
  22. event "init" {
  23.   zakFollowDist 15
  24.   setAudioEnv "city"
  25.   oz'track::stop $::music_track
  26.   SetAmbient 2d ambiance/forest "0 0 0" 0 0
  27.   SetAmbient 2d ambiance/waterway "0 0 0" 0 0
  28.   SetAmbient 2d ambiance/elvandarRiver "0 0 0" 0 0
  29.   SetAmbient 3d sfx/millGearWorking "610 -19 454" 30 0 0.6
  30.   SetAmbient 3d sfx/millWheel "594.459 -21.683 372.964" 30 0 0.6
  31.   SetAmbient 3d sfx/dragonFountainLoop "227 71 157" 30 0 0.6
  32.   SetAmbient 3d sfx/gardenPond "245 71 270" 30 0 0.6
  33.   SetAmbient 2d ambiance/basement "0 0 0" 0 1
  34.   SetAmbient 3d sfx/fallsFar "130 144 870" 10000 0
  35.   
  36.   ozSet "basementRoom" "visited"
  37.   
  38.   ozSet "basement.useBrickPuzzle" "false"
  39.   
  40.   if { [getVar "basementFear"] != "complete" || [getVar "secretPassage"] != "complete" } {
  41.     ozSet "basementFear" "initiated"
  42.   }
  43.  
  44.   if { [getVar "hauntedBasement"] == "ok" } {
  45.     callEvent "ghostWhining"
  46.   }
  47. }
  48.  
  49.  
  50. ################################################################################
  51. ## ========================================================================== ##
  52. ##   DOOR BLOCKING & PUZZLE SECTION                                           ##
  53. ## ========================================================================== ##
  54. ################################################################################
  55.  
  56.  
  57. ## ===================================================== ##
  58. ##   Ghosts whining                                      ##
  59. ## ===================================================== ##
  60.  
  61. event "ghostWhining" {
  62.   if ![canZakTalk] {eventState queue}
  63.   eventState [checkTime [ozGet "ghostWhiningVar"] ]
  64.   ozSet "ghostWhiningVar" [expr 10000 + [ random 5000]]
  65.  
  66.   if { [ozGet "sysScene"] != "basement" && [ozGet "sysScene"] != "wineCave" } {
  67.     eventState queue
  68.   }
  69.   
  70.   if { [ozGet "basementFear"] == "complete" } {
  71.     return
  72.   }
  73.  
  74.   if { [getVar "whining"] == "" } {
  75.     callEvent "ghostWhiningOne"
  76.     chainCallEvent "ghostWhining"
  77.  
  78.   } elseif { [getVar "whining"] == "first" } {
  79.     callEvent "ghostWhiningTwo"
  80.     chainCallEvent "ghostWhining"
  81.  
  82.   } elseif { [getVar "whining"] == "second" } {
  83.     callEvent "ghostWhiningThree"
  84.     chainCallEvent "ghostWhining"
  85.  
  86.   } elseif { [getVar "whining"] == "third" } {
  87.     callEvent "ghostWhiningFour"
  88.     chainCallEvent "ghostWhining"
  89.  
  90.   } elseif { [getVar "whining"] == "fourth" } {
  91.     callEvent "ghostWhiningFive"
  92.   }
  93. }
  94.  
  95.  
  96. ################################################################################
  97. ## ========================================================================== ##
  98. ##   MOVEMENT                                                                 ##
  99. ## ========================================================================== ##
  100. ################################################################################
  101.  
  102.  
  103. ## ===================================================== ##
  104. ##   transJunctionEnd                                    ##
  105. ## ===================================================== ##
  106.  
  107. event "transJunctionEnd" {
  108.   wizEntityMove Lydia "339.1 38.7 507.5"
  109. }
  110.  
  111.  
  112. ## ===================================================== ##
  113. ##   transEntranceStairs                                 ##
  114. ## ===================================================== ##
  115.  
  116. event "transEntranceStairs" {
  117.   wizEntityMove Lydia "260 62 492" "basement.toGarden" 2
  118. }
  119.  
  120.  
  121. ## ===================================================== ##
  122. ##   toGardenClick                                       ##
  123. ## ===================================================== ##
  124.  
  125. event "toGardenClick" {
  126.   wizEntityMove Lydia "263 61.9 492.5" "basement.toGarden" 2
  127. }
  128.  
  129.  
  130. ## ===================================================== ##
  131. ##   toGarden                                            ##
  132. ## ===================================================== ##
  133.  
  134. event "toGarden" {
  135.   eventState [wizEventStart "toGarden"]
  136.  
  137.   chainEvent {
  138.     freezePlayer
  139.     wizDisableMouse
  140.   }
  141.   
  142.   wizEntityOrientation Lydia 10
  143.   
  144.   Play3DSound "characters/lydia/smallDoorUnlocked"
  145.   wizqEntityAction Lydia standOpenDoorRightHand
  146.  
  147.   chainEvent { delay 2200 }
  148.  
  149.   chainEvent {
  150.     standardFadeout
  151.     setThreadID 4
  152.     wq'widget::delete& entranceStairs::lightLantern
  153.     setThreadID 0
  154.   }
  155.   chainEvent { delay 1000 }
  156.  
  157.   chainEvent { wizEntitySetPosition Lydia "256.6 61.9 483.9" }
  158.   chainEvent { wizEntitySetPosition Zak "262.6 61.9 483.9" }
  159.  
  160.   chainEvent { setScene "garden" world }
  161.  
  162.   chainEvent { wizEntitySetOrientation Lydia 280 }
  163.   wizqEntitySetCycle Lydia standCycleNormal
  164.  
  165.   chainEvent { wizEntitySetOrientation Zak 300 }
  166.   wizqEntitySetCycle Lydia standCycleNormal
  167.  
  168.   chainEvent { standardFadein }
  169.   chainEvent {
  170.     unfreezePlayer
  171.     wizEnableMouse
  172.   }
  173.  
  174.   wizqEventEnd "toGarden"
  175. }
  176.  
  177.  
  178. ## ===================================================== ##
  179. ##   toCrescentCoastWaterwayTeleport                     ##
  180. ## ===================================================== ##
  181.  
  182. event "toCrescentCoastWaterwayTeleport" {
  183.   if { [getVar "secretPassage"] == "" } {
  184.     callEvent "secretPassage"
  185.     return
  186.   }
  187.  
  188.   if { [getVar "pendantBreak"] == "" } {
  189.     chainEvent {wizDisableMouse}
  190.     chainEvent { standardFadeout }
  191.     callEvent crescentCoastWaterway.pendantBreakingMovie
  192.  
  193.   } else {
  194.     chainEvent { standardFadeout }
  195.  
  196.     chainEvent { wizEntitySetPosition Lydia "311.6 -6.02 469.9" }
  197.     chainEvent { wizEntitySetPosition Zak "311.6 -6.02 463.9" }
  198.  
  199.     chainEvent { setScene "crescentCoastWaterway" world }
  200.  
  201.     chainEvent { wizEntitySetOrientation Lydia 80 }
  202.     wizqEntitySetCycle Lydia standCycleNormal
  203.  
  204.     chainEvent { wizEntitySetOrientation Zak 90 }
  205.     wizqEntitySetCycle Lydia standCycleNormal
  206.  
  207.     chainEvent { standardFadein }
  208.   }
  209. }
  210.  
  211.  
  212. ## ===================================================== ##
  213. ##   Use Brick Puzzle                                    ##
  214. ## ===================================================== ##
  215.  
  216. event "useBrickPuzzle" {
  217.   eventState [wizEventStart "useBrickPuzzle"]
  218.  
  219.   if { [ozGet "puzzleZak"] == "complete" } {
  220.     # Block 1
  221.     wizqQueue 2 {
  222.       oz'event {wizEntityStopFollow Zak}
  223.       wizqEntityMove Zak "408.1 21.2 519.5" "wait"
  224.       wizqEntityOrientation Zak 140
  225.       oz'event {wizEntityResumeFollow Zak}
  226.     }
  227.   }
  228.  
  229.   wizqEntityMove Lydia "414.1 21.1 529.5" "basement.brickPuzzleBehavior" 2
  230.  
  231.   wizqEventEnd "useBrickPuzzle"
  232. }
  233.  
  234.  
  235. ## ===================================================== ##
  236. ##   transeEntranceStairs                                ##
  237. ## ===================================================== ##
  238.  
  239. event "transToCrescentCoastWaterway" {
  240.   eventState [wizEventStart "transToCrescentCoastWaterway"]
  241.  
  242.   # Block 1
  243.   wizqQueue 2 {
  244.     chainEvent { wizEntityStopFollow Zak }
  245.     wizqEntityMove Zak "290 16.8 502.7" "wait"
  246.     wizqEntityOrientation Zak 330
  247.   }
  248.  
  249.   wizEntityMove Lydia "283.3 16.9 490.6"
  250.  
  251.   # Wait for Block 1
  252.   wizqWaitQueue 2
  253.  
  254.   wizqEntityMove Lydia "283.3 16.9 490.6" "basement.toCrescentCoastWaterwayTeleport" 2
  255.   
  256.   wizqEventEnd "transToCrescentCoastWaterway"
  257. }
  258.  
  259.  
  260. ## ===================================================== ##
  261. ##   lookStageEnd                                        ##
  262. ## ===================================================== ##
  263.  
  264. event "lookStageEnd" {
  265.   eventState [wizEventStart "lookStageEnd"]
  266.  
  267.   if { [ozGet "puzzleZak"] == "complete" } {
  268.     # Block 1
  269.     wizqQueue 2 {
  270.       oz'event {wizEntityStopFollow Zak}
  271.       wizqEntityMove Zak "269.8 35.6 532.5" "wait"
  272.       wizqEntityOrientation Zak 135
  273.       oz'event {wizEntityResumeFollow Zak}
  274.     }
  275.   }
  276.  
  277.   wizqEntityMove Lydia "277.1 35.6 534.5" "basement.cratesZoomIn" 2
  278.  
  279.   wizqEventEnd "lookStageEnd"
  280. }
  281.  
  282.  
  283. ################################################################################
  284. ## ========================================================================== ##
  285. ## ANIMATION & SPECIAL CAMERA SECTION                                         ##
  286. ## ========================================================================== ##
  287. ################################################################################
  288.  
  289.  
  290. ## ===================================================== ##
  291. ##   Wine Cave Puzzle Zoom In                            ##
  292. ## ===================================================== ##
  293.  
  294. event "wCPuzzleZoomIn" {
  295.   wizqZoomIn "wineCavePuzzleCloseUp" "basement.wCPuzzleZoomOut"
  296. }
  297.  
  298.  
  299. ## ===================================================== ##
  300. ##   Wine Cave Puzzle Zoom Out                           ##
  301. ## ===================================================== ##
  302.  
  303. event "wCPuzzleZoomOut" {
  304.   useBrickReset
  305.   wizqZoomOut "wineCavePuzzle"
  306.   chainEvent { hRemoveBack }
  307. }
  308.  
  309.  
  310. ## ===================================================== ##
  311. ##   crates Zoom Out                                     ##
  312. ## ===================================================== ##
  313.  
  314. event "cratesZoomOut" {
  315.   wizqZoomOut "stageEndCrates"
  316.   chainEvent { hRemoveBack }
  317. }
  318.  
  319.  
  320. ## ===================================================== ##
  321. ##   junction camera                                     ##
  322. ## ===================================================== ##
  323.  
  324. event "junction" {
  325.   setCamera "junction"
  326.   wizhCameraChange
  327.   
  328.   chainEvent { delay 500 }
  329.  
  330.   if { [getVar "hauntedBasement"] == "" } {
  331.     callEvent "hauntedBasement"
  332.  
  333.   } else {
  334.     chainCallEvent "ghostWhining"
  335.   }
  336. }
  337.  
  338.  
  339. ## ===================================================== ##
  340. ##   under Ground Corner camera                          ##
  341. ## ===================================================== ##
  342.  
  343. event "underGroundCorner" {
  344.   setCamera "underGroundCorner"
  345.   wizhCameraChange
  346.   
  347.   chainEvent { delay 500 }
  348.   
  349.   callEvent "windSource"
  350. }
  351.  
  352.  
  353. ## ===================================================== ##
  354. ##   under Ground Alley camera                           ##
  355. ## ===================================================== ##
  356.  
  357. event "underGroundAlley" {
  358.   setCamera "underGroundAlley"
  359.   wizhCameraChange
  360.   
  361.   chainEvent { delay 500 }
  362.   
  363.   callEvent "windSource"
  364. }
  365.  
  366.  
  367. ## ===================================================== ##
  368. ##   under River Entrance camera                         ##
  369. ## ===================================================== ##
  370.  
  371. event "underRiverEntrance" {
  372.   setCamera "underRiverEntrance"
  373.   wizhCameraChange
  374. }
  375.  
  376.  
  377. ## ===================================================== ##
  378. ##   Wine Cave Puzzle Camera                             ##
  379. ## ===================================================== ##
  380.  
  381. event "wineCavePuzzle" {
  382.   if { [getVar "wineCavePuzzle"] == "complete" } {
  383.     setCamera "wineCavePuzzleComplete"
  384.     wizhCameraChange
  385.  
  386.   } else {
  387.     setCamera "wineCavePuzzle"
  388.     wizhCameraChange
  389.   }
  390. }
  391.  
  392.  
  393. ## ===================================================== ##
  394. ##   small stairs camera                                 ##
  395. ## ===================================================== ##
  396.  
  397. event "smallStairs" {
  398.   if { [ozGet "wineCavePuzzle"] == "complete" } {
  399.     setCamera "smallStairsOpen"
  400.     wizhCameraChange
  401.  
  402.   } else {
  403.     setCamera "smallStairs"
  404.     wizhCameraChange
  405.   }
  406.  
  407.   wizEntityResumeFollow Zak
  408. }
  409.  
  410.  
  411. ## ===================================================== ##
  412. ##   stage End camera                                    ##
  413. ## ===================================================== ##
  414.  
  415. event "stageEnd" {
  416.   if { [ozGet "puzzleMustavioPathway"] == "complete" } {
  417.     setCamera "stageEnd"
  418.     wizhCameraChange
  419.  
  420.   } else {
  421.     setCamera "stageEndCrates"
  422.     wizhCameraChange
  423.   }
  424. }
  425.  
  426.  
  427. ## ===================================================== ##
  428. ##   stage Entrance camera                               ##
  429. ## ===================================================== ##
  430.  
  431. event "stageEntrance" {
  432.   if { [ozGet "puzzleMustavioPathway"] == "" } {
  433.     setCamera "stageEntranceCrates"
  434.     wizhCameraChange
  435.  
  436.   } else {
  437.     setCamera "stageEntrance"
  438.     wizhCameraChange
  439.   }
  440. }
  441.  
  442.  
  443. ################################################################################
  444. ## ========================================================================== ##
  445. ##   NPC DIALOGUE SECTION                                                     ##
  446. ## ========================================================================== ##
  447. ################################################################################
  448.  
  449.  
  450. ## ===================================================== ##
  451. ##   crates Zoom In                                      ##
  452. ## ===================================================== ##
  453.  
  454. event "cratesZoomIn" {
  455.   if { [ozGet "puzzleZak"] == "complete" } {
  456.     # Block 1
  457.     wizqQueue 2 {
  458.       wizqEntityMove Zak "269.8 35.6 532.5" "wait"
  459.       wizqEntityOrientation Zak 135
  460.     }
  461.  
  462.     oz'event {wizEntityStopFollow Zak}
  463.   }
  464.  
  465.   oz'event {wizDisableMouse}
  466.   wizqEntityOrientation Lydia 180 "wait"
  467.   wizqEntitySetCycle Lydia standCycleNormal
  468.  
  469.   # Wait for Block 1
  470.   wizqWaitQueue 2
  471.  
  472.   # Block 1
  473.   wizqQueue 1 {
  474.     chainEvent { delay 1000 }
  475.     wizqZoomIn "crateMustavio" "basement.cratesZoomOut"
  476.     wizqDisableMouse
  477.   }
  478.   ozSet "puzzleMustavioCrates" "complete"
  479.     
  480.   wizqTalkOpen
  481.   
  482.   if { [ozGet "caretakerDeal"] == "discussed" } {
  483.     wizqTalkSay Lydia $::lng::cratesZoomInL1     "sound/vo/$::LNG/scenes/basement/cratesZoomInL1.ogg"
  484.  
  485.   } elseif { [ozGet "mustavioIntroduction"] == "discussed" } {
  486.     wizqTalkSay Lydia $::lng::cratesZoomInL2     "sound/vo/$::LNG/scenes/basement/cratesZoomInL2.ogg"
  487.  
  488.   } elseif { [ozGet "mustavioMeaning"] == "" } {
  489.     ozSet "mustavioMeaning" "discussed"
  490.     wizqTalkSay Lydia $::lng::cratesZoomInL3     "sound/vo/$::LNG/scenes/basement/cratesZoomInL3.ogg"
  491.     wizqTalkSay Zak $::lng::cratesZoomInZ1    "sound/vo/$::LNG/scenes/basement/cratesZoomInZ1.ogg"
  492.  
  493.   } else {
  494.     wizqTalkSay Lydia $::lng::cratesZoomInL4     "sound/vo/$::LNG/scenes/basement/cratesZoomInL4.ogg"
  495.   }
  496.   
  497.   wizqTalkClose
  498.  
  499.   # Wait for Block 1
  500.   wizqWaitQueue 1
  501.  
  502.   oz'event {wizEnableMouse}
  503.   oz'event {wizEntityResumeFollow Zak}
  504. }
  505.  
  506.  
  507. ################################################################################
  508. ## ========================================================================== ##
  509. ##   FORCED DIALOGUE SECTION                                                  ##
  510. ## ========================================================================== ##
  511. ################################################################################
  512.  
  513.  
  514. ## ===================================================== ##
  515. ##   Haunted basement                                    ##
  516. ## ===================================================== ##
  517. ## trigger is when the player enter the basement
  518. ## for the first time
  519.  
  520. event "hauntedBasement" {
  521.   checkConversation "hauntedBasement" {
  522.     chainEvent {
  523.       freezePlayer
  524.       wizDisableFloorevent
  525.       wizDisableMouse
  526.       wizEntityStopFollow Zak
  527.     }
  528.  
  529.     # Block 1
  530.     wizqQueue 1 {
  531.       wizqEntityWalk Lydia "264 51.1 548.5" "wait"
  532.       chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  533.     }
  534.     
  535.     # Block 1-B
  536.     wizqQueue 2 {
  537.       wizqEntityWalk Zak "269 51.1 525.5" "wait"
  538.       wizqEntitySetCycle Zak lieCycleFear
  539.     }
  540.  
  541.     wizqTalkOpen
  542.     wizqTalkSay Zak $::lng::hauntedBasementZ1   "sound/vo/$::LNG/scenes/basement/hauntedBasementZ1.ogg"
  543.  
  544.     # Wait for Block 1 & 1-B
  545.     wizqWaitQueue 1
  546.     wizqWaitQueue 2
  547.  
  548.     # Block 2
  549.     wizqQueue 1 {
  550.       wizqEntityAction Lydia standTalkTwoHands "wait"
  551.     }
  552.     
  553.     wizqTalkSay Lydia $::lng::hauntedBasementL1   "sound/vo/$::LNG/scenes/basement/hauntedBasementL1.ogg" fastout
  554.  
  555.     # Wait for Block 2
  556.     wizqWaitQueue 1
  557.     
  558.     # Block 3
  559.     wizqQueue 1 {
  560.       wizqEntityWalk Lydia "270.1 51.1 531.9" "wait"
  561.       chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  562.       wizqEntityChangeCycle Lydia crouchCycleNormal standToCrouch "wait"
  563.     }
  564.     
  565.     wizqTalkSay Zak $::lng::hauntedBasementZ2   "sound/vo/$::LNG/scenes/basement/hauntedBasementZ2.ogg" fastin
  566.  
  567.     # Wait for Block 3
  568.     wizqWaitQueue 1
  569.  
  570.     # Block 4
  571.     wizqQueue 1 {
  572.       wizqEntityAction Lydia crouchTalk "wait"
  573.       chainEvent { delay 500 }
  574.       wizqEntityAction Lydia crouchTalk "wait"
  575.     }
  576.  
  577.     wizqTalkSay Lydia $::lng::hauntedBasementL2   "sound/vo/$::LNG/scenes/basement/hauntedBasementL2.ogg"
  578.  
  579.     # Block 4-B
  580.     wizqQueue 2 {
  581.       wizqEntitySetCycle Zak standCycleNormal
  582.     }
  583.  
  584.     wizqTalkSay Zak $::lng::hauntedBasementZ3   "sound/vo/$::LNG/scenes/basement/hauntedBasementZ3.ogg"
  585.  
  586.     # Wait for Block 4 & 4-B
  587.     wizqWaitQueue 1
  588.     wizqWaitQueue 2
  589.  
  590.     # Block 5
  591.     wizqQueue 1 {
  592.       wizqEntityChangeCycle Lydia standCycleNormal crouchToStand "wait"
  593.     }
  594.  
  595.     wizqTalkSay Lydia $::lng::hauntedBasementL3   "sound/vo/$::LNG/scenes/basement/hauntedBasementL3.ogg"
  596.     wizqTalkClose
  597.  
  598.    # Wait for Block 5
  599.     wizqWaitQueue 1
  600.  
  601.   chainEvent {
  602.     unfreezePlayer
  603.     wizEnableFloorevent
  604.     wizEnableMouse
  605.     wizEntityResumeFollow Zak
  606.     }
  607.   }
  608.   chainCallEvent "ghostWhining"
  609. }
  610.  
  611.  
  612.  
  613. ## ===================================================== ##
  614. ##   Wind of Guidance                                    ##
  615. ## ===================================================== ##
  616. ## trigger is when the player get close to the crescent
  617. ## coast waterway exit.
  618.  
  619. event "windSource" {
  620.   checkConversation "windSource" {
  621.     wizqTalkOpen
  622.     wizqTalkSay Lydia $::lng::windSourceL1   "sound/vo/$::LNG/scenes/basement/windSourceL1.ogg"
  623.     wizqTalkClose
  624.   }
  625. }
  626.  
  627.  
  628. ## ===================================================== ##
  629. ##   Wind Source                                         ##
  630. ## ===================================================== ##
  631. ## trigger is the secret entrance to the Crescent
  632. ## Coast Waterway
  633.  
  634. event "secretPassage" {
  635.   chainEvent {
  636.     freezePlayer
  637.     wizDisableMouse
  638.     wizEntityStopFollow Zak
  639.   }
  640.   
  641.   ozSet "basementFear" "complete"
  642.  
  643.   chainEvent { wizqEntityAction Lydia standHandOnChin "wait" }
  644.   
  645.   # Block 1
  646.   wizqQueue 1 {
  647.     chainEvent { delay 100 }
  648.     chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  649.     wizqEntitySetCycle Zak sitCycleNormal
  650.   }
  651.     
  652.   # Block 1-B
  653.   wizqQueue 2 {
  654.     chainEvent { delay 500 }
  655.     wizqEntityWalk Lydia "283.3 16.9 490.6" "wait"
  656.     chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  657.     chainEvent { delay 500 }
  658.     wizqEntityAction Lydia standTalkHandHip "wait"
  659.     wizqEntityAction Lydia standNo "wait"
  660.   }
  661.       
  662.   wizqTalkOpen
  663.   wizqTalkSay Lydia $::lng::secretWayL1   "sound/vo/$::LNG/scenes/basement/secretWayL1.ogg"
  664.  
  665.   # Wait for Block 1 & 1-B
  666.   wizqWaitQueue 1
  667.   wizqWaitQueue 2
  668.   wizqEntitySetOrientationTarget Lydia None
  669.  
  670.   # Block 2
  671.   wizqQueue 1 {
  672.     wizqEntityAction Lydia standArmCross "wait"
  673.   }
  674.     
  675.   wizqTalkSay Lydia $::lng::secretWayL2   "sound/vo/$::LNG/scenes/basement/secretWayL2.ogg"
  676.  
  677.   # Wait for Block 2
  678.   wizqWaitQueue 1
  679.  
  680.   # Block 3
  681.   wizqQueue 1 {
  682.     wizqEntityAction Zak sitNo "wait"
  683.   }
  684.  
  685.   wizqTalkSay Zak $::lng::secretWayZ1   "sound/vo/$::LNG/scenes/basement/secretWayZ1.ogg"
  686.  
  687.   # Block 3-B
  688.   wizqQueue 2 {
  689.     wizqEntityWalk Lydia "285.1 16.8 499.5" "wait"
  690.     wizqEntityChangeCycle Lydia crouchCycleNormal standToCrouch "wait"
  691.   }
  692.  
  693.   wizqTalkSay Zak $::lng::secretWayZ2   "sound/vo/$::LNG/scenes/basement/secretWayZ2.ogg"
  694.  
  695.   # Wait for Block 3 & 3-B
  696.   wizqWaitQueue 1
  697.   wizqWaitQueue 2
  698.  
  699.   # Block 4
  700.   wizqQueue 1 {
  701.     wizqEntityAction Lydia crouchTalk "wait"
  702.   }
  703.     
  704.   wizqTalkSay Lydia $::lng::secretWayL3   "sound/vo/$::LNG/scenes/basement/secretWayL3.ogg" fastout
  705.  
  706.   # Wait for Block 4
  707.   wizqWaitQueue 1
  708.  
  709.   # Block 5
  710.   wizqQueue 1 {
  711.     wizqEntityAction Zak sitLoseHope
  712.   }
  713.  
  714.   wizqTalkSay Zak $::lng::secretWayZ3   "sound/vo/$::LNG/scenes/basement/secretWayZ3.ogg" fastin
  715.  
  716.   # Wait for Block 5
  717.   wizqWaitQueue 1
  718.  
  719.   # Block 6
  720.   wizqQueue 1 {
  721.     wizqEntityChangeCycle Lydia standCycleNormal crouchToStand "wait"
  722.   }
  723.     
  724.   wizqTalkSay Lydia $::lng::secretWayL4   "sound/vo/$::LNG/scenes/basement/secretWayL4.ogg"
  725.   wizqTalkClose
  726.  
  727.   # Wait for Block 6
  728.   wizqWaitQueue 1
  729.     
  730.   chainEvent {
  731.     unfreezePlayer
  732.     wizEnableMouse
  733.     wizEntityResumeFollow Zak
  734.     ozSet "secretPassage" "complete"
  735.   }
  736. }
  737.  
  738.  
  739. ## ===================================================== ##
  740. ##   Zak's whining of ghosts One                         ##
  741. ## ===================================================== ##
  742. ## trigger is the first time Zak whine about ghosts
  743.  
  744. event "ghostWhiningOne" {
  745.   # Zak and Lydia's conversation
  746.   checkConversation "ghostWhiningOne" {
  747.     wizqTalkOpen
  748.     wizqTalkSay Zak $::lng::ghostWhiningOneZ1   "sound/vo/$::LNG/scenes/basement/ghostWhiningOneZ1.ogg" fastout
  749.     wizqTalkSay Lydia $::lng::ghostWhiningOneL1   "sound/vo/$::LNG/scenes/basement/ghostWhiningOneL1.ogg" fastin
  750.     wizqTalkClose
  751.   }
  752.   ozSet "whining" "first"
  753. }
  754.  
  755.  
  756. ## ===================================================== ##
  757. ##   Zak's whining of ghosts Two                         ##
  758. ## ===================================================== ##
  759. ## trigger is the second time Zak whine about ghosts
  760.  
  761. event "ghostWhiningTwo" {
  762.   # Zak and Lydia's conversation
  763.   checkConversation "ghostWhiningTwo" {
  764.     wizqTalkOpen
  765.     wizqTalkSay Zak $::lng::ghostWhiningTwoZ1   "sound/vo/$::LNG/scenes/basement/ghostWhiningTwoZ1.ogg"
  766.     wizqTalkSay Lydia $::lng::ghostWhiningTwoL1   "sound/vo/$::LNG/scenes/basement/ghostWhiningTwoL1.ogg" fastout
  767.     wizqTalkSay Zak $::lng::ghostWhiningTwoZ2   "sound/vo/$::LNG/scenes/basement/ghostWhiningTwoZ2.ogg" fastin
  768.     wizqTalkClose
  769.   }
  770.   ozSet "whining" "second"
  771. }
  772.  
  773.  
  774. ## ===================================================== ##
  775. ##   Zak's whining of ghosts Three                       ##
  776. ## ===================================================== ##
  777. ## trigger is the third time Zak whine about ghosts
  778.  
  779. event "ghostWhiningThree" {
  780.   # Zak and Lydia's conversation
  781.   checkConversation "ghostWhiningThree" {
  782.     wizqTalkOpen
  783.     wizqTalkSay Zak $::lng::ghostWhiningThreeZ1   "sound/vo/$::LNG/scenes/basement/ghostWhiningThreeZ1.ogg"
  784.     wizqTalkSay Lydia $::lng::ghostWhiningThreeL1   "sound/vo/$::LNG/scenes/basement/ghostWhiningThreeL1.ogg"
  785.     wizqTalkSay Zak $::lng::ghostWhiningThreeZ2   "sound/vo/$::LNG/scenes/basement/ghostWhiningThreeZ2.ogg"
  786.     wizqTalkClose
  787.   }
  788.   ozSet "whining" "third"
  789. }
  790.  
  791.  
  792. ## ===================================================== ##
  793. ##   Zak's whining of ghosts Four                        ##
  794. ## ===================================================== ##
  795. ## trigger is the fourth time Zak whine about ghosts
  796.  
  797. event "ghostWhiningFour" {
  798.   # Zak and Lydia's conversation
  799.   checkConversation "ghostWhiningFour" {
  800.     wizqTalkOpen
  801.     wizqTalkSay Zak $::lng::ghostWhiningFourZ1   "sound/vo/$::LNG/scenes/basement/ghostWhiningFourZ1.ogg"
  802.     wizqTalkSay Zak $::lng::ghostWhiningFourZ2   "sound/vo/$::LNG/scenes/basement/ghostWhiningFourZ2.ogg"
  803.     wizqTalkSay Lydia $::lng::ghostWhiningFourL1   "sound/vo/$::LNG/scenes/basement/ghostWhiningFourL1.ogg"
  804.     wizqTalkClose
  805.   }
  806.   ozSet "whining" "fourth"
  807. }
  808.  
  809.  
  810. ## ===================================================== ##
  811. ##   Zak's whining of ghosts Five                        ##
  812. ## ===================================================== ##
  813. ## trigger is the fifth time Zak whine about ghosts
  814.  
  815. event "ghostWhiningFive" {
  816.   # Zak and Lydia's conversation
  817.   checkConversation "ghostWhiningFive" {
  818.     wizqTalkOpen
  819.     wizqTalkSay Zak $::lng::ghostWhiningFiveZ1   "sound/vo/$::LNG/scenes/basement/ghostWhiningFiveZ1.ogg" fastout
  820.     wizqTalkSay Lydia $::lng::ghostWhiningFiveL1   "sound/vo/$::LNG/scenes/basement/ghostWhiningFiveL1.ogg" fastin
  821.     wizqTalkSay Lydia $::lng::ghostWhiningFiveL2   "sound/vo/$::LNG/scenes/basement/ghostWhiningFiveL2.ogg"
  822.     wizqTalkSay Zak $::lng::ghostWhiningFiveZ2   "sound/vo/$::LNG/scenes/basement/ghostWhiningFiveZ2.ogg" fastout
  823.     wizqTalkSay Lydia $::lng::ghostWhiningFiveL3   "sound/vo/$::LNG/scenes/basement/ghostWhiningFiveL3.ogg" fastin
  824.     wizqTalkSay Zak $::lng::ghostWhiningFiveZ3   "sound/vo/$::LNG/scenes/basement/ghostWhiningFiveZ3.ogg"
  825.     wizqTalkClose
  826.   }
  827.   ozSet "whining" "fifth"
  828.   ozSet "basementFear" "complete"
  829. }
  830.  
  831.  
  832. ## ===================================================== ##
  833. ##   transWineCavePuzzle                                 ##
  834. ## ===================================================== ##
  835.  
  836. event "brickPuzzleBehavior" {
  837.   if { [ozGet "puzzleZak"] == "complete" } {
  838.     # Block 1
  839.     wizqQueue 2 {
  840.       wizqEntityMove Zak "408.1 21.2 519.5" "wait"
  841.       wizqEntityOrientation Zak 140
  842.     }
  843.  
  844.     oz'event {wizEntityStopFollow Zak}
  845.   }
  846.  
  847.   oz'event {wizDisableMouse}
  848.   wizqEntityOrientation Lydia 95 "wait"
  849.   wizqEntitySetCycle Lydia standCycleNormal
  850.  
  851.   # Wait for Block 1
  852.   wizqWaitQueue 2
  853.  
  854.   if { [getVar "wineCavePuzzleSolved"] == "" } {
  855.     if { [getVar "wineCavePuzzleDiscussion"] == "" } {
  856.       chainEvent {
  857.         freezePlayer
  858.         wizDisableMouse
  859.       }
  860.     
  861.       # Block 1
  862.       wizqQueue 1 {
  863.         chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  864.         chainEvent { delay 500 }
  865.         wizqEntityAction Lydia standTalkTwoHands "wait"
  866.       }
  867.  
  868.       wizqTalkOpen
  869.       wizqTalkSay Lydia $::lng::transWineCavePuzzleL1   "sound/vo/$::LNG/scenes/basement/transWineCavePuzzleL1.ogg"
  870.  
  871.       # Wait for Block 1
  872.       wizqWaitQueue 1
  873.       wizqWaitQueue 2
  874.  
  875.       # Block 2
  876.       wizqQueue 1 {
  877.         chainEvent { delay 500 }
  878.         wizqEntityAction Zak standNo "wait"
  879.       }
  880.  
  881.       # Block 2-B
  882.       wizqQueue 2 {
  883.         chainEvent { delay 2000 }
  884.         wizqEntityAction Lydia standHandOnChin "wait"
  885.       }
  886.       
  887.       wizqTalkSay Zak $::lng::transWineCavePuzzleZ1   "sound/vo/$::LNG/scenes/basement/transWineCavePuzzleZ1.ogg"
  888.  
  889.       # Wait for Block 2
  890.       wizqWaitQueue 1
  891.  
  892.       # Block 3
  893.       wizqQueue 1 {
  894.         chainEvent { delay 1500 }
  895.         wizqEntityAction Zak standYes "wait"
  896.       }
  897.  
  898.       wizqTalkSay Zak $::lng::transWineCavePuzzleZ2   "sound/vo/$::LNG/scenes/basement/transWineCavePuzzleZ2.ogg"
  899.       wizqTalkClose
  900.       
  901.       # Wait for Block 3 & 2-B
  902.       wizqWaitQueue 1
  903.       wizqWaitQueue 2
  904.  
  905.       # Block 3
  906.       wizqQueue 1 {
  907.         chainEvent { delay 500 }
  908.         wizqEntityAction Lydia standTalkHandHip "wait"
  909.         wizqEntityAction Lydia standYes "wait"
  910.         chainEvent { delay 1000 }
  911.         wizqEntityOrientation Lydia 95 "wait"
  912.         wizqEntitySetCycle Lydia standCycleNormal
  913.         chainEvent { delay 500 }
  914.         callEvent "wCPuzzleZoomIn"
  915.       }
  916.     
  917.       wizqTalkOpen
  918.       wizqTalkSay Lydia $::lng::transWineCavePuzzleL2   "sound/vo/$::LNG/scenes/basement/transWineCavePuzzleL2.ogg"
  919.       wizqTalkSay Lydia $::lng::transWineCavePuzzleL3   "sound/vo/$::LNG/scenes/basement/transWineCavePuzzleL3.ogg"
  920.       wizqTalkClose
  921.  
  922.       # Wait for Block 3
  923.       wizqWaitQueue 1
  924.     
  925.       ozSet "wineCavePuzzleDiscussion" "discussed"
  926.     
  927.       chainEvent {
  928.         wizEnableMouse
  929.       }
  930.  
  931.     } else {
  932.       callEvent "wCPuzzleZoomIn"
  933.     }
  934.   }
  935.  
  936.   oz'event {wizEnableMouse}
  937.   oz'event {wizEntityResumeFollow Zak}
  938. }
  939.  
  940.  
  941. ## ===================================================== ##
  942. ##   transWineCavePuzzle completed                       ##
  943. ## ===================================================== ##
  944.  
  945. event "wineCavePuzzleSolved" {
  946.   ozSet "wineCavePuzzle" "complete"
  947.   ozSet "wineCave.transEntrance" ""
  948.   
  949.   #Will unfreeze and everything at the end of this event
  950.   chainEvent {
  951.     wizEntityShow Lydia
  952.     wizEntityShow Zak
  953.     freezePlayer
  954.     wizDisableMouse
  955.     wizEntityStopFollow Zak
  956.     setCamera "wineCavePuzzleComplete"
  957.     wizhCameraChange
  958.     hRemoveBack
  959.   }
  960.  
  961.   chainEvent {
  962.     wineCavePuzzleCloseUp::new complete
  963.     ozqSound::New3DFX s "sound/sfx/charmingFall.ogg"
  964.     ozqSound::Position $s "415 21 530"
  965.     ozqSound::ReferenceDistance $s 30
  966.     ozqSound::Rolloff $s 0.6
  967.     ozqSound::Play $s
  968.     unset s
  969.   }
  970.   
  971.   chainEvent { delay 2000 }
  972.  
  973.   ozqSound::NewFX  "sound/sfx/vaseBreaking.ogg"
  974.   oz'track::play $::music_track "sound/music/nathanielsOwl.ogg"
  975.  
  976.   # Block 1
  977.   wizqQueue 1 {
  978.     wizqEntityRun Zak "412 21.2 543" "wait"
  979.     wizqEntitySetCycle Zak lieCycleFear
  980.   }
  981.   
  982.   # Block 1-B
  983.   wizqQueue 2 {
  984.     wizqEntityAction Lydia standSurprise "wait"
  985.     wizqEntityOrientation Lydia 270
  986.   }
  987.   
  988.   wizqTalkOpen
  989.   wizqTalkSay Zak $::lng::wineCavePuzzleSolvedZ1   "sound/vo/$::LNG/scenes/basement/wineCavePuzzleSolvedZ1.ogg" fastout
  990.   wizqTalkSay Lydia $::lng::wineCavePuzzleSolvedL1   "sound/vo/$::LNG/scenes/basement/wineCavePuzzleSolvedL1.ogg" fastin
  991.   
  992.   # Wait for Block 1 & 1-B
  993.   wizqWaitQueue 1
  994.   wizqWaitQueue 2
  995.  
  996.   # Block 2
  997.   wizqQueue 1 {
  998.     chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  999.     wizqEntityAction Lydia standDisbelief "wait"
  1000.   }
  1001.  
  1002.   wizqTalkSay Lydia $::lng::wineCavePuzzleSolvedL2   "sound/vo/$::LNG/scenes/basement/wineCavePuzzleSolvedL2.ogg"
  1003.  
  1004.   # Wait for Block 2
  1005.   wizqWaitQueue 1
  1006.  
  1007.   # Block 3
  1008.   wizqQueue 1 {
  1009.     wizqEntityAction Lydia standArmCross "wait"
  1010.   }
  1011.   
  1012.   wizqTalkSay Zak $::lng::wineCavePuzzleSolvedZ2   "sound/vo/$::LNG/scenes/basement/wineCavePuzzleSolvedZ2.ogg"
  1013.  
  1014.   # Wait for Block 3
  1015.   wizqWaitQueue 1
  1016.  
  1017.   # Block 4
  1018.   wizqQueue 1 {
  1019.     wizqEntityAction Lydia standTalkHandHip "wait"
  1020.   }
  1021.  
  1022.   wizqTalkSay Lydia $::lng::wineCavePuzzleSolvedL3   "sound/vo/$::LNG/scenes/basement/wineCavePuzzleSolvedL3.ogg"
  1023.   wizqTalkClose
  1024.   
  1025.   # Wait for Block 4
  1026.   wizqWaitQueue 1
  1027.  
  1028.   wizqEntitySetCycle Zak standCycleNormal
  1029.   chainEvent { delay 500 }
  1030.   chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  1031.  
  1032.   wq'widget::waitfor $wineCavePuzzleCloseUp::complete -animate
  1033.   wq'widget::delete& wineCavePuzzleCloseUp::complete
  1034.     
  1035.   chainEvent {
  1036.     unfreezePlayer
  1037.     wizEnableMouse
  1038.     wizEntityResumeFollow Zak
  1039.   }
  1040. }
  1041.  
  1042. event "toCrescentCoastWaterway" {
  1043.     setCamera "underRiverEntrance"
  1044.     wizhCameraChange
  1045. }
  1046.  
  1047. ################################################################################
  1048. ## ========================================================================== ##
  1049. ##   OPTIONNAL DIALOGUE SECTION                                               ##
  1050. ## ========================================================================== ##
  1051. ################################################################################
  1052.  
  1053.  
  1054. # NONE FOR NOW
  1055.  
  1056.  
  1057. ################################################################################
  1058. ## ========================================================================== ##
  1059. ##   TO ADD/ CORRECTIONS NEEDED                                               ##
  1060. ## ========================================================================== ##
  1061. ################################################################################
  1062.  
  1063.  
  1064. # NONE FOR NOW
  1065.  
  1066.  
  1067. ################################################################################
  1068. ## ========================================================================== ##
  1069. ##   TO CHECK                                                                 ##
  1070. ## ========================================================================== ##
  1071. ################################################################################
  1072.  
  1073.  
  1074. # This is a fix for Zak teleport bug
  1075. event "transStageEntrance" {
  1076.   wizqEntityStopFollow Zak
  1077.   wizqEntityMove Lydia "298.3 35.6 511.9"
  1078.   wizqEntityMove Zak "309.9 35.6 518.7" "wait"
  1079.  
  1080.   wizqEntityResumeFollow Zak
  1081. }
  1082.  
  1083.  
  1084.