var a,b,c,d,e,f:integer; s:string; begin writeln('You wake up with a great head ache. You can''t remember nothing.'); writeln('''What is my name? How did I get here?I see the door! But it is locked.'); writeln('Oh no!What should I do?!'''); writeln('________________________________________________________________________________'); writeln('It is a big accomodation.There is a chest in the corner of the room'); writeln('Also you see a door'); writeln('________________________________________________________________________________'); while a<>1 do begin readln(s); If s='research the chest' then writeln('YOU SEE A KEY IN IT') else If s='take the key' then writeln('YOU TAKE THE KEY'); If s='take the key' then a:=1 else If s='open the door' then writeln('IT IS LOCKED'); end; a:=0; while f<>1 do begin readln(s); If s='research the chest' then writeln('THERE IS NOTHING HERE')else If s='open the door' then f:=1; end; f:=0; If s='open the door' then begin writeln('________________________________________________________________________________'); writeln('It is no big room.There is a chest in the corner of the room.'); writeln('There is a picture on the wall of the room.Also you see a door'); writeln('________________________________________________________________________________'); while b<>1 do begin readln(s); If s='open the door' then writeln('IT IS LOCKED') else If s='research the chest' then writeln('IT IS LOCKED')else If s='open the chest' then writeln('YOU CAN''T DO IT') else If s='research the picture' then writeln('YOU FIND A BUTTON')else If s='push the button' then writeln('YOU PUSHED IT'); If s='push the button' then b:=1; end; while a<>1 do begin readln(s); If s='research the chest' then writeln('YOU SEE A KEY IN IT') else If s='research the picture' then writeln('THERE IS NOTHING HERE') else If s='open the door' then writeln('IT IS LOCKED') else If s='take the key' then writeln('YOU TAKE IT'); If s='take the key' then a:=1; end; a:=0; b:=0; while f<>1 do begin readln(s); If s='research the picture' then writeln('THERE IS NOTHING HERE') else If s='research the chest' then writeln('THERE IS NOTHING HERE')else If s='open the door' then f:=1 end; f:=0; If s='open the door' then begin writeln('________________________________________________________________________________'); writeln('It is no big accomodation.You see the bone on he floor.You see the chest in the corner'); writeln('but near it you see the big dog which can kill you!'); writeln('________________________________________________________________________________'); while b<>1 do begin readln(s); If s='open the door' then writeln('IT IS LOCKED') else If s='research the chest' then writeln('YOU CAN''T DO IT') else If s='take the bone' then writeln('YOU TAKE IT'); If s='take the bone' then b:=1 else If s='research the dog' then writeln('IT IS A VERY BIG DOG!'); end; while a<>1 do begin readln(s); If s='open the door' then writeln('IT IS LOCKED') else If s='research the chest' then writeln('YOU CAN''T DO IT') else If s='research the dog' then writeln('IT IS A VERY BIG DOG!') else If s='give the bone to the dog' then writeln('YOU GIVE IT.THE DOG IS GO AWAY'); If s='give the bone to the dog' then a:=1; end; while s<>'13' do begin writeln('IT IS A PASSWORD. YOU HAVE TO SOLVE THIS PROBLEM:1,1,2,3,5,8... WHAT IS THE NEXT NUMBER?'); readln(s); end; If s='13' then writeln('YOU DID IT!'); while d<>1 do begin readln(s); If s='open the door' then writeln('IT IS LOCKED') else If s='research the chest' then writeln('YOU SEE THE KEY IN IT') else If s='take the key' then writeln('YOU TAKED IT'); If s='take the key' then d:=1; end; a:=0; b:=0; c:=0; d:=0; while f<>1 do begin readln(s); If s='research the chest' then writeln('THERE IS NO INTERESTING HERE'); If s='open the door' then f:=1; end; f:=0; If s='open the door' then begin writeln('________________________________________________________________________________'); writeln('You see the picture on the wall.There is the wardrobe near it.'); writeln('There is the chest in the corner but near it you see the big dog which can kill you'); writeln('Also you see the door'); writeln('________________________________________________________________________________'); while a<>1 do begin readln(s); If s='research the dog' then writeln('IT IS A BIG FAT DOG') else If s='research the chest' then writeln('YOU CAN''T DO IT') else If s='open the chest' then writeln('YOU CAN''T DO IT') else If s='open the door' then writeln('IT IS LOCKED') else If s='research the wardrobe' then writeln('IT IS LOCKED') else If s='open the wardrobe' then writeln('YOU CAN''T DO IT') else If s='research the picture' then writeln('YOU SEE THE BUTTON NEAR IT') else If s='push the button' then writeln('THE WARDROBE IS OPEN'); If s='push the button' then a:=1; end; while b<>1 do begin readln(s); If s='research the dog' then writeln('IT IS A BIG FAT DOG') else If s='research the chest' then writeln('YOU CAN''T DO IT') else If s='open the chest' then writeln('YOU CAN''T DO IT') else If s='open the door' then writeln('IT IS LOCKED') else If s='research the wardrobe' then writeln('YOU SEE THE BONE IN IT') else If s='research the picture' then writeln('THERE IS NO INTERESTING HERE') else If s='take the bone' then writeln('YOU TAKE IT'); If s='take the bone' then b:=1; end; while c<>1 do begin readln(s); If s='research the dog' then writeln('IT IS A BIG FAT DOG') else If s='research the chest' then writeln('YOU CAN''T DO IT') else If s='open the chest' then writeln('YOU CAN''T DO IT') else If s='open the door' then writeln('IT IS LOCKED') else If s='research the wardrobe' then writeln('THERE IS NO INTERESTING HERE') else If s='research the picture' then writeln('THERE IS NO INTERESTING HERE') else If s='give the bone to the dog' then writeln('THE DOG IS GO AWAY'); If s='give the bone to the dog' then c:=1; end; while s<>'49' do begin writeln('ON THE CHEST YOU SEE THE PASSWORD.YOU HAVE TO SOLVE THIS PROBLEM'); writeln('4,9,16,25,36...WHAT IS THE NEXT NUMBER'); readln(s); end; If s='49' then writeln('YOU DID IT!'); while e<>1 do begin readln(s); If s='research the chest' then writeln('YOU SEE THE KEY IN IT') else If s='open the door' then writeln('IT IS LOCKED') else If s='research the wardrobe' then writeln('THERE IS NO INTERESTING HERE') else If s='research the picture' then writeln('THERE IS NO INTERESTING HERE') else If s='take the key' then writeln('YOU TAKE IT'); If s='take the key' then e:=1; end; while f<>1 do begin readln(s); If s='research the chest' then writeln('THERE IS NO INTERESTING HERE') else If s='research the wardrobe' then writeln('THERE IS NO INTERESTING HERE') else If s='research the picture' then writeln('THERE IS NO INTERESTING HERE') else If s='open the door' then f:=1; If s='open the door' then begin writeln('''It was a nightmare! I remember! My name is John, and I in my own flat now.'); writeln('Thank you God! But what is it? The door is locked! Please, no,No,NO...'''); writeln('The end.'); writeln('The game was create by Zyoma'); readln(s); end; end; end; end; end; end.