{ (set: $timer to 89) (set: $hasKey1 to false) (set: $hasKey2 to false) (set: $hasKey3 to false) (set: $startTimer to false) (set: $leftRoom to false) } [[(Enter Room)->Room]]{ (set: $startTimer to true) } |== **Search areas:** * [[Cabinet]] * [[Desk]] * [[Carpet]] ==| (display: "Inventory") |==| You didn't escape in time! { (set: $leftRoom to true) } |== **Search areas:** * [[Desk]] * [[Carpet]] ==| (display: "Inventory") |==| **Cabinet:** { (if: $hasKey2 is true)[ The only notable item, the box, has been unlocked and the key retrieved. ](else:)[ (if: $hasKey1 is true)[ (link: '(Unlock box with a "1" on it)')[ A key with a "2" on it! (set: $hasKey2 to true) ] ](else:)[ A locked box with the number "1" on it. ] ] } |== **Search areas:** * [[Cabinet]] * [[Carpet]] ==| (display: "Inventory") |==| **Desk:** { (if: $hasKey3 is true)[ The desk holds nothing else of interest. ](else:)[ (link: "Center drawer")[ (if: $hasKey2 is true)[ (link: '(Unlock small box with "2" on it)')[ A key with a "3" on it! (set: $hasKey3 to true) ] ](else:)[ A small box with a number "2" on it. ] ] ] } |== **Search areas:** * [[Cabinet]] * [[Desk]] ==| (display: "Inventory") |==| **Carpet:** { (if: $hasKey1 is true)[ The carpet has been pulled up revealing the previous hiding place of a key! ](else:)[ (link: "(Pull up north-west corner)")[Nothing of note.]<br> (link: "(Pull up north-east corner)")[Nothing of note.]<br> (link: "(Pull up south-west corner)")[ A key with a "1" on it! (set: $hasKey1 to true) ]<br> (link: "(Pull up south-east corner)")[Nothing of note.] ] } =><= --- { (if: $leftRoom is true)[ ](else:)[ (if: $hasKey1 is true and $hasKey2 is true and $hasKey3 is true)[ (link: "Leave room")[ (set: $startTimer to false) (goto: "Good Ending") ] ](else:)[ Quickly find all the keys! ] ] } <== =><= { (if: $startTimer is true)[ (live: 1s)[ (set: $timer to it - 1) (if: $timer is 0)[ (stop:) Time's up! (set: $startTimer to false) (goto: "Bad Ending") ] (else:)[ You have $timer seconds left! (link: "Reset?")[ (set: $startTimer to false) (goto: "Start") ] ] ] ](else:)[ (Timer paused!) ] } --- <== **Inventory:** (if: $hasKey1 is true)["1" Key] (if: $hasKey2 is true)["2" Key] (if: $hasKey3 is true)["3" Key]You escaped the room! { (set: $leftRoom to true) }