-+-+-+-+-+-+-+-+ START OF PART 31 -+-+-+-+-+-+-+-+ X BEGIN X afraid := afraid + randint(10) + level; X msg_print('You feel terrified!'); X ident := true; X END; X 4 : with py.flags do X BEGIN X confused := confused + randint(10) + level; X msg_print('You feel drugged.'); X END; X 5 : with py.flags do X image := image + randint(200) + 25*level + 200; X 6 : ident := cure_poison; X 7 : ident := cure_blindness; X 8 : with py.flags do X if (afraid > 1) then X BEGIN X afraid := 1; X ident := true; X END; X 9 : ident := cure_confusion; X 10 : ident := lose_str; X 11 : ident := lose_con; X 12 : ident := lose_int; X 13 : ident := lose_wis; X 14 : ident := lose_dex; X 15 : ident := lose_chr; X 16 : with py.stat do X if (str > cstr) then X BEGIN X cstr := str; X msg_print('You feel your strength returning.'); X prt_strength; X ident := true; X END; X 17 : with py.stat do X if (con > ccon) then X BEGIN X ccon := con; X msg_print('You feel your health returning.'); X prt_constitution; X ident := true; X END; X 18 : with py.stat do X if (py.stat.int > cint) then X BEGIN X cint := py.stat.int; X msg_print('Your head spins a moment.'); X prt_intelligence; X ident := true; X END; X 19 : with py.stat do X if (wis > cwis) then X BEGIN X cwis := wis; X msg_print('You feel your wisdom returning.'); X prt_wisdom; X ident := true; X END; X 20 : with py.stat do X if (dex > cdex) then X BEGIN X cdex := dex; X msg_print('You feel more dextrous.'); X prt_dexterity; X ident := true; X END; X 21 : with py.stat do X if (chr > cchr) then X BEGIN X cchr := chr; X msg_print('Your skins starts itching.'); X prt_charisma; X ident := true; X END; X 22 : ident := hp_player(randint(3),'food.'); X 23 : ident := hp_player(randint(6),'food.'); X 24 : ident := hp_player(randint(12),'food.'); X 25 : ident := hp_player(damroll('3d6'),'food.'); X 26 : ident := hp_player(damroll('3d12'),'food.'); X 27 : ident := hp_player(-randint(4),'poisonous food.'); X 28 : ident := hp_player(-randint(8),'poisonous food.'); X X 29 : ident := hp_player(-damroll('2d8'),'poisonous food.'); X 30 : ident := hp_player(-damroll('3d8'),'poisonous food.'); X 31 : with py.misc do X BEGIN X mhp := mhp - 1; X if (mhp < chp) then X chp := mhp; X take_hit(1,'poisonous food.'); X prt_mhp; X prt_chp; X ident := true; X END; X otherwise ; X END; X`7B End of food actions.`7D X END; X if (ident) then X identify(inventory`5Bitem_val`5D); X if (flags <> 0) then X with py.misc do X BEGIN X exp := exp + round(level/lev); X prt_experience; X END; X add_food(p1); X py.flags.status := uand(%X'FFFFFFFC',py.flags.status); X prt_hunger; X prt_cur_weight; X desc_remain(item_val); X inven_destroy(item_val); X END X else X if (redraw) then draw_cave; X END X else `20 X msg_print('You are not carrying any food.'); X END X else X msg_print('But you are not carrying anything.'); X END; $ CALL UNPACK [.INC]EAT.INC;1 1599540174 $ create 'f' X`7B function returns the players USERNAME `7D X`5Bpsect(id$code)`5D function get_username : usernam_type; X var X user : usernam_type; X icode : integer; X jpirec : recj; X`20 X`7B calls GETJPI routine to return the USERNAME `7D X function sys$getjpi (%immed p1 : integer; X %immed p2 : integer; X %immed p3 : integer; X var itmlst : recj; X %immed p4 : integer; X %immed p5 : integer; X %immed p6 : integer) : integer; X external; X`20 X BEGIN X with jpirec do X BEGIN X unameinfo.unamelen := 12; X unameinfo.jpi$_username := %x202; X new (ptr_uname); X ptr_uname`5E := ' '; X new (ptr_unamelen); X ptr_unamelen`5E := 0; X endlist := 0 X END; X icode := SYS$GETJPI (0,0,0,jpirec,0,0,0); X if not odd(icode) then X BEGIN X writeln('Error in GETJPI process'); X halt X END X else X get_username := jpirec.ptr_uname`5E X END; X X X`7BCompares Username to Users listed in a file. If in file, returns true. -R VLG`7D X`5Bpsect(id$code)`5D function user_vs_file(boss_file : vtype) : boolean; X var X usr, curusr: usernam_type; X file1 : text; `20 X XBEGIN `7B-NBT-`7D X user_vs_file := false;`20 X usr := username; X priv_switch(1); X open(file1,file_name:=boss_file, organization:=sequential,history:=old, X sharing:=readwrite,error:=continue); X if (status(file1) = 0) then X BEGIN X reset(file1); X while not(eof(file1)) do begin X readln(file1,curusr,error:=continue); X if usr = curusr then user_vs_file := true; X end; X close(file1,error:=continue); X END X else X BEGIN X prt ('ERROR: A severe error occurred in ID Section.',1,1); X`09 prt ('Please notify the BOSS Master...',2,1); X Pause(24); X End; X END; X X X `7B Function returns true if proper password is given. -RLG `7D X`5Bpsect(id$code)`5D function check_pswd : boolean; X var X i1 : integer; X x : char; X tpw : packed array `5B1..12`5D of char; X`20 X BEGIN X check_pswd := false; X i1 := 0; X tpw := ' '; X prt('Password : ',1,1); X repeat X inkey(x); X case ord(x) of X 13 : ; X otherwise `20 X`09 begin X i1 := i1 + 1; X tpw`5Bi1`5D := x; X end X end; X until ((i1 = 12) or (ord(x) = 13)); X if (tpw = gurgle) then check_pswd := true; X msg_flag := false; X erase_line(msg_line,msg_line); X END; X X X`5Bpsect(id$code)`5D procedure look_at_userid; X X BEGIN X`09username := get_username; X`09validuser := user_vs_file(BOSS_WIZ); X scumuser := user_vs_file(BOSS_LOS); X putzuser := user_vs_file(BOSS_ANNOY); X END; X `20 X X X`09`7B Attempt to open the intro file `7D X`5Bpsect(setup$code)`5D procedure intro(var finam : vtype); X var X xpos,i1 : integer; X dummy : char; X day_test,in_line: vtype; X file1 : text; X file2 : file of key_type; X exit_flag : boolean; X BEGIN X exit_flag := false; X clear(1,1); X`7B Attempt to read hours.dat. If it does not exist, then create a standard V one.`7D X priv_switch(1); X open(file1,file_name:=BOSS_HOU, X history:=readonly,sharing:=readonly,error:=continue); X if (status(file1) = 0) then X BEGIN X reset(file1); X repeat X readln(file1,in_line,error:=continue); X if (length(in_line) > 3) then X BEGIN X day_test := substr(in_line,1,4); X if (day_test = 'SUN:') then days`5B1`5D := in_line X else if (day_test = 'MON:') then days`5B2`5D := in_line X else if (day_test = 'TUE:') then days`5B3`5D := in_line X else if (day_test = 'WED:') then days`5B4`5D := in_line X else if (day_test = 'THU:') then days`5B5`5D := in_line X else if (day_test = 'FRI:') then days`5B6`5D := in_line X else if (day_test = 'SAT:') then days`5B7`5D := in_line; X END; X until(eof(file1)); X close(file1,error:=continue); X priv_switch(0); X END X else `7B Create a standard hours file `7D X BEGIN X priv_switch(0); X open(file1,file_name:=BOSS_HOU, X organization:=sequential,history:=new, X sharing:=readwrite,error:=continue); X if (status(file1) = 0) then X BEGIN X rewrite(file1,error:=continue); X writeln(file1,' Boss operating hours are:'); X writeln(file1,' `7C AM `7C PM `7C'); X writeln(file1,' 1 111 111'); X writeln(file1,' 2123456789012123456789012'); X for i1 := 1 to 7 do X writeln(file1,days`5Bi1`5D); X writeln(file1,' (X=Open; .=Closed)'); X close(file1,error:=continue); X writeln('Created ',BOSS_HOU); X exit_flag := true; X END X else X BEGIN X writeln('Error in creating ',BOSS_HOU); X exit; X END; X END; X`20 X`7B Check the hours, if closed then require password `7D X if (not(exit_flag)) then X BEGIN X xpos := index(finam,'/WIZARD'); X if ( xpos > 0) then X`7B Opusii `7D if (validuser) then`20 X insert_str(finam,'/WIZARD',''); X if (not(wizard)) then X no_controly; X if (not(check_time)) then X if (not(validuser)) then X BEGIN X priv_switch(1); X open(file1,file_name:=BOSS_HOU, X history:=readonly,sharing:=readonly,error:=continue) V; X if (status(file1) = 0) then X BEGIN X reset(file1); X repeat X readln(file1,in_line); X writeln(in_line); X until(eof(file1)); X close(file1,error:=continue); X END; X priv_switch(0); X exit; X END; X END; X`20 X`7B Print the introduction message, news, ect.`7D X priv_switch(1); X open(file1,file_name:=BOSS_MOR, X organization:=sequential,history:=old, X sharing:=readwrite,error:=continue); X if (status(file1) = 0) then X BEGIN X if (not(exit_flag)) then X BEGIN X reset(file1); X repeat X readln(file1,in_line,error:=continue); X writeln(in_line); X until (eof(file1)); X pause_exit(24); X close(file1,error:=continue); X END X else X close(file1,error:=continue); X priv_switch(0); X END X else `7B Create one.`7D X BEGIN X priv_switch(0); X open(file1,file_name:=BOSS_MOR, X organization:=sequential,history:=new, X sharing:=readwrite,error:=continue); X if (status(file1) = 0) then X BEGIN X rewrite(file1,error:=continue); Xwriteln(file1,' ***********************'); Xwriteln(file1,' ** BOSS ',cur_version:7:2,' ** V'); Xwriteln(file1,' ***********************'); Xwriteln(file1,' COPYRIGHT (c) Robert Alan Koeneke'); Xwriteln(file1,' '); Xwriteln(file1,'Programers : Robert Alan Koeneke / University of Oklahoma'); Xwriteln(file1,' Jimmey Wayne Todd / University of Oklahoma'); Xwriteln(file1,' '); Xwriteln(file1,' '); Xwriteln(file1,'Modified by: Bill Palter / State University of New Yo Vrk'); Xwriteln(file1,' Nick B Triantos / State University of New Yo Vrk'); Xwriteln(file1,' `09`09`09`09`09`09'); Xwriteln(file1,'BOSS Modifications by: Robert Gulledge / University of Washin Vgton'); Xwriteln(file1,' jason black / University of Washin Vgton'); Xwriteln(file1,' '); Xwriteln(file1,' '); Xwriteln(file1,' Check NewsInc in the office building for new fea Vtures!.'); X close(file1,error:=continue); X writeln('Created ',BOSS_MOR); X exit_flag := true; X END X else X BEGIN X writeln('Error in creating ',BOSS_MOR); X exit; X END; X END; X`7B Check for MASTER.DAT `7D X priv_switch(1); +-+-+-+-+-+-+-+- END OF PART 31 +-+-+-+-+-+-+-+-