10 ' OFFICE
20 MODE 1:BORDER 0:T=0:L=0
30 FOR i=0 TO 3:INK i,0:NEXT i
25 POKE &BE80,0:POKE &BE81,0:POKE &BE82,0:POKE &BE83,0:POKE &BE84,0
40 MEMORY &3FFF
50 LOAD"Bureau.cmp"
60 FOR i=0 TO 3:INK i,0:NEXT i
70 POKE &A634,&C8:POKE &A635,0:POKE &A636,0:CALL &A60B
80 POKE &C7F1,&C9:CALL &C7D0
90 CALL &A60B
100 WINDOW #1,25,35,4,19
110 INK 0,0:INK 1,3:INK 2,15:INK 3,24
120 PEN #1,3:PRINT #1:PRINT #1,"You are":PRINT #1,"in your":PRINT #1,"small":PRINT #1,"office...":PRINT #1:PRINT #1:PRINT #1,"The smell":PRINT #1,"of old":PRINT #1,"paper":PRINT #1,"feels":PRINT #1,"familiar."
130 LOCATE 13,20:PEN 2:PRINT"WHAT WILL YOU DO ?"
140 PEN 3: LOCATE 4,21:PRINT "1-Examine        2-Read the letter"
150 PEN 2:LOCATE 4,22:PRINT "3-Look at the map"
160 PEN 3:LOCATE 4,23:PRINT "4-Open the drawer"
170 PEN 2:LOCATE 4,24:PRINT "5-Search the bookcase"
200 k$=INKEY$
210 IF k$="1"THEN GOTO 300
220 IF k$="2" AND T=0 THEN GOTO 400
230 IF k$="2" AND T=1 THEN GOTO 500
240 IF k$="3"THEN GOTO 1000
250 IF k$="4"THEN GOTO 1100
260 IF k$="5"THEN GOTO 1200
270 IF k$<"1"OR k$>"5" THEN GOTO 200
300 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
310 PEN 3:PRINT"You are in your office, where the":PRINT"light has struggled to enter since 1947."
320 PEN 2:PRINT:PRINT"A sagging bookcase,":PRINT"full of tired books,":PRINT"looks like it wants to collapse..."
330 PEN 1:PRINT:PRINT"An old Egypt map hangs on the wall,":PRINT"as if to remind you that lately":PRINT"you only travel by proxy..."
340 PEN 3:PRINT:PRINT"The dust is so thick,":PRINT"it could demand a salary."
350 PEN 2:PRINT:PRINT"On the desk, a spotless letter":PRINT"clashes with this funeral decor...":PRINT:PRINT"Probably a casting mistake."
360 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
370 GOTO 60
400 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
410 PEN 3:PRINT"You unfold the letter with the":PRINT"solemnity of a man hoping for":PRINT"a check..."
420 PEN 2:PRINT:PRINT"           ...and you find a code.":PEN 1:LOCATE 30,5:PRINT"code"
430 PEN 3:LOCATE 1,7:PRINT"As usual, your patron gives you":PRINT"the destination of your next":PRINT"expedition."
440 PEN 2:PRINT:PRINT"But this time, he thought it wise":PRINT"to encrypt it as if you were at":PRINT"war."
450 PEN 3:PRINT:PRINT"The place name?"
460 PEN 1:PRINT:PRINT"               JZGGZIZ"
470 PEN 2:PRINT"Charming...":PEN 1:PRINT:PRINT"      Why all this drama?":PEN 3:PRINT:PRINT"What could scare him enough":PRINT"to encrypt a simple place name?"
480 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
490 L=1:GOTO 60
500 IF L=1 THEN GOTO 800
510 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
520 PEN 3:PRINT"You read the letter carefully."
530 PEN 2:PRINT:PRINT"As usual, your patron tells you":PRINT"the destination of your next":PRINT"expedition by mail."
540 PEN 3:PRINT:PRINT"Usually, he just scribbles the":PRINT"name of the next remote place":PRINT"to send you."
550 PEN 1:PRINT:PRINT"But this time, he brought out the":PRINT"big cryptographic guns, like if you":PRINT"were infiltrating Berlin in 1943."
560 PEN 3:PRINT:PRINT"The place name?"
570 PEN 1:PRINT:PRINT"               JZGGZIZ"
580 PEN 2:PRINT:PRINT"Sounds like a pharaoh sneezing":PRINT"with a bad cold..."
590 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
600 CLS:PEN 3:LOCATE 1,6:PRINT"This strange word, JZGGZIZ, teases":PRINT"your mind like a mosquito in the":PRINT"middle of the desert.":LOCATE 20,6:PEN 1:PRINT"JZGGZIZ"
610 PEN 2:LOCATE 1,10:PRINT"You feel the solution is close,":PRINT"somewhere between intuition":PRINT"and pure luck."
620 PEN 1:LOCATE 3,17:PRINT"Do you want to try to decode it"
630 LOCATE 14,18:INPUT"(Y/N) ";d$
640 IF UPPER$(d$)="N" THEN GOTO 60
650 IF UPPER$(d$)="Y" THEN GOTO 700
660 GOTO 620
700 CLS:PEN 3:LOCATE 1,1:INPUT"What is the decoded word ";Nom$
710 IF UPPER$(Nom$)<>"QATTARA" THEN GOTO 900
720 PEN 1:PRINT:PRINT"Bravo, Sherlock!":PRINT"You solved the mystery!"
730 PEN 2:PRINT:PRINT"The word QATTARA now shines like":PRINT"a beacon in the night."
740 PEN 3:PRINT:PRINT"Time to swap your worn-out chair":PRINT"for an epic adventure."
750 PEN 1: PRINT:PRINT"Grab your hat, your boots,":PRINT"and plenty of sunscreen,":PRINT"because you’re leaving your":PRINT"loser’s den."
760 PEN 2:PRINT:PRINT"Off to QATTARA!":PEN 3:LOCATE 8,17:PRINT"QATTARA"
770 PEN 3:PRINT:PRINT"Oh, by the way... When putting the":PRINT"letter back, you see the word ";CHR$(34);" SWWN ";CHR$(34);" on the back.":LOCATE 33,20:PEN 1:PRINT"SWWN"
780 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
790 RUN"Caire.bas"
800 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
810 PEN 3:PRINT"You reread the letter, now with":PRINT"renewed attention."
820 PEN 2:PRINT:PRINT "This strange word, JZGGZIZ, pricks":PRINT"your mind like a mosquito in":PRINT"the desert.":PEN 1:LOCATE 20,4:PRINT"JZGGZIZ"
830 PEN 3:LOCATE 1,8:PRINT"You feel the solution is within":PRINT"reach, somewhere between":PRINT"intuition and luck."
840 PEN 1:LOCATE 7,17:PRINT"Do you want to try decoding"
850 LOCATE 12,18:INPUT"this word (Y/N) ";d$
860 IF UPPER$(d$)="N" THEN GOTO 60
870 IF UPPER$(d$)="Y" THEN GOTO 700
880 GOTO 850
900 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
910 PEN 3:PRINT"Oh no, that's not it!"
920 PEN 2:PRINT:PRINT"Unless you're using a very avant-garde":PRINT"Egyptian dialect, it doesn't fit..."
930 PEN 1:PRINT:PRINT"Maybe a book could help you":PRINT"use both your neurons."
940 PEN 2:PRINT:PRINT"Or simply learn the alphabet":PRINT"before playing detective..."
950 PEN 3:LOCATE 4,15:INPUT"Do you want to try again (Y/N)?",d$
960 IF UPPER$(d$)="N" THEN GOTO 60
970 IF UPPER$(d$)="Y" THEN GOTO 700
980 GOTO 950
1000 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
1010 PEN 3:PRINT"The map shows Egypt in all":PRINT"its glory:"
1020 PEN 2:PRINT"From the majestic Nile to pyramids":PRINT"sharp as thesis critiques."
1030 PEN 1:PRINT:PRINT"At one exact spot, a place name":PRINT"was carefully erased, as if":PRINT"someone wanted to stop a tourist":PRINT"from going there."
1040 PEN 3:PRINT:PRINT"Only one letter remains: ";"a ";CHR$(34)"Q";CHR$(34):PRINT"It evokes a place...":PEN 1:LOCATE 29,11:PRINT"Q"
1050 PEN 2:LOCATE 1,14:PRINT"At the bottom of the map, a handwritten":PRINT"note, crossed out, says:"
1060 PEN 1:PRINT:PRINT CHR$(34);"Caesar's military techniques":PRINT"never worked in Egypt":PRINT"DO NOT USE THEM!";CHR$(34)
1070 PEN 2:PRINT:PRINT"Apparently, even Roman generals":PRINT"have off days."
1080 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
1090 GOTO 60
1100 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
1110 PEN 3:PRINT"You open the office drawer,":PRINT"hoping to find a mysterious clue."
1120 PEN 1:PRINT"Instead, it's a real intergalactic":PRINT"mess box:"
1130 PEN 2:PRINT:PRINT"A dubious plastic spoon,":PRINT"a collection of stones sorted by":PRINT"size and color, an old poster":PRINT"of a cat dressed as a pharaoh, and":PRINT"a burnt-out bulb... without socket."
1140 PEN 3:PRINT:PRINT"Oh, and a banana-shaped eraser,":PRINT"that sticks more than it erases..."
1150 PEN 1:PRINT:PRINT"You even find a small plastic scarab":PRINT"that blinks."
1160 PEN 2:PRINT:PRINT"Carefully, you push the drawer back,":PRINT"whistle, and pray nobody asks questions."
1170 PEN 3:LOCATE 15,25:INPUT" ENTER  ",en$
1180 GOTO 60
1200 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
1210 PEN 3:PRINT"You lean over the bookshelf,":PRINT"hoping to find a secret":PRINT"or at least a forgotten bookmark."
1220 PEN 1:PRINT:PRINT"Among the dusty volumes on Egypt,":PRINT"3 tomes stand out strangely"
1230 PRINT"because they all talk about the":PRINT"war 39-45"
1240 PEN 3:PRINT:PRINT"- First tome:":PEN 2:PRINT"Message encryption tricks.":PRINT"Because, apparently, decoding":PRINT"messages requires skill."
1250 PEN 3:PRINT:PRINT"- Second tome:":PEN 2:PRINT"Unexpected war traps."
1260 PEN 3:PRINT:PRINT"- Third tome:":PEN 2:PRINT"Troop movement encryption tricks."
1270 PEN 3:LOCATE 8,23:PRINT"Choose a Tome (1/2/3/0)"
1280 k$=INKEY$
1290 IF k$="1"THEN GOTO 1400
1300 IF k$="2"THEN GOTO 1500
1310 IF k$="3"THEN GOTO 1600
1320 IF k$="0"THEN MODE 1:GOTO 60
1330 IF k$<"0"OR k$>"3" THEN GOTO 1280

1400 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24:T=1
1410 PEN 3:PRINT"You open the first tome,":PRINT"ready to dive into military":PRINT"encryption mysteries."
1420 PEN 2:PRINT:PRINT"To your surprise,":PRINT"the book details the famous inverse":PRINT"alphabet technique."
1430 PEN 1:PRINT:PRINT"Yes, that old A becomes Z,":PRINT"B becomes Y, and so on..."
1440 PEN 3:PRINT:PRINT"The tome also explains the Caesar cipher":PRINT"A method where each letter":PRINT"is shifted by a set number":PRINT"along the alphabet."
1450 PEN 1:PRINT:PRINT"For example, with a shift of 3,":PRINT"A becomes D, B becomes E, etc..."
1460 PEN 3:LOCATE 8,23:PRINT"Choose a Tome (1/2/3/0)"
1470 GOTO 1280

1500 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
1510 PEN 3:PRINT"You open the second tome,":PRINT"ready to study the war traps":PRINT"seriously."
1520 PEN 2:PRINT:PRINT"To your surprise,":PRINT"several pages were torn out and":PRINT"replaced by comic strips of Donald Duck!"
1530 PEN 3:PRINT:PRINT"Apparently, someone decided":PRINT"military strategy needed":PRINT"a more pecuniary, duckish touch!"
1540 PEN 1:PRINT:PRINT"Not sure this helps you avoid traps,":PRINT"but at least you get an unexpected":PRINT"relaxing break."
1550 PEN 3:LOCATE 8,23:PRINT"Choose a Tome (1/2/3/0)"
1560 GOTO 1280

1600 MODE 1:INK 0,0:INK 1,6:INK 2,15:INK 3,24
1610 PEN 3:PRINT"You open the third tome,":PRINT"full of hope to uncover a well-":PRINT"crafted military secret."
1620 PEN 2:PRINT:PRINT"It explains that generals":PRINT"coded troop movements by":PRINT"assembling the initials of":PRINT"the cardinal points:"
1630 PEN 1:PRINT:PRINT"S for South, W for West,":PRINT"N for North, E for East"
1640 PEN 3:PRINT"And thus, a mysterious word was born!"
1650 PEN 2:PRINT:PRINT"For example, the word NES,":PRINT"which might suggest a console,":PRINT"actually meant North-East-South!"
1660 PEN 1:PRINT:PRINT"A technique as simple":PRINT"as ingenious, perfect to":PRINT"transmit orders without being":PRINT"caught by the enemy."
1670 PEN 3:LOCATE 8,23:PRINT"Choose a Tome (1/2/3/0)"
1680 GOTO 1280
