-+-+-+-+-+-+-+-+ START OF PART 74 -+-+-+-+-+-+-+-+
X                  cursor_erp := escape + 'J';
X                  curlen_r   := 3;
X                  curlen_c   := 1;
X                  cursor_l   := 4;
X                  for i1 := 1 to 24 do
X                    begin
X                      tmp := chr(i1+39);                        `7B Row char
V`7D
X                      cursor_r`5Bi1`5D := escape + 'Y' + tmp        `7B Row
V part`7D
X                    end;
X                  for i1 := 1 to 80 do
X                    begin
X                      tmp := chr(i1+39);                        `7B Col char
V`7D
X                      cursor_c`5Bi1`5D := tmp                       `7B Col
V part`7D
X                    end
X                end;
X        16 :    `7B Teleray 10 (/FT1)                     `7D
X                begin
X                  row_first := true;    `7B Sequence is row,col   `7D
X                  cursor_erl := escape + 'K';
X                  cursor_erp := escape + 'J';
X                  curlen_r   := 3;
X                  curlen_c   := 1;
X                  cursor_l   := 4;
X                  for i1 := 1 to 24 do
X                    begin
X                      tmp := chr(i1+31);                        `7B Row char
V`7D
X                      cursor_r`5Bi1`5D := escape + 'Y' + tmp        `7B Row
V part`7D
X                    end;
X                  for i1 := 1 to 80 do
X                    begin
X                      tmp := chr(i1+31);                        `7B Col char
V`7D
X                      cursor_c`5Bi1`5D := tmp                       `7B Col
V part`7D
X                    end
X                end;
X        64 :    `7B VT52 (/VT52)                          `7D
X                begin
X                  row_first := true;    `7B Sequence is row,col   `7D
X                  cursor_erl := escape + 'K';
X                  cursor_erp := escape + 'J';
X                  curlen_r   := 3;
X                  curlen_c   := 1;
X                  cursor_l   := 4;
X                  for i1 := 1 to 24 do
X                    begin
X                      tmp := chr(i1+31);                        `7B Row char
V`7D
X                      cursor_r`5Bi1`5D := escape + 'Y' + tmp        `7B Row
V part`7D
X                    end;
X                  for i1 := 1 to 80 do
X                    begin
X                      tmp := chr(i1+31);                        `7B Col char
V`7D
X                      cursor_c`5Bi1`5D := tmp                       `7B Col
V part`7D
X                    end
X                end;
X      96..102 : `7B VT100,101,102,105,125,131,132 and ANSI X3.64 standard `7
VD
X                `7B Note that the row and column strings must always be   `7
VD
X                `7B of the same length                                    `7
VD
X                begin
X                  row_first := true;    `7B Sequence is row,col   `7D
X                  cursor_erl := escape + '`5BK';
X                  cursor_erp := escape + '`5BJ';
X                  curlen_r   := 4;
X                  curlen_c   := 4;
X                  cursor_l   := 8;
X                  for i1 := 1 to 24 do
X                    begin
X                      writev(tmp_str,'00',i1:1);                `7B Row char
Vs`7D
X                      tmp_str := substr(tmp_str,length(tmp_str)-1,2);
X                      cursor_r`5Bi1`5D := escape + '`5B' + tmp_str    `7B Ro
Vw part `7D
X                    end;
X                  for i1 := 1 to 80 do
X                    begin
X                      writev(tmp_str,'00',i1:1);                `7B Col char
Vs`7D
X                      tmp_str := substr(tmp_str,length(tmp_str)-1,2);
X                      cursor_c`5Bi1`5D := ';' + tmp_str + 'H'       `7B Col
V part `7D
X                    end
X                end;
X        110 :   `7B VT200 and ANSI X3.64 standard (/DEV=VT200)`7D
X                `7B Note that the row and column strings must always be   `7
VD
X                `7B of the same length                                    `7
VD
X                begin
X                  row_first := true;    `7B Sequence is row,col   `7D
X                  cursor_erl := escape + '`5BK';
X                  cursor_erp := escape + '`5BJ';
X                  curlen_r   := 4;
X                  curlen_c   := 4;
X                  cursor_l   := 8;
X                  for i1 := 1 to 24 do
X                    begin
X                      writev(tmp_str,'00',i1:1);                `7B Row char
Vs`7D
X                      tmp_str := substr(tmp_str,length(tmp_str)-1,2);
X                      cursor_r`5Bi1`5D := escape + '`5B' + tmp_str    `7B Ro
Vw part `7D
X                    end;
X                  for i1 := 1 to 80 do
X                    begin
X                      writev(tmp_str,'00',i1:1);                `7B Col char
Vs`7D
X                      tmp_str := substr(tmp_str,length(tmp_str)-1,2);
X                      cursor_c`5Bi1`5D := ';' + tmp_str + 'H'       `7B Col
V part `7D
X                    end
X                end;
X        112 :   `7B VT300 and ANSI X3.64 standard (/DEV=VT300)`7D
X                `7B Note that the row and column strings must always be   `7
VD
X                `7B of the same length                                    `7
VD
X                begin
X                  row_first := true;    `7B Sequence is row,col   `7D
X                  cursor_erl := escape + '`5BK';
X                  cursor_erp := escape + '`5BJ';
X                  curlen_r   := 4;
X                  curlen_c   := 4;
X                  cursor_l   := 8;
X                  for i1 := 1 to 24 do
X                    begin
X                      writev(tmp_str,'00',i1:1);                `7B Row char
Vs`7D
X                      tmp_str := substr(tmp_str,length(tmp_str)-1,2);
X                      cursor_r`5Bi1`5D := escape + '`5B' + tmp_str    `7B Ro
Vw part `7D
X                    end;
X                  for i1 := 1 to 80 do
X                    begin
X                      writev(tmp_str,'00',i1:1);                `7B Col char
Vs`7D
X                      tmp_str := substr(tmp_str,length(tmp_str)-1,2);
X                      cursor_c`5Bi1`5D := ';' + tmp_str + 'H'       `7B Col
V part `7D
X                    end
X                end;
X           113 :   `7B VT400 and ANSI X3.64 standard (/DEV=VT400)`7D
X                   `7B Note that the row and column strings must always be
V   `7D
X                   `7B of the same length.
V                                   `7D
X                begin
X                  row_first := true;    `7B Sequence is row,col   `7D
X                  cursor_erl := escape + '`5BK';
X                  cursor_erp := escape + '`5BJ';
X                  curlen_r   := 4;
X                  curlen_c   := 4;
X                  cursor_l   := 8;
X                  for i1 := 1 to 24 do
X                    begin
X                      writev(tmp_str,'00',i1:1);                `7B Row char
Vs`7D
X                      tmp_str := substr(tmp_str,length(tmp_str)-1,2);
X                      cursor_r`5Bi1`5D := escape + '`5B' + tmp_str    `7B Ro
Vw part `7D
X                    end;
X                  for i1 := 1 to 80 do
X                    begin
X                      writev(tmp_str,'00',i1:1);                `7B Col char
Vs`7D
X                      tmp_str := substr(tmp_str,length(tmp_str)-1,2);
X                      cursor_c`5Bi1`5D := ';' + tmp_str + 'H'       `7B Col
V part `7D
X                    end
X                end;
X        otherwise
X                begin
X                  writeln('*** ERROR : Terminal not supported ***');
X                  writeln('See TERMDEF.PAS for definning new terminals.');
X                  writeln('*** Terminals supported:');
X                  writeln('    VT52         Set Terminal/VT52');
X                  writeln('    VT100        Set Terminal/VT100');
X                  writeln('    VT101        Set Terminal/VT101');
X                  writeln('    VT102        Set Terminal/VT102');
X                  writeln('    VT105        Set Terminal/VT105');
X                  writeln('    VT125        Set Terminal/VT125');
X                  writeln('    VT131        Set Terminal/VT131');
X                  writeln('    VT132        Set Terminal/VT132');
X                  writeln('    VT200        Set Terminal/VT200');
X                  writeln('    VT300        Set Terminal/VT300');
X                  writeln('    VT400        Set Terminal/VT400');
X                  writeln('    Teleray 10   Set Terminal/FT1');
X                  writeln('    ADM-3A       Set Terminal/FT2');
X                  writeln('    ADDS100      Set Terminal/FT3');
X                  writeln('    IBM3101      Set Terminal/FT4');
X                  writeln;
X                  exit
X                end
X    end
Xend;
$ CALL UNPACK [.INC]TERMDEF.INC;1 1098812698
$ create 'f'
X`7BTraining`7D
X
X`5Bpsect(store$code)`5D function get_option : char;
X   var`20
X
X       option`09`09:`09char;
X       com_val`09`09:`09integer;
X       exit_flag`09:`09boolean;
X      `20
XBegin
X`09prt_num('Dollars Remaining : ',py.misc.au,19,23);
X`09prt('You may:',21,6);
Xprt('  p) Pay for Option.               space) Browse options.',22,6);
Xprt(' `5EZ) Exit.                            `5ER) Redraw the screen.',23,6)
V;
X    repeat
X      if (get_com('',command)) then
X        begin
X`09  msg_flag := false;
X`09  com_val := ord(command);
X`09  case com_val of`20
X`09     18  :;
X`09     32  :prt('All options are shown.',1,1);
X`09    112  :begin
X`09`09    prt('What would you like?',1,1);
X`09`09    exit_flag := get_com('',option);
X`09`09  end;
X`09    otherwise prt('Invalid Command.',1,1);
X`09  end;
X`09end
X      else
X        exit_flag := true;     `20
X    until(exit_flag);
X    get_option := option;
XEnd;
X
X`7BSpecific Training within a store`7D
X
X`5Bpsect(store$code)`5D procedure ltrain;
X   var
X       oa,ob,oc`09`09:`09integer;
X       too_poor`09`09:`09ttype;      `20
X
XBEGIN
X     begin `7Bset prices`7D
X       oa := py.misc.stl*100;
X       ob := (py.misc.perc)*10;
X       oc := 20*py.stat.ccon**2;
X     end;
X     too_poor := 'You cannot afford such professional services.';
X     prt('Welcome to the Survivalist Union',3,20);
X     prt(' How can we assist you?',5,1);        prt('   Your Price:',5,61);
X     prt(' a) Increase Stealth Skill',7,1);     prt_num('',oa,7,66);
X     prt(' b) Increase Perception Skill',8,1);`09prt_num('',ob,8,66);
X     prt(' c) Increase Constitution',9,1);      prt_num('',oc,9,66);
X    case ord(get_option) of `7B97-99`7D
X      97: Begin
X`09    if (py.misc.au < oa) then
X`09       msg_print(too_poor)
X`09    else
X`09      begin
X      `09msg_print('You suffer hours of intensive games of hide and seek.');
X`09`09turn := turn + 2880;
X`09`09py.misc.au := py.misc.au - oa;
X`09`09py.flags.food := py.flags.food - 3000;`09`09
X`09`09py.misc.stl := py.misc.stl + 1;
X`09      end;
X`09  End;
X      98: Begin
X`09    if (py.misc.au < ob) then
X`09       msg_print(too_poor)
X`09    else
X`09      begin
X      `09msg_print('You spend hours doing intensive word search puzzles.');
X`09`09turn := turn + 2880;
X`09`09py.misc.au := py.misc.au - ob;
X`09`09py.flags.food := py.flags.food - 3000;`09`09
X`09`09py.misc.perc := py.misc.perc + 5 + randint(5);
X`09      end;
X`09  End;
X      99: Begin
X`09    if (py.misc.au < oc) then
X`09       msg_print(too_poor)
X`09    else
X`09      begin
X      `09msg_print('You do aerobic exercises and practice swallowing poisons
V.');
X`09`09turn := turn + 2880;
X`09`09py.misc.au := py.misc.au - oc;
X`09`09py.flags.food := py.flags.food - 3000;`09`09
X`09`09py.stat.ccon := in_statt(py.stat.ccon);
X`09`09if (py.stat.ccon > py.stat.con) then
X`09`09    py.stat.con := py.stat.ccon;
X`09      end;
X`09  End;
X       otherwise turn := turn + 12;
X    End;
XEND;
X
X`5Bpsect(store$code)`5D procedure wtrain;
X
X   var
X       oa,ob,oc`09`09:`09integer;
X       too_poor`09`09:`09ttype;      `20
X
XBEGIN
X     begin `7Bset prices`7D
X       oa := py.misc.bth*10;
X       ob := py.misc.bthb*10;
X       oc := 20*py.stat.cstr**2;
X     end;
X     too_poor := 'You cannot afford our physical training.';
X     prt('Welcome to the Soldier of Fortune Outpost',3,15);
X     prt(' How can we assist you?',5,1);    prt('   Your Price:',5,61);
X     prt(' a) Increase Melee Skill',7,1);   prt_num('',oa,7,66);
X     prt(' b) Increase Gun Skill',8,1);`09    prt_num('',ob,8,66);
X     prt(' c) Increase Strength',9,1);`09    prt_num('',oc,9,66);
X    case ord(get_option) of `7B97-99`7D
X      97: Begin
X`09    if (py.misc.au < oa) then
X`09       msg_print(too_poor)
X`09    else
X`09      begin
X`09      `09msg_print('You endure hours of hand to hand training.');
X`09`09turn := turn + 2880;
X`09`09py.misc.au := py.misc.au - oa;
X`09`09py.flags.food := py.flags.food - 3000;`09`09
X`09`09py.misc.bth := py.misc.bth + 5 + randint(5);
X`09      end;
X`09  End;
X      98: Begin
X`09    if (py.misc.au < ob) then
X`09       msg_print(too_poor)
X`09    else
X`09      begin
X`09      `09msg_print('You endure hours of ranged weapon training.');
X`09`09turn := turn + 2880;
X`09`09py.misc.au := py.misc.au - ob;
X`09`09py.flags.food := py.flags.food - 3000;`09`09
X`09`09py.misc.bthb := py.misc.bthb + 5 + randint(5);
X`09      end;
X`09  End;
X      99: Begin
X`09    if (py.misc.au < oc) then
X`09       msg_print(too_poor)
X`09    else
X`09      begin
X`09      `09msg_print('You lift weights under skilled supervision.');
X`09`09turn := turn + 2880;
X`09`09py.misc.au := py.misc.au - oc;
X`09`09py.flags.food := py.flags.food - 3000;`09`09
X`09`09py.stat.cstr := in_statt(py.stat.cstr);
X`09`09if (py.stat.cstr > py.stat.str) then
X`09`09    py.stat.str := py.stat.cstr;
X`09      end;
X`09  End;
X`09otherwise turn := turn + 12;
X      End;`09     `09`09
XEND;
X
X`5Bpsect(store$code)`5D procedure ttrain;
X
X   var
X       oa,ob,oc`09`09:`09integer;
X       too_poor`09`09:`09ttype;      `20
X
XBEGIN
X     begin `7Bset prices`7D
X       oa := py.misc.save*10;
X       if (py.misc.pclass in `5B3,6`5D) then
X         ob := py.misc.lev*600
X       else
X         ob := py.misc.lev*1000;
X       oc := 20*py.stat.cwis**2;
X     end;
X   too_poor := 'Sorry, but you must donate more money than you are carrying.
V';
X     prt('Welcome to the Illustrious All-Knowing Club',3,15);
X     prt(' How may we aid you?',5,1);    prt('   Your Price:',5,61);
+-+-+-+-+-+-+-+-  END  OF PART 74 +-+-+-+-+-+-+-+-
