-+-+-+-+-+-+-+-+ START OF PART 85 -+-+-+-+-+-+-+-+ X prt('(0 - 32767) Resources = ',1,1); X get_string(tmp_str,1,26,10); X tmp_val := -999; X readv(tmp_str,tmp_val,error:=continue); X if ((tmp_val > -1) and (tmp_val < 32768)) then X begin X mana := tmp_val; X cmana := tmp_val; X prt_mana; X end; X end; X writev(tmp_str,'Current=',srh:1,' (0-100) Searching = '); X tmp_val := length(tmp_str); X prt(tmp_str,1,1); X get_string(tmp_str,1,tmp_val+1,10); X tmp_val := -999; X readv(tmp_str,tmp_val,error:=continue); X if ((tmp_val > -1) and (tmp_val < 201)) then X srh := tmp_val; X writev(tmp_str,'Current=',stl:1,' (0-10) Stealth = '); X tmp_val := length(tmp_str); X prt(tmp_str,1,1); X get_string(tmp_str,1,tmp_val+1,10); X tmp_val := -999; X readv(tmp_str,tmp_val,error:=continue); X if ((tmp_val > -1) and (tmp_val < 11)) then X stl := tmp_val; X writev(tmp_str,'Current=',disarm:1,' (0-100) Disarming = '); X tmp_val := length(tmp_str); X prt(tmp_str,1,1); X get_string(tmp_str,1,tmp_val+1,10); X tmp_val := -999; X readv(tmp_str,tmp_val,error:=continue); X if ((tmp_val > -1) and (tmp_val < 201)) then X disarm := tmp_val; X writev(tmp_str,'Current=',save:1,' (0-100) Save = '); X tmp_val := length(tmp_str); X prt(tmp_str,1,1); X get_string(tmp_str,1,tmp_val+1,10); X tmp_val := -999; X readv(tmp_str,tmp_val,error:=continue); X if ((tmp_val > -1) and (tmp_val < 201)) then X save := tmp_val; X writev(tmp_str,'Current=',bth:1,' (0-200) Base to hit = '); X tmp_val := length(tmp_str); X prt(tmp_str,1,1); X get_string(tmp_str,1,tmp_val+1,10); X tmp_val := -999; X readv(tmp_str,tmp_val,error:=continue); X if ((tmp_val > -1) and (tmp_val < 201)) then X bth := tmp_val; X writev(tmp_str,'Current=',bthb:1,' (0-200) Guns/Grenade = '); X tmp_val := length(tmp_str); X prt(tmp_str,1,1); X get_string(tmp_str,1,tmp_val+1,10); X tmp_val := -999; X readv(tmp_str,tmp_val,error:=continue); X if ((tmp_val > -1) and (tmp_val < 201)) then X bthb := tmp_val; X writev(tmp_str,'Current=',au:1,' Money = '); X tmp_val := length(tmp_str); X prt(tmp_str,1,1); X get_string(tmp_str,1,tmp_val+1,10); X tmp_val := -999; X readv(tmp_str,tmp_val,error:=continue); X if (tmp_val > -1) then X begin X au := tmp_val; X prt_gold; X end; X end; X erase_line(msg_line,msg_line); X py_bonuses(blank_treasure,0); X end; X`20 X `7B Wizard routine for creating objects -RAK- `7 VD X`5Bpsect(wizard$code)`5D procedure wizard_create; X var X tmp_val : integer; X tmp_str : vtype; X flag : boolean; X begin X msg_print('Warning: This routine can cause fatal error.'); X msg_print(' '); X msg_flag := false; X with temporary_slot do X begin X prt('Name : ',1,1); X if (get_string(tmp_str,1,10,60)) then X name := tmp_str X else X name := '& Wizard Object!'; X repeat X prt('Tval : ',1,1); X get_string(tmp_str,1,10,10); X tmp_val := 0; X readv(tmp_str,tmp_val,error:=continue); X flag := true; X case tmp_val of X 1,13,15 : tchar := '`7E'; X 2 : tchar := '&'; X 4 : tchar := ';'; X 10 : tchar := '`7B'; X 11 : tchar := '`7B'; X 12 : tchar := '`7B'; X 20 : tchar := '`7D'; X 21 : tchar := '/'; X 22 : tchar := '\'; X 23 : tchar := '`7C'; X 25 : tchar := '\'; X`09 29 :`09tchar := '%'; X 30 : tchar := '`5D'; X 31 : tchar := '`5D'; X 32 : tchar := '('; X 33 : tchar := '`5D'; X 34 : tchar := ')'; X 35 : tchar := '`5B'; X 36 : tchar := '('; X 40 : tchar := '"'; X 45 : tchar := '='; X 55 : tchar := '_'; X 60 : tchar := '-'; X 65 : tchar := '-'; X 70,71 : tchar := '?'; X 75,76 : tchar := '!'; X 80 : tchar := ','; X`09 82 :`09tchar := '`7C'; X`09 84 :`09tchar := '*'; X 90,91,92 : tchar := '?'; X otherwise flag := false; X end; X until (flag); X tval := tmp_val; X prt('Subval : ',1,1); X get_string(tmp_str,1,10,10); X tmp_val := 1; X readv(tmp_str,tmp_val,error:=continue); X subval := tmp_val; X prt('Weight : ',1,1); X get_string(tmp_str,1,10,10); X tmp_val := 1; X readv(tmp_str,tmp_val,error:=continue); X weight := tmp_val; X prt('Number : ',1,1); X get_string(tmp_str,1,10,10); X tmp_val := 1; X readv(tmp_str,tmp_val,error:=continue); X number := tmp_val; X prt('Damage : ',1,1); X get_string(tmp_str,1,10,5); X damage := tmp_str; X prt('+To hit: ',1,1); X get_string(tmp_str,1,10,10); X tmp_val := 0; X readv(tmp_str,tmp_val,error:=continue); X tohit := tmp_val; X prt('+To dam: ',1,1); X get_string(tmp_str,1,10,10); X tmp_val := 0; X readv(tmp_str,tmp_val,error:=continue); X todam := tmp_val; X prt('AC : ',1,1); X get_string(tmp_str,1,10,10); X tmp_val := 0; X readv(tmp_str,tmp_val,error:=continue); X ac := tmp_val; X prt('+To AC : ',1,1); X get_string(tmp_str,1,10,10); X tmp_val := 0; X readv(tmp_str,tmp_val,error:=continue); X toac := tmp_val; X prt('P1 : ',1,1); X get_string(tmp_str,1,10,10); X tmp_val := 0; X readv(tmp_str,tmp_val,error:=continue); X p1 := tmp_val; X prt('Flags (In HEX): ',1,1); X flags := get_hex_value(1,17,8); X prt('Cost : ',1,1); X get_string(tmp_str,1,10,10); X tmp_val := 0; X readv(tmp_str,tmp_val,error:=continue); X cost := tmp_val; X if (get_com('Allocate? (Y/N)',command)) then X case command of X 'y','Y': begin X popt(tmp_val); X t_list`5Btmp_val`5D := temporary_slot; X with cave`5Bchar_row,char_col`5D do X begin X if (tptr > 0) then X delete_object(char_row,char_col); X tptr := tmp_val; X end; X msg_print('Allocated...'); X end; X otherwise msg_print('Aborted...'); X end; X temporary_slot := blank_treasure; X end; X end; X X`5Bpsect(wizard$code)`5D procedure make_nice_character; X X BEGIN X with py.misc do X`09 if (lev < 20) then X`09 Begin X max_exp := 7000; exp := max_exp; X au := 30000; `20 X bth := 100; ptohit := 20; ptodam := 20; X`09`09pac := 100; ptoac := 50; `20 X`09`09dis_th := 20; dis_td := 20; dis_tac := 50; X with py.stat do X begin X str := 30; int := 30; wis := 30;`20 X dex := 30; con := 30; chr := 30;`20 X end; X`09 End X`09 else X`09 Begin X max_exp := 200000; exp := max_exp; X au := 90000; `20 X bth := 200;`20 X ptohit := 50; ptodam := 50; `20 X`09`09pac := 100; ptoac := 100; X`09`09dis_th := 50; dis_td := 50; dis_tac := 100; X`09`09with py.stat do X begin X str := 50; int := 50; wis := 50; X`09`09 dex := 50; con := 50; chr := 50;`20 X end; X with py.flags do X begin X fire_resist := true; cold_resist := true; X acid_resist := true; regenerate := true; X lght_resist := true; free_act := true; X sustain_str := true; sustain_int := true;`20 X`09`09 sustain_wis := true; sustain_dex := true;`20 X`09`09 sustain_con := true; sustain_chr := true; X see_inv := true; ffall := true; X end; X`09 End; X draw_cave; X END; X X`5Bpsect(wizard$code)`5D procedure change_location; X Xvar X i1,i2`09: integer; X tmp_str`09: vtype; X XBEGIN X prt_num('Go to which level (0-',townlist`5Btown_num`5D.max_depth,1,1);`20 X prt(') ? ',1,24); X get_string(tmp_str,1,29,5); X i1 := -1; X readv(tmp_str,i1,error:=continue); X i2 := (i1 div 100); X if (i1 > 99) then `7Bchange town`7D X begin X if ((i2 <> town_num) and (i2 in `5B1..8`5D)) then X begin X msg_print('You beam yourself to '+townlist`5Bi2`5D.town_name); X msg_print(''); X town_num := i2; X town_seed := get_seed; X store_init; store_maint; X py.misc.max_lev := 0; X office_char_row := -1; office_char_col := -1; X moria_flag := true; X end; X end X else if (i1 > -1) then X begin X dun_level := i1; X if (dun_level>townlist`5Btown_num`5D.max_depth) then X dun_level := townlist`5Btown_num`5D.max_depth; X moria_flag := true; X end X else X erase_line(msg_line,msg_line); XEND; X X X`5Bpsect(wizard$code)`5D procedure really_heal_character; X BEGIN`20 X remove_curse; X cure_blindness; X cure_confusion; X cure_poison; X remove_fear; X py.misc.chp := py.misc.mhp; X with py.stat do X begin X cstr := str; cint := int; cwis := wis; X cdex := dex; ccon := con; cchr := chr; X end; X zero_pyflag; X prt_stat_block; X END; X X X`5Bpsect(wizard$code)`5D procedure show_values; X X var X`09i1,i2,i3,row,col`09`09`09 : integer; XBegin X`09clear(1,1); X`09with py.misc do X`09 begin`20 X`09 i1 := trunc(expfact*100); X`09 prt_num('Real +to armor : ',ptoac,3,2); X`09 prt_num('Hit Die : ',hitdie,4,2); X`09 prt_num('Exp. Factor % : ',i1,5,2); X`09 prt_num('Real +to hit : ',ptohit,6,2); X`09 prt_num('Real +to dam : ',ptodam,7,2); X`09 prt_num('Speed : ',py.flags.speed,8,2); X`09 prt_num('Base to Hit : ',bth,3,27); X`09 prt_num('BTH with Guns : ',bthb,4,27); X`09 prt_num('BaseSearching : ',srh,5,27); X`09 prt_num('BasePerception : ',perc,6,27); X`09 prt_num('BaseDisarming : ',disarm,7,27); X`09 prt_num('BaseSavingThrow : ',save,8,27); X`09 prt_num('BaseStealth : ',stl,9,27); X`09 prt_num('BaseWeird : ',wierd,10,27); X`09 prt_num('Infravision : ',py.flags.see_infra,11,27); X`09 prt_num('Melee Fights : ',xbth,3,50); X`09 prt_num('Guns/Grenades : ',xbthb,4,50); X`09 prt_num('Searching : ',xsrh,5,50); X`09 prt_num('Perception : ',xperc,6,50); X`09 prt_num('Disarming : ',xdis,7,50); X`09 prt_num('Saving Throw : ',xsave,8,50); X`09 prt_num('Stealth : ',xstl,9,50); X`09 prt_num('Wierd Device : ',xdev,10,50); X`09 prt_num('Dun_Level : ',dun_level,12,2); X`09 prt_num('Town Lev_plus : ',townlist`5Btown_num`5D.lev_plus,13,2); X`09 prt_num('Dun_power : ',dun_power,14,2); X`09 end; X pause(24); X`09clear(1,1); X`09with py.flags do X`09 begin X`09 prt('Counters',3,5); X`09 prt_num('Blind : ',blind,5,5); `20 X`09 prt_num('Confusion : ',confused,6,5);`20 X`09 prt_num('Paralysis : ',paralysis,7,5);`20 X`09 prt_num('Fear : ',afraid,8,5); `20 X`09 prt_num('Posion : ',poisoned,9,5); `20 X`09 prt_num('Hallucinate : ',image,10,5); `20 X`09 prt_num('Prot. Evil : ',protevil,11,5);`20 X`09 prt_num('Invulnerable: ',invuln,12,5);`20 X`09 prt_num('Blessed : ',blessed,13,5); `20 X`09 prt_num('Detect Inv. : ',detect_inv,14,5); X`09 prt_num('Resist Heat : ',resist_heat,15,5); X`09 prt_num('Resist Cold : ',resist_cold,16,5); X`09 prt('More Counters',3,25); X`09 prt_num('Food : ',food,5,25); X`09 prt_num('Food Rate : ',food_digested,6,25); X`09 prt_num('Fast : ',fast,7,25); X`09 prt_num('Slow : ',slow,8,25); X`09 prt_num('Hero : ',hero,9,25);`09 X`09 prt_num('Super Hero : ',shero,10,25); X`09 prt_num('Recall : ',word_recall,11,25); X`09 prt_num('Infravsion : ',tim_infra,12,25); X`09 prt_num('Ring Blast : ',ring_blast,13,25); X`09 prt_num('Special : ',special,14,25); X`09 prt_num('Petrified : ',petrified,15,25); X`09 prt_num('Diseased : ',diseased,16,25); X`09 end; X`09pause(24); X`09clear(1,1); X`09i1 := muptr; X`09i3 := 0; X`09while ((i1 <> 0) and (i3 < 60)) do X`09 begin X`09 prt(c_list`5Bm_list`5Bi1`5D.mptr`5D.name,(i3 mod 20)+2,(i3 div 20)*27 V + 1); X`09 i1 := m_list`5Bi1`5D.nptr; X`09 i3 := i3 + 1; X`09 end; X`09pause(24); X draw_cave; X End; X X`5Bpsect(wizard$code)`5D procedure item_stats; X Xvar X i1`09`09`09: unsigned; X item_val,counter,i2`09: integer; X redraw`09`09: boolean; X out_val`09`09: vtype; X X BEGIN `09 X redraw := false; X if (get_item(item_val,'Examine which item?',redraw,1,inven_ctr)) then X with inventory`5Bitem_val`5D do X begin +-+-+-+-+-+-+-+- END OF PART 85 +-+-+-+-+-+-+-+-