 1  ONERR  GOTO 5500
 2 A =  USR (1):A =  USR (2): & WINDOW0,40,0,24: HOME : TEXT :A =  USR (0)
 5  DIM KA(8),KB(8),KC(8),OB$(9),OB(9,6): POKE 7445,1
 10  &  READ "USER.PLAYER": INPUT NM$,NA%,NU%,CY%,CX%,CL,RA
 20  FOR I = 1 TO 8: INPUT KA(I),KB(I),KC(I): NEXT I
 30  INPUT GP,XP,AR,PA,PR,EN,OB,LP%
 40  IF OB = 0 THEN 70
 50  FOR I = 1 TO OB: INPUT OB$(I): FOR J = 1 TO 6: INPUT OB(I,J): NEXT J: NEXT I
 70  &  END 
 80  &  RECALL "SCRN.TOWN-2",8192: &  RECALL "DATA.TOWN-2",7471:A =  USR (1): POKE  - 16304,0
 90  DEF  FN T(X) = ((X = PA) OR (X = AR) OR (X = PR))
 95  & WINDOW4,32,7,16
 100  FOR I = 1 TO 8: READ C1$(I): READ C1(I): NEXT I
 102  FOR I = 1 TO 8: READ C2$(I): NEXT I
 103  DIM CA(4,8): FOR I = 1 TO 4: FOR J = 1 TO 8: READ CA(I,J): NEXT J: NEXT I
 104  DIM EQ(9,6,2): DIM EQ$(9,2)
 106  FOR I = 1 TO 2
 107  FOR J = 1 TO 9
 108  READ EQ$(J,I)
 110  FOR K = 1 TO 6: READ EQ(J,K,I): NEXT K
 112  NEXT J
 113  NEXT I
 114  FOR I = 1 TO 6: READ RA$(I): NEXT I
 116  FOR I = 1 TO 4: READ CA$(I): NEXT I
 120  & CLS: & SCRN1,2: GOSUB 17100: VTAB 21: HTAB 11: PRINT "Possibilit{s"
 130  VTAB 8: HTAB 6: PRINT "1)Consulter le sage"
 140  HTAB 6: VTAB 9: PRINT "2)Temple de l'ordre"
 150  HTAB 6: VTAB 10: PRINT "3)Guilde"
 160  HTAB 6: VTAB 11: PRINT "4)Reliques"
 170  HTAB 6: VTAB 12: PRINT "5)Boutiques"
 180  HTAB 6: VTAB 13: PRINT "6)Recharges"
 190  HTAB 6: VTAB 14: PRINT "7)Examen"
 200  HTAB 6: VTAB 15: PRINT "8)Jeter"
 210  HTAB 6: VTAB 20: GET A$
 220  IF  ASC (A$) = 27 THEN 9000
 230  IF  VAL (A$) < 1 OR  VAL (A$) > 8 THEN 210
 240  ON  VAL (A$) GOTO 1000,2000,3000,4000,5000,6000,7000,8000
 1000  & CLS: GOSUB 17100: VTAB 21: HTAB 13: PRINT "Le sage":V% = 0
 1010  FOR I = 1 TO OB
 1020  IF OB(I,1) = 41 THEN V% = I
 1030  NEXT I
 1040  IF V% <  > 0 THEN 1100
 1050  VTAB 10
 1060  HTAB 3: PRINT "Le sage est en masturbation"
 1070  HTAB 3: PRINT "transcendantale. Sa noble"
 1080  HTAB 3: PRINT "{rection le bloque dans sa"
 1085  HTAB 13: PRINT "cellule."
 1090  GET A$: GOTO 120
 1100  & CLS: VTAB 8:A =  USR (3)
 1110  PRINT "Mon {jaculation pr{coce est un  signe, tu est l'{lu. Ton destin est de combattre le libidineux  Beltrik dont je vais te r{v{ler le secret. En fait Mithgul n'a"
 1120  GET A$
 1150  PRINT "pas p{ri lors de l'explosion de son complexe. Lui et le d{mon   qu'il avait invoqu{ ont subi de plein fouet l'effet des brumes. Ainsi ont ils forniqu{ pendant  des si}cles jusqu'@ ce que l'"
 1160  GET A$
 1200  PRINT "effet du mal{fice se dissipe. Led{mon est alors devenu le fami- lier de Mithgul. L'archimage,   traumatis{ et perverti par son  exp{rience, avait perdu une"
 1210  GET A$
 1250  PRINT "bonne part de son savoir. Il se rebaptisa Beltrik et se voua auxforces du chaos. Voici une let- tre d'introduction aupr}s du    roi. Valdrin te proposera sans  doute une r{compense subtantiel-le."
 1260 A =  USR (2)
 1310 OB$(V%) = "Lettre"
 1320 OB(V%,1) = 46
 1330  GET A$: GOTO 120
 1990  GOTO 120
 2000  REM  TEMPLE
 2005 C1(1) = 1: IF KC(2) > 15 THEN C1(1) = 0
 2010  & CLS: GOSUB 17100: VTAB 21: HTAB 14: PRINT "Temple"
 2020  GOSUB 17200
 2040  FOR I = 1 TO 8
 2050  VTAB 7 + I: HTAB 6: PRINT I;")";C1$(I)
 2060  VTAB 7 + I: HTAB 21: PRINT C1(I);" PO"
 2080  NEXT I
 2090  VTAB 20: HTAB 6: GET A$
 2100  IF  ASC (A$) = 27 THEN 120
 2110  IF  VAL (A$) = 0 OR  VAL (A$) = 9 THEN 2090
 2120  IF C1( VAL (A$)) > GP THEN 2090
 2130 GP = GP - C1( VAL (A$))
 2140  GOSUB 17200
 2150  ON  VAL (A$) GOTO 2200,2220,2240,2260,2280,2300,2320,2340
 2200 KC(5) = KA(5): GOTO 2090
 2220 KC(6) = KA(6): GOTO 2090
 2240 KC(3) = KA(3) + 7: GOTO 2090
 2260 KC(4) = KA(4) + 7: GOTO 2090
 2280 KC(5) = KA(5) + 7: GOTO 2090
 2300 KC(6) = KA(6) + 7: GOTO 2090
 2320 KC(7) = KA(7) + 7: GOTO 2090
 2340 KC(8) = KA(8) + 7: GOTO 2090
 3000  REM  GUILDE
 3010  & CLS: GOSUB 17100: VTAB 21: HTAB 14: PRINT "Guilde"
 3020  GOSUB 17300
 3040  FOR I = 1 TO 8
 3050  VTAB 7 + I: HTAB 6: PRINT I;")";C2$(I)
 3060  VTAB 7 + I: HTAB 21: PRINT CA(CL,I);" XP"
 3080  NEXT I
 3090  VTAB 20: HTAB 6: GET A$
 3100  IF  ASC (A$) = 27 THEN 120
 3110  IF A$ = "9" OR  VAL (A$) = 0 THEN 3090
 3120  IF CA(CL, VAL (A$)) > XP THEN 3090
 3130 XP = XP - CA(CL, VAL (A$))
 3140  GOSUB 17300
 3150  IF  VAL (A$) > 4 THEN CL =  VAL (A$) - 4: GOTO 3040
 3160 KA( VAL (A$)) = KA( VAL (A$)) + 1
 3170 KC( VAL (A$)) = KA( VAL (A$))
 3200 KA(5) = KB(5) +  INT ((KA(3) + KA(4) - KB(3) - KB(4)) / 2 + .5)
 3210 KA(6) = KB(6) +  INT ((KA(1) + KA(2) - KB(1) - KB(2)) / 2 + .5)
 3220 KA(7) = KB(7) +  INT ((KA(1) + KA(4) - KB(1) - KB(4)) / 2 + .5)
 3230 KA(8) = KB(8) +  INT ((KA(2) + KA(4) - KB(2) - KB(4)) / 2 + .5)
 3240  FOR I = 1 TO 4
 3250 CA(I, VAL (A$)) = CA(I, VAL (A$)) + 100
 3255 KC(I + 4) = KA(I + 4)
 3260  NEXT I
 3300  GOTO 3040
 4000  REM  RELIQUES
 4010  & CLS: GOSUB 17100: VTAB 21: HTAB 13: PRINT "Reliques"
 4015 R = 1: GOTO 5020
 5000  REM  MARCHE
 5005 R = 2
 5010  & CLS: GOSUB 17100: VTAB 21: HTAB 12: PRINT "Boutiques"
 5020  IF OB > 9 THEN  GOTO 110
 5030  GOSUB 17200
 5040  FOR I = 1 TO 9
 5050  VTAB 7 + I: HTAB 2: PRINT I;")";EQ$(I,R)
 5060  VTAB 7 + I: HTAB 17: PRINT EQ(I,2,R);" PO"
 5070  IF EQ(I,1,R) =  < 10 THEN  IF EQ(I,3,R) > KC(3) OR EQ(I,4,R) > KC(4) THEN  VTAB 7 + I: HTAB 27: PRINT "Inut"
 5075  IF EQ(I,1,R) > 10 THEN  IF EQ(I,3,R) > KC(1) OR EQ(I,4,R) > KC(2) THEN  VTAB 7 + I: HTAB 27: PRINT "Inut"
 5080  NEXT I
 5090  HTAB 6: VTAB 21: GET A$
 5100  IF  ASC (A$) = 27 OR OB = 9 THEN 120
 5110  IF  VAL (A$) = 0 THEN 5090
 5120  IF EQ( VAL (A$),2,R) > GP THEN 5090
 5130 GP = GP - EQ( VAL (A$),2,R): GOSUB 17200
 5140 OB = OB + 1
 5150 OB$(OB) = EQ$( VAL (A$),R)
 5160  FOR I = 1 TO 6
 5170 OB(OB,I) = EQ( VAL (A$),I,R)
 5180  NEXT I
 5190  GOTO 5090
 5500  CALL 50688
 6000  REM  RECHARGE
 6010  & CLS: GOSUB 17100: VTAB 21: HTAB 12: PRINT "Recharges"
 6020  IF OB = 0 THEN 120
 6040  FOR I = 1 TO OB
 6050  VTAB 7 + I: HTAB 2: PRINT I;")";OB$(I)
 6060  VTAB 7 + I: HTAB 17
 6070  IF OB(I,5) =  < 20 THEN 6090
 6080  IF OB(I,1) = 20 THEN  PRINT  INT (OB(I,2) / 2 + .5);" PO": GOTO 6100
 6090  PRINT "Impossible"
 6100  NEXT I
 6110  GOSUB 17200
 6120  VTAB 21: HTAB 6: GET A$
 6130  IF  ASC (A$) = 27 THEN 120
 6140  IF  VAL (A$) = 0 OR  VAL (A$) > OB THEN 6120
 6150  IF OB( VAL (A$),1) <  > 20 THEN 6120
 6160  IF OB( VAL (A$),5) =  < 20 THEN 6120
 6170  IF GP <  INT (OB( VAL (A$),2) / 2 + 0.5) THEN 6120
 6180 GP = GP -  INT (OB( VAL (A$),2) / 2 + 0.5)
 6190 OB( VAL (A$),5) = OB( VAL (A$),5) - 20
 6200  GOTO 6010
 7000  REM  EXAMEN
 7010  & CLS: GOSUB 17100: VTAB 21: HTAB 17 -  INT ( LEN (NM$) * .5): PRINT NM$
 7020  HTAB 2: VTAB 9: PRINT RA$(RA);" ";CA$(CL)
 7030  HTAB 2: VTAB 10: PRINT "Arg : ";GP
 7040  HTAB 17: VTAB 10: PRINT "Exp : ";XP
 7050  HTAB 2: VTAB 12: PRINT "Int : ";KC(1)
 7060  HTAB 2: VTAB 13: PRINT "Sag : ";KC(2)
 7070  HTAB 2: VTAB 14: PRINT "For : ";KC(3)
 7080  HTAB 2: VTAB 15: PRINT "Dex : ";KC(4)
 7090  HTAB 17: VTAB 12: PRINT "Vit : ";KC(5);"/";KA(5)
 7100  HTAB 17: VTAB 13: PRINT "Mag : ";KC(6);"/";KA(6)
 7110  HTAB 17: VTAB 14: PRINT "Adr : ";KC(7)
 7120  HTAB 17: VTAB 15: PRINT "Per : ";KC(8)
 7130  GET A$: & CLS
 7140  IF OB = 0 THEN 120
 7150  FOR I = 1 TO 5
 7160  VTAB 9 + I: HTAB 2: GOSUB 17400
 7170  NEXT I
 7180  FOR I = 6 TO 9
 7190  VTAB 4 + I: HTAB 17: GOSUB 17400
 7200  NEXT I
 7210  HTAB 6: VTAB 21: GET A$
 7990  GOTO 120
 8000  REM  JETER
 8010  IF OB = 0 THEN  GOTO 120
 8020  & CLS: GOSUB 17100: VTAB 21: HTAB 14: PRINT "Jeter"
 8040  FOR I = 1 TO OB
 8050  VTAB 7 + I: HTAB 6: PRINT I;")";: GOSUB 17400
 8080  NEXT I
 8100  GET A$:V% =  VAL (A$)
 8110  IF  ASC (A$) = 27 THEN 120
 8120  IF  VAL (A$) = 0 OR  VAL (A$) > OB THEN 8100
 8130  IF  FN T(V%) THEN 8100
 8200  IF OB =  VAL (A$) THEN 8300
 8210  FOR I =  VAL (A$) TO OB - 1
 8220 OB$(I) = OB$(I + 1)
 8230  FOR J = 1 TO 6
 8240 OB(I,J) = OB(I + 1,J)
 8250  NEXT J
 8260  NEXT I
 8300 OB$(OB) = ""
 8310  FOR I = 1 TO 6:OB(OB,I) = 0: NEXT I
 8330 OB = OB - 1
 8335  GOSUB 17500
 8340  GOTO 8000
 9000  REM  FIN
 9010  GOSUB 17100: VTAB 21: HTAB 11: PRINT "Partir (O/N)";
 9020  GET A$
 9030  IF A$ = "N" THEN 120
 9040  IF A$ = "O" THEN 9060
 9050  GOTO 9020
 9060  & WINDOW0,40,0,24: HOME : TEXT 
 9062  FOR I = 1 TO 8
 9064  IF KC(I) > 99 THEN KC(I) = 99
 9066  IF KA(I) > 99 THEN KA(I) = 99
 9068  NEXT I
 9070 A =  USR (0):PL$ = "USER.PLAYER": &  DEL PL$: &  DEF PL$,2: &  PRINT PL$
 9080  PRINT NM$: PRINT NA%: PRINT NU%: PRINT CY%: PRINT CX%: PRINT CL: PRINT RA
 9090  FOR I = 1 TO 8: PRINT KA(I): PRINT KB(I): PRINT KC(I): NEXT I
 9100  PRINT GP: PRINT XP: PRINT AR: PRINT PA: PRINT PR: PRINT EN: PRINT OB: PRINT LP%
 9110  IF OB = 0 THEN 9200
 9120  FOR I = 1 TO OB: PRINT OB$(I): FOR J = 1 TO 6: PRINT OB(I,J): NEXT J: NEXT I
 9200  &  END :A =  USR (3): POKE 7445,3
 9210  &  RUN "COMB",24576
 10000  REM  DONNEES
 11000  REM  AUBERGE
 12000  REM  TEMPLE 
 12010  DATA Gu{rison,0 
 12020  DATA M{ditation,0
 12030  DATA Pri}re FOR,20
 12040  DATA Pri}re DEX,20
 12050  DATA Pri}re VIT,20 
 12060  DATA Pri}re MAG,20
 12070  DATA Pri}re ADR,20
 12080  DATA Pri}re PER,20 
 13000  REM  GUILDE
 13010  DATA Intellect,Sagesse,Force,Dext{rit{
 13020  DATA Sorcier,Pr~tre,Guerrier,Voleur 
 13030  DATA  100,300,400,200,0,100,200,100
 13040  DATA  300,100,200,400,100,0,100,200
 13050  DATA  400,300,100,200,200,100,0,100
 13060  DATA  300,400,200,100,100,200,100,0
 14000  REM  ALCHIMISTE
 14010  DATA Potion 5,20,40,0,0,20,5
 14020  DATA Crucifix,30,150,0,15,0,28
 14030  DATA Crosse,20,300,0,15,1,2
 14040  DATA Mitre,30,300,0,15,1,47
 14050  DATA Soutane,30,350,0,20,1,23
 14060  DATA Eau b{nite,20,10,0,15,20,30
 14070  DATA Ep{e sainte,2,300,25,20,13,13 
 14080  DATA Oeil de Ra,30,250,10,15,1,38  
 14090  DATA Dard de set,30,200,5,15,1,7  
 15000  REM  MARCHE
 15010  DATA  Robe,10,1,0,0,1,0
 15020  DATA Hachette,0,3,10,15,5,4
 15030  DATA Baton,2,20,15,15,6,8
 15040  DATA Gourdin,1,3,10,10,5,5 
 15050  DATA Arc long,4,40,20,20,9,0
 15060  DATA Masse mag.,1,100,15,10,8,7
 15070  DATA Baton mag.,2,200,15,15,9,10
 15080  DATA Robe mag.,10,100,0,0,3,0
 15090  DATA Ecu mag.,3,350,25,15,14,0 
 16000  REM  AUTRES
 16010  DATA Humain,Nain,Elfe,Hobbit,Orque,Gnome  
 16020  DATA Sorcier,Pr~tre,Guerrier,Voleur 
 17100  VTAB 21: HTAB 3: PRINT  SPC( 28)
 17110  RETURN 
 17200  VTAB 19: HTAB 13: PRINT  SPC( 8)
 17210  VTAB 19: HTAB 13: PRINT "Arg:";GP
 17230  RETURN 
 17300  VTAB 19: HTAB 13: PRINT  SPC( 8)
 17310  VTAB 19: HTAB 13: PRINT "Exp:";XP
 17330  RETURN 
 17400  IF  FN T(I) THEN  INVERSE 
 17410  PRINT OB$(I)
 17420  NORMAL 
 17430  RETURN 
 17500  IF AR > V% THEN AR = AR - 1
 17510  IF PR > V% THEN PR = PR - 1
 17520  IF PA > V% THEN PA = PA - 1
 17530  RETURN 
