home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1994 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1994.iso
/
compsrcs
/
games
/
vmsnet
/
monhl104
/
part09
< prev
next >
Wrap
Internet Message Format
|
1992-08-02
|
44KB
Path: uunet!mcsun!fuug!news.funet.fi!hydra!klaava!hurtta
From: Kari.Hurtta@Helsinki.FI (Kari E. Hurtta)
Newsgroups: vmsnet.sources.games
Subject: Monster Helsinki V 1.04 - part 09/32
Keywords: Monster, a multiplayer adventure game
Message-ID: <1992Jun14.001827.3836@klaava.Helsinki.FI>
Date: 14 Jun 92 00:18:27 GMT
Sender: hurtta@klaava.Helsinki.FI (Kari Hurtta)
Followup-To: vmsnet.sources.d
Organization: University of Helsinki
Lines: 1272
Archieve-name: monster_helsinki_104/part09
Author: Kari.Hurtta@Helsinki.FI
Product: Monster Helsinki V 1.04
Environment: VMS, Pascal
Part: 09/32
-+-+-+-+-+-+-+-+ START OF PART 9 -+-+-+-+-+-+-+-+
X`009`009`0090: writeln('Only the primary description will print');
X`009`009`0091: writeln('Only the secondary description will print');
X`009`009`0092: writeln('Both the primary and secondary descriptions will pri
Vnt');
X`009`009`0093: begin
X`009`009`009`009writeln('The primary description will print, followed by the
V seconary description');
X`009`009`009`009writeln('if the player is holding the magic object');
X`009`009`009 end;
X`009`009`0094: begin
X`009`009`009`009writeln('If the player is holding the magic object, the seco
Vndary description will print');
X`009`009`009`009writeln('Otherwise, the primary description will print');
X`009`009`009 end;
X`009`009`009otherwise writeln('The way the room description prints is damage
Vd');
X`009`009end;
X
X`009`009writeln;
X`009`009if magicobj = 0 then
X`009`009`009writeln('There is no magic object for this room')
X`009`009else
X`009`009`009writeln('The magic object for this room is the ',objnam.idents`0
V91magicobj`093,'.');
X
X`009`009if objdrop = 0 then
X`009`009`009writeln('Dropped objects remain here')
X`009`009else begin
X`009`009`009writeln('Dropped objects go to ',nam.idents`091objdrop`093,'.');
X`009`009`009if objdesc = 0 then
X`009`009`009`009writeln('Dropped.')
X`009`009`009else
X`009`009`009`009print_line(objdesc);
X`009`009`009if objdest = 0 then
X`009`009`009`009writeln('Nothing is printed when object "bounces in" to targ
Vet room')
X`009`009`009else
X`009`009`009`009print_line(objdest);
X`009`009end;
X`009`009writeln;
X`009`009if trapto = 0 then
X`009`009`009writeln('There is no trapdoor set')
X`009`009else
X`009`009`009writeln('The trapdoor sends players ',direct`091trapto`093,
X`009`009`009`009' with a chance factor of ',trapchance:1,'%');
X
X`009`009if hook > 0 then writeln ('There is a hook in this room.');
X`009`009for i := 1 to maxdetail do begin
X`009`009`009if length(detail`091i`093) > 0 then begin
X`009`009`009`009write('Detail "',detail`091i`093,'" ');
X`009`009`009`009if detaildesc`091i`093 > 0 then
X`009`009`009`009`009writeln('has a description')
X`009`009`009`009else
X`009`009`009`009`009writeln('has no description');
X`009`009`009end;
X`009`009end;
X`009`009writeln;
X`009end;
Xend;
X
X
X`091global`093 procedure custom_room;
Xlabel exit_label;
Xvar
X`009done: boolean;
X`009prompt,param: string;
X`009n: integer;
X`009s: string;
X`009newdsc: integer;
X`009bool: boolean;
X`009prevloc: integer;
X
X procedure leave;
X begin
X`009writeln('EXIT - no changes.');
X`009goto exit_label;
X end;
X
X
Xbegin
X`009log_action(e_custroom,0);
X`009writeln;
X`009writeln('Customizing this room');
X`009writeln('If you would rather be customizing an exit, type CUSTOM <direct
Vion of exit>');
X`009writeln('If you would rather be customizing an object, type CUSTOM <obje
Vct name>');
X`009writeln;
X`009done := false;
X`009prompt := 'Custom> ';
X
X`009repeat
X`009`009repeat
X`009`009`009grab_line(prompt,s,eof_handler := leave);
X`009`009`009param := slead(s);
X`009`009`009s := bite(param);
X`009`009until length(s) > 0;`009`009
X`009`009s := lowcase(s);`009`009
X`009`009case s`0911`093 of
X`009`009`009'c': begin
X`009`009`009`009gethere;
X`009`009`009`009n := here.hook;
X`009`009`009`009prevloc := location;
X`009`009`009`009custom_hook(n,here.owner,
X`009`009`009`009 trim_filename(here.nicename));
X`009`009`009`009if (prevloc <> location) then begin
X`009`009`009`009`009writeln('You can no longer customize this room.');
X done := true;
X`009`009`009`009end else begin
X `009`009`009getroom;
X`009`009`009`009`009here.hook := n;
X`009`009`009`009`009putroom
X`009`009`009`009end;
X`009`009`009 end;
X`009`009`009'e','q': done := true;
X`009`009`009'?','h': command_help('*room help*');
X`009`009`009'r': do_rename (param);
X`009`009`009'v': view_room;
X`123dir trapdoor goes`125`009't': begin
X`009`009`009`009if param > '' then s := param
X`009`009`009`009else grab_line('What direction does the trapdoor exit throug
Vh? ',
X`009`009`009`009 s,eof_handler := leave);
X`009`009`009`009if length(s) > 0 then begin
X`009`009`009`009`009if lookup_dir(n,s) then begin
X`009`009`009`009`009`009getroom;
X`009`009`009`009`009`009here.trapto := n;
X`009`009`009`009`009`009putroom;
X`009`009`009`009`009`009writeln('Room updated.');
X`009`009`009`009`009end else
X`009`009`009`009`009`009writeln('No such direction.');
X`009`009`009`009end else
X`009`009`009`009`009writeln('No changes.');
X`009`009`009 end;
X`123chance`125`009`009'f': begin
X`009`009`009`009if param > '' then s := param
X`009`009`009`009else begin
X`009`009`009`009`009writeln('Enter the chance that in any given minute the p
Vlayer will fall through');
X`009`009`009`009`009writeln('the trapdoor (0-100) :');
X`009`009`009`009`009writeln;
X`009`009`009`009`009grab_line('? ',s,eof_handler := leave);
X`009`009`009`009end;
X`009`009`009`009if isnum(s) then begin
X`009`009`009`009`009n := number(s);
X`009`009`009`009`009if n in `0910..100`093 then begin
X`009`009`009`009`009`009getroom;
X`009`009`009`009`009`009here.trapchance := n;
X`009`009`009`009`009`009putroom;
X`009`009`009`009`009end else
X`009`009`009`009`009`009writeln('Out of range.');
X`009`009`009`009end else
X`009`009`009`009`009writeln('No changes.');
X`009`009`009 end;
X`009`009`009's': begin
X`009`009`009`009newdsc := here.secondary;
X`009`009`009`009writeln('`091 Editing the secondary room description `093');
X`009`009`009`009if edit_desc(newdsc) then begin
X`009`009`009`009`009getroom;
X`009`009`009`009`009here.secondary := newdsc;
X`009`009`009`009`009putroom;
X`009`009`009`009end;
X`009`009`009 end;
X`009`009`009'i': begin
X`009`009`009`009newdsc := here.exitfail;
X`009`009`009`009writeln('`091 Editing th default exit failure description `
V093');
X`009`009`009`009if edit_desc(newdsc) then begin
X`009`009`009`009`009getroom;
X`009`009`009`009`009here.exitfail := newdsc;
X`009`009`009`009`009putroom;
X`009`009`009`009end;
X`009`009`009 end;
X`009`009 `009'p': begin
X`123 same as desc `125`009`009newdsc := here.primary;
X`009`009`009`009writeln('`091 Editing the primary room description `093');
X`009`009`009`009if edit_desc(newdsc) then begin
X`009`009`009`009`009getroom;
X`009`009`009`009`009here.primary := newdsc;
X`009`009`009`009`009putroom;
X`009`009`009`009end;
X`009`009`009 end;
X`009`009`009'o': begin
X`009`009`009`009writeln('Enter the line that will be printed when someone dr
Vops an object here:');
X`009`009`009`009writeln('If dropped objects do not stay here, you may use a
V # for the object name.');
X`009`009`009`009writeln('Right now it says:');
X`009`009`009`009if here.objdesc = 0 then
X`009`009`009`009`009writeln('Dropped. `091default`093')
X`009`009`009`009else
X`009`009`009`009`009print_line(here.objdesc);
X
X`009`009`009`009n := here.objdesc;
X`009`009`009`009make_line(n);
X`009`009`009`009getroom;
X`009`009`009`009here.objdesc := n;
X`009`009`009`009putroom;
X`009`009`009 end;
X`009 `009`009'x': begin
X`009`009`009`009writeln('Enter a line that will be randomly shown.');
X`009`009`009`009writeln('Right now it says:');
X`009`009`009`009if here.rndmsg = 0 then
X`009`009`009`009`009writeln('`091none defined`093')
X`009`009`009`009else
X`009`009`009`009`009print_line(here.rndmsg);
X
X`009`009`009`009n := here.rndmsg;
X`009`009`009`009make_line(n);
X`009`009`009`009getroom;
X`009`009`009`009here.rndmsg := n;
X`009`009`009`009putroom;
X`009`009`009 end;
X`123alternate mystery msg`125`009'a': do_y_altmsg;`032
X`123bounced in desc`125`009'b': begin
X`009`009`009`009writeln('Enter the line that will be displayed in the room w
Vhere an object really');
X`009`009`009`009writeln('goes when an object dropped here "bounces" there:')
V;
X`009`009`009`009writeln('Place a # where the object name should go.');
X`009`009`009`009writeln;
X`009`009`009`009writeln('Right now it says:');
X`009`009`009`009if here.objdest = 0 then
X`009`009`009`009`009writeln('Something has bounced into the room.')
X`009`009`009`009else
X`009`009`009`009`009print_line(here.objdest);
X
X`009`009`009`009n := here.objdest;
X`009`009`009`009make_line(n);
X`009`009`009`009getroom;
X`009`009`009`009here.objdest := n;
X`009`009`009`009putroom;
X`009`009`009 end;
X`123visual links`125`009`009'1': do_group1;
X`009`009`009'2': do_group2;
X`009`009`009'm': begin
X`009`009`009`009getobjnam;
X`009`009`009`009freeobjnam;
X`009`009`009`009if param > '' then s := param
X`009`009`009`009else begin
X`009`009`009`009`009if here.magicobj = 0 then
X`009`009`009`009`009`009writeln('There is currently no magic object for this
V room.')
X`009`009`009`009`009else
X`009`009`009`009`009`009writeln(objnam.idents`091here.magicobj`093,
X`009`009`009`009`009`009`009' is currently the magic object for this room.')
V;
X`009`009`009`009`009writeln;
X`009`009`009`009`009grab_line('New magic object? ',s,
X`009`009`009`009`009 eof_handler := leave);
X`009`009`009`009end;
X`009`009`009`009if s = '' then
X`009`009`009`009`009writeln('No changes.')
X`009`009`009`009else if lookup_obj(n,s) then begin
X`009`009`009`009`009getroom;
X`009`009`009`009`009here.magicobj := n;
X`009`009`009`009`009putroom;
X`009`009`009`009`009writeln('Room updated.');
X`009`009`009`009end else
X`009`009`009`009`009writeln('No such object found.');
X`009`009`009 end;
X`009`009`009'g': begin
X`009`009`009`009getnam;
X`009`009`009`009freenam;
X`009`009`009`009if param > '' then s := param
X`009`009`009`009else begin
X`009`009`009`009`009if here.objdrop = 0 then
X`009`009`009`009`009`009writeln('Objects dropped fall here.')
X`009`009`009`009`009else
X`009`009`009`009`009`009writeln('Objects dropped fall in ',nam.idents`091her
Ve.objdrop`093,'.');
X`009`009`009`009`009writeln;
X`009`009`009`009`009writeln('Enter * for `091this room`093:');
X`009`009`009`009`009grab_line('Room dropped objects go to? ',
X`009`009`009`009`009 s,eof_handler := leave);
X`009`009`009`009end;
X`009`009`009`009if s = '' then
X`009`009`009`009`009writeln('No changes.')
X`009`009`009`009else if s = '*' then begin
X`009`009`009`009`009getroom;
X`009`009`009`009`009here.objdrop := 0;
X`009`009`009`009`009putroom;
X`009`009`009`009`009writeln('Room updated.');
X`009`009`009`009end else if lookup_room(n,s) then begin
X`009`009`009`009`009getroom;
X`009`009`009`009`009here.objdrop := n;
X`009`009`009`009`009putroom;
X`009`009`009`009`009writeln('Room updated.');
X`009`009`009`009end else
X`009`009`009`009`009writeln('No such room found.');
X`009`009`009 end;
X`009`009`009'd': begin
X`009`009`009`009writeln('Print room descriptions how?');
X`009`009`009`009writeln;
X`009`009`009`009writeln('0) Print primary (main) description only `091defau
Vlt`093');
X`009`009`009`009writeln('1) Print only secondary description.');
X`009`009`009`009writeln('2) Print both primary and secondary descriptions t
Vogether.');
X`009`009`009`009writeln('3) Print primary description first; then print sec
Vondary description only if');
X`009`009`009`009writeln(' the player is holding the magic object for this
V room.');
X`009`009`009`009writeln('4) Print secondary if holding the magic obj; print
V primary otherwise');
X`009`009`009`009writeln;
X`009`009`009`009grab_line('? ',s,eof_handler := leave);
X`009`009`009`009if isnum(s) then begin
X`009`009`009`009`009n := number(s);
X`009`009`009`009`009if n in `0910..4`093 then begin
X`009`009`009`009`009`009getroom;
X`009`009`009`009`009`009here.which := n;
X`009`009`009`009`009`009putroom;
X`009`009`009`009`009`009writeln('Room updated.');
X`009`009`009`009`009end else
X`009`009`009`009`009`009writeln('Out of range.');
X`009`009`009`009end else
X`009`009`009`009`009writeln('No changes.');
X
X`009`009`009 end;
X`009`009`009'n': begin
X`009`009`009`009writeln('How would you like the room name to print?');
X`009`009`009`009writeln;
X`009`009`009`009writeln('0) No room name is shown');
X`009`009`009`009writeln('1) "You''re in ..."');
X`009`009`009`009writeln('2) "You''re at ..."');
X`009`009`009`009writeln('3) "You''re in the ..."');
X`009`009`009`009writeln('4) "You''re at the ..."');
X`009`009`009`009writeln('5) "You''re in a ..."');
X`009`009`009`009writeln('6) "You''re at a ..."');
X`009`009`009`009writeln('7) "You''re in an ..."');
X`009`009`009`009writeln('8) "You''re at an ..."');
X`009`009`009`009writeln;
X`009`009`009`009grab_line('? ',s,eof_handler := leave);
X`009`009`009`009if isnum(s) then begin
X`009`009`009`009`009n := number(s);
X`009`009`009`009`009if n in `0910..8`093 then begin
X`009`009`009`009`009`009getroom;
X`009`009`009`009`009`009here.nameprint := n;
X`009`009`009`009`009`009putroom;
X`009`009`009`009`009end else
X`009`009`009`009`009`009writeln('Out of range.');
X`009`009`009`009end else
X`009`009`009`009`009writeln('No changes.');
X`009`009`009 end;
X`009`009`009otherwise writeln('Bad command, type ? for a list');
X`009`009end;
X`009until done;
X`009exit_label:
X`009log_event(myslot,E_ROOMDONE,0,0);
Xend;
X
X`123 custom EXIT -----------------------------------------------------------
V--- `125
X
X`091global`093 procedure exit_default(dir, kind: integer);
Xbegin
X`009case kind of
X`0091: writeln('There is a passage leading ',direct`091dir`093,'.');
X`0092: writeln('There is a locked door leading ',direct`091dir`093,'.');
X`0095:`009case dir of
X`009`009`009north,south,east,west:
X`009`009`009`009writeln('A note on the ',direct`091dir`093,' wall says "Your
V exit here."');
X`009`009`009up: writeln('A note on the ceiling says "Your exit here."');
X`009`009`009down: writeln('A note on the floor says "Your exit here."');
X`009`009end;
X`009otherwise writeln('There is an exit: ',direct`091dir`093);
X`009end;
Xend;
X
Xprocedure analyze_exit(dir: integer);
Xvar
X`009s: string;
X
Xbegin
X`009writeln;
X`009getnam;
X`009freenam;
X`009getobjnam;
X`009freeobjnam;
X`009with here.exits`091dir`093 do begin
X`009`009s := alias;
X`009`009if s = '' then
X`009`009`009s := '(no alias)'
X`009`009else
X`009`009`009s := '(alias ' + s + ')';
X`009`009if here.exits`091dir`093.reqalias then
X`009`009`009s := s + ' (required)'
X`009`009else
X`009`009`009s := s + ' (not required)';
X
X`009`009if toloc <> 0 then
X`009`009`009writeln('The ',direct`091dir`093,' exit ',s,' goes to ',nam.iden
Vts`091toloc`093)
X`009`009else
X`009`009`009writeln('The ',direct`091dir`093,' exit goes nowhere.');
X`009`009if hidden <> 0 then
X`009`009`009writeln('Concealed.');
X`009`009write('Exit type: ');
X`009`009case kind of
X`009`009`0090: writeln('no exit.');
X`009`009`0091: writeln('Open passage.');
X`009`009`0092: writeln('Door, object required to pass.');
X`009`009`0093: writeln('No passage if holding object.');
X`009`009`0094: writeln('Randomly fails');
X`009`009`0095: writeln('Potential exit.');
X`009`009`0096: writeln('Only exists while holding the required object.');
X`009`009`0097: writeln('Timed exit');
X`009`009end;
X`009`009if objreq = 0 then
X`009`009`009writeln('No required object.')
X`009`009else
X`009`009`009writeln('Required object is: ',objnam.idents`091objreq`093);
X
X`009`009writeln;
X`009`009if exitdesc = DEFAULT_LINE then
X`009`009`009exit_default(dir,kind)
X`009`009else
X`009`009`009print_line(exitdesc);
X
X`009`009if success = 0 then
X`009`009`009writeln('(no success message)')
X`009`009else
X`009`009`009print_desc(success);
X
X`009`009if fail = DEFAULT_LINE then begin
X`009`009`009if kind = 5 then
X`009`009`009`009writeln('There isn'' an exit there yet.')
X`009`009`009else
X`009`009`009`009writeln('You can''t that.');
X`009`009end else
X`009`009`009print_desc(fail);
X
X`009`009if comeout = DEFAULT_LINE then
X`009`009`009writeln('# has come into the room from ',direct`091dir`093)
X`009`009else
X`009`009`009print_desc(comeout);
X`009`009if goin = DEFAULT_LINE then
X`009`009`009writeln('# has gone ',direct`091dir`093)
X`009`009else
X`009`009`009print_desc(goin);
X
X`009`009writeln;
X`009`009if autolook then
X`009`009`009writeln('LOOK automatically done after exit used')
X`009`009else
X`009`009`009writeln('LOOK supressed on exit use');
X`009`009if reqverb then
X`009`009`009writeln('The alias is required to be a verb for exit use')
X`009`009else
X`009`009`009writeln('The exit can be used with GO or as a verb');
X`009end;
X`009writeln;
Xend;
X
X
Xprocedure get_key(dir: integer; param: string := '');
Xlabel exit_label;
Xvar
X`009s: string;
X`009n: integer;
X
X procedure leave;
X begin
X`009writeln('EXIT - no changes.');
X`009goto exit_label;
X end;
X
X
Xbegin
X`009getobjnam;
X`009freeobjnam;
X`009if param > '' then s := param
X`009else begin
X`009`009if here.exits`091dir`093.objreq = 0 then
X`009`009`009writeln('Currently there is no key set for this exit.')
X`009`009else
X`009`009`009writeln(objnam.idents`091here.exits`091dir`093.objreq`093,' is t
Vhe current key for this exit.');
X`009`009writeln('Enter * for `091no key`093');
X`009`009writeln;
X`009
X`009`009grab_line('What object is the door key? ',s,
X`009`009 eof_handler := leave);
X`009end;
X`009if length(s) > 0 then begin
X`009`009if s = '*' then begin
X`009`009`009getroom;
X`009`009`009here.exits`091dir`093.objreq := 0;
X`009`009`009putroom;
X`009`009`009writeln('Exit updated.');
X`009`009end else if lookup_obj(n,s) then begin
X`009`009`009getroom;
X`009`009`009here.exits`091dir`093.objreq := n;
X`009`009`009putroom;
X`009`009`009writeln('Exit updated.');
X`009`009end else
X`009`009`009writeln('There is no object by that name.');
X`009end else
X`009`009writeln('No changes.');
X exit_label:
Xend;
X
Xprocedure custom_exit(dirnam: string);
Xlabel exit_label;
Xvar
X`009prompt: string;
X`009done : boolean;
X`009s,param: string;
X`009dir,n: integer;
X
X procedure leave;
X begin
X`009writeln('EXIT - no changes.');
X`009log_event(myslot,E_CUSTDONE,0,0);
X`009goto exit_label;
X end;
X
Xbegin
X`009if lookup_dir(dir,dirnam) then begin
X`009 if can_alter(dir) then begin
X
X`009`009log_action(c_custom,0);
X
X`009`009writeln('Customizing ',direct`091dir`093,' exit');
X`009`009writeln('If you would rather be customizing this room, type CUSTOM w
Vith no arguments');
X`009`009writeln('If you would rather be customizing an object, type CUSTOM <
Vobject name>');
X`009`009writeln('If you would rather be customizing a monster, type CUSTOM <
Vmonster name>');
X`009`009writeln;
X`009`009writeln('Type ** for any line to leave it unchanged.');
X`009`009writeln('Type return for any line to select the default.');
X`009`009writeln;
X`009`009writev(prompt,'Custom ',direct`091dir`093,'> ');
X`009`009done := false;
X`009`009repeat
X`009`009`009repeat
X`009`009`009`009grab_line(prompt,s,eof_handler := leave);
X`009`009`009`009param := slead(s);
X`009`009`009`009s := bite(param);
X`009`009`009until length(s) > 0;
X`009`009`009s := lowcase(s);
X`009`009`009case s`0911`093 of
X`009`009`009`009'?','h': command_help('*custom help*');
X`009`009`009`009'q','e': done := true;
X`009`009`009`009'k': get_key(dir,param);
X`009`009`009`009'c': begin
X`009`009`009`009`009writeln('Type the description that a player will see whe
Vn the exit is found.');
X`009`009`009`009`009writeln('Make no text for description to unconceal the e
Vxit.');
X`009`009`009`009`009writeln;
X`009`009`009`009`009writeln('`091 Editing the "hidden exit found" descriptio
Vn `093');
X`009 `009`009`009`009n := here.exits`091dir`093.hidden;
X`009`009`009`009`009if edit_desc(n) then begin
X`009`009`009`009`009`009getroom;
X`009`009`009`009`009`009here.exits`091dir`093.hidden := n;
X`009`009`009`009`009`009putroom;
X`009`009`009`009`009end;
X`009`009`009`009 end;
X`123req alias`125`009`009`009'r': begin
X`009`009`009`009`009getroom;
X`009`009`009`009`009here.exits`091dir`093.reqalias :=
X`009`009`009`009`009`009not(here.exits`091dir`093.reqalias);
X`009`009`009`009`009putroom;
X
X`009`009`009`009`009if here.exits`091dir`093.reqalias then
X`009`009`009`009`009`009writeln('The alias for this exit will be required to
V reference it.')
X`009`009`009`009`009else
X`009`009`009`009`009`009writeln('The alias will not be required to reference
V this exit.');
X`009`009`009`009 end;
X`123req verb`125`009`009`009'x': begin
X`009`009`009`009`009getroom;
X`009`009`009`009`009here.exits`091dir`093.reqverb :=
X`009`009`009`009`009`009not(here.exits`091dir`093.reqverb);
X`009`009`009`009`009putroom;
X
X`009`009`009`009`009if here.exits`091dir`093.reqverb then
X`009`009`009`009`009`009writeln('The exit name will be required to be used a
Vs a verb to use the exit')
X`009`009`009`009`009else
X`009`009`009`009`009`009writeln('The exit name may be used with GO or as a v
Verb to use the exit');
X`009`009`009`009 end;
X`123autolook`125`009`009`009'l': begin
X`009`009`009`009`009getroom;
X`009`009`009`009`009here.exits`091dir`093.autolook :=
X`009`009`009`009`009`009not(here.exits`091dir`093.autolook);
X`009`009`009`009`009putroom;
X
X`009`009`009`009`009if here.exits`091dir`093.autolook then
X`009`009`009`009`009`009writeln('A LOOK will be done after the player travel
Vs through this exit.')
X`009`009`009`009`009else
X`009`009`009`009`009`009writeln('The automatic LOOK will not be done when a
V player uses this exit.');
X`009`009`009`009 end;
X`009`009`009`009'a': begin
X`009`009`009`009`009if param > '' then s := param
X`009 `009`009`009`009else grab_line('Alternate name for the exit? ',
X`009`009`009`009`009 s,eof_handler := leave);
X`009`009`009`009`009if length(s) > veryshortlen then
X`009`009`009`009`009`009writeln('Your alias must be less than ',veryshortlen
V:1,' characters.')
X`009`009`009`009`009else begin
X`009`009`009`009`009`009getroom;
X`009`009`009`009`009`009here.exits`091dir`093.alias := lowcase(s);
X`009`009`009`009`009`009putroom;
X`009`009`009`009`009end;
X`009`009`009`009 end;
X`009`009`009`009'v': analyze_exit(dir);
X`009`009`009`009't': begin
X`009`009`009`009`009writeln;
X`009`009`009`009`009writeln('Select the type of your exit:');
X`009`009`009`009`009writeln;
X`009`009`009`009`009writeln('0) No exit');
X`009`009`009`009`009writeln('1) Open passage');
X`009`009`009`009`009writeln('2) Door (object required to pass)');
X`009`009`009`009`009writeln('3) No passage if holding key');
X`009`009`009`009`009if special_priv then `123 minor change by leino@finuha `
V125
X`009`009`009`009`009`009writeln('4) exit randomly fails');
X`009`009`009`009`009writeln('6) Exit exists only when holding object');
X`009`009`009`009`009if special_priv then `123 minor change by leino@finuha `
V125
X`009`009`009`009`009`009writeln('7) exit opens/closes invisibly every minute
V');
X`009`009`009`009`009writeln;
X`009`009`009`009`009grab_line('Which type? ',s,
X`009`009`009`009`009 eof_handler := leave);
X`009`009`009`009`009if isnum(s) then begin
X`009`009`009`009`009`009n := number(s);
X`009`009`009`009`009`009if ((n in `0914,7`093) and special_priv)
X`009`009`009`009`009`009or (n in `0910..3,6`093) then begin `123 minor hack
V by jlaiho@finuha `125
X`009`009`009`009`009`009`009getroom;
X`009`009`009`009`009`009`009here.exits`091dir`093.kind := n;
X`009`009`009`009`009`009`009putroom;
X`009`009`009`009`009`009`009writeln('Exit type updated.');
X`009`009`009`009`009`009`009writeln;
X`009`009`009`009`009`009`009if n in `0912,6`093 then
X`009`009`009`009`009`009`009`009get_key(dir);
X`009`009`009`009`009`009end else
X`009`009`009`009`009`009`009writeln('Bad exit type.');
X`009`009`009`009`009end else
X`009`009`009`009`009`009writeln('Exit type not changed.');
X`009`009`009`009 end;
X`009`009`009`009'f': begin
X`009`009`009`009`009writeln('The failure description will print if the playe
Vr attempts to go through the');
X`009`009`009`009`009writeln('the exit but cannot for any reason.');
X`009`009`009`009`009writeln;
X`009 `009`009`009`009writeln('`091 Editing the exit failure description `09
V3');
X
X`009`009`009`009`009n := here.exits`091dir`093.fail;
X`009`009`009`009`009if edit_desc(n) then begin
X`009`009`009`009`009`009getroom;
X`009`009`009`009`009`009here.exits`091dir`093.fail := n;
X`009`009`009`009`009`009putroom;
X`009`009`009`009`009end;
X`009`009`009`009 end;
X`009`009`009`009'i': begin
X`009`009`009`009`009writeln('Edit the description that other players see whe
Vn someone goes into');
X`009`009`009`009`009writeln('the exit. Place a # where the player''s name s
Vhould appear.');
X`009`009`009`009`009writeln;
X`009`009`009`009`009writeln('`091 Editing the exit "go in" description `093'
V);
X`009`009`009`009`009n := here.exits`091dir`093.goin;
X`009`009`009`009`009if edit_desc(n) then begin
X`009`009`009`009`009`009getroom;
X`009`009`009`009`009`009here.exits`091dir`093.goin := n;
X`009`009`009`009`009`009putroom;
X`009`009`009`009`009end;
X`009`009`009`009 end;
X`009`009`009`009'o': begin
X`009`009`009`009`009writeln('Edit the description that other players see whe
Vn someone comes out of');
X`009`009`009`009`009writeln('the exit. Place a # where the player''s name s
Vhould appear.');
X`009`009`009`009`009writeln;
X`009`009`009`009`009writeln('`091 Editing the exit "come out of" description
V `093');
X`009`009`009`009`009n := here.exits`091dir`093.comeout;
X`009`009`009`009`009if edit_desc(n) then begin
X`009`009`009`009`009`009getroom;
X`009`009`009`009`009`009here.exits`091dir`093.comeout := n;
X`009`009`009`009`009`009putroom;
X`009`009`009`009`009end;
X`009`009`009`009 end;
X`123 main exit desc `125`009`009'd': begin
X`009`009`009`009`009writeln('Enter a one line description of the exit.');
X`009`009`009`009`009writeln;
X`009`009`009`009`009n := here.exits`091dir`093.exitdesc;
X`009`009`009`009`009make_line(n);
X`009`009`009`009`009getroom;
X`009`009`009`009`009here.exits`091dir`093.exitdesc := n;
X`009`009`009`009`009putroom;
X`009`009`009`009 end;
X`009`009`009`009's': begin
X`009`009`009`009`009writeln('The success description will print when the pla
Vyer goes through the exit.');
X`009`009`009`009`009writeln;
X`009`009`009`009`009writeln('`091 Editing the exit success description `093'
V);
X
X`009`009`009`009`009n := here.exits`091dir`093.success;
X`009`009`009`009`009if edit_desc(n) then begin
X`009`009`009`009`009`009getroom;
X`009`009`009`009`009`009here.exits`091dir`093.success := n;
X`009`009`009`009`009`009putroom;
X`009`009`009`009`009end;
X`009`009`009`009 end;
X`009`009`009`009otherwise writeln('-- Bad command, type ? for a list');
X`009`009`009end;
X`009`009until done;
X`009 end else
X`009`009writeln('You are not allowed to alter that exit.');
X
X`009`009log_event(myslot,E_CUSTDONE,0,0);
X`009end else writeln('Unknown direction.');
X exit_label:
X
Xend;
X
X`091global`093 PROCEDURE do_custom(dirnam: string);
Xvar`009n: integer;
X`009t: o_type;
X`009fi,ta: string; `123 first and tail `125
Xbegin
X gethere;
X if checkhide then begin
X`009ta := dirnam;
X`009fi := bite(ta);
X
X`009if length(dirnam) = 0 then begin
X`009 if is_owner(location,TRUE) then
X`009`009custom_room
X`009 else begin
X`009`009writeln('You are not the owner of this room; you cannot customize it
V.');
X`009`009writeln('However, you may be able to customize some of the exits. T
Vo customize an');
X`009`009writeln('exit, type CUSTOM <direction of exit>');
X`009 end;
X`009end else if lookup_dir(n,dirnam) then`032
X`009 custom_exit(dirnam)
X`009else if lookup_type(t,fi,pl := FALSE) then begin
X`009 case t of`032
X`009`009t_none: writeln('%Error in DO_CUSTOM. Notify Monster Manager.');
X`009`009t_room: begin
X`009`009 if ta > '' then writeln('You can only custom this room.')
X`009`009 else if is_owner(location,TRUE) then custom_room
X`009`009 else writeln('You are not the owner of this room; you cannot cus
Vtomize it.');
X`009`009end;
X`009`009t_object: do_program(ta);
X`009`009t_spell: writeln('Use SET SPELL <spell name> to customize spell.');
X`009`009t_monster: custom_monster(ta);
X`009`009t_player: begin
X`009`009 if manager_priv then writeln('Use SYSTEM to customize player.')
X`009`009 else writeln('You can''t customize player.');
X`009`009end;
X`009 end; `123 case `125
X`009end else if lookup_obj(n,dirnam) then
X`123 if lookup_obj returns TRUE then dirnam is name of object to customize `
V125
X`009 do_program(dirnam)`009`123 customize the object `125
X else if lookup_pers(n,dirnam) then
X`009 custom_monster(dirnam)
X`009else begin
X`009 writeln('To customize this room, type CUSTOM');
X`009 writeln('To customize an exits, type CUSTOM <direction>');
X`009 writeln('To customize an object, type CUSTOM <object name>');
X`009 writeln('To customize a monster, type CUSTOM <monster name>');
X`009end;
X`123`009clear_command;`009`125
X`009end;
Xend;
X
X`123 custom OBJECT ---------------------------------------------------------
V---- `125
X
X
X`123 support for do_program (customize an object)
X Give the player a list of kinds of object he's allowed to make his object
X and update it `125
X
Xprocedure prog_kind(objnum: integer);
Xlabel exit_label;
Xvar
X`009n: integer;
X`009s: string;
X`009p: integer;
X
X procedure leave;
X begin
X`009writeln('EXIT - no changes.');
X`009goto exit_label;
X end;
X
Xbegin
X`009writeln('Select the type of your object:');
X`009writeln;
X`009writeln(O_BLAND:3,`009' Ordinary object (good for door keys)');
X`009writeln(O_WEAPON:3,`009' Weapon');
X`009writeln(O_ARMOR:3,`009' Armor');
X`123`009writeln(O_THRUSTER:3,`009' Exit thruster');`009`125
X`009writeln(O_DISGUISE:3,`009' Disguise');
X`009writeln(O_BOOK:3, ' Magic book.');
X `032
X`009writeln(O_TRAP:3,`009' Trap (bites if player fails to get it)'); `123
V O_TRAP `125
X`009if special_priv then begin `123 minor change by leino@finuha `125
X`009`009writeln;
X`123`009`009writeln(O_BAG:3,`009' Bag');`009`125
X`009`009writeln(O_CRYSTAL:3,`009' Crystal Ball');
X`123`009`009writeln(O_WAND:3,`009' Wand of Power');`009`125
X`123`009`009writeln(O_HAND:3,`009' Hand of Glory');`009`125
X`009`009writeln(O_TELEPORT_RING:3,' Teleport Ring');
X`009`009writeln(O_HEALTH_RING:3,' Health Ring');
X`009end;
X`009writeln;
X`009if wizard and special_priv then begin
X`009`009writeln(O_MAGIC_RING:3,`009' Magic Ring');
X`009`009writeln;
X`009end;
X
X`009grab_line('Which kind? ',s,eof_handler := leave);
X
X`009if isnum(s) then begin
X`009`009n := number(s);
X`009`009if (n >= 100) and (not special_priv)`032
X`009`009`009or (n >= 200) and (not wizard) then
X`009`009`009writeln('Out of range.')
X`009`009else if n in `091O_BLAND,O_WEAPON,O_ARMOR,
X`009`009`009O_DISGUISE,O_CRYSTAL,O_MAGIC_RING,
X`009`009`009O_TELEPORT_RING,O_HEALTH_RING,
X`009`009`009O_BOOK, O_TRAP`093 then begin
X`009`009`009getobj(objnum);
X`009`009`009`123 clear parms `125
X`009`009`009for p := 1 to maxparm do obj.parms`091p`093 := 0;
X obj.kind := n;
X`009`009`009putobj; `032
X `032
X writeln('Object updated.');
X`009`009end else
X`009`009`009writeln('Out of range.');
X`009end;
X exit_label:
Xend;
X `032
X
X`123 support for do_program (customize an object)
X Based on the kind it is allow the
X user to set the various parameters for the effects associated with that
X kind `125
X
XProcedure program_weapon (objnum: integer);
Xlabel exit_label;
XVar attack_power: Integer;
X required_experience: Integer;
X n,top,lev: integer;
X s: string;
X
X procedure leave;
X begin
X`009writeln('EXIT - no changes.');
X`009goto exit_label;
X end;
X
Xbegin
X`123 getobj (objnum);
X freeobj; `125 `123 prog_obj do this already `125
X
X writeln ('Use 3 to edit failure attack message');
X writeln ('Use 4 to edit attack success message');
X writeln ('Use x to edit attack success message, what victim sees.');
X writeln ('Use 5 to edit attack success message, what others see.');
X writeln;
X
X attack_power := obj.ap;
X required_experience := obj.exreq;
X lev := level(myexperience);
X top := leveltable`091lev`093.maxpower;
X
X writeln ('Select attack power of this weapon: 0 - ',top:1);
X writeln ('Current attack power is ',attack_power:1);
X grab_line ('Power? ',s,eof_handler := leave);
X if isnum (s) then begin
X n := number (s);
X if (n >= 0) and (n <=top) then`032
X begin
X attack_power := n;`032
X getobj (objnum);
X obj.ap := attack_power;
X putobj;
X writeln ('Updated.');
X
X end
X else writeln ('Out of range.'); `032
X end else writeln('No such power.');
X writeln;
X
X writeln ('Select required experience to use this weapon: 0 - ',
X maxexperience:1);
X writeln ('Current required experience is ',required_experience:1);
X grab_line ('Experience? ',s,eof_handler := leave);
X if isnum (s) then begin
X n := number (s);
X if (n >=0) and (n <= maxexperience) then
X begin
X required_experience := n;
X getobj (objnum);
X obj.exreq := required_experience;
X putobj;
X writeln ('Updated.');
X end else writeln ('Out of range.');
X end else writeln ('No such experience.');
X writeln;
X
X exit_label:
X
Xend; `032
X
XProcedure program_book (objnum: integer);
Xlabel exit_label;
XVar spell: Integer;
X required_experience: Integer;
X n: integer;
X s: string;
X
X procedure leave;
X begin
X`009writeln('EXIT - no changes.');
X`009goto exit_label;
X end;
X
Xbegin
X`123 getobj (objnum);
X freeobj; `125 `123 prog_obj do this already `125
X
X spell := obj.parms`091OP_SPELL`093;
X required_experience := obj.exreq;
X getspell_name;
X freespell_name;
X
X
X writeln ('Select spell for this magic book.');
X
X if spell > 0 then`032
X writeln ('Current spell is ',spell_name.idents`091spell`093)
X else writeln('Current spell is <none>');
X grab_line ('Spell? ',s,eof_handler := leave);
X if lookup_spell(n,s) then begin
X if is_spell_owner(n,public_ok := true) then
X begin
X spell := n;`032
X getobj (objnum);
X obj.parms`091OP_SPELL`093 := spell;
X putobj;
X writeln ('Updated.');
X end
X else writeln ('You aren''t owner of this spell.'); `032
X end else writeln('No such spell.');
X writeln;
X
X writeln ('Select required experience to use this magic book: 0 - ',
X maxexperience:1);
X writeln ('Current required experience is ',required_experience:1);
X grab_line ('Experience? ',s,eof_handler := leave);
X if isnum (s) then begin
X n := number (s);
X if (n >=0) and (n <= maxexperience) then
X begin
X required_experience := n;
X getobj (objnum);
X obj.exreq := required_experience;
X putobj;
X writeln ('Updated.');
X end else writeln ('Out of range.');
X end else writeln ('No such experience.');
X writeln;
X
X exit_label:
Xend; `032
X
Xprocedure program_trap (objnum: integer);
Xlabel exit_label;
Xvar attack_power: integer;
X n,top,lev: integer;
X s: string;
X
X procedure leave;
X begin
X`009writeln('EXIT - no changes.');
X`009goto exit_label;
X end;
X
Xbegin
X`123 getobj (objnum);
X freeobj; `125 `123 prog_obj do this already `125
X `032
X writeln ('Use f to edit what victim sees when (s)he tries to get trap.');
X writeln ('Use x to edit what others see when someone fails to get trap');
X
X writeln;
X writeln ('Attack power that the trap uses when it bites someone');
X attack_power := obj.ap;
X lev := level(myexperience);
X top := leveltable`091lev`093.maxpower;
X
X writeln ('Select attack power, range is 0 - ',top:1);
X writeln ('Current attack power is ',attack_power:1);
X grab_line ('Power? ',s,eof_handler := leave);
X if isnum (s) then begin
X n := number (s);
X if (n >= 0) and (n <=top) then`032
X begin
X attack_power := n; `032
X getobj (objnum);
X obj.ap := attack_power;
X putobj;
X writeln ('Updated.');
X
X end
X else writeln ('Out of range.'); `032
X end else writeln('No such power.');
X exit_label:
Xend; `032
X
Xprocedure program_armor(objnum: integer);
Xlabel exit_label;
Xvar attack_power: integer;
X n,top,lev: integer;
X s: string;
X
X procedure leave;
X begin
X`009writeln('EXIT - no changes.');
X`009goto exit_label;
X end;
X
Xbegin
X`123 getobj (objnum);
X freeobj; `125 `123 prog_obj do this already `125
X writeln ('Protection rate of armor');
X attack_power := obj.ap;
X lev := level(myexperience);
X top := leveltable`091lev`093.maxpower;
X
X writeln ('Select protection rate, range is 0 - ',top:1);
X writeln ('Current protection rate is ',attack_power:1);
X grab_line ('Power? ',s,eof_handler := leave);
X if isnum (s) then begin
X n := number (s);
X if (n >= 0) and (n <=top) then`032
X begin
X attack_power := n; `032
X getobj (objnum);
X obj.ap := attack_power;
X putobj;
X writeln ('updated.');
X
X end
X else Writeln ('Out of range.'); `032
X end else writeln('No such power.');
X exit_label:
Xend; `032
X
Xprocedure prog_obj(objnum: integer);
Xvar object_type: integer;
Xbegin `032
X getobj (objnum);
X freeobj;
X`032
X object_type := obj.kind;
X case object_type of
X`009O_BLAND : WriteLn ('You can''t program ordinary object.'); `03
V2
X`009O_WEAPON: program_weapon (objnum); `032
X`009O_TRAP: program_trap(objnum);
X`009O_ARMOR: program_armor(objnum);
X`009O_DISGUISE: Writeln ('You can''t program disguise.');
X`009O_BOOK: program_book(objnum);
X otherwise WriteLn ('This kind of object is not supported here.')
X end; `123 case `125
Xend;
X
X
X`091global`093 PROCEDURE show_kind(p: integer; cr: boolean := true);
Xvar s: string;
Xbegin
X`009case p of
X`009`009O_BLAND: s := 'Ordinary object';
X`009`009O_WEAPON: s := 'Weapon';
X`009`009O_ARMOR: s := 'Armor';
X `009`009O_TRAP: s := 'Trap';
X`009`009O_DISGUISE: s := 'Disguise';
X`009`009O_BOOK:`009 s := 'Magic book';
X`009`009O_BAG: s := 'Bag';
X`009`009O_CRYSTAL: s := 'Crystal Ball';
X`009`009O_WAND: s := 'Wand of Power';
X`009`009O_HAND: s := 'Hand of Glory';
X`009`009O_TELEPORT_RING: s := 'Teleport Ring';
X`009`009O_HEALTH_RING: s := 'Health Ring';
X`009`009O_MAGIC_RING: s := 'Magic Ring';
X`009`009otherwise s := 'Bad object type';
X`009end;
X`009if cr then writeln(s)
X`009else write(lowcase(s));
Xend;
X
Xprocedure obj_view(objnum: integer);
Xbegin
X`009writeln;
X`009getobj(objnum);
X`009freeobj;
X`009getobjown;
X`009freeobjown;
X`009writeln('Object name: ',obj.oname);
X`009if objown.idents`091objnum`093 = public_id then writeln('Public')
X`009else if objown.idents`091objnum`093 = disowned_id then writeln('Disowned
V')
X`009else writeln('Owner: ',class_out(objown.idents`091objnum`093));
X`009writeln;
X`009show_kind(obj.kind);
X`009writeln;
X
X`009if obj.linedesc = 0 then
X`009`009writeln('There is a(n) # here')
X`009else
X`009`009print_line(obj.linedesc);
X
X`009if obj.examine = 0 then
X`009`009writeln('No inspection description set')
X`009else
X`009`009print_desc(obj.examine);
X
X`123`009writeln('Worth (in points) of this object: ',obj.worth:1);`009`125
X`009if obj.home > 0 then begin
X`009 getnam;
X`009 freenam;
X`009 writeln('Home of this object is ',nam.idents`091obj.home`093);
X`009end;
X`009if obj.kind in `091O_WEAPON,O_ARMOR,O_TRAP`093 then`032
X`009`009writeln ('Power of this object: ',obj.ap:1);
X`009if obj.kind in `091O_WEAPON,O_BOOK`093 then
X`009`009writeln ('Required experience to use this object: ',obj.exreq:1);
X if obj.kind = O_BOOK then begin
X`009`009getspell_name; freespell_name;
X`009`009if obj.parms`091OP_SPELL`093 > 0 then
X`009`009 writeln('Spell name of this object: ',
X`009`009`009spell_name.idents`091obj.parms`091OP_SPELL`093`093)
X`009`009else writeln('Spell name of this object: <none>');
X`009end;
X`009if obj.actindx > 0 then
X`009`009writeln ('In this object is a hook.')
X`009else writeln ('No hook in this object.');
X`009writeln('Number in existence: ',obj.numexist:1);
X`009writeln;
Xend;
X
X
X
X
XPROCEDURE do_program;`009`123 (object_name: string); declared forward `125
Xlabel exit_label;
Xvar
X`009prompt: string;
X`009done : boolean;
X`009s,param: string;
X`009objnum: integer;
X`009n: integer;
X`009newdsc: integer;
X
X procedure leave;
X begin
X`009writeln('EXIT - no changes.');
X`009log_event(myslot,E_OBJDONE,objnum,0);
X`009goto exit_label;
X end;
X
X
Xbegin
X gethere;
X if checkhide then begin
X`009if object_name = '' then writeln('To customize an object, type CUSTOM OB
VJECT <object name>.')
X`009else if lookup_obj(objnum,object_name) then begin
X`009 if not is_owner(location,TRUE) then begin
X`009`009writeln('You may only work on your objects when you are in one of yo
Vur own rooms.');
X`009 end else if obj_owner(objnum) then begin
X`009`009log_action(e_program,0);
X`009`009writeln;
X`009`009writeln('Customizing object');
X`009`009writeln('If you would rather be customizing an EXIT, type CUSTOM <di
Vrection of exit>');
X`009`009writeln('If you would rather be customizing this room, type CUSTOM')
V;
X`009`009writeln;
X`009`009getobj(objnum);
X`009`009freeobj;
X`009`009if (obj.kind = O_MAGIC_RING) and not wizard then begin
X`009`009`009writeln ('That kind of object may be customized only by Monster
V Manager.');
X`009`009`009done := true;
X`009`009end else done := false;
X`009`009prompt := 'Custom object> ';
X`009`009while not done do begin
X`009`009`009repeat
X`009`009`009`009grab_line(prompt,s,eof_handler := leave);
X`009`009`009`009param := slead(s);
X`009`009`009`009s := bite(param)
X`009`009`009until length(s) > 0;
X`009`009`009s := lowcase(s);
X`009`009`009case s`0911`093 of
X`009`009`009`009'?','h': command_help('*program help*');
X`009`009`009`009'q','e': done := true;
X`009`009`009`009'v': obj_view(objnum);
X`009`009`009`009'r': do_objrename(objnum,param);
X`009`009`009`009'c': begin
X`009`009`009`009`009getobj(objnum);
X`009`009`009`009`009freeobj;
X`009`009`009`009`009n := obj.actindx;
X`009`009`009`009`009`123 obj_owner is made getobjown `125
X`009`009`009`009`009`123 lookup_obj is made getobjnam `125
X`009`009`009`009`009custom_hook(n,objown.idents`091objnum`093,
X`009`009`009`009`009 trim_filename(
X`009`009`009`009`009`009objnam.idents`091objnum`093)
X`009`009`009`009`009 );
X`009`009`009`009`009getobj(objnum);
X`009`009`009`009`009obj.actindx := n;
X`009`009`009`009`009putobj;
X`009`009`009`009 end;
X`009`009`009`009'g': begin
X`009`009`009`009`009if param > '' then s := param
X`009`009`009`009`009else begin
X`009`009`009`009`009`009writeln('Enter * for no object');
X`009`009`009`009`009`009grab_line('Object required for GET? ',
X`009`009`009`009`009`009 s,eof_handler := leave);
X`009`009`009`009`009end;
X`009`009`009`009`009if s = '*' then begin
X`009`009`009`009`009`009getobj(objnum);
X`009`009`009`009`009`009obj.getobjreq := 0;
X`009`009`009`009`009`009putobj;
X`009`009`009`009`009end else if lookup_obj(n,s) then begin
X`009`009`009`009`009`009getobj(objnum);
X`009`009`009`009`009`009obj.getobjreq := n;
X`009`009`009`009`009`009putobj;
X`009`009`009`009`009`009writeln('Object modified.');
X`009`009`009`009`009end else
X`009`009`009`009`009`009writeln('No such object.');
X`009`009`009`009 end;
X`009`009`009`009'7': begin
+-+-+-+-+-+-+-+- END OF PART 9 +-+-+-+-+-+-+-+-