-+-+-+-+-+-+-+-+ START OF PART 33 -+-+-+-+-+-+-+-+ X if (uand(%X'00040000',spells) <> 0) then X writeln(file1,' **Unknown spell value**',error:=continue); X if (uand(%X'00080000',spells) <> 0) then X writeln(file1,' Breathes Lightning Dragon Breath.',error:=contin Vue); X if (uand(%X'00100000',spells) <> 0) then X writeln(file1,' Breathes Gas Dragon Breath.',error:=continue); X if (uand(%X'00200000',spells) <> 0) then X writeln(file1,' Breathes Acid Dragon Breath.',error:=continue); X if (uand(%X'00400000',spells) <> 0) then X writeln(file1,' Breathes Frost Dragon Breath.',error:=continue); X if (uand(%X'00800000',spells) <> 0) then X writeln(file1,' Breathes Fire Dragon Breath.',error:=continue); X END; X`7B Movement for creature `7D Xwriteln(file1,' --Movement =',error:=continue); Xif (uand(%X'00000001',cmove) <> 0) then X writeln(file1,' Move only to attack.',error:=continue); Xif (uand(%X'00000002',cmove) <> 0) then X writeln(file1,' Move and attack normally.',error:=continue); Xif (uand(%X'00000008',cmove) <> 0) then X writeln(file1,' 20% random movement.',error:=continue); Xif (uand(%X'00000010',cmove) <> 0) then X writeln(file1,' 40% random movement.',error:=continue); Xif (uand(%X'00000020',cmove) <> 0) then X writeln(file1,' 75% random movement.',error:=continue); Xif (uand(%X'00020000',cmove) <> 0) then X writeln(file1,' Can open doors.',error:=continue); Xif (uand(%X'00040000',cmove) <> 0) then X writeln(file1,' Can phase through walls.',error:=continue); Xwriteln(file1,' --Creature attacks =',error:=continue); Xattstr := damage; Xwhile (length(attstr) > 0) do X BEGIN X xpos := index(attstr,'`7C'); X if (xpos > 0) then X BEGIN X attx := substr(attstr,1,xpos-1); X attstr := substr(attstr,xpos+1,length(attstr)-xpos); X END X else X BEGIN X attx := attstr; X attstr := ''; X END; X readv(attx,atype,adesc,damstr); X CASE atype of X`7BNormal attack `7D 1 : new_val := 'normal damage.'; X`7BPoison Strength`7D 2 : new_val := 'lowering strength.'; X`7BConfusion attack`7D 3 : new_val := 'confusion.'; X`7BFear attack `7D 4 : new_val := 'fear.'; X`7BFire attack `7D 5 : new_val := 'fire damage.'; X`7BAcid attack `7D 6 : new_val := 'acid damage.'; X`7BCold attack `7D 7 : new_val := 'cold damage.'; X`7BLightning attack`7D 8 : new_val := 'lightning damage.'; X`7BCorrosion attack`7D 9 : new_val := 'corrosion damage.'; X`7BBlindness attack`7D 10 : new_val := 'blindness.'; X`7BParalysis attack`7D 11 : new_val := 'paralyzation.'; X`7BSteal Money `7D 12 : new_val := 'stealing money.'; X`7BSteal Object `7D 13 : new_val := 'stealing object.'; X`7BPoison `7D 14 : new_val := 'poison damage.'; X`7BLose Dex `7D 15 : new_val := 'lose dexterity.'; X`7BLose Con `7D 16 : new_val := 'lose constitution.'; X`7BLose Int `7D 17 : new_val := 'lose intelligence.'; X`7BLose Wis `7D 18 : new_val := 'lose wisdom.'; X`7BLose Exp `7D 19 : new_val := 'lose experience.'; X`7BAggravation `7D 20 : new_val := 'aggravates monsters.'; X`7BDisenchant `7D 21 : new_val := 'disenchants objects.'; X`7BEats food `7D 22 : new_val := 'eating food.'; X`7BEats light `7D 23 : new_val := 'eating light source.'; X`7BEats charges `7D 24 : new_val := 'absorbing charges.'; X`7BVampire Bite `7D 25 : new_val := 'losing strength and experience'; X`7BTurn to Stone `7D 26 : new_val := 'turning to stone.'; X`7BMind Flayer `7D 27 : new_val := 'sucking your brain out.'; X`7BHell Horse`09`7D 28 : new_val := 'NightMare blindness.'; X`7BVargouille`09`7D 29 : new_val := 'draining max hit points.'; X`7BDiseases `7D 30 : new_val := 'causes disease.'; X`7BLose charisma`09`7D 31 : new_val := 'lose charisma.'; X`7BSpecial `7D 99 : new_val := 'blank message.'; X otherwise new_val := '**Unknown value** AAAAUUUGH!!!!'; X END; X out_val := attack_desc`5Badesc`5D + new_val + ' (' + damstr + ')'; X writeln(file1,out_val,error:=continue); X END; X for i2 := 1 to 2 do writeln(file1,' ',error:=continue); XEND; X`7B end writing to file `7D X close(file1,error:=continue); X prt('Completed.',1,1); X END; X END X END; X`20 X`20 X`7B Print the character to a file or device `7D X`5Bpsect(misc2$code)`5D procedure character_print; X var X i1,i2,i3: integer; X file1 : text; X out_val,filename1,prt1,prt2,new_page : vtype; X out_str,out_int,out_wis,out_dex,out_con,out_chr : stat_type; X`20 X BEGIN X prt('File name: ',1,1); X if (get_string(filename1,1,12,64)) then X BEGIN X if (length(filename1) = 0) then filename1 := 'BOSSCHR.DAT'; X open(file1,filename1,error:=continue); X if (status(file1) = 0) then X BEGIN X prt('Writing character sheet...',1,1); X put_qio; X rewrite(file1,error:=continue); X new_page := chr(12); X writeln(file1,new_page,error:=continue); X cnv_stat(py.stat.cstr,out_str); X cnv_stat(py.stat.cint,out_int); X cnv_stat(py.stat.cwis,out_wis); X cnv_stat(py.stat.cdex,out_dex); X cnv_stat(py.stat.ccon,out_con); X cnv_stat(py.stat.cchr,out_chr); X writeln(file1,' ',error:=continue); X writeln(file1,' ',error:=continue); X writeln(file1,' ',error:=continue); Xwrite(file1, ' Name :',pad(py.misc.name,' ',25),error:=continue); Xwrite(file1, ' Age :',py.misc.age:4,error:=continue); Xwriteln(file1,' Strength :',out_str:6,error:=continue); Xwrite(file1, ' Qual :',pad(py.misc.race,' ',25),error:=continue); Xwrite(file1, ' Height :',py.misc.ht:4,error:=continue); Xwriteln(file1,' Intelligence :',out_int:6,error:=continue); Xwrite(file1, ' Sex :',pad(py.misc.sex,' ',25),error:=continue); Xwrite(file1, ' Weight :',py.misc.wt:4,error:=continue); Xwriteln(file1,' Wisdom :',out_wis:6,error:=continue); Xwrite(file1, ' Class :',pad(py.misc.tclass,' ',25),error:=continue); Xwrite(file1, ' Social Class:',py.misc.sc:4,error:=continue); Xwriteln(file1,' Dexterity :',out_dex:6,error:=continue); Xwrite(file1, ' Title :',pad(py.misc.title,' ',25),error:=continue); Xwrite(file1, ' ',' ',error:=continue); Xwriteln(file1,' Constitution :',out_con:6,error:=continue); Xwrite(file1, ' ',' ':30,error:=continue); Xwrite(file1, ' ',error:=continue); Xwriteln(file1,' Charisma :',out_chr:6,error:=continue); X writeln(file1,' ',error:=continue); X writeln(file1,' ',error:=continue); X writeln(file1,' ',error:=continue); X writeln(file1,' ',error:=continue); Xwrite(file1, ' + To Hit :',py.misc.dis_th:6,error:=continue); Xwrite(file1, ' Level :',py.misc.lev:6,error:=continue); Xwriteln(file1,' Max Hit Points :',py.misc.mhp:6,error:=continue); Xwrite(file1, ' + To Damage :',py.misc.dis_td:6,error:=continue); Xwrite(file1, ' Experience :',py.misc.exp:6,error:=continue); Xwriteln(file1,' Cur Hit Points :',trunc(py.misc.chp):6,error:=continue); Xwrite(file1, ' + To AC :',py.misc.dis_tac:6,error:=continue); Xwrite(file1, ' Cash :',py.misc.au:6,error:=continue); Xwriteln(file1,' Max Resources :',py.misc.mana:6,error:=continue); Xwrite(file1, ' Total AC :',py.misc.dis_ac:6,error:=continue); Xwrite(file1, ' ',error:=continue); Xwriteln(file1,' Current Rsrc :',py.misc.mana:6,error:=continue); X`20 X writeln(file1,' ',error:=continue); X writeln(file1,' ',error:=continue); Xwriteln(file1,'(Miscellaneous Abilities)':40,error:=continue); Xwriteln(file1,' ',error:=continue); Xwrite(file1, ' Melee Fights: ',pad(likert(xbth ,20,1),' ',10),error:=conti Vnue); Xwrite(file1, ' Stealth : ',pad(likert(xstl ,10,1),' ',10),error:=conti Vnue); Xwriteln(file1,' Perception : ',pad(likert(xperc,10,1),' ',10),error:=conti Vnue); Xwrite(file1, ' Guns/Grenade: ',pad(likert(xbthb,20,1),' ',10),error:=conti Vnue); Xwrite(file1, ' Disarming : ',pad(likert(xdis ,10,1),' ',10),error:=conti Vnue); Xwriteln(file1,' Searching : ',pad(likert(xsrh ,10,1),' ',10),error:=conti Vnue); Xwrite(file1, ' Saving Throw: ',pad(likert(xsave,10,1),' ',10),error:=conti Vnue); Xwrite(file1, ' Weird Device: ',pad(likert(xdev ,10,1),' ',10),error:=conti Vnue); Xwriteln(file1,' Infra-Vision: ',pad(xinfra,' ',10),error:=continue); X`7B Write out the character's history `7D Xwriteln(file1,' '); Xwriteln(file1,' '); Xwriteln(file1,'Character Background':45); Xfor i1 := 1 to 5 do writeln(file1,pad(py.misc.history`5Bi1`5D,' ',71):76); X`7B Write out the equipment list.`7D X i2 := 0; X writeln(file1,' ',error:=continue); X writeln(file1,' ',error:=continue); X writeln(file1,' `5BCharacter''s Equipment List`5D',error:=con Vtinue); X writeln(file1,' ',error:=continue); Xif (equip_ctr = 0) then X writeln(file1,' Character has no equipment in use.',error:=continue) Xelse X for i1 := 23 to equip_max do X with equipment`5Bi1`5D do X if (tval > 0) then X BEGIN X CASE i1 of X 23 : prt1 := ') You are wielding : '; X 24 : prt1 := ') Worn on head : '; X 25 : prt1 := ') Worn around neck : '; X 26 : prt1 := ') Worn on body : '; X 27 : prt1 := ') Worn on shield arm : '; X 28 : prt1 := ') Worn on hands : '; X 29 : prt1 := ') Right ring finger : '; X 30 : prt1 := ') Left ring finger : '; X 31 : prt1 := ') Worn on feet : '; X 32 : prt1 := ') Worn about body : '; X 33 : prt1 := ') Light source is : '; X 34 : prt1 := ') Secondary weapon : '; X`09 35 : prt1 := ') Computer Used : '; X otherwise prt1 := ') *Unknown value* : '; X END; X i2 := i2 + 1; X objdes(prt2,i1,true,'e'); X writev(out_val,' ',chr(i2+96),prt1,prt2); X writeln(file1,out_val,error:=continue); X END; X`7B Write out the character's inventory.`7D X writeln(file1,new_page,error:=continue); X writeln(file1,' ',error:=continue); X writeln(file1,' ',error:=continue); X writeln(file1,' ',error:=continue); X writeln(file1,' `5BGeneral Inventory List`5D',error:=continue V); X writeln(file1,' ',error:=continue); Xif (inven_ctr = 0) then X writeln(file1,' Character has no objects in inventory.',error:=continue) Xelse X BEGIN X for i1 := 1 to inven_ctr do X BEGIN X objdes(prt1,i1,true,'i'); X writev(out_val,chr(i1+96),') ',prt1); X writeln(file1,out_val,error:=continue); X END X END; X writeln(file1,new_page,error:=continue); X close(file1,error:=continue); X prt('Completed.',1,1); X END; X END X END; X X X`5Bpsect(moria$code)`5D procedure read_text_data( position : integer;`20 X`09`09`09`09`09 filename : vtype); XVAR X num,starts,msg_lines : integer; X infile`09 : text; X string`09 : vtype; X XBEGIN X open(infile,file_name:=filename, organization:=sequential,history:=old, X sharing:=readonly,error:=continue); X reset(infile); X readln(infile,num); X If (position > num) then X begin X writev(string,'Error: Message number ',position:3,' in file ',filenam Ve); X msg_print(string); X msg_print('Please report error to your local BOSS wizard.'); X end X Else X begin `20 X if (position = 0) then `20 X position := randint(num); X starts := 1; X while(starts < position) do X begin X`09 readln(infile,string); X`09 if (string = '**') then X`09 starts := starts + 1; X end; X msg_lines := 0; X readln(infile,string); X while (string <> '**') do X begin X msg_lines := msg_lines + 1; X`09msg_print(string); X`09readln(infile,string); X end; X if (msg_lines = 0) then X begin X writev(string, X 'Error: blank message number ',position:3,' in file ',filename); X`09 msg_print(string); X`09 msg_print('Please report error to your local BOSS wizard.'); X end; X end; X close(infile); X End; $ CALL UNPACK [.INC]FILES.INC;1 889478932 $ create 'f' X `7B Running Disk Programs -RAK- (RLG) `7D X`09`7BPlayer Must have a computer (tval=29) wielded`7D X`5Bpsect(misc2$code)`5D procedure read; X var X i1`09 : unsigned; X i2,i3,i4,item_val,y,x,failure_rate : integer; X redraw,ident,first,flag`09`09 : boolean; X BEGIN X first := true; X reset_flag := true; X if (inven_ctr > 0) then X if (equipment`5B35`5D.tval = 29) then X begin X if (find_range(`5B70,71`5D,i2,i3)) then X if (py.flags.blind > 0) then X msg_print('Help me, I''m blind!') X else if (no_light) then X msg_print('You have no light to see by.') X else if (py.flags.confused > 0) then X begin X msg_print('The text seems to swim about the screen!'); X msg_print('You are too confused to type...'); X end X else X begin X redraw := false; X if (get_item(item_val,'Run which floppy disk?',redraw, X i2,i3)) then X with inventory`5Bitem_val`5D do X begin X if (redraw) then draw_cave; X`09`09 failure_rate := (equipment`5B35`5D.subval - 300); X reset_flag := false; X i1 := flags; X ident := false; +-+-+-+-+-+-+-+- END OF PART 33 +-+-+-+-+-+-+-+-