home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 April / Gamestar_83_2006-04_dvd.iso / Dema / keepsake_demo_en.exe / res / scripts / garden.tcl < prev    next >
Text File  |  2006-01-23  |  79KB  |  2,851 lines

  1. ################################################################################
  2. #                                                                             ##
  3. #    file   garden.tcl                                                        ##
  4. #    brief  Events for the Garden.                                            ##
  5. #    author bruno.parenteau@wickedstudios.com                                 ##
  6. #           ben.thomas@wickedstudios.com                                      ##
  7. #                                                                             ##
  8. ################################################################################
  9.  
  10.  
  11. ## ===================================================== ##
  12. ##   Loading script from source                          ##
  13. ## ===================================================== ##
  14.  
  15. source "[PUZZLES]/garden.puzzle.tcl"
  16. source "[AUTO]/garden.mvwrap.tcl"
  17. source "[PUZZLES]/garden.camera.tcl"
  18.  
  19.  
  20. ## ===================================================== ##
  21. ##   Initialization                                      ##
  22. ## ===================================================== ##
  23.  
  24. event "init" {
  25.   zakFollowDist 30
  26.  
  27.   ozSet "gardenRoom" "visited"
  28.   ozSet "garden.useBeanClick" "false"
  29.  
  30.   setAudioEnv "city"
  31.   SetAmbient 2d ambiance/basement "0 0 0" 0 0
  32.   SetAmbient 3d sfx/fountain "359 4 -62" 30 0 0.6
  33.   SetAmbient 3d sfx/bigFirePlace "293 109 496" 30 0 0.6
  34.   SetAmbient 3d sfx/bigFirePlace2 "393 95 589" 30 0 0.6
  35.   SetAmbient 3d sfx/smallOven "409 95 515" 30 0 0.6
  36.   SetAmbient 3d sfx/bubblingCauldron "393 95 589" 30 0 0.6
  37.  
  38.   
  39.   SetAmbient 3d sfx/fallsFar "130 144 870" 10000 0.5
  40.   SetAmbient 3d sfx/gardenPond "245 71 270" 30 1 0.6
  41.   if {[ozGet "puzzleWaterLevel"] == "complete"} {
  42.     SetAmbient 3d sfx/dragonFountainLoop "227 71 157" 30 1 0.6
  43.   } else {
  44.     SetAmbient 3d sfx/dragonFountainLoop "227 71 157" 30 0 0.6
  45.   }
  46. }
  47.  
  48.  
  49. ################################################################################
  50. ## ========================================================================== ##
  51. ##   DOOR BLOCKING & PUZZLE SECTION                                           ##
  52. ## ========================================================================== ##
  53. ################################################################################
  54.  
  55.  
  56. ## ===================================================== ##
  57. ##   To Dinner Hall                                      ##
  58. ## ===================================================== ##
  59.  
  60. event "toDinnerHall" {
  61.   if { [ozGet "puzzleZak"] == "complete" } {
  62.     # Block 1
  63.     wizqQueue 2 {
  64.       wizqEntityMove Zak "263.6 106.5 390.7" "wait"
  65.       wizqEntityOrientation Zak 180
  66.     }
  67.  
  68.     oz'event {wizEntityStopFollow Zak}
  69.   }
  70.  
  71.   oz'event {wizDisableMouse}
  72.   wizqEntityOrientation Lydia 180 "wait"
  73.   wizqEntitySetCycle Lydia standCycleNormal
  74.  
  75.   # Wait for Block 1
  76.   wizqWaitQueue 2
  77.  
  78.   wizqEntityAction Lydia standOpenDoorRightHand
  79.  
  80.   callEvent lockedDoor.init
  81.   lockedDoorDispatcher
  82.  
  83.   oz'event {wizEnableMouse}
  84.   oz'event {wizEntityResumeFollow Zak}
  85. }
  86.  
  87.  
  88. ## ===================================================== ##
  89. ##   To Basement                                         ##
  90. ## ===================================================== ##
  91.  
  92. event "toBasement" {
  93.   if { [ozGet "puzzleZak"] == "complete" } {
  94.     # Block 1
  95.     wizqQueue 2 {
  96.       wizqEntityMove Zak "245.8 66.1 479.6" "wait"
  97.       wizqEntityOrientation Zak 105
  98.     }
  99.  
  100.     oz'event {wizEntityStopFollow Zak}
  101.   }
  102.  
  103.   oz'event {wizDisableMouse}
  104.   wizqEntityOrientation Lydia 190 "wait"
  105.   wizqEntitySetCycle Lydia standCycleNormal
  106.  
  107.   # Wait for Block 1
  108.   wizqWaitQueue 2
  109.  
  110.   wizqEntityAction Lydia standOpenDoorLeftHand
  111.  
  112.   callEvent lockedDoor.init
  113.   doorDispatcher basement
  114.   
  115.   wizqEventEnd "toBasement"
  116.  
  117.   oz'event {wizEnableMouse}
  118.   oz'event {wizEntityResumeFollow Zak}
  119. }
  120.  
  121.  
  122. ## ===================================================== ##
  123. ##   Zak Discovery dispatcher                            ##
  124. ## ===================================================== ##
  125.  
  126. event "gardenStage" {
  127.   if { [getVar "puzzleZak"] == "complete" && [getVar "zakDiscovery"] == "" } {
  128.     freezePlayer
  129.     setCamera "stageStairs"
  130.     chainEvent { standardFadeout }
  131.     chainEvent {
  132.       setCamera "gardenStage"
  133.       wizhCameraChange
  134.       #Player will unfreeze and mouse re-enable in the event "vision.dollEffectOne"
  135.       freezePlayer
  136.       wizDisableFloorevent
  137.       wizDisableMouse
  138.       wizEntityStopFollow Zak
  139.       wizEntitySetPosition Zak "204.4 70.4 350"
  140.       wizEntitySetOrientation Zak 180
  141.       wizEntitySetPosition Lydia "200.3 70.4 333.5"
  142.       wizEntityWalk Lydia "204.5 70.4 358.9"
  143.       wizEntityWalk Zak "204.5 70.4 358.9"
  144.       standardFadein
  145.       delay 10
  146.     }
  147.  
  148.     chainCallEvent "zakDiscovery"
  149.  
  150.   } else {
  151.     setCamera "gardenStage"
  152.     wizhCameraChange
  153.   }
  154.   disableedge down
  155. }
  156.  
  157.  
  158. ## ===================================================== ##
  159. ##   usePuzzleSliders Behavior                           ##
  160. ## ===================================================== ##
  161.  
  162. event "puzzleSlidersBehavior" {
  163.   if { [ozGet "puzzleZak"] == "complete" } {
  164.     # Block 1
  165.     wizqQueue 2 {
  166.       wizqEntityMove Zak "211.6 89.1 253.9" "wait"
  167.       wizqEntityOrientation Zak 220
  168.     }
  169.  
  170.     oz'event {wizEntityStopFollow Zak}
  171.   }
  172.  
  173.   oz'event {wizDisableMouse}
  174.   wizqEntityOrientation Lydia 270 "wait"
  175.   wizqEntitySetCycle Lydia standCycleNormal
  176.  
  177.   # Wait for Block 1
  178.   wizqWaitQueue 2
  179.  
  180.   chainEvent {
  181.     freezePlayer
  182.     wizDisableMouse
  183.     wizEntityStopFollow Zak
  184.   }
  185.  
  186.   if { [getVar "puzzleLightRune" ] != "complete" } {
  187.     chainCallEvent "puzzleLightRuneTry"
  188.   }
  189.  
  190.   oz'event {wizEnableMouse}
  191.   oz'event {wizEntityResumeFollow Zak}
  192. }
  193.  
  194.  
  195. ## ===================================================== ##
  196. ##   Look Magical Tree Behavior from the balcony         ##
  197. ## ===================================================== ##
  198.  
  199. event "lookMagicalTreeBehavior" {
  200.   chainEvent { wizEntityStopFollow Zak }
  201.   wizqEntityWalk Zak "226.6 143.9 138.9" "wait"
  202.   chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  203.   wizqEntityOrientation Lydia 270 "wait"
  204.   wizqEntitySetCycle Lydia standCycleNormal
  205.   callEvent "nigilisFruitZoomIn"
  206.   chainEvent { 
  207.     wizEntityResumeFollow Zak 
  208.   }
  209. }
  210.  
  211.  
  212. ## ===================================================== ##
  213. ##   Light Rune puzzle                                   ##
  214. ## ===================================================== ##
  215.  
  216. event "puzzleLightRuneTry" {
  217.   if { [getVar "puzzleZak" ] == "complete" && [getVar "puzzleLightRuneTryZak" ] == "" } {
  218.     callEvent "puzzleLightRuneTryZak"
  219.  
  220.   } elseif { [getVar "puzzleLightRuneTryAlone" ] == "" && [getVar "puzzleLightRuneTryZak" ] == "" } {
  221.     callEvent "puzzleLightRuneTryAlone"
  222.  
  223.   } else {
  224.     callEvent "puzzleSlidersZoomIn"
  225.   }
  226. }
  227.  
  228.  
  229. ## ===================================================== ##
  230. ##   Water Lever puzzle while zoom out                   ##
  231. ## ===================================================== ##
  232.  
  233. event "smallBridgeBehavior" {
  234.   if { [ozGet "puzzleZak"] == "complete" } {
  235.     # Block 1
  236.     wizqQueue 2 {
  237.       wizqEntityMove Zak "200.8 70.4 211.8" "wait"
  238.       wizqEntityOrientation Zak 320
  239.     }
  240.  
  241.     oz'event {wizEntityStopFollow Zak}
  242.   }
  243.  
  244.   oz'event {wizDisableMouse}
  245.   wizqEntityOrientation Lydia 360 "wait"
  246.   wizqEntitySetCycle Lydia standCycleNormal
  247.  
  248.   # Wait for Block 1
  249.   wizqWaitQueue 2
  250.  
  251.   callEvent "waterLeverZoomIn"
  252.  
  253.   oz'event {wizEnableMouse}
  254.   oz'event {wizEntityResumeFollow Zak}
  255. }
  256.  
  257.  
  258. ## ===================================================== ##
  259. ##   Water Lever puzzle while zoom in                    ##
  260. ## ===================================================== ##
  261.  
  262. event "useGardenLever" {
  263.   chainEvent {
  264.     freezePlayer
  265.     wizDisableMouse
  266.   }
  267.  
  268.   if { [getVar "puzzleAqueduct" ] == "complete" } {
  269.     chainEvent {hideInterface}
  270.     chainEvent {hideMouse}
  271.     PlayMovieSound gardenLever  leverSuccess sfx/gardenLeverSuccess
  272.     chainEvent {standardFadeout}
  273.     chainEvent {cameraFadein 0}
  274.     PlayMovieSound gardenLever  leverWater   sfx/dragonFountainSpit
  275.     oz'event {
  276.         hRemoveBack
  277.         setCamera "smallBridge"
  278.         wizhCameraChange
  279.     }
  280.     wq'widget::waitfor $gardenLever::leverSuccess -animate
  281.     wq'widget::delete& gardenLever::leverSuccess
  282.     chainEvent {wizDisableMouse}
  283.     oz'event {SetAmbient 3d sfx/dragonFountainLoop "227 71 157" 30 1 0.6}
  284.     chainEvent {cameraFadeout 0}
  285.     oz'event {
  286.         wizEntityShow Lydia
  287.         wizEntityShow Zak
  288.         showMouse
  289.         showInterface
  290.      }
  291.     chainEvent {delay 1}
  292.     chainEvent {standardFadein}
  293.  
  294.     callEvent "puzzleWaterSolved"
  295.  
  296.   } else {
  297.     PlayMovieSound gardenLever leverFail sfx/gardenLeverFail
  298.  
  299.     wizqTalkOpen
  300.     wizqTalkSay Lydia $::lng::useGardenLeverL1   "sound/vo/$::LNG/scenes/garden/useGardenLeverL1.ogg"
  301.     wizqTalkClose
  302.  
  303.   }
  304.  
  305.   chainEvent {
  306.     unfreezePlayer
  307.     wizEnableMouse
  308.   }
  309. }
  310.  
  311.  
  312. ## ===================================================== ##
  313. ##   Planting the Bean                                   ##
  314. ## ===================================================== ##
  315.  
  316. event "useNigilisBeanBehavior" {
  317.   if { [ozGet "puzzleZak"] == "complete" } {
  318.     # Block 1
  319.     wizqQueue 2 {
  320.       wizqEntityMove Zak "180.5 70.7 155.3" "wait"
  321.       wizqEntityOrientation Zak 55
  322.     }
  323.  
  324.     oz'event {wizEntityStopFollow Zak}
  325.   }
  326.  
  327.   oz'event {wizDisableMouse}
  328.   wizqEntityOrientation Lydia 145 "wait"
  329.   wizqEntitySetCycle Lydia standCycleNormal
  330.  
  331.   # Wait for Block 1
  332.   wizqWaitQueue 2
  333.  
  334.   chainEvent {
  335.     freezePlayer
  336.     wizDisableMouse
  337.     wizEntityStopFollow Zak
  338.   }
  339.  
  340.   if { [getVar "puzzleZak" ] == "" } {
  341.     callEvent "nothingToPlantAlone"
  342.  
  343.   } elseif { [getVar "puzzleZak" ] == "complete" } {
  344.     if { [getVar "itemNigilisBean" ] == "" } {
  345.       callEvent "nothingToPlantZak"
  346.  
  347.  
  348.     } elseif { [getVar "itemNigilisBean" ] == "pickedUp" } {
  349.       if { [ozGet "itemPagesNigilis"] == "pickedUp" && [ozGet "itemCirclet"] == "pickedUp" } {
  350.         callEvent "plantingTheBean"
  351.         
  352.       } else {
  353.         callEvent "nigilisBeanNotNeeded"
  354.       }
  355.     }
  356.   }
  357.  
  358.   oz'event {wizEnableMouse}
  359.   oz'event {wizEntityResumeFollow Zak}
  360.   chainEvent {
  361.     unfreezePlayer
  362.   }
  363. }
  364.  
  365.  
  366. ## ===================================================== ##
  367. ##   Water Shower puzzle Solved                          ##
  368. ## ===================================================== ##
  369.  
  370. event "puzzleWaterSolved" {
  371.   chainEvent {
  372.     freezePlayer
  373.     wizDisableMouse
  374.     wizEntityStopFollow Zak
  375.   }
  376.   ozSet "puzzleWaterLevel" "complete"
  377.   ozSet "garden.useSmallBridge" "false"
  378.   
  379.   ozqSound::New3DFX ::snd_littleFall   "sound/sfx/charmingFall.ogg"
  380.   ozqSound::Position $::snd_littleFall "227 71 157"
  381.   ozqSound::ReferenceDistance $::snd_littleFall 3
  382.   ozqSound::Play $::snd_littleFall
  383.  
  384.   chainEvent { delay 500 }
  385.   
  386.   ozqSound::New3DFX ::snd_littleFallLoop   "sound/ambiance/charmingFallLoop.ogg"
  387.   ozqSound::Position $::snd_littleFallLoop "227 71 157"
  388.   ozqSound::ReferenceDistance $::snd_littleFallLoop 3
  389.   ozqSound::Repeat $::snd_littleFallLoop 1
  390.   ozqSound::Play $::snd_littleFallLoop
  391.   
  392.   if { [ozGet "itemPagesNigilis"] == "pickedUp" && [ozGet "itemNoteBook"] == "pickedUp" && [ozGet "itemCirclet"] == "pickedUp" } {
  393.     callEvent "waterNeededNotNow"
  394.  
  395.   } else {
  396.     callEvent "waterNotNeeded"
  397.   }
  398. }
  399.  
  400.  
  401. ## ===================================================== ##
  402. ##   Light Rune puzzle Solved                            ##
  403. ## ===================================================== ##
  404. ## trigger is when the Light Rune puzzle is complete
  405.  
  406. event "puzzleLightRuneSolved" {
  407.   ozSet "puzzleLightRune" "complete"
  408.   ozSet "garden.usePuzzleSliders" "false"
  409.   if { [getVar "puzzleZak" ] == "" } {
  410.     callEvent "lightBreathAlone"
  411.  
  412.   } elseif { [getVar "puzzleZak" ] == "complete" } {
  413.     if { [getVar "puzzleNigilisBean" ] == "complete" && [getVar "puzzleWaterLevel" ] == "complete" } {
  414.       chainEvent {
  415.         wizEntityShow Zak
  416.         wizEntityShow Lydia
  417.         hRemoveBack
  418.         standardFadein
  419.         delay 0
  420.       }
  421.       chainCallEvent "magicalFormula"
  422.  
  423.     } elseif { [ozGet "itemPagesNigilis"] == "pickedUp" && [ozGet "itemNoteBook"] == "pickedUp" && [ozGet "itemCirclet"] == "pickedUp" } {
  424.       callEvent "lightBreathZakNeeded"
  425.  
  426.     } else {
  427.       callEvent "lightBreathZakNotNeeded"
  428.     }
  429.   }
  430. }
  431.  
  432.  
  433. ################################################################################
  434. ## ========================================================================== ##
  435. ##   MOVEMENT                                                                 ##
  436. ## ========================================================================== ##
  437. ################################################################################
  438.  
  439.  
  440. ## ===================================================== ##
  441. ##   Look Magical Tree from the balcony                  ##
  442. ## ===================================================== ##
  443.  
  444. event "lookMagicalTree" {
  445.   wizEntityMove Lydia "222.6 143.9 152.9" "garden.lookMagicalTreeBehavior" 2
  446. }
  447.  
  448.  
  449. ## ===================================================== ##
  450. ##   transDinnerRoomEntrance                             ##
  451. ## ===================================================== ##
  452.  
  453. event "transDinnerRoomEntrance" {
  454.   eventState [wizEventStart "transDinnerRoomEntrance"]
  455.  
  456.   if { [ozGet "puzzleZak"] == "complete" } {
  457.     # Block 1
  458.     wizqQueue 2 {
  459.       oz'event {wizEntityStopFollow Zak}
  460.       wizqEntityMove Zak "263.6 106.5 390.7" "wait"
  461.       wizqEntityOrientation Zak 180
  462.       oz'event {wizEntityResumeFollow Zak}
  463.     }
  464.   }
  465.  
  466.   wizqEntityMove Lydia "260.6 109.7 400.7" "garden.toDinnerHall" 2
  467.  
  468.   wizqEventEnd "transDinnerRoomEntrance"
  469. }
  470.  
  471.  
  472. ## ===================================================== ##
  473. ##   transBasementDoor                                   ##
  474. ## ===================================================== ##
  475.  
  476. event "transBasementDoor" {
  477.   eventState [wizEventStart "transBasementDoor"]
  478.  
  479.   if { [ozGet "puzzleZak"] == "complete" } {
  480.     # Block 1
  481.     wizqQueue 2 {
  482.       oz'event {wizEntityStopFollow Zak}
  483.       wizqEntityMove Zak "245.8 66.1 479.6" "wait"
  484.       wizqEntityOrientation Zak 105
  485.       oz'event {wizEntityResumeFollow Zak}
  486.     }
  487.   }
  488.  
  489.   wizqEntityMove Lydia "264 61.9 485" "garden.toBasement" 2
  490.  
  491.   wizqEventEnd "transBasementDoor"
  492. }
  493.  
  494.  
  495. ## ===================================================== ##
  496. ##   toBasementClick                                     ##
  497. ## ===================================================== ##
  498.  
  499. event "toBasementClick" {
  500.   eventState [wizEventStart "toBasementClick"]
  501.   
  502.   if { [ozGet "puzzleZak"] == "complete" } {
  503.     # Block 1
  504.     wizqQueue 2 {
  505.       oz'event {wizEntityStopFollow Zak}
  506.       wizqEntityMove Zak "245.8 66.1 479.6" "wait"
  507.       wizqEntityOrientation Zak 105
  508.       oz'event {wizEntityResumeFollow Zak}
  509.     }
  510.   }
  511.   
  512.   wizqEntityMove Lydia "264 61.9 485" "garden.toBasement" 2
  513.  
  514.     wizqEventEnd "toBasementClick"
  515. }
  516.  
  517.  
  518. ## ===================================================== ##
  519. ##   transBasementDoor                                   ##
  520. ## ===================================================== ##
  521.  
  522. event "transBasementEntrance" {
  523.   wizEntityMove Lydia "264 61.9 485"
  524. }
  525.  
  526.  
  527. ## ===================================================== ##
  528. ##   use Nigilis Bean                                    ##
  529. ## ===================================================== ##
  530.  
  531. event "useNigilisBean" {
  532.   eventState [wizEventStart "useNigilisBean"]
  533.  
  534.   if { [ozGet "puzzleZak"] == "complete" } {
  535.     # Block 1
  536.     wizqQueue 2 {
  537.       oz'event {wizEntityStopFollow Zak}
  538.       wizqEntityMove Zak "180.5 70.7 155.3" "wait"
  539.       wizqEntityOrientation Zak 55
  540.       oz'event {wizEntityResumeFollow Zak}
  541.     }
  542.   }
  543.  
  544.   wizqEntityMove Lydia "190.6 70.7 147.9" garden.useNigilisBeanBehavior 2
  545.  
  546.   wizqEventEnd "useNigilisBean"
  547. }
  548.  
  549.  
  550. ## ===================================================== ##
  551. ##   usePuzzleSliders                                    ##
  552. ## ===================================================== ##
  553.  
  554. event "usePuzzleSliders" {
  555.   eventState [wizEventStart "usePuzzleSliders"]
  556.  
  557.   if { [ozGet "puzzleZak"] == "complete" } {
  558.     # Block 1
  559.     wizqQueue 2 {
  560.       oz'event {wizEntityStopFollow Zak}
  561.       wizqEntityMove Zak "211.6 89.1 253.9" "wait"
  562.       wizqEntityOrientation Zak 220
  563.       oz'event {wizEntityResumeFollow Zak}
  564.     }
  565.   }
  566.  
  567.   wizqEntityMove Lydia "208.629 89.13 264.87" "garden.puzzleSlidersBehavior" 2
  568.  
  569.   wizqEventEnd "usePuzzleSliders"
  570. }
  571.  
  572.  
  573. ## ===================================================== ##
  574. ##   Water Lever puzzle while zoom out                   ##
  575. ## ===================================================== ##
  576.  
  577. event "useSmallBridge" {
  578.   eventState [wizEventStart "useSmallBridge"]
  579.  
  580.   if { [ozGet "puzzleZak"] == "complete" } {
  581.     # Block 1
  582.     wizqQueue 2 {
  583.       oz'event {wizEntityStopFollow Zak}
  584.       wizqEntityMove Zak "200.8 70.4 211.8" "wait"
  585.       wizqEntityOrientation Zak 320
  586.       oz'event {wizEntityResumeFollow Zak}
  587.     }
  588.   }
  589.  
  590.   wizqEntityMove Lydia "190.6 70.4 201.9" "garden.smallBridgeBehavior" 2
  591.  
  592.   wizqEventEnd "useSmallBridge"
  593. }
  594.  
  595.  
  596. ## ===================================================== ##
  597. ##   garden Fear going Right                             ##
  598. ## ===================================================== ##
  599.  
  600. event "gardenFearGoingRight" {
  601.   chainEvent { wizEntityStopFollow Zak }
  602.   ozSet "zakGardenPosition" "rightSide"
  603.   wizqEntityChangeSprintSpeed Zak 50
  604.   wizqEntityRun Zak "230.6 143.9 133.9" "wait"
  605.   wizqEntitySetCycle Zak lieCycleFear
  606. }
  607.  
  608.  
  609. ## ===================================================== ##
  610. ##   garden Fear going Left                              ##
  611. ## ===================================================== ##
  612.  
  613. event "gardenFearGoingLeft" {
  614.   chainEvent { wizEntityStopFollow Zak }
  615.   ozSet "zakGardenPosition" "leftSide"
  616.   wizqEntityChangeSprintSpeed Zak 50
  617.   wizqEntityRun Zak "301.8 147.2 209.4" "wait"
  618.   wizqEntitySetCycle Zak lieCycleFear
  619. }
  620.  
  621.  
  622. ## ===================================================== ##
  623. ##   trans Gargoyles                                     ##
  624. ## ===================================================== ##
  625.  
  626. event "transGargoyles" {
  627.   wizEntityMove Lydia "277.6 143.9 208.7"
  628. }
  629.  
  630.  
  631. ## ===================================================== ##
  632. ##   trans Flag                                          ##
  633. ## ===================================================== ##
  634.  
  635. event "transFlag" {
  636.   wizEntityMove Lydia "320.6 147 208.1"
  637. }
  638.  
  639.  
  640. ################################################################################
  641. ## ========================================================================== ##
  642. ## ANIMATION & SPECIAL CAMERA SECTION                                         ##
  643. ## ========================================================================== ##
  644. ################################################################################
  645.  
  646.  
  647. ## ===================================================== ##
  648. ##   Nigilis Tree Growing                                ##
  649. ## ===================================================== ##
  650.  
  651. event "nigilisTreeMovie" {
  652.   ozSet "puzzleNigilisTree" "complete"
  653.   ozSet "garden.useOrlos" "false"
  654.   ozSet "garden.useDria" "false"
  655.   ozSet "garden.useUndar" "false"
  656.   ozSet "zakPresence" "away"
  657.   
  658.     chainEvent {standardFadeout}
  659.     oz'event {
  660.         hideInterface
  661.         hideMouse
  662.         wizEntityHide Lydia
  663.         wizEntityHide Zak
  664.     }
  665.     oz'event {oz'delay 0.250}
  666.     oz'track::play $::music_track "sound/music/mystery.ogg"
  667.     ozqSound::NewFX  "sound/cutscenes/treeGrowing.ogg"
  668.     magicalTreeGrowing::new magicalTreeGrowing -foreground -nopan
  669.     chainEvent {standardFadein}
  670.     oz'event {
  671.         setCamera "smallBridgeTree"
  672.         wizhCameraChange
  673.         wizEntitySetPosition Zak "200.8 70.4 211.8"
  674.         wizEntitySetPosition Lydia "208.6 70.4 195.9"
  675.         wizEntityLookAt Zak "195.6 70.7 169.4"
  676.         wizEntityLookAt Lydia "195.6 70.7 169.4"
  677.     }
  678.     wq'widget::waitfor $magicalTreeGrowing::magicalTreeGrowing -animate
  679.     wq'widget::delete& magicalTreeGrowing::magicalTreeGrowing
  680.     chainEvent {cameraFadeout 0}
  681.     oz'event {wizDisableMouse}
  682.     oz'event {
  683.         wizEntityShow Lydia
  684.         wizEntityShow Zak
  685.         showMouse
  686.         showInterface
  687.      }
  688.     chainEvent {standardFadein}
  689.  
  690.     callEvent "nigilisTree"
  691. }
  692.  
  693.  
  694. ## ===================================================== ##
  695. ##   Water shower level Zoom In                          ##
  696. ## ===================================================== ##
  697.  
  698. event "waterLeverZoomIn" {
  699.   wizqZoomIn "gardenLever" "garden.waterLeverZoomOut"
  700. }
  701.  
  702.  
  703. ## ===================================================== ##
  704. ##   Water shower level Zoom Out                         ##
  705. ## ===================================================== ##
  706.  
  707. event "waterLeverZoomOut" {
  708.   wizqZoomOut "smallBridge"
  709.   chainEvent { hRemoveBack }
  710. }
  711.  
  712.  
  713. ## ===================================================== ##
  714. ##   puzzleSliders Zoom In                               ##
  715. ## ===================================================== ##
  716.  
  717. event "puzzleSlidersZoomIn" {
  718.   chainEvent {
  719.     unfreezePlayer
  720.     wizEnableFloorevent
  721.     wizEnableMouse
  722.     wizEntityResumeFollow Zak
  723.   }
  724.  
  725.   for {set i 1} {$i <= 8} {incr i} {
  726.     puzzleSliders::new rune${i} -repeat -alpha 0 -foreground
  727.   }
  728.  
  729.   wizqZoomIn "puzzleSliders" "garden.puzzleSlidersZoomOut"
  730. }
  731.  
  732.  
  733. ## ===================================================== ##
  734. ##   puzzleSliders Zoom Out                              ##
  735. ## ===================================================== ##
  736.  
  737. event "puzzleSlidersZoomOut" {
  738.   wizEntityResumeFollow Zak
  739.   resetPuzzle
  740.  
  741.   for {set i 1} {$i <= 8} {incr i} {
  742.     wq'widget::delete& puzzleSliders::rune${i}
  743.     wq'widget::delete& puzzleSliders::slider${i}OnSt
  744.   }
  745.  
  746.   wizqZoomOut "puzzleStageBack"
  747.   chainEvent { hRemoveBack }
  748. }
  749.  
  750.  
  751. ## ===================================================== ##
  752. ##   useUndar Zoom In                                    ##
  753. ## ===================================================== ##
  754.  
  755. event "useUndar" {
  756.   eventState [wizEventStart "useUndar"]
  757.  
  758.   if { [ozGet "puzzleZak"] == "complete" } {
  759.     # Block 1
  760.     wizqQueue 2 {
  761.       oz'event {wizEntityStopFollow Zak}
  762.       wizqEntityMove Zak "187.6 70.7 142.9" "wait"
  763.       wizqEntityOrientation Zak 90
  764.       oz'event {wizEntityResumeFollow Zak}
  765.     }
  766.   }
  767.  
  768.   wizqEntityMove Lydia "203.6 70.7 143.9" garden.useUndarBehavior 2
  769.  
  770.   wizqEventEnd "useUndar"
  771. }
  772.  
  773.  
  774. ## ===================================================== ##
  775. ##   useUndar Behavior                                   ##
  776. ## ===================================================== ##
  777.  
  778. event "useUndarBehavior" {
  779.   if { [ozGet "puzzleZak"] == "complete" } {
  780.     # Block 1
  781.     wizqQueue 2 {
  782.       wizqEntityMove Zak "187.6 70.7 142.9" "wait"
  783.       wizqEntityOrientation Zak 90
  784.     }
  785.  
  786.     oz'event {wizEntityStopFollow Zak}
  787.   }
  788.  
  789.   oz'event {wizDisableMouse}
  790.   wizqEntityOrientation Lydia 210 "wait"
  791.   wizqEntitySetCycle Lydia standCycleNormal
  792.  
  793.   # Wait for Block 1
  794.   wizqWaitQueue 2
  795.  
  796.   chainEvent { wizEntityLookAt Lydia "189.4 70.7 166.3" }
  797.   wizqEntityChangeCycle Lydia crouchCycleNormal standToCrouch "wait"
  798.  
  799.   wizqZoomIn "undarCloseUpNA" "garden.useUndarZoomOut"
  800.   oz'event {setCrossfadeCamera "undarCloseUp" 3000}
  801.   wizqTalkOpen
  802.   wizqTalkSay Lydia $::lng::useUndarL1   "sound/vo/$::LNG/scenes/garden/useUndarL1.ogg"
  803.   wizqTalkClose
  804. }
  805.  
  806.  
  807. ## ===================================================== ##
  808. ##   useUndar Zoom Out                                   ##
  809. ## ===================================================== ##
  810.  
  811. event "useUndarZoomOut" {
  812.   chainEvent {
  813.     freezePlayer
  814.     wizDisableMouse
  815.   }
  816.   
  817.   wizqEntitySetCycle Lydia crouchCycleNormal
  818.  
  819.   wizqZoomOut "islandCloseUp"
  820.   chainEvent { hRemoveBack }
  821.   wizqDisableMouse
  822.  
  823.   chainEvent { delay 100 }
  824.   wizqEntityChangeCycle Lydia standCycleNormal crouchToStand "wait"
  825.  
  826.   chainEvent {
  827.     unfreezePlayer
  828.     wizEnableMouse
  829.   }
  830. }
  831.  
  832.  
  833. ## ===================================================== ##
  834. ##   useOrlos Zoom In                                    ##
  835. ## ===================================================== ##
  836.  
  837. event "useOrlos" {
  838.   eventState [wizEventStart "useOrlos"]
  839.  
  840.   if { [ozGet "puzzleZak"] == "complete" } {
  841.     # Block 1
  842.     wizqQueue 2 {
  843.       oz'event {wizEntityStopFollow Zak}
  844.       wizqEntityMove Zak "212.6 70.7 156.9" "wait"
  845.       wizqEntityOrientation Zak 200
  846.       oz'event {wizEntityResumeFollow Zak}
  847.     }
  848.   }
  849.  
  850.   wizqEntityMove Lydia "205.6 70.7 170.9" garden.useOrlosBehavior 2
  851.  
  852.   wizqEventEnd "useOrlos"
  853. }
  854.  
  855.  
  856. ## ===================================================== ##
  857. ##   useOrlos Behavior                                   ##
  858. ## ===================================================== ##
  859.  
  860. event "useOrlosBehavior" {
  861.   if { [ozGet "puzzleZak"] == "complete" } {
  862.     # Block 1
  863.     wizqQueue 2 {
  864.       wizqEntityMove Zak "212.6 70.7 156.9" "wait"
  865.       wizqEntityOrientation Zak 200
  866.     }
  867.  
  868.     oz'event {wizEntityStopFollow Zak}
  869.   }
  870.  
  871.   oz'event {wizDisableMouse}
  872.   wizqEntityOrientation Lydia 330 "wait"
  873.   wizqEntitySetCycle Lydia standCycleNormal
  874.  
  875.   # Wait for Block 1
  876.   wizqWaitQueue 2
  877.  
  878.   wizqEntityChangeCycle Lydia crouchCycleNormal standToCrouch "wait"
  879.  
  880.   wizqZoomIn "orlosCloseUpNA" "garden.useOrlosZoomOut"
  881.   oz'event {setCrossfadeCamera "orlosCloseUp" 3000}
  882.   wizqTalkOpen
  883.   wizqTalkSay Lydia $::lng::useOrlosL1   "sound/vo/$::LNG/scenes/garden/useOrlosL1.ogg"
  884.   wizqTalkClose
  885.  
  886.   oz'event {wizEnableMouse}
  887.   oz'event {wizEntityResumeFollow Zak}
  888. }
  889.  
  890.  
  891. ## ===================================================== ##
  892. ##   useOrlos Zoom Out                                   ##
  893. ## ===================================================== ##
  894.  
  895. event "useOrlosZoomOut" {
  896.   chainEvent {
  897.     freezePlayer
  898.     wizDisableMouse
  899.   }
  900.   
  901.   wizqEntitySetCycle Lydia crouchCycleNormal
  902.  
  903.   wizqZoomOut "islandCloseUp"
  904.   chainEvent { hRemoveBack }
  905.   wizqDisableMouse
  906.  
  907.   chainEvent { delay 100 }
  908.   wizqEntityChangeCycle Lydia standCycleNormal crouchToStand "wait"
  909.  
  910.   chainEvent {
  911.     unfreezePlayer
  912.     wizEnableMouse
  913.   }
  914. }
  915.  
  916.  
  917. ## ===================================================== ##
  918. ##   useDria Zoom In                                     ##
  919. ## ===================================================== ##
  920.  
  921. event "useDria" {
  922.   eventState [wizEventStart "useDria"]
  923.  
  924.   if { [ozGet "puzzleZak"] == "complete" } {
  925.     # Block 1
  926.     wizqQueue 2 {
  927.       oz'event {wizEntityStopFollow Zak}
  928.       wizqEntityMove Zak "187.6 70.7 142.9" "wait"
  929.       wizqEntityOrientation Zak 180
  930.       oz'event {wizEntityResumeFollow Zak}
  931.     }
  932.   }
  933.  
  934.   wizqEntityMove Lydia "181.6 70.7 155.9" garden.useDriaBehavior 2
  935.  
  936.   wizqEventEnd "useDria"
  937. }
  938.  
  939.  
  940. ## ===================================================== ##
  941. ##   useDria Behavior                                    ##
  942. ## ===================================================== ##
  943.  
  944. event "useDriaBehavior" {
  945.   if { [ozGet "puzzleZak"] == "complete" } {
  946.     # Block 1
  947.     wizqQueue 2 {
  948.       wizqEntityMove Zak "187.6 70.7 142.9" "wait"
  949.       wizqEntityOrientation Zak 180
  950.     }
  951.  
  952.     oz'event {wizEntityStopFollow Zak}
  953.   }
  954.  
  955.   oz'event {wizDisableMouse}
  956.   wizqEntityOrientation Lydia 90 "wait"
  957.   wizqEntitySetCycle Lydia standCycleNormal
  958.  
  959.   # Wait for Block 1
  960.   wizqWaitQueue 2
  961.  
  962.   wizqEntityChangeCycle Lydia crouchCycleNormal standToCrouch "wait"
  963.  
  964.   wizqZoomIn "driaCloseUpNA" "garden.useDriaZoomOut"
  965.   oz'event {setCrossfadeCamera "driaCloseUp" 3000}
  966.  
  967.   wizqTalkOpen
  968.   wizqTalkSay Lydia $::lng::useDriaL1   "sound/vo/$::LNG/scenes/garden/useDriaL1.ogg"
  969.   wizqTalkClose
  970.  
  971.   oz'event {wizEnableMouse}
  972.   oz'event {wizEntityResumeFollow Zak}
  973. }
  974.  
  975.  
  976. ## ===================================================== ##
  977. ##   useDria Zoom Out                                    ##
  978. ## ===================================================== ##
  979.  
  980. event "useDriaZoomOut" {
  981.   chainEvent {
  982.     freezePlayer
  983.     wizDisableMouse
  984.   }
  985.   
  986.   wizqEntitySetCycle Lydia crouchCycleNormal
  987.  
  988.   wizqZoomOut "islandCloseUp"
  989.   chainEvent { hRemoveBack }
  990.   wizqDisableMouse
  991.  
  992.   chainEvent { delay 100 }
  993.   wizqEntityChangeCycle Lydia standCycleNormal crouchToStand "wait"
  994.  
  995.   chainEvent {
  996.     unfreezePlayer
  997.     wizEnableMouse
  998.   }
  999. }
  1000.  
  1001.  
  1002. ## ===================================================== ##
  1003. ##   Study Balconny                                      ##
  1004. ## ===================================================== ##
  1005.  
  1006. event "studyBalcony" {
  1007.   if { [ozGet "puzzleNigilisTree"] == "complete" } {
  1008.     setCamera "studyBalconyTree"
  1009.     wizhCameraChange
  1010.  
  1011.   } else {
  1012.     setCamera "studyBalcony"
  1013.     wizhCameraChange
  1014.   }
  1015.   
  1016.   chainEvent { delay 500 }
  1017.  
  1018.   if {[ozGet "zakRoofWalk"] != "complete"} {
  1019.     if { [ozGet "zakGardenPosition"] == "leftSide" } {
  1020.       callEvent "gardenFearGoingRight"
  1021.  
  1022.     } elseif { [ozGet "zakGardenPosition"] == "rightSide" } {
  1023.       callEvent "gardenFearGoingRight"
  1024.     }
  1025.  
  1026.     ozSet "zakPresence" "away"
  1027.   }
  1028.  
  1029. }
  1030.  
  1031.  
  1032. ## ===================================================== ##
  1033. ##   Fear of Heights Dispatcher                          ##
  1034. ## ===================================================== ##
  1035.  
  1036. event "gargoyles" {
  1037.   if { [ozGet "puzzleNigilisTree"] == "complete" } {
  1038.     setCamera "gargoylesTree"
  1039.     wizhCameraChange
  1040.  
  1041.   } else {
  1042.     setCamera "gargoyles"
  1043.     wizhCameraChange
  1044.   }
  1045.   
  1046.   chainEvent { delay 500 }
  1047.  
  1048.   if {[ozGet "zakRoofWalk"] != "complete"} {
  1049.     if { [ozGet "zakGardenPosition"] == "rightSide" } {
  1050.       callEvent "gardenFearGoingLeft"
  1051.  
  1052.     } elseif { [ozGet "zakGardenPosition"] == "leftSide" } {
  1053.       callEvent "gardenFearGoingRight"
  1054.     }
  1055.   }
  1056. }
  1057.  
  1058.  
  1059. ## ===================================================== ##
  1060. ##   camera flag                                         ##
  1061. ## ===================================================== ##
  1062.  
  1063. event "flag" {
  1064.   setCamera "flag"
  1065.   wizhCameraChange
  1066.   wizEntityHide Npc
  1067.   
  1068.   chainEvent { delay 500 }
  1069.  
  1070.   if {[ozGet "zakRoofWalk"] != "complete"} {
  1071.     ozSet "zakPresence" "away"
  1072.  
  1073.     if { [ozGet "zakGardenPosition"] == "" } {
  1074.       callEvent "gardenFearEntering"
  1075.  
  1076.     } elseif { [ozGet "zakGardenPosition"] == "rightSide" } {
  1077.       callEvent "gardenFearGoingLeft"
  1078.  
  1079.     } elseif { [ozGet "zakGardenPosition"] == "leftSide" } {
  1080.       callEvent "gardenFearGoingLeft"
  1081.     }
  1082.   }
  1083. }
  1084.  
  1085.  
  1086. ## ===================================================== ##
  1087. ##   to grand hall studies                               ##
  1088. ## ===================================================== ##
  1089.  
  1090. event "toGrandhallStudies" {
  1091.   wizEntityResumeFollow Zak
  1092.   wizEntityWalk Zak "244 144 151.9"
  1093.   setScene "grandHall" worldStudies
  1094. }
  1095.  
  1096.  
  1097. ## ===================================================== ##
  1098. ##   Camera                                              ##
  1099. ## ===================================================== ##
  1100.  
  1101. camera "ending" {
  1102.     pos 206.7356 141.033 322.8264
  1103.     aim 48.3625 -34.2672 65.5973
  1104.     up 0.23 0.9218 0.312
  1105.     fov 48.4555
  1106.     layer background "ending" 0 0 0 0 0 0 0 0
  1107.     cursor "dinnerRoomStairs/dinnerRoomStairsCursor.tga"
  1108. }
  1109.  
  1110.  
  1111. ## ===================================================== ##
  1112. ##   small Island                                        ##
  1113. ## ===================================================== ##
  1114.  
  1115. event "smallIsland" {
  1116.   if { [ozGet "puzzleNigilisTree"] == "complete" } {
  1117.     setCamera "smallIslandTree"
  1118.     wizhCameraChange
  1119.  
  1120.   } else {
  1121.     setCamera "smallIsland"
  1122.     wizhCameraChange
  1123.   }
  1124.   
  1125.   if { [ozGet "zakPresence"] == "" && [ozGet noZakFollow] != 1} {
  1126.     wizEntityResumeFollow Zak
  1127.   }
  1128. }
  1129.  
  1130.  
  1131. ## ===================================================== ##
  1132. ##   island Close Up Camera                              ##
  1133. ## ===================================================== ##
  1134.  
  1135. event "islandCloseUp" {
  1136.   if { [ozGet "puzzleNigilisTree"] == "complete" } {
  1137.     setCamera "islandCloseUpTree"
  1138.     wizhCameraChange
  1139.  
  1140.   } else {
  1141.     setCamera "islandCloseUp"
  1142.     wizhCameraChange
  1143.   }
  1144. }
  1145.  
  1146.  
  1147. ## ===================================================== ##
  1148. ##   puzzle stage top                                    ##
  1149. ## ===================================================== ##
  1150.  
  1151. event "puzzleStageTop" {
  1152.   setCamera "puzzleStageTop"
  1153.   wizhCameraChange
  1154. }
  1155.  
  1156.  
  1157. ## ===================================================== ##
  1158. ##   basement door camera                                ##
  1159. ## ===================================================== ##
  1160.  
  1161. event "basementDoor" {
  1162.   setCamera "basementDoor"
  1163.   wizhCameraChange
  1164. }
  1165.  
  1166.  
  1167. ## ===================================================== ##
  1168. ##   garden End camera                                   ##
  1169. ## ===================================================== ##
  1170.  
  1171. event "gardenEnd" {
  1172.   setCamera "gardenEnd"
  1173.   wizhCameraChange
  1174.  
  1175.   if { [ozGet "visionOne"] == "viewed" && [ozGet "familiar"] == "" } {
  1176.     wizqDisableMouse
  1177.     chainEvent {
  1178.       freezePlayer
  1179.       wizEntityStopFollow Zak
  1180.     }
  1181.  
  1182.     # Block 1
  1183.     wizqQueue 1 {
  1184.       wizqEntityWalk Zak "204.6 70.4 475.7" "wait"
  1185.     }
  1186.  
  1187.     # Block 1-B
  1188.     wizqQueue 2 {
  1189.       wizqEntityWalk Lydia "205.6 70.4 463.7" "wait"
  1190.     }
  1191.  
  1192.     # Wait for Block 1 & 1-B
  1193.     wizqWaitQueue 1
  1194.     wizqWaitQueue 2
  1195.  
  1196.     chainEvent {
  1197.       unfreezePlayer
  1198.       wizEntityResumeFollow Zak
  1199.     }
  1200.  
  1201.     chainCallEvent optionnalConversation.familiarBehavior
  1202.   }
  1203. }
  1204.  
  1205.  
  1206. ## ===================================================== ##
  1207. ##   small Brige Camera                                  ##
  1208. ## ===================================================== ##
  1209.  
  1210. event "smallBridge" {
  1211.   if { [ozGet "puzzleNigilisTree"] == "complete" } {
  1212.     setCamera "smallBridgeTree"
  1213.     wizhCameraChange
  1214.  
  1215.   } else {
  1216.     setCamera "smallBridge"
  1217.     wizhCameraChange
  1218.   }
  1219. }
  1220.  
  1221.  
  1222. ## ===================================================== ##
  1223. ##   path Camera                                         ##
  1224. ## ===================================================== ##
  1225.  
  1226. event "path" {
  1227.   if { [ozGet "puzzleNigilisTree"] == "complete" } {
  1228.     setCamera "pathTree"
  1229.     wizhCameraChange
  1230.  
  1231.   } else {
  1232.     setCamera "path"
  1233.     wizhCameraChange
  1234.   }
  1235.   
  1236.   wizEntityResumeFollow Zak
  1237. }
  1238.  
  1239.  
  1240. ## ===================================================== ##
  1241. ##   nigilis Fruit Zoom In                               ##
  1242. ## ===================================================== ##
  1243.  
  1244. event "nigilisFruitZoomIn" {
  1245.   wizqZoomIn "fruitCloseUp" "garden.nigilisFruitZoomOut"
  1246. }
  1247.  
  1248.  
  1249. ## ===================================================== ##
  1250. ##   nigilis Fruit Zoom Out                              ##
  1251. ## ===================================================== ##
  1252.  
  1253. event "nigilisFruitZoomOut" {
  1254.   wizqZoomOut "studyBalconyTree"
  1255.   chainEvent { hRemoveBack }
  1256. }
  1257.  
  1258.  
  1259. ################################################################################
  1260. ## ========================================================================== ##
  1261. ##   NPC DIALOGUE SECTION                                                     ##
  1262. ## ========================================================================== ##
  1263. ################################################################################
  1264.  
  1265.  
  1266. # NONE FOR NOW
  1267.  
  1268.  
  1269. ################################################################################
  1270. ## ========================================================================== ##
  1271. ##   FORCED DIALOGUE SECTION                                                  ##
  1272. ## ========================================================================== ##
  1273. ################################################################################
  1274.  
  1275.  
  1276. ## ===================================================== ##
  1277. ##   Zak Discovery && The Doll                           ##
  1278. ## ===================================================== ##
  1279.  
  1280. event "zakDiscovery" {
  1281.   ozSet "zakDiscovery" "initiated"
  1282.   # Block 1
  1283.   wizqQueue 1 {
  1284.     wizqEntityWalk Lydia "201.6 70.4 352.5" "wait"
  1285.   }
  1286.  
  1287.   # Block 1-B
  1288.   wizqQueue 2 {
  1289.     wizqEntityWalk Zak "204.5 70.4 358.9" "wait"
  1290.     Play3DSound "characters/Zak/zakSnif" Zak
  1291.     wizqEntityAction Zak standSniffing "wait"
  1292.     wizqEntityRun Zak "208 70.4 439"
  1293.   }
  1294.  
  1295.   # Wait for Block 1 & 1-B
  1296.   wizqWaitQueue 1
  1297.   wizqWaitQueue 2
  1298.  
  1299.   # Block 2
  1300.   wizqQueue 1 {
  1301.     chainEvent { delay 1000 }
  1302.     chainEvent {
  1303.     setCamera "zakSearch"
  1304.     wizhCameraChange
  1305.     }
  1306.   }
  1307.  
  1308.   # Block 2- B
  1309.   wizqQueue 2 {
  1310.     wizqEntityRun Zak "214.5 70.4 421.7" "wait"
  1311.     Play3DSound "characters/Zak/zakSnif" Zak
  1312.     wizqEntityAction Zak standSniffing "wait"
  1313.     wizqEntityWalk Zak "195 70.4 449" "wait"
  1314.   }
  1315.  
  1316.   # Block 2- C
  1317.   wizqQueue 3 {
  1318.     wizqEntityAction Lydia "standWhat" "wait"
  1319.     wizqEntityWalk Lydia "200.6 70.4 430.5"
  1320.   }
  1321.  
  1322.   wizqTalkOpen
  1323.   wizqTalkSay Lydia $::lng::zakDiscoveryL1   "sound/vo/$::LNG/scenes/garden/zakDiscoveryL1.ogg"
  1324.   wizqTalkSay Zak $::lng::zakDiscoveryZ1   "sound/vo/$::LNG/scenes/garden/zakDiscoveryZ1.ogg"
  1325.   wizqTalkClose
  1326.  
  1327.   # Wait for Block 2 & 2-B & 2-C
  1328.   wizqWaitQueue 1
  1329.   wizqWaitQueue 2
  1330.   wizqWaitQueue 3
  1331.  
  1332.   # Block 3
  1333.   wizqQueue 1 {
  1334.     Play3DSound "characters/Zak/zakSnif" Zak
  1335.     wizqEntityAction Zak standSniffing "wait"
  1336.     wizqEntityWalk Zak "175.9 69.8 490.9"
  1337.   }
  1338.  
  1339.   # Block 3-B
  1340.   wizqQueue 2 {
  1341.     chainEvent { delay 500 }
  1342.     chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  1343.     Play3DSound "characters/Lydia/standHappy"
  1344.     wizqEntityAction Lydia standHappy "wait"
  1345.     wizqEntityWalk Lydia "198.4 70.4 455.5"
  1346.   }
  1347.  
  1348.   wizqTalkOpen
  1349.   wizqTalkSay Lydia $::lng::zakDiscoveryL2   "sound/vo/$::LNG/scenes/garden/zakDiscoveryL2.ogg"
  1350.   wizqTalkSay Zak $::lng::zakDiscoveryZ2   "sound/vo/$::LNG/scenes/garden/zakDiscoveryZ2.ogg"
  1351.   wizqTalkClose
  1352.  
  1353.   # Wait for Block 3 & 3-B
  1354.   wizqWaitQueue 1
  1355.   wizqWaitQueue 2
  1356.  
  1357.   # Block 4
  1358.   wizqQueue 1 {
  1359.     chainEvent {
  1360.       wizqEntityWalk Zak "175.9 69.8 490.9" "wait"
  1361.       wizEntityLookAt Zak "184.9 70.3 480.9"
  1362.       wizEntitySetCycle Zak sitCycleNormal
  1363.     }
  1364.   }
  1365.  
  1366.   # Block 4-B
  1367.   wizqQueue 2 {
  1368.     chainEvent { delay 1000 }
  1369.     wizqEntityRun Lydia "184.9 70.3 480.9"
  1370.     chainEvent { delay 1000 }
  1371.     chainEvent {
  1372.       setCamera "dollFinding"
  1373.       wizhCameraChange
  1374.     }
  1375.     chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  1376.     wizqEntityRun Lydia "184.9 70.3 480.9" "wait"
  1377.     chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  1378.     wizqEntityChangeCycle Lydia crouchCycleNormal standToCrouch "wait"
  1379.   }
  1380.  
  1381.   wizqTalkOpen
  1382.   wizqTalkSay Zak $::lng::zakDiscoveryZ3   "sound/vo/$::LNG/scenes/garden/zakDiscoveryZ3.ogg"
  1383.   wizqTalkClose
  1384.  
  1385.   # Wait for Block 4 & 4-B
  1386.   wizqWaitQueue 1
  1387.   wizqWaitQueue 2
  1388.  
  1389.   # Block 6
  1390.   wizqQueue 1 {
  1391.     chainEvent { standardFadeout }
  1392.     chainEvent {wizEntityHide Lydia}
  1393.     chainEvent {wizEntityHide Zak}
  1394.     chainEvent {
  1395.       setCamera "dollCloseUp"
  1396.       wizhCameraChange
  1397.       standardFadein
  1398.       delay 0
  1399.     }
  1400.   }
  1401.  
  1402.   wizqTalkOpen
  1403.   wizqTalkSay Lydia $::lng::zakDiscoveryL3   "sound/vo/$::LNG/scenes/garden/zakDiscoveryL3.ogg"
  1404.   wizqTalkSay Lydia $::lng::zakDiscoveryL4   "sound/vo/$::LNG/scenes/garden/zakDiscoveryL4.ogg"
  1405.   wizqTalkClose
  1406.  
  1407.   # Wait for Block 6
  1408.   wizqWaitQueue 1
  1409.  
  1410.   # Block 7
  1411.   wizqQueue 1 {
  1412.     chainEvent { oz'track::stop $::music_track }
  1413.     chainEvent { delay 1000 }
  1414.     ozqSound::NewFX  "/sound/sfx/dollGrab.ogg"
  1415.     chainEvent { setCrossfadeCamera "dollCloseUpEmpty" }
  1416.   }
  1417.  
  1418.   wizqTalkOpen
  1419.   wizqTalkSay Zak $::lng::zakDiscoveryZ4   "sound/vo/$::LNG/scenes/garden/zakDiscoveryZ4.ogg"
  1420.   wizqTalkSay Zak $::lng::zakDiscoveryZ5   "sound/vo/$::LNG/scenes/garden/zakDiscoveryZ5.ogg"
  1421.   wizqTalkClose
  1422.  
  1423.   # Wait for Block 7
  1424.   wizqWaitQueue 1
  1425.  
  1426.   chainEvent { standardFadeout }
  1427.   chainEvent {wizEntityShow Lydia}
  1428.   chainEvent {wizEntityShow Zak}
  1429.   ozSet "itemDoll" "pickedUp"
  1430.   oz'event {SetModelLydia}
  1431.  
  1432.   callEvent vision.firstVisionTeleport
  1433. }
  1434.  
  1435.  
  1436. ## ===================================================== ##
  1437. ##   Nothing to Plant Alone                              ##
  1438. ## ===================================================== ##
  1439.  
  1440. event "nothingToPlantAlone" {
  1441.  
  1442.   # Block 1
  1443.   wizqQueue 1 {
  1444.     chainEvent { delay 100 }
  1445.     wizqEntityChangeCycle Lydia crouchCycleNormal standToCrouch "wait"
  1446.   }
  1447.  
  1448.   wizqTalkOpen
  1449.   wizqTalkSay Lydia $::lng::nothingToPlantAloneL1   "sound/vo/$::LNG/scenes/garden/nothingToPlantAloneL1.ogg"
  1450.   wizqTalkClose
  1451.  
  1452.   # Wait for Block 1
  1453.   wizqWaitQueue 1
  1454.  
  1455.   wizqEntityChangeCycle Lydia standCycleNormal crouchToStand "wait"
  1456.     
  1457.   chainEvent {
  1458.     unfreezePlayer
  1459.     wizEnableMouse
  1460.     wizEntityResumeFollow Zak
  1461.   }
  1462. }
  1463.  
  1464.  
  1465. ## ===================================================== ##
  1466. ##   Nothing to Plant                                    ##
  1467. ## ===================================================== ##
  1468.  
  1469. event "nothingToPlantZak" {
  1470.   # Block 1
  1471.   wizqQueue 1 {
  1472.     chainEvent { delay 500 }
  1473.     chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  1474.     chainEvent { delay 500 }
  1475.     wizqEntityAction Lydia standWhat "wait"
  1476.   }
  1477.  
  1478.   # Block 1-B
  1479.   wizqQueue 2 {
  1480.     chainEvent { delay 1000 }
  1481.     chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  1482.   }
  1483.  
  1484.   wizqTalkOpen
  1485.   wizqTalkSay Lydia $::lng::nothingToPlantZakL1   "sound/vo/$::LNG/scenes/garden/nothingToPlantZakL1.ogg"
  1486.  
  1487.   # Wait for Block 1
  1488.   wizqWaitQueue 1
  1489.   wizqWaitQueue 2
  1490.  
  1491.   # Block 2
  1492.   wizqQueue 1 {
  1493.     chainEvent { delay 500 }
  1494.     wizqEntityAction Zak standYes "wait"
  1495.   }
  1496.  
  1497.   wizqTalkSay Zak $::lng::nothingToPlantZakZ1   "sound/vo/$::LNG/scenes/garden/nothingToPlantZakZ1.ogg"
  1498.   wizqTalkClose
  1499.  
  1500.   # Wait for Block 2
  1501.   wizqWaitQueue 1
  1502.   
  1503.   chainEvent { ozSet "plantGrowingProcess" "initiated" }
  1504.  
  1505.   if { [getVar "howDoYouKnow"] == "" } {
  1506.     callEvent "howDoYouKnow"
  1507.   }
  1508.  
  1509.   chainEvent {
  1510.     unfreezePlayer
  1511.     wizEnableMouse
  1512.     wizEntityResumeFollow Zak
  1513.   }
  1514. }
  1515.  
  1516.  
  1517. ## ===================================================== ##
  1518. ##   Nigilis Bean not needed                             ##
  1519. ## ===================================================== ##
  1520.  
  1521. event "nigilisBeanNotNeeded" {
  1522.   # Block 1
  1523.   wizqQueue 1 {
  1524.     chainEvent { delay 500 }
  1525.     chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  1526.   }
  1527.  
  1528.   # Block 1-B
  1529.   wizqQueue 2 {
  1530.     chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  1531.     chainEvent { delay 1000 }
  1532.     wizqEntityAction Zak standYes "wait"
  1533.   }
  1534.  
  1535.   wizqTalkOpen
  1536.   wizqTalkSay Zak $::lng::nigilisBeanNotNeededZ1   "sound/vo/$::LNG/scenes/garden/nigilisBeanNotNeededZ1.ogg"
  1537.  
  1538.   # Wait for Block 1 & 1-B
  1539.   wizqWaitQueue 1
  1540.   wizqWaitQueue 2
  1541.  
  1542.   # Block 2
  1543.   wizqQueue 1 {
  1544.     wizqEntityAction Lydia standNo "wait"
  1545.     wizqEntityAction Lydia standTalkHandHip "wait"
  1546.     chainEvent { delay 1000 }
  1547.     wizqEntityAction Lydia standTalkTwoHands "wait"
  1548.   }
  1549.  
  1550.   wizqTalkSay Lydia $::lng::nigilisBeanNotNeededL1   "sound/vo/$::LNG/scenes/garden/nigilisBeanNotNeededL1.ogg"
  1551.   wizqTalkSay Lydia $::lng::nigilisBeanNotNeededL2   "sound/vo/$::LNG/scenes/garden/nigilisBeanNotNeededL2.ogg"
  1552.  
  1553.   # Wait for Block 2
  1554.   wizqWaitQueue 1
  1555.  
  1556.   # Block 3
  1557.   wizqQueue 1 {
  1558.     wizqEntityAction Zak standTurnRightHoldShort "wait"
  1559.   }
  1560.   
  1561.   wizqTalkSay Zak $::lng::nigilisBeanNotNeededZ2   "sound/vo/$::LNG/scenes/garden/nigilisBeanNotNeededZ2.ogg"
  1562.  
  1563.   if { [getVar "plantGrowingProcess"] == "" } {
  1564.     ozSet "plantGrowingProcess" "initiated"
  1565.     
  1566.     # Block 3
  1567.     wizqQueue 2 {
  1568.       chainEvent { delay 500 }
  1569.       wizqEntityAction Lydia standHandOnChin "wait"
  1570.     }
  1571.  
  1572.     wizqTalkSay Zak $::lng::nigilisBeanNotNeededZ3   "sound/vo/$::LNG/scenes/garden/nigilisBeanNotNeededZ3.ogg"
  1573.   }
  1574.  
  1575.   wizqTalkClose
  1576.  
  1577.   # Wait for Block 3 & 3-B
  1578.   wizqWaitQueue 1
  1579.   wizqWaitQueue 2
  1580.  
  1581.   if { [getVar "howDoYouKnow"] == "" } {
  1582.     callEvent "howDoYouKnow"
  1583.   }
  1584.  
  1585.   chainEvent {
  1586.     unfreezePlayer
  1587.     wizEnableMouse
  1588.     wizEntityResumeFollow Zak
  1589.   }
  1590. }
  1591.  
  1592.  
  1593. ## ===================================================== ##
  1594. ##   Planting the Bean                                   ##
  1595. ## ===================================================== ##
  1596.  
  1597. event "plantingTheBean" {
  1598.   ozSet "puzzleNigilisBean" "complete"
  1599.   ozSet "itemNigilisBean" "planted"
  1600.   ozSet "garden.useNigilisBean" "false"
  1601.  
  1602.   if { [ozGet "potionMaking"] == "initiated" || [ozGet "potionMaking"] == "needed" } {
  1603.     # Block 1
  1604.     wizqQueue 1 {
  1605.       chainEvent { delay 500 }
  1606.       chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  1607.     }
  1608.  
  1609.     # Block 1-B
  1610.     wizqQueue 2 {
  1611.       chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  1612.       chainEvent { delay 500 }
  1613.       wizqEntityAction Zak standYes "wait"
  1614.     }
  1615.   
  1616.     wizqTalkOpen
  1617.     wizqTalkSay Zak $::lng::plantingTheBeanZ1   "sound/vo/$::LNG/scenes/garden/plantingTheBeanZ1.ogg"
  1618.  
  1619.     # Wait for Block 1 & 1-B
  1620.     wizqWaitQueue 1
  1621.     wizqWaitQueue 2
  1622.  
  1623.   } else {
  1624.     # Block 1
  1625.     wizqQueue 1 {
  1626.       chainEvent { delay 500 }
  1627.       chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  1628.     }
  1629.  
  1630.     # Block 1-B
  1631.     wizqQueue 2 {
  1632.       chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  1633.       chainEvent { delay 500 }
  1634.       wizqEntityAction Lydia standTalkTwoHands "wait"
  1635.       wizqEntityAction Lydia standYes "wait"
  1636.     }
  1637.  
  1638.     wizqTalkOpen
  1639.     wizqTalkSay Lydia $::lng::plantingTheBeanL1   "sound/vo/$::LNG/scenes/garden/plantingTheBeanL1.ogg"
  1640.  
  1641.     # Wait for Block 2 & 2-B
  1642.     wizqWaitQueue 1
  1643.     wizqWaitQueue 2
  1644.  
  1645.     # Block 3
  1646.     wizqQueue 1 {
  1647.       chainEvent { delay 1000 }
  1648.       wizqEntityAction Zak standYes "wait"
  1649.     }
  1650.     
  1651.     wizqTalkSay Zak $::lng::plantingTheBeanZ2   "sound/vo/$::LNG/scenes/garden/plantingTheBeanZ2.ogg"
  1652.  
  1653.     # Block 3-B
  1654.     wizqQueue 2 {
  1655.       wizqEntityAction Lydia standWhat "wait"
  1656.     }
  1657.     
  1658.     wizqTalkSay Lydia $::lng::plantingTheBeanL2   "sound/vo/$::LNG/scenes/garden/plantingTheBeanL2.ogg"
  1659.  
  1660.     # Wait for Block 3 & 3-B
  1661.     wizqWaitQueue 1
  1662.     wizqWaitQueue 2
  1663.  
  1664.     # Block 4
  1665.     wizqQueue 1 {
  1666.       chainEvent { delay 1500 }
  1667.       wizqEntityAction Zak standConfusedRight "wait"
  1668.     }
  1669.     
  1670.     wizqTalkSay Zak $::lng::plantingTheBeanZ3   "sound/vo/$::LNG/scenes/garden/plantingTheBeanZ3.ogg"
  1671.  
  1672.     # Wait for Block 4
  1673.     wizqWaitQueue 1
  1674.   }
  1675.  
  1676.   # Block 5
  1677.   wizqQueue 1 {
  1678.     wizqEntitySetOrientationTarget Zak Lydia
  1679.   }
  1680.   
  1681.   # Block 5-B
  1682.   wizqQueue 2 {
  1683.     wizqEntityAction Lydia standHandOnChin "wait"
  1684.     wizqEntityWalk Lydia "195 70.7 153" "wait"
  1685.     chainEvent { wizEntityLookAt Lydia "206.6 70.7 172.1" }
  1686.     wizqEntityChangeCycle Lydia crouchCycleNormal standToCrouch "wait"
  1687.     Play3DSound characters/lydia/crouchPlant
  1688.     wizqEntityAction Lydia crouchPlant "wait"
  1689.   }
  1690.  
  1691.   wizqTalkSay Zak $::lng::plantingTheBeanZ4   "sound/vo/$::LNG/scenes/garden/plantingTheBeanZ4.ogg"
  1692.   wizqTalkSay Lydia $::lng::plantingTheBeanL3   "sound/vo/$::LNG/scenes/garden/plantingTheBeanL3.ogg"
  1693.   wizqTalkClose
  1694.   
  1695.   # Wait for Block 5 & 5-B
  1696.   wizqWaitQueue 1
  1697.   wizqWaitQueue 2
  1698.   wizqEntitySetOrientationTarget Zak None
  1699.  
  1700.   # Block 6
  1701.   wizqQueue 1 {
  1702.     chainEvent { delay 100 }
  1703.     wizqEntityChangeCycle Lydia standCycleNormal crouchToStand "wait"
  1704.     chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  1705.   }
  1706.  
  1707.   wizqTalkOpen
  1708.   wizqTalkSay Lydia $::lng::plantingTheBeanL4   "sound/vo/$::LNG/scenes/garden/plantingTheBeanL4.ogg"
  1709.  
  1710.   # Wait for Block 6
  1711.   wizqWaitQueue 1
  1712.  
  1713.   if { [getVar "puzzleWaterLevel" ] == "complete" && [getVar "puzzleLightRune" ] == "complete" } {
  1714.     wizqTalkClose
  1715.     
  1716.     # Block 7
  1717.     wizqQueue 1 {
  1718.       wizqEntitySetOrientationTarget Zak Lydia
  1719.     }
  1720.  
  1721.     # Block 7-B
  1722.     wizqQueue 2 {
  1723.       wizqEntityWalk Lydia "190.6 70.7 147.9" "wait"
  1724.     }
  1725.  
  1726.     # Wait for Block 7 & 7-B
  1727.     wizqWaitQueue 1
  1728.     wizqWaitQueue 2
  1729.     wizqEntitySetOrientationTarget Zak None
  1730.  
  1731.     wizqTalkClose
  1732.     chainCallEvent "magicalFormula"
  1733.     
  1734.     return
  1735.  
  1736.   } elseif { [getVar "puzzleLightRune"] == "complete" || [getVar "puzzleWaterLevel"] == "complete"} {
  1737.     # Block 8
  1738.     wizqQueue 1 {
  1739.       chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  1740.       chainEvent { delay 500 }
  1741.       wizqEntityAction Zak standLoseHope "wait"
  1742.     }
  1743.  
  1744.     wizqTalkSay Zak $::lng::plantingTheBeanZ5   "sound/vo/$::LNG/scenes/garden/plantingTheBeanZ5.ogg"
  1745.  
  1746.     # Block 8-B
  1747.     wizqQueue 2 {
  1748.       wizqEntityAction Lydia standTalkTwoHands "wait"
  1749.     }
  1750.     
  1751.     wizqTalkSay Lydia $::lng::plantingTheBeanL5   "sound/vo/$::LNG/scenes/garden/plantingTheBeanL5.ogg"
  1752.  
  1753.   } else {
  1754.     # Block 8
  1755.     wizqQueue 1 {
  1756.       chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  1757.       chainEvent { delay 500 }
  1758.       wizqEntityAction Zak standLoseHope "wait"
  1759.     }
  1760.  
  1761.     wizqTalkSay Zak $::lng::plantingTheBeanZ5   "sound/vo/$::LNG/scenes/garden/plantingTheBeanZ5.ogg"
  1762.  
  1763.     # Block 8-B
  1764.     wizqQueue 2 {
  1765.       wizqEntityAction Lydia standTalkTwoHands "wait"
  1766.     }
  1767.     wizqTalkSay Lydia $::lng::plantingTheBeanL6   "sound/vo/$::LNG/scenes/garden/plantingTheBeanL6.ogg"
  1768.   }
  1769.   
  1770.   wizqTalkClose
  1771.  
  1772.   # Wait for Block 8 & 8-B
  1773.   wizqWaitQueue 1
  1774.   wizqWaitQueue 2
  1775.  
  1776.   # Block 9
  1777.   wizqQueue 1 {
  1778.     wizqEntitySetOrientationTarget Zak Lydia
  1779.   }
  1780.  
  1781.   # Block 9-B
  1782.   wizqQueue 2 {
  1783.     wizqEntityWalk Lydia "190.6 70.7 147.9" "wait"
  1784.   }
  1785.  
  1786.   # Wait for Block 9 & 9-B
  1787.   wizqWaitQueue 1
  1788.   wizqWaitQueue 2
  1789.   wizqEntitySetOrientationTarget Zak None
  1790.  
  1791.   chainEvent {
  1792.     unfreezePlayer
  1793.     wizEnableMouse
  1794.     wizEntityResumeFollow Zak
  1795.   }
  1796. }
  1797.  
  1798.  
  1799. ## ===================================================== ##
  1800. ##   Light Rune puzzle                                   ##
  1801. ## ===================================================== ##
  1802.  
  1803. event "puzzleLightRuneTryZak" {
  1804.   checkConversation "puzzleLightRuneTryZak" {
  1805.  
  1806.     # Block 1
  1807.     wizqQueue 1 {
  1808.       chainEvent { delay 1000 }
  1809.       chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  1810.     }
  1811.  
  1812.     # Block 1-B
  1813.     wizqQueue 2 {
  1814.       chainEvent { delay 500 }
  1815.       chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  1816.       chainEvent { delay 1000 }
  1817.       wizqEntityAction Zak standConfusedLeft "wait"
  1818.     }
  1819.     
  1820.     wizqTalkOpen
  1821.     wizqTalkSay Zak $::lng::puzzleLightRuneTryZ1   "sound/vo/$::LNG/scenes/garden/puzzleLightRuneTryZ1.ogg"
  1822.  
  1823.     # Wait for Block 1
  1824.     wizqWaitQueue 1
  1825.  
  1826.     # Block 2
  1827.     wizqQueue 1 {
  1828.       wizqEntityAction Lydia standTalkTwoHands "wait"
  1829.       wizqEntityAction Lydia standYes "wait"
  1830.     }
  1831.  
  1832.     wizqTalkSay Lydia $::lng::puzzleLightRuneTryL1   "sound/vo/$::LNG/scenes/garden/puzzleLightRuneTryL1.ogg"
  1833.     wizqTalkClose
  1834.  
  1835.     # Wait for Block 2 & 1-B
  1836.     wizqWaitQueue 1
  1837.     wizqWaitQueue 2
  1838.     
  1839.     wizqEntityOrientation Zak 220
  1840.     wizqEntityOrientation Lydia 270 "wait"
  1841.  
  1842.     chainCallEvent "puzzleSlidersZoomIn"
  1843.   }
  1844. }
  1845.  
  1846.  
  1847. ## ===================================================== ##
  1848. ##   Light Rune puzzle                                   ##
  1849. ## ===================================================== ##
  1850.  
  1851. event "puzzleLightRuneTryAlone" {
  1852.   checkConversation "puzzleLightRuneTryAlone" {
  1853.     # Block 1
  1854.     wizqQueue 1 {
  1855.       wizqEntityAction Lydia standHandOnChin "wait"
  1856.     }
  1857.  
  1858.     wizqTalkOpen
  1859.     wizqTalkSay Lydia $::lng::puzzleLightRuneTryAloneL1   "sound/vo/$::LNG/scenes/garden/puzzleLightRuneTryAloneL1.ogg"
  1860.     wizqTalkClose
  1861.  
  1862.     # Wait for Block 2
  1863.     wizqWaitQueue 1
  1864.  
  1865.     chainCallEvent "puzzleSlidersZoomIn"
  1866.   }
  1867. }
  1868.  
  1869.  
  1870. ## ===================================================== ##
  1871. ##   Light Breath Alone                                  ##
  1872. ## ===================================================== ##
  1873.  
  1874. event "lightBreathAlone" {
  1875.   chainEvent {
  1876.     freezePlayer
  1877.     wizDisableMouse
  1878.   }
  1879.  
  1880.     chainEvent {
  1881.       wizEntityShow Lydia
  1882.       standardFadein
  1883.       delay 0
  1884.   }
  1885.  
  1886.   # Block 1
  1887.   wizqQueue 1 {
  1888.     chainEvent { wizEntityLookAt Lydia "211.7 89.1 264.2" }
  1889.     chainEvent { delay 1000 }
  1890.     wizqEntityAction Lydia standTalkTwoHands "wait"
  1891.     wizqEntityAction Lydia standHandOnChin "wait"
  1892.   }
  1893.  
  1894.   wizqTalkOpen
  1895.   wizqTalkSay Lydia $::lng::lightBreathAloneL1   "sound/vo/$::LNG/scenes/garden/lightBreathAloneL1.ogg"
  1896.   wizqTalkSay Lydia $::lng::lightBreathAloneL2   "sound/vo/$::LNG/scenes/garden/lightBreathAloneL2.ogg"
  1897.   wizqTalkClose
  1898.  
  1899.   # Wait for Block 1
  1900.   wizqWaitQueue 1
  1901.  
  1902.   wizqConvRemove "clues"
  1903.   
  1904.   chainEvent {
  1905.     unfreezePlayer
  1906.     wizEnableMouse
  1907.   }
  1908. }
  1909.  
  1910.  
  1911. ## ===================================================== ##
  1912. ##   Light Breath Zak needed                             ##
  1913. ## ===================================================== ##
  1914.  
  1915. event "lightBreathZakNeeded" {
  1916.   chainEvent {
  1917.     freezePlayer
  1918.     wizDisableMouse
  1919.     wizEntityStopFollow Zak
  1920.   }
  1921.  
  1922.   chainEvent {
  1923.     wizhCameraChange
  1924.     wizEntitySetPosition Zak "212.5 89.1 254.7"
  1925.     wizEntityShow Zak
  1926.     wizEntityShow Lydia
  1927.     standardFadein
  1928.     delay 0
  1929.   }
  1930.  
  1931.   # Block 1
  1932.   wizqQueue 1 {
  1933.     chainEvent { delay 1000 }
  1934.     chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  1935.     chainEvent { delay 500 }
  1936.     wizqEntityAction Lydia standTalkTwoHands "wait"
  1937.     chainEvent { delay 1000 }
  1938.     wizqEntityAction Lydia standHandOnChin "wait"
  1939.   }
  1940.  
  1941.   # Block 1-B
  1942.   wizqQueue 2 {
  1943.     chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  1944.   }
  1945.  
  1946.   wizqTalkOpen
  1947.   wizqTalkSay Lydia $::lng::lightBreathAloneL1   "sound/vo/$::LNG/scenes/garden/lightBreathAloneL1.ogg"
  1948.  
  1949.   # Wait for Block 1-B
  1950.   wizqWaitQueue 2
  1951.  
  1952.   # Block 2-B
  1953.   wizqQueue 2 {
  1954.     chainEvent { delay 3500 }
  1955.     wizqEntityAction Zak standNo "wait"
  1956.   }
  1957.   
  1958.   wizqTalkSay Zak $::lng::lightBreathMissingSomethingZ1   "sound/vo/$::LNG/scenes/garden/lightBreathMissingSomethingZ1.ogg"
  1959.  
  1960.   # Wait for Block 1 & 2-B
  1961.   wizqWaitQueue 1
  1962.   wizqWaitQueue 2
  1963.  
  1964.    if { [getVar "puzzleNigilisBean"] == "complete" || [getVar "puzzleWaterLevel"] == "complete" } {
  1965.     # Block 2
  1966.     wizqQueue 1 {
  1967.       wizqEntityAction Lydia standTalkTwoHands "wait"
  1968.     }
  1969.     wizqTalkSay Lydia $::lng::plantingTheBeanL5   "sound/vo/$::LNG/scenes/garden/plantingTheBeanL5.ogg"
  1970.  
  1971.   } else {
  1972.     # Block 2
  1973.     wizqQueue 1 {
  1974.       wizqEntityAction Lydia standTalkTwoHands "wait"
  1975.     }
  1976.     wizqTalkSay Lydia $::lng::plantingTheBeanL6   "sound/vo/$::LNG/scenes/garden/plantingTheBeanL6.ogg"
  1977.   }
  1978.   wizqTalkClose
  1979.  
  1980.   # Wait for Block 2
  1981.   wizqWaitQueue 1
  1982.  
  1983.   wizqConvRemove "clues"
  1984.   
  1985.   chainEvent {
  1986.     unfreezePlayer
  1987.     wizEnableMouse
  1988.     wizEntityResumeFollow Zak
  1989.   }
  1990. }
  1991.  
  1992.  
  1993. ## ===================================================== ##
  1994. ##   Light Breath Zak Not Needed                         ##
  1995. ## ===================================================== ##
  1996.  
  1997. event "lightBreathZakNotNeeded" {
  1998.   chainEvent {
  1999.     freezePlayer
  2000.     wizDisableMouse
  2001.     wizEntityStopFollow Zak
  2002.   }
  2003.  
  2004.   chainEvent {
  2005.     wizEntitySetPosition Zak "212.5 89.1 254.7"
  2006.     wizEntityShow Zak
  2007.     wizEntityShow Lydia
  2008.     standardFadein
  2009.     delay 0
  2010.   }
  2011.  
  2012.   # Block 1
  2013.   wizqQueue 1 {
  2014.     chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  2015.     chainEvent { delay 500 }
  2016.     wizqEntityAction Lydia standTalkTwoHands "wait"
  2017.   }
  2018.  
  2019.   # Block 1-B
  2020.   wizqQueue 2 {
  2021.     chainEvent { delay 500 }
  2022.     chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  2023.   }
  2024.  
  2025.   wizqTalkOpen
  2026.   wizqTalkSay Lydia $::lng::lightBreathAloneL1   "sound/vo/$::LNG/scenes/garden/lightBreathAloneL1.ogg"
  2027.  
  2028.   # Wait for Block 1 & 1-B
  2029.   wizqWaitQueue 1
  2030.   wizqWaitQueue 2
  2031.   
  2032.   if { [getVar "plantGrowingProcess"] == "" } {
  2033.     ozSet "plantGrowingProcess" "initiated"
  2034.  
  2035.     # Block 2
  2036.     wizqQueue 1 {
  2037.       chainEvent { delay 1500 }
  2038.       wizqEntityAction Lydia standHandOnChin "wait"
  2039.     }
  2040.   
  2041.     wizqTalkSay Lydia $::lng::lightBreathZakNotNeededL1   "sound/vo/$::LNG/scenes/garden/lightBreathZakNotNeededL1.ogg"
  2042.     wizqTalkSay Zak $::lng::lightBreathZakNotNeededZ1   "sound/vo/$::LNG/scenes/garden/lightBreathZakNotNeededZ1.ogg"
  2043.   }
  2044.   wizqTalkClose
  2045.  
  2046.   # Wait for Block 2
  2047.   wizqWaitQueue 1
  2048.  
  2049.   if { [getVar "howDoYouKnow"] == "" } {
  2050.     callEvent "howDoYouKnow"
  2051.   }
  2052.  
  2053.   chainEvent {
  2054.     unfreezePlayer
  2055.     wizEnableMouse
  2056.     wizEntityResumeFollow Zak
  2057.   }
  2058. }
  2059.  
  2060.  
  2061. ## ===================================================== ##
  2062. ##   Water Needed Not Now                                ##
  2063. ## ===================================================== ##
  2064.  
  2065. event "waterNeededNotNow" {
  2066.   chainEvent {
  2067.     freezePlayer
  2068.     wizDisableMouse
  2069.     wizEntityStopFollow Zak
  2070.   }
  2071.  
  2072.   # Block 1
  2073.   wizqQueue 1 {
  2074.     chainEvent { delay 500 }
  2075.     chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  2076.     chainEvent { delay 500 }
  2077.     wizqEntityAction Lydia standTalkTwoHands "wait"
  2078.   }
  2079.  
  2080.   # Block 1-B
  2081.   wizqQueue 2 {
  2082.     chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  2083.   }
  2084.  
  2085.   wizqTalkOpen
  2086.   wizqTalkSay Lydia $::lng::waterNeededNotNowL1   "sound/vo/$::LNG/scenes/garden/waterNeededNotNowL1.ogg"
  2087.  
  2088.   # Wait for Block 1 & 1-B
  2089.   wizqWaitQueue 1
  2090.   wizqWaitQueue 2
  2091.  
  2092.   # Block 2
  2093.   wizqQueue 1 {
  2094.     wizqEntityAction Lydia standYes "wait"
  2095.     wizqEntityAction Lydia standTalkTwoHands
  2096.   }
  2097.   
  2098.   wizqTalkSay Lydia $::lng::waterNeededNotNowL2   "sound/vo/$::LNG/scenes/garden/waterNeededNotNowL2.ogg"
  2099.  
  2100.   # Wait for Block 2
  2101.   wizqWaitQueue 1
  2102.  
  2103.   if { [getVar "puzzleNigilisBean" ] == "complete" && [getVar "puzzleLightRune" ] == "complete" } {
  2104.     wizqTalkClose
  2105.     ozSet "safeDistanceTree" "complete"
  2106.     callEvent "magicalFormula"
  2107.     return
  2108.   }
  2109.   
  2110.   if { [getVar "puzzleLightRune"] == "complete" || [getVar "puzzleNigilisBean"] == "complete" } {
  2111.     # Block 3
  2112.     wizqQueue 1 {
  2113.       wizqEntityAction Lydia standTalkTwoHands "wait"
  2114.     }
  2115.     wizqTalkSay Lydia $::lng::plantingTheBeanL5   "sound/vo/$::LNG/scenes/garden/plantingTheBeanL5.ogg"
  2116.  
  2117.   } else {
  2118.     # Block 3
  2119.     wizqQueue 1 {
  2120.     wizqEntityAction Lydia standTalkTwoHands "wait"
  2121.     }
  2122.     wizqTalkSay Lydia $::lng::plantingTheBeanL6   "sound/vo/$::LNG/scenes/garden/plantingTheBeanL6.ogg"
  2123.   }
  2124.  
  2125.   wizqTalkClose
  2126.  
  2127.   # Wait for Block 3
  2128.   wizqWaitQueue 1
  2129.     
  2130.   chainEvent {
  2131.     unfreezePlayer
  2132.     wizEnableMouse
  2133.     wizEntityResumeFollow Zak
  2134.   }
  2135. }
  2136.  
  2137.  
  2138. ## ===================================================== ##
  2139. ##   Water Not Needed                                    ##
  2140. ## ===================================================== ##
  2141.  
  2142. event "waterNotNeeded" {
  2143.   chainEvent {
  2144.     freezePlayer
  2145.     wizDisableMouse
  2146.     wizEntityStopFollow Zak
  2147.   }
  2148.  
  2149.   chainEvent {
  2150.     wizEntitySetPosition Zak "179.6 70.4 213.9"
  2151.   }
  2152.  
  2153.   # Block 1
  2154.   wizqQueue 1 {
  2155.     chainEvent { delay 500 }
  2156.     chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  2157.     wizqEntityAction Lydia standWhat "wait"
  2158.   }
  2159.  
  2160.   # Block 1-B
  2161.   wizqQueue 2 {
  2162.     chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  2163.   }
  2164.   
  2165.   wizqTalkOpen
  2166.   wizqTalkSay Lydia $::lng::waterNotNeededL1   "sound/vo/$::LNG/scenes/garden/waterNotNeededL1.ogg"
  2167.   wizqTalkClose
  2168.  
  2169.   # Wait for Block 1 & 1-B
  2170.   wizqWaitQueue 1
  2171.   wizqWaitQueue 2
  2172.   
  2173.   chainEvent {
  2174.     unfreezePlayer
  2175.     wizEnableMouse
  2176.     wizEntityResumeFollow Zak
  2177.   }
  2178. }
  2179.  
  2180.  
  2181. ## ===================================================== ##
  2182. ##   Nigilis Tree Grown                                  ##
  2183. ## ===================================================== ##
  2184.  
  2185. event "nigilisTree" {
  2186.   # Block 1
  2187.   wizqQueue 1 {
  2188.     chainEvent { delay 1000 }
  2189.     chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  2190.   }
  2191.  
  2192.   # Block 1-B
  2193.   wizqQueue 2 {
  2194.     chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  2195.   }
  2196.  
  2197.   wizqTalkOpen
  2198.   wizqTalkSay Zak $::lng::nigilisTreeZ1   "sound/vo/$::LNG/scenes/garden/nigilisTreeZ1.ogg"
  2199.  
  2200.   # Wait for Block 1 & 1-B
  2201.   wizqWaitQueue 1
  2202.   wizqWaitQueue 2
  2203.  
  2204.   # Block 2
  2205.   wizqQueue 1 {
  2206.     Play3DSound "characters/Lydia/standHappy"
  2207.     wizqEntityAction Lydia standHappy "wait"
  2208.   }
  2209.  
  2210.   wizqTalkSay Lydia $::lng::nigilisTreeL1   "sound/vo/$::LNG/scenes/garden/nigilisTreeL1.ogg"
  2211.  
  2212.   # Wait for Block 2
  2213.   wizqWaitQueue 1
  2214.  
  2215.   # Block 3
  2216.   wizqQueue 1 {
  2217.     wizqEntityRun Lydia "173.6 70.7 158.9" "wait"
  2218.     chainEvent { wizEntityLookAt Lydia "208 70.7 160.2" }
  2219.     wizqEntityAction Lydia standLookUp "wait"
  2220.   }
  2221.  
  2222.   # Block 3-B
  2223.   wizqQueue 2 {
  2224.     wizqEntityRun Zak "179 70.7 150.2" "wait"
  2225.     chainEvent { wizEntityLookAt Zak "208 70.7 160.2" }
  2226.     chainEvent { delay 2000 }
  2227.     wizqEntityAction Zak standLookUp "wait"
  2228.   }
  2229.  
  2230.   if { [ozGet "potionMaking"] == "initiated" || [ozGet "potionMaking"] == "needed" } {
  2231.     wizqTalkSay Zak $::lng::nigilisTreeZ2   "sound/vo/$::LNG/scenes/garden/nigilisTreeZ2.ogg"
  2232.     
  2233.   } else {
  2234.     wizqTalkSay Lydia $::lng::nigilisTreeL3   "sound/vo/$::LNG/scenes/garden/nigilisTreeL3.ogg"
  2235.   }
  2236.   
  2237.   wizqTalkClose
  2238.  
  2239.   # Wait for Block 3 & 3-B
  2240.   wizqWaitQueue 1
  2241.   wizqWaitQueue 2
  2242.  
  2243.   wizqTalkOpen
  2244.   if { [ozGet "potionMaking"] == "initiated" || [ozGet "potionMaking"] == "needed" } {
  2245.     # Block 4
  2246.     wizqQueue 1 {
  2247.       chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  2248.       chainEvent { delay 1000 }
  2249.       wizqEntityAction Lydia standNo "wait"
  2250.     }
  2251.  
  2252.     # Block 4-B
  2253.     wizqQueue 2 {
  2254.       chainEvent { delay 500 }
  2255.       chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  2256.     }
  2257.  
  2258.     wizqTalkSay Lydia $::lng::nigilisTreeL2   "sound/vo/$::LNG/scenes/garden/nigilisTreeL2.ogg"
  2259.     
  2260.   } else {
  2261.     # Block 4
  2262.     wizqQueue 1 {
  2263.       chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  2264.       chainEvent { delay 500 }
  2265.       wizqEntityAction Lydia standWhat "wait"
  2266.     }
  2267.  
  2268.     # Block 4-B
  2269.     wizqQueue 2 {
  2270.       chainEvent { delay 500 }
  2271.       chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  2272.     }
  2273.  
  2274.     wizqTalkSay Lydia $::lng::nigilisTreeL4   "sound/vo/$::LNG/scenes/garden/nigilisTreeL4.ogg"
  2275.   }
  2276.  
  2277.   # Wait for Block 4 & 4-B
  2278.   wizqWaitQueue 1
  2279.   wizqWaitQueue 2
  2280.  
  2281.   # Block 5
  2282.   wizqQueue 1 {
  2283.     wizqEntityWalk Zak "188 70.7 140.9" "wait"
  2284.     chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  2285.   }
  2286.  
  2287.   # Block 5-B
  2288.   wizqQueue 2 {
  2289.     wizqEntitySetOrientationTarget Lydia Zak
  2290.   }
  2291.   
  2292.   wizqTalkSay Zak $::lng::nigilisTreeZ3   "sound/vo/$::LNG/scenes/garden/nigilisTreeZ3.ogg"
  2293.  
  2294.   # Wait for Block 5 & 5-B
  2295.   wizqWaitQueue 1
  2296.   wizqWaitQueue 2
  2297.   wizqEntitySetOrientationTarget Lydia None
  2298.  
  2299.   # Block 6
  2300.   wizqQueue 1 {
  2301.     wizqEntityAction Zak standYes
  2302.   }
  2303.   
  2304.   wizqTalkSay Zak $::lng::nigilisTreeZ4   "sound/vo/$::LNG/scenes/garden/nigilisTreeZ4.ogg"
  2305.  
  2306.   # Wait for Block 6
  2307.   wizqWaitQueue 1
  2308.   
  2309.   # Block 6
  2310.   wizqQueue 1 {
  2311.     wizqEntityWalk Lydia "172.6 77.2 190.9" "wait"
  2312.     chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  2313.   }
  2314.  
  2315.   # Block 6-B
  2316.   wizqQueue 2 {
  2317.     chainEvent { delay 5000 }
  2318.     wizqEntityWalk Zak "173.7 77.2 179.7" "wait"
  2319.     chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  2320.   }
  2321.  
  2322.   if { [ozGet "potionMaking"] == "initiated" || [ozGet "potionMaking"] == "needed" } {
  2323.     wizqTalkSay Lydia $::lng::nigilisTreeL5   "sound/vo/$::LNG/scenes/garden/nigilisTreeL5.ogg"
  2324.     wizqTalkSay Zak $::lng::nigilisTreeZ5   "sound/vo/$::LNG/scenes/garden/nigilisTreeZ5.ogg"
  2325.  
  2326.     # Wait for Block 6 & 6-B
  2327.     wizqWaitQueue 1
  2328.     wizqWaitQueue 2
  2329.  
  2330.     # Block 7
  2331.     wizqQueue 1 {
  2332.       chainEvent { delay 500 }
  2333.       wizqEntityAction Zak standYes "wait"
  2334.     }
  2335.   
  2336.     wizqTalkSay Zak $::lng::nigilisTreeZ6   "sound/vo/$::LNG/scenes/garden/nigilisTreeZ6.ogg"
  2337.  
  2338.     # Wait for Block 7
  2339.     wizqWaitQueue 1
  2340.     
  2341.   } else {
  2342.     wizqTalkSay Lydia $::lng::nigilisTreeL7   "sound/vo/$::LNG/scenes/garden/nigilisTreeL7.ogg"
  2343.     wizqTalkSay Zak $::lng::nigilisTreeZ7   "sound/vo/$::LNG/scenes/garden/nigilisTreeZ7.ogg"
  2344.   }
  2345.  
  2346.   # Block 7
  2347.   wizqQueue 1 {
  2348.     wizqEntityAction Lydia standArmCross "wait"
  2349.   }
  2350.  
  2351.   wizqTalkSay Lydia $::lng::nigilisTreeL6   "sound/vo/$::LNG/scenes/garden/nigilisTreeL6.ogg"
  2352.   wizqTalkClose
  2353.   
  2354.   # Wait for Block 7
  2355.   wizqWaitQueue 1
  2356.  
  2357.   # Block 8
  2358.   wizqQueue 1 {
  2359.     chainEvent { delay 1000 }
  2360.     wizqEntityAction Lydia standNo "wait"
  2361.     chainEvent { wizEntityLookAt Lydia "231.6 70.4 193.1" }
  2362.     chainEvent {
  2363.       setCamera "gargoylesTree"
  2364.       wizhCameraChange
  2365.     }
  2366.   }
  2367.  
  2368.   wizqTalkOpen
  2369.   wizqTalkSay Lydia $::lng::nigilisTreeL8   "sound/vo/$::LNG/scenes/garden/nigilisTreeL8.ogg"
  2370.  
  2371.   # Wait for Block 8
  2372.   wizqWaitQueue 1
  2373.  
  2374.   # Block 9
  2375.   wizqQueue 1 {
  2376.     wizqEntityAction Lydia standPoint "wait"
  2377.   }
  2378.  
  2379.   # Block 9-B
  2380.   wizqQueue 2 {
  2381.     chainEvent { wizEntityLookAt Zak "231.6 70.4 193.1" }
  2382.     wizqEntityAction Zak standLookUp "wait"
  2383.   }
  2384.  
  2385.   wizqTalkSay Lydia $::lng::nigilisTreeL9   "sound/vo/$::LNG/scenes/garden/nigilisTreeL9.ogg"
  2386.   wizqTalkClose
  2387.  
  2388.   # Wait for Block 9 & 9-B
  2389.   wizqWaitQueue 1
  2390.   wizqWaitQueue 2
  2391.  
  2392.   chainEvent {
  2393.     setCamera "smallBridgeTree"
  2394.     wizhCameraChange
  2395.   }
  2396.  
  2397.   chainEvent {
  2398.     #all of this start in event "nigilisTreeMovie"
  2399.     unfreezePlayer
  2400.     wizEnableMouse
  2401.     wizEntityResumeFollow Zak
  2402.     ozSet "zakPresence" ""
  2403.   }
  2404.   oz'event {ozSet noZakFollow 0}
  2405. }
  2406.  
  2407.  
  2408. ## ===================================================== ##
  2409. ##   get Magical Fruit                                   ##
  2410. ## ===================================================== ##
  2411.  
  2412. event "getMagicalFruit" {
  2413.   checkConversation "getMagicalFruit" {
  2414.     chainEvent {
  2415.       wizEntityStopFollow Zak
  2416.       freezePlayer
  2417.       wizDisableMouse
  2418.     }
  2419.     ozSet "itemNigilisFruit" "pickedUp"
  2420.     ozSet "mustavioLooseInSchool" "complete"
  2421.     ozSet "garden.lookMagicalTree" "false"
  2422.  
  2423.     # Block 1
  2424.     wizqQueue 1 {
  2425.       ozqSound::NewFX  "sound/sfx/nigilisFruitPickup.ogg"
  2426.       chainEvent { setCrossfadeCamera "fruitCloseUpTaken" }
  2427.     }
  2428.  
  2429.     wizqTalkOpen
  2430.     wizqTalkSay Lydia $::lng::getMagicalFruitL1   "sound/vo/$::LNG/scenes/garden/getMagicalFruitL1.ogg"
  2431.  
  2432.     # Wait for Block 1
  2433.     wizqWaitQueue 1
  2434.  
  2435.     # Block 2
  2436.     wizqQueue 1 {
  2437.       chainEvent { standardFadeout }
  2438.       chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  2439.       wizqEntitySetCycle Zak sitCycleNormal
  2440.       chainEvent {
  2441.         setCamera "studyBalconyTree"
  2442.         wizhCameraChange
  2443.         wizEntityShow Lydia
  2444.         wizEntityShow Zak
  2445.         hRemoveBack
  2446.         delay 500
  2447.         standardFadein
  2448.       }
  2449.       wizqEntityWalk Lydia "224.6 143.9 151.9" "wait"
  2450.       chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  2451.       wizqEntityAction Lydia standHandOnChin
  2452.     }
  2453.  
  2454.     if { [ozGet "potionMaking"] == "needed" || [ozGet "potionMaking"] == "initiated" } {
  2455.       wizqTalkSay Lydia $::lng::getMagicalFruitL2   "sound/vo/$::LNG/scenes/garden/getMagicalFruitL2.ogg"
  2456.  
  2457.     } else {
  2458.       wizqTalkSay Lydia $::lng::getMagicalFruitL3   "sound/vo/$::LNG/scenes/garden/getMagicalFruitL3.ogg"
  2459.  
  2460.       # Block 2-B
  2461.       wizqQueue 2 {
  2462.         wizqEntityAction Zak sitYes "wait"
  2463.       }
  2464.  
  2465.       wizqTalkSay Zak $::lng::getMagicalFruitZ1   "sound/vo/$::LNG/scenes/garden/getMagicalFruitZ1.ogg"
  2466.     }
  2467.     wizqTalkClose
  2468.  
  2469.     # Wait for Block 2 & 2-B
  2470.     wizqWaitQueue 1
  2471.     wizqWaitQueue 2
  2472.     
  2473.     wizqEntityAction Zak sitDisbelief "wait"
  2474.     wizqEntityAction Lydia standHandOnChin
  2475.     
  2476.     # Block 3
  2477.     wizqQueue 1 {
  2478.       chainEvent { delay 1000 }
  2479.       wizqEntityAction Zak sitLoseHope "wait"
  2480.       chainEvent { delay 1500 }
  2481.       wizqEntityAction Zak sitNo "wait"
  2482.     }
  2483.     
  2484.     wizqTalkOpen
  2485.     wizqTalkSay Zak $::lng::getMagicalFruitZ2   "sound/vo/$::LNG/scenes/garden/getMagicalFruitZ2.ogg"
  2486.  
  2487.     # Wait for Block 3
  2488.     wizqWaitQueue 1
  2489.  
  2490.     # Block 4
  2491.     wizqQueue 1 {
  2492.       wizqEntityAction Lydia standYes "wait"
  2493.       wizqEntityAction Lydia standTalkHandHip "wait"
  2494.       chainEvent { delay 500 }
  2495.       wizqEntityAction Lydia standTalkTwoHands "wait"
  2496.     }
  2497.  
  2498.     # Block 4-B
  2499.     wizqQueue 2 {
  2500.       chainEvent { delay 3000 }
  2501.       wizqEntityChangeCycle Zak standCycleNormal sitToStand "wait"
  2502.     }
  2503.     
  2504.     wizqTalkSay Lydia $::lng::getMagicalFruitL4   "sound/vo/$::LNG/scenes/garden/getMagicalFruitL4.ogg"
  2505.     wizqTalkSay Lydia $::lng::getMagicalFruitL5   "sound/vo/$::LNG/scenes/garden/getMagicalFruitL5.ogg"
  2506.     
  2507.     # Wait for Block 4 & 4-B
  2508.     wizqWaitQueue 1
  2509.     wizqWaitQueue 2
  2510.  
  2511.     # Block 5
  2512.     wizqQueue 1 {
  2513.       wizqEntityAction Zak standYes "wait"
  2514.     }
  2515.  
  2516.     wizqTalkSay Zak $::lng::getMagicalFruitZ3   "sound/vo/$::LNG/scenes/garden/getMagicalFruitZ3.ogg"
  2517.     wizqTalkClose
  2518.  
  2519.     # Wait for Block 5
  2520.     wizqWaitQueue 1
  2521.   }
  2522.  
  2523.   chainEvent {
  2524.     wizEntityResumeFollow Zak
  2525.     unfreezePlayer
  2526.     wizEnableMouse
  2527.   }
  2528.  
  2529.   chainEvent {
  2530.     ozqSound::NewFX  "sound/interface/itemPickUp.ogg"
  2531.     iq'showdesc nigilisFruit
  2532.   }
  2533. }
  2534.  
  2535.  
  2536. ## ===================================================== ##
  2537. ##   Magical Formula                                     ##
  2538. ## ===================================================== ##
  2539.  
  2540. event "magicalFormula" {
  2541.   chainEvent {
  2542.     freezePlayer
  2543.     wizDisableMouse
  2544.     wizEntityStopFollow Zak
  2545.   }
  2546.  
  2547.   chainEvent { wizEntityLookAt Lydia "194.6 70.7 154.8" }
  2548.   chainEvent { delay 500 }
  2549.   chainEvent { wizEntityLookAt Zak "194.6 70.7 154.8" }
  2550.   chainEvent { delay 1000 }
  2551.   wizqEntityAction Lydia standArmCross "wait"
  2552.   chainEvent { delay 1000 }
  2553.  
  2554.   # Block 1
  2555.   wizqQueue 1 {
  2556.     chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  2557.     chainEvent { delay 500 }
  2558.     wizqEntityAction Lydia standTalkTwoHands "wait"
  2559.   }
  2560.  
  2561.   # Block 1-B
  2562.   wizqQueue 2 {
  2563.     chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  2564.   }
  2565.  
  2566.   wizqTalkOpen
  2567.   wizqTalkSay Lydia $::lng::magicalFormulaL1   "sound/vo/$::LNG/scenes/garden/magicalFormulaL1.ogg"
  2568.  
  2569.   # Wait for Block 1
  2570.   wizqWaitQueue 1
  2571.   wizqWaitQueue 2
  2572.  
  2573.   wizqTalkSay Zak $::lng::magicalFormulaZ1   "sound/vo/$::LNG/scenes/garden/magicalFormulaZ1.ogg" fastout
  2574.  
  2575.   # Block 2
  2576.   wizqQueue 1 {
  2577.     wizqEntityAction Lydia standTalkHandHip "wait"
  2578.   }
  2579.  
  2580.   wizqTalkSay Lydia $::lng::magicalFormulaL2   "sound/vo/$::LNG/scenes/garden/magicalFormulaL2.ogg" fastboth
  2581.  
  2582.   # Block 2
  2583.   wizqQueue 1 {
  2584.     chainEvent { delay 1000 }
  2585.     wizqEntityAction Zak standNo "wait"
  2586.   }
  2587.  
  2588.   wizqTalkSay Zak $::lng::magicalFormulaZ2   "sound/vo/$::LNG/scenes/garden/magicalFormulaZ2.ogg" fastin
  2589.  
  2590.   # Wait for Block 2 & 2-B
  2591.   wizqWaitQueue 1
  2592.   wizqWaitQueue 2
  2593.  
  2594.   wizqTalkSay Lydia $::lng::magicalFormulaL3   "sound/vo/$::LNG/scenes/garden/magicalFormulaL3.ogg"
  2595.  
  2596.   oz'event {ozSet noZakFollow 1}
  2597.  
  2598.   if { [ozGet "safeDistanceTree"] == "complete" } {
  2599.     wizqTalkClose
  2600.     wizqEntitySetOrientationTarget Zak Lydia
  2601.     wizqEntityWalk Lydia "208.6 70.4 195.9" "wait"
  2602.     
  2603.     # Block 4
  2604.     wizqQueue 1 {
  2605.       chainEvent { delay 500 }
  2606.       wizqEntityAction Zak Yes "wait"
  2607.     }
  2608.  
  2609.     # Block 4-B
  2610.     wizqQueue 2 {
  2611.       chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  2612.     }
  2613.  
  2614.     wizqTalkOpen
  2615.     wizqTalkSay Zak $::lng::magicalFormulaZ4   "sound/vo/$::LNG/scenes/garden/magicalFormulaZ4.ogg"
  2616.  
  2617.  
  2618.   } else {
  2619.     # Block 3
  2620.     wizqQueue 1 {
  2621.       wizqEntityWalk Zak "200.8 70.4 211.8" "wait"
  2622.       wizqEntitySetOrientationTarget Zak Lydia
  2623.     }
  2624.  
  2625.     # Block 3-B
  2626.     wizqQueue 2 {
  2627.       chainEvent { delay 1000 }
  2628.       wizqEntityRun Lydia "208.6 70.4 195.9" "wait"
  2629.     }
  2630.  
  2631.     wizqTalkSay Zak $::lng::magicalFormulaZ3   "sound/vo/$::LNG/scenes/garden/magicalFormulaZ3.ogg"
  2632.     wizqTalkClose
  2633.  
  2634.     # Wait for Block 3 & 3-B
  2635.     wizqWaitQueue 1
  2636.     wizqWaitQueue 2
  2637.     wizqEntitySetOrientationTarget Zak None
  2638.  
  2639.     # Block 4
  2640.     wizqQueue 1 {
  2641.       chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  2642.       chainEvent { delay 500 }
  2643.       wizqEntityAction Zak Yes "wait"
  2644.     }
  2645.  
  2646.     # Block 4-B
  2647.     wizqQueue 2 {
  2648.       chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  2649.     }
  2650.  
  2651.     wizqTalkOpen
  2652.     wizqTalkSay Zak $::lng::magicalFormulaZ4   "sound/vo/$::LNG/scenes/garden/magicalFormulaZ4.ogg"
  2653.   }
  2654.  
  2655.   # Wait for Block 3 & 3-B
  2656.   wizqWaitQueue 1
  2657.   wizqWaitQueue 2
  2658.   wizqEntitySetOrientationTarget Zak None
  2659.     
  2660.   # Block 5
  2661.   wizqQueue 1 {
  2662.     wizqEntityAction Lydia standHandOnChin "wait"
  2663.   }
  2664.  
  2665.   # Block 5-B
  2666.   wizqQueue 2 {
  2667.     chainEvent { delay 500 }
  2668.     wizqEntityAction Zak standYes "wait"
  2669.   }
  2670.   
  2671.   wizqTalkSay Zak $::lng::magicalFormulaZ5   "sound/vo/$::LNG/scenes/garden/magicalFormulaZ5.ogg"
  2672.  
  2673.   # Wait for Block 5
  2674.   wizqWaitQueue 1
  2675.  
  2676.   chainEvent { wizEntityLookAt Lydia "195 70.7 153" }
  2677.   chainEvent { wizEntityLookAt Zak "195 70.7 153" }
  2678.   chainEvent { delay 500 }
  2679.  
  2680.   # Block 6
  2681.   wizqQueue 1 {
  2682.     wizqEntityAction Lydia standTalkTwoHands "wait"
  2683.     wizqEntityAction Lydia standTalkTwoHands
  2684.   }
  2685.  
  2686.   wizqQueue 2 {
  2687.     oz'event {oz'delay 0.5}
  2688.     Play3DSound characters/lydia/incantation
  2689.   }
  2690.   wizqTalkSay Lydia $::lng::magicalFormulaL4   "sound/vo/$::LNG/scenes/garden/magicalFormulaL4.ogg"
  2691.   wizqTalkClose
  2692.  
  2693.   # Wait for Block 6
  2694.   wizqWaitQueue 1
  2695.   wizqWaitQueue 2
  2696.  
  2697.   chainCallEvent "nigilisTreeMovie"
  2698. }
  2699.  
  2700.  
  2701. ## ===================================================== ##
  2702. ##   Magical Formula                                     ##
  2703. ## ===================================================== ##
  2704.  
  2705. event "gardenFearEntering" {
  2706.   chainEvent { wizEntityStopFollow Zak }
  2707.   ozSet "zakGardenPosition" "leftSide"
  2708.   wizqEntityRun Zak "301.8 147.2 209.4" "wait"
  2709.   wizqEntitySetCycle Zak lieCycleFear
  2710. }
  2711.  
  2712.  
  2713. ################################################################################
  2714. ## ========================================================================== ##
  2715. ##   OPTIONNAL DIALOGUE SECTION                                               ##
  2716. ## ========================================================================== ##
  2717. ################################################################################
  2718.  
  2719.  
  2720. ## ===================================================== ##
  2721. ##   How do you know                                     ##
  2722. ## ===================================================== ##
  2723.  
  2724. event "howDoYouKnow" {
  2725.   chainEvent {
  2726.     freezePlayer
  2727.     wizDisableMouse
  2728.     wizEntityStopFollow Zak
  2729.   }
  2730.   ozSet "howDoYouKnow" "discussed"
  2731.  
  2732.   # Block 1
  2733.   wizqQueue 1 {
  2734.     chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
  2735.     chainEvent { delay 500 }
  2736.     wizqEntityAction Lydia standWhat "wait"
  2737.   }
  2738.  
  2739.   # Block 1-B
  2740.   wizqQueue 2 {
  2741.     chainEvent { delay 500 }
  2742.     chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
  2743.   }
  2744.   
  2745.   wizqTalkOpen
  2746.   wizqTalkSay Lydia $::lng::howDoYouKnowTriggerL1   "sound/vo/$::LNG/scenes/garden/howDoYouKnowTriggerL1.ogg"
  2747.   wizqTalkSay Lydia $::lng::howDoYouKnowL1   "sound/vo/$::LNG/scenes/garden/howDoYouKnowL1.ogg"
  2748.  
  2749.   # Wait for Block 1 & 1-B
  2750.   wizqWaitQueue 1
  2751.   wizqWaitQueue 2
  2752.  
  2753.   # Block 2
  2754.   wizqQueue 1 {
  2755.     wizqEntityAction Zak standConfusedLeft "wait"
  2756.     chainEvent { delay 3000 }
  2757.     wizqEntityAction Zak standYes "wait"
  2758.   }
  2759.  
  2760.   wizqTalkSay Zak $::lng::howDoYouKnowZ1   "sound/vo/$::LNG/scenes/garden/howDoYouKnowZ1.ogg"
  2761.  
  2762.   # Block 2-B
  2763.   wizqQueue 2 {
  2764.     wizqEntityAction Lydia standTalkHandHip "wait"
  2765.   }
  2766.  
  2767.   wizqTalkSay Lydia $::lng::howDoYouKnowL2  "sound/vo/$::LNG/scenes/garden/howDoYouKnowL2.ogg"
  2768.  
  2769.   # Wait for Block 2 & 2-B
  2770.   wizqWaitQueue 1
  2771.   wizqWaitQueue 2
  2772.  
  2773.   # Block 3
  2774.   wizqQueue 1 {
  2775.     wizqEntityAction Lydia standTalkTwoHands "wait"
  2776.     wizqEntityAction Lydia standYes "wait"
  2777.   }
  2778.   
  2779.   wizqTalkSay Lydia $::lng::howDoYouKnowL3   "sound/vo/$::LNG/scenes/garden/howDoYouKnowL3.ogg"
  2780.   wizqTalkSay Zak $::lng::howDoYouKnowZ2   "sound/vo/$::LNG/scenes/garden/howDoYouKnowZ2.ogg"
  2781.   wizqTalkClose
  2782.   
  2783.   # Wait for Block 2
  2784.   wizqWaitQueue 1
  2785.  
  2786.   chainEvent {
  2787.     unfreezePlayer
  2788.     wizEnableMouse
  2789.     wizEntityResumeFollow Zak
  2790.   }
  2791. }
  2792.  
  2793. event "useBean" {
  2794.     setCamera "islandCloseUp"
  2795. }
  2796.  
  2797. ################################################################################
  2798. ## ========================================================================== ##
  2799. ##   CAMERA                                                                   ##
  2800. ## ========================================================================== ##
  2801. ################################################################################
  2802.  
  2803. camera "driaCloseUpNA" {
  2804.     pos 181.6167 80.0358 157.4484
  2805.     aim 1.4479 -2.7247 0
  2806.     up 0.8831 0.4693 0
  2807.     fov 48.4555
  2808.     layer background "driaCloseUp/driaCloseUp" 0 0 0 0 0 0 0 0
  2809.     cursor "driaCloseUp/driaCloseUpCursor.tga"
  2810. }
  2811.  
  2812. camera "undarCloseUpNA" {
  2813.     pos 203.4733 81.1714 146.1205
  2814.     aim -9.6923 -50.5414 13.7397
  2815.     up -0.547 0.3157 0.7754
  2816.     fov 48.4555
  2817.     layer background "undarCloseUp/undarCloseUp" 0 0 0 0 0 0 0 0
  2818.     cursor "undarCloseUp/undarCloseUpCursor.tga"
  2819. }
  2820.  
  2821. camera "orlosCloseUpNA" {
  2822.     pos 203.024 80.4011 169.1231
  2823.     aim -1.4712 -9.3123 -2.7669
  2824.     up -0.445 0.3189 -0.8368
  2825.     fov 48.4555
  2826.     layer background "orlosCloseUp/orlosCloseUp" 0 0 0 0 0 0 0 0
  2827.     cursor "orlosCloseUp/orlosCloseUpCursor.tga"
  2828. }
  2829.  
  2830. ################################################################################
  2831. ## ========================================================================== ##
  2832. ##   TO ADD/ CORRECTIONS NEEDED                                               ##
  2833. ## ========================================================================== ##
  2834. ################################################################################
  2835.  
  2836.  
  2837. # NONE FOR NOW
  2838.  
  2839.  
  2840. ################################################################################
  2841. ## ========================================================================== ##
  2842. ##   TO CHECK                                                                 ##
  2843. ## ========================================================================== ##
  2844. ################################################################################
  2845.  
  2846.  
  2847. # NONE FOR NOW
  2848.  
  2849.  
  2850.  
  2851.