1 |
REM > !Territory.Utils.Choose |
2 |
|
3 |
DIM Terr$(20), Terr%(20), b% 100 |
4 |
|
5 |
PRINT "Please choose a territory:" |
6 |
|
7 |
z% = 0 |
8 |
FOR t% = 1 TO 100 |
9 |
SYS &43044, t% TO ;f% |
10 |
IF (f% AND %100) THEN |
11 |
Terr%(z%) = t% |
12 |
SYS &43043, t%, b%, 100 TO , Terr$(z%) |
13 |
PRINT " "+CHR$(65 + z%)+" "+Terr$(z%) |
14 |
z% += 1 |
15 |
ENDIF |
16 |
NEXT |
17 |
|
18 |
PRINT |
19 |
PRINT "Choosing " + Terr$(0) + " in "; |
20 |
x% = POS: y% = VPOS |
21 |
PRINT "5 seconds" |
22 |
s% = 5 |
23 |
REPEAT |
24 |
g% = INKEY(100) |
25 |
IF g% = -1 THEN |
26 |
s% -= 1 |
27 |
IF s% = 0 THEN |
28 |
PRINT TAB(0, y%) Terr$(0) + " territory chosen "' |
29 |
OSCLI"Set Territory$Name " + Terr$(0) |
30 |
OSCLI"SetEval Territory " + STR$Terr%(0) |
31 |
END |
32 |
ENDIF |
33 |
PRINT TAB(x%, y%) STR$s% |
34 |
ELSE |
35 |
IF g% > 96 THEN g% -= 32 |
36 |
ENDIF |
37 |
UNTIL (g% > 64) AND (g% < (65 + z%)) |
38 |
|
39 |
PRINT TAB(0, y%) Terr$(g% - 65)+" territory chosen "' |
40 |
|
41 |
OSCLI"Set Territory$Name " + Terr$(g% - 65) |
42 |
OSCLI"SetEval Territory " + STR$Terr%(g% - 65) |