home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1994 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1994.iso
/
compsrcs
/
games
/
vmsnet
/
monhl104
/
part07
< prev
next >
Wrap
Text File
|
1992-08-02
|
44KB
|
1,387 lines
Path: uunet!mcsun!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 07/32
Keywords: Monster, a multiplayer adventure game
Message-ID: <1992Jun13.231819.3342@klaava.Helsinki.FI>
Date: 13 Jun 92 23:18:19 GMT
Sender: hurtta@klaava.Helsinki.FI (Kari Hurtta)
Followup-To: vmsnet.sources.d
Organization: University of Helsinki
Lines: 1374
Archieve-name: monster_helsinki_104/part07
Author: Kari.Hurtta@Helsinki.FI
Product: Monster Helsinki V 1.04
Environment: VMS, Pascal
Part: 07/32
-+-+-+-+-+-+-+-+ START OF PART 7 -+-+-+-+-+-+-+-+
XEXITFROM%room of sentries
XSLOT%4
XTO%%%NULL%%
XKIND%0
XTOSLOT%0
XDEFAULT*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDEFAULT*BLOCK!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%room of sentries
XSLOT%5
XTO%%%NULL%%
XKIND%0
XTOSLOT%0
XDEFAULT*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDEFAULT*BLOCK!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%room of sentries
XSLOT%6
XTO%%%NULL%%
XKIND%0
XTOSLOT%0
XDEFAULT*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDEFAULT*BLOCK!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XOBJDROP%%%NULL%%
XGRPLOC1%%%NULL%%
XGRPLOC2%%%NULL%%
XROOM2%under water 1
XEXITFROM%under water 1
XSLOT%1
XTO%%%NULL%%
XKIND%0
XTOSLOT%0
XDEFAULT*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDEFAULT*BLOCK!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%under water 1
XSLOT%2
XTO%under water 2
XKIND%1
XTOSLOT%1
XDESCLINE%The tunnel continues both up and to the south.
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDESCLINE%# dived southwards.
XDESCLINE%# arrived.
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%under water 1
XSLOT%3
XTO%%%NULL%%
XKIND%0
XTOSLOT%0
XDEFAULT*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDEFAULT*BLOCK!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%under water 1
XSLOT%4
XTO%%%NULL%%
XKIND%0
XTOSLOT%0
XDEFAULT*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDEFAULT*BLOCK!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%under water 1
XSLOT%5
XTO%1st
XKIND%1
XTOSLOT%6
XNULL*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDESCLINE%# dived up.
XDESCLINE%# arrived.
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%under water 1
XSLOT%6
XTO%%%NULL%%
XKIND%0
XTOSLOT%0
XDEFAULT*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDEFAULT*BLOCK!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XOBJDROP%%%NULL%%
XGRPLOC1%%%NULL%%
XGRPLOC2%%%NULL%%
XROOM2%under water 2
XEXITFROM%under water 2
XSLOT%1
XTO%under water 1
XKIND%1
XTOSLOT%2
XNULL*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDESCLINE%# dived further to the north.
XDESCLINE%# arrived.
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%under water 2
XSLOT%2
XTO%under water 3
XKIND%1
XTOSLOT%1
XDESCLINE%The tunnel continues both to the north and to the south.
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDESCLINE%# dived further southwards.
XDESCLINE%# arrived.
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%under water 2
XSLOT%3
XTO%%%NULL%%
XKIND%0
XTOSLOT%0
XDEFAULT*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDEFAULT*BLOCK!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%under water 2
XSLOT%4
XTO%%%NULL%%
XKIND%0
XTOSLOT%0
XDEFAULT*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDEFAULT*BLOCK!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%under water 2
XSLOT%5
XTO%%%NULL%%
XKIND%0
XTOSLOT%0
XDEFAULT*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDEFAULT*BLOCK!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%under water 2
XSLOT%6
XTO%%%NULL%%
XKIND%0
XTOSLOT%0
XDEFAULT*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDEFAULT*BLOCK!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XOBJDROP%%%NULL%%
XGRPLOC1%%%NULL%%
XGRPLOC2%%%NULL%%
XROOM2%under water 3
XEXITFROM%under water 3
XSLOT%1
XTO%under water 2
XKIND%1
XTOSLOT%2
XDESCLINE%The tunnel continues to the north.
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDESCLINE%# dived further.
XDESCLINE%# arrived.
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%under water 3
XSLOT%2
XTO%%%NULL%%
XKIND%0
XTOSLOT%0
XDEFAULT*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDEFAULT*BLOCK!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%under water 3
XSLOT%3
XTO%%%NULL%%
XKIND%0
XTOSLOT%0
XDEFAULT*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDEFAULT*BLOCK!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%under water 3
XSLOT%4
XTO%%%NULL%%
XKIND%0
XTOSLOT%0
XDEFAULT*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDEFAULT*BLOCK!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%under water 3
XSLOT%5
XTO%bottom of well
XKIND%1
XTOSLOT%6
XDESCLINE%A dim beam of light comes from the ceiling.
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDESCLINE%# swimmed up.
XDESCLINE%# arrived.
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XEXITFROM%under water 3
XSLOT%6
XTO%%%NULL%%
XKIND%0
XTOSLOT%0
XDEFAULT*DESCLINE!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XDEFAULT*BLOCK!
XDEFAULT*BLOCK!
XNULL*BLOCK!
XOBJREQ%%%NULL%%
XALIAS%
XREQVERB%F
XREQALIAS%F
XAUTOLOOK%T
XOBJDROP%%%NULL%%
XGRPLOC1%%%NULL%%
XGRPLOC2%%%NULL%%
XGLOBAL%1
XGBOOL%T
XGLOBAL%2
XGBOOL%T
XGLOBAL%3
XGBOOL%T
XGLOBAL%4
XSTART*BLOCK!
XBLOCK%Welcome to Monster (multi user dungeon)
XBLOCK%
XBLOCK% to the starter's CASTLE
XBLOCK%
XGLOBAL%5
XSTART*BLOCK!
XBLOCK%Welcome to Monster (multi user dungeon)
XBLOCK%
XBLOCK% to the starter's CASTLE
XBLOCK%
XGLOBAL%6
XNULL*MDL!
$ CALL UNPACK CASTLE.DMP;3 2006464661
$ create/nolog 'f'
X!*************************************MONSTER*******************************
V*******
Xdefine syntax MONSTER_WHO
X image %image_dir%monster_who
X noqualifiers
Xdefine syntax MONSTER_DUMP
X image %image_dir%monster_dump
X parameter P1
X`009label = DUMP_FILE
X`009prompt = "Dump file"
X`009value(type=$file,required)
Xdefine verb MONSTER
X image %image_dir%mon
X qualifier WHO
X nonnegatable
X syntax = MONSTER_WHO
X qualifier REBUILD
X qualifier FIX
X qualifier VERSION
X qualifier DEBUG
X qualifier REAL_USERID
X value(required)
X qualifier USERID
X value(required)
X qualifier BATCH
X value(required,type=$infile)
X qualifier START
X qualifier OUTPUT
X value(default="SYS$OUTPUT",type=$outfile)
X qualifier DUMP
X nonnegatable
X syntax = MONSTER_DUMP
X qualifier BUILD
X nonnegatable
X syntax = MONSTER_DUMP
X disallow any2 (REBUILD, FIX, REAL_USERID, USERID, BATCH, DUMP, BUILD)
X disallow ((OUTPUT or neg OUTPUT) and FIX)`032
X disallow (START and (BUILD or DUMP))
$ CALL UNPACK CLD.PROTO;2 1732842641
$ create/nolog 'f'
X`091environment,inherit ('Global','Guts','Database')`093
Xmodule cli (input, output);
X
Xconst
X`009cli$_present`009= 261401;
X`009cli$_absent`009= 229872;
X`009cli$_negated`009= 229880;
X`009cli$_defaulted`009= 261409;
X`009ss$_normal`009= 1;
X
Xtype
X`009word_unsigned`009= `091word`093 0..65535;
X`009cond_value`009= `091long`093 unsigned;
X
Xvar
X`009done`009`009: `091external`093 boolean;
X`009userid`009`009: `091external`093 veryshortstring;
X`009myname`009`009: `091external`093 shortstring;
X`009wizard`009`009: `091external`093 boolean;
X
X`009output_file`009: `091global`093 string := 'SYS$OUTPUT';
X
Xfunction cli$get_value (%descr entity_desc: string;`032
X`009`009`009%descr retdesc: string;
X`009`009`009%ref retlength: word_unsigned): cond_value;
X`009external;
X
Xfunction cli$present (%descr entity_desc: string): cond_value;
X`009external;
X
Xprocedure rebuild_system;
X`009external;
X
Xfunction fix_system (batch: string := ''): boolean;
X`009external;
X
Xfunction lowcase (s: string): string;
X`009external;
X
X`091global`093 procedure monster_version;
Xbegin
X`009`123 Don't take this out please... `125
X`009writeln('Monster, a multiplayer adventure game where the players create
V the world');
X`009writeln('and make the rules.');
X`009writeln;
X`009writeln('VERSION: Monster Helsinki 1.04');
X`009writeln('DISTRIBUTED: 13.6.1992');
X`009writeln;
X`009writeln('Originally written by Rich Skrenta at Northwestern University,
V 1988.');
X writeln;
X`009writeln(' modified by Juha Laiho at University of Helsinki, 1
V988--89,');
X`009writeln(' Antti Leino at University of Helsinki, 1
V989,');
X writeln(' Kari Hurtta at University of Helsinki
V, 1989--92.');
X writeln;
X`009writeln('Monster''s programming language by Kari Hurtta.');
Xend;
X
X
Xfunction batch_system (file_name: string): boolean;
Xvar line: string;
X pos,errorcode: integer;
X batch: text;
X quit: boolean;
Xbegin
X batch_system := true;
X open(batch,file_name,history := readonly, error := continue);
X quit := false;
X errorcode := status(batch);
X if errorcode <> 0 then begin
X`009case errorcode of
X`009 -1: `123 PAS$K_EOF `125 writeln('Batch file is empty.');
X`009 3: `123 PAS$K_FILNOTFOU `125 writeln('Batch file not foud.');
X`009 4: `123 PAS$K_INVFILSYN `125 writeln('Illegal name of batch file.')
V;
X`009 otherwise writeln('Can''t open batch file, error code (status): ',
X`009`009errorcode:1);
X`009end; `123 case `125
X`009quit := true;
X end else begin
X`009reset(batch);
X`009while not quit and not eof(batch) do begin
X`009 readln(batch,line);
X`009 writeln(line);
X`009 if line > '' then begin
X`009`009pos := index(line,'!');
X`009`009if pos > 0 then line := substr(line,1,pos-1);
X`009 end;
X`009 if line > '' then quit := not fix_system(line);
X`009end;
X end;
X batch_system := not quit;
Xend; `123 batch system `125
X
X`091global`093 procedure very_prestart; `123 before procedure init `125
Xvar
X`009qualifier,
X`009value,
X`009s,file_name`009: string;
X`009value_length`009: word_unsigned;
X`009status1,
X`009status2`009`009: cond_value;
X
X`009do_rebuild, do_fix, do_batch : boolean;
Xbegin
X do_rebuild := false;
X do_fix := false;
X do_batch := false;
X file_name := '';
X
X`009qualifier := 'OUTPUT';
X`009status1 := cli$present (qualifier);
X`009if status1 = cli$_present then begin
X`009 status2 := cli$get_value (qualifier, value, value_length);
X`009 if status2 = ss$_normal then output_file := value
X`009 else begin
X`009`009writeln ('Something is wrong with /OUTPUT.');
X`009`009done := true;
X`009 end;
X`009end else if status1 = cli$_negated then output_file := 'NLA0:';
X
X`009`123 for /OUTPUT and big terminal lines `125
X`009if output_file > '' then begin
X`009 close(output);
X`009 open(output,output_file,new,terminal_line_len+80,DEFAULT := '.LOG');
X`009 rewrite(output);
X`009end;`032
X
X`009qualifier := 'REBUILD';
X`009status1 := cli$present (qualifier);
X`009if status1 = cli$_present then begin
X`009`009if wizard then begin
X`009`009`009`123 Must use 'wizard' here, because at this spot
X`009`009`009 the priv'd users always have privd:=false, but
X`009`009`009 wizard:=true`009`009`009`009`009 `125
X`009`009`009`123 Nowadays even that is incorrect. 'Wizard'
X`009`009`009 denotes rebuilding rights. `009leino@finuha`009`125
X`009`009`009if REBUILD_OK then begin
X`009`009`009`009writeln('Do you really want to destroy the entire universe?'
V);
X`009`009`009`009readln(s);
X`009`009`009`009if length(s) > 0 then
X`009`009`009`009`009if substr(lowcase(s),1,1) = 'y' then
X`009`009`009`009`009`009do_rebuild := true;
X`009`009`009end else
X`009`009`009`009writeln('REBUILD is disabled.');
X`009`009`009`009done := true;
X`009`009end else
X`009`009`009writeln ('Only the Monster Manager may REBUILD.');
X`009end;
X
X`009qualifier := 'FIX';
X`009status1 := cli$present (qualifier);
X`009if status1 = cli$_present then begin
X`009`009if wizard then do_fix := true`009`123 hurtta@finuh `125
X`009`009else writeln ('Only the Monster Manager may fix database.');
X`009end;
X
X`009qualifier := 'BATCH';
X`009status1 := cli$present (qualifier);
X`009if status1 = cli$_present then begin
X`009 if userid = MM_userid then begin
X`009`009status2 := cli$get_value (qualifier, value, value_length);
X`009`009if status2 = ss$_normal then begin
X`009`009 file_name := value;
X`009`009 do_batch := true `123 hurtta@finuh `125
X`009`009end else begin
X`009`009 writeln ('Something is wrong with BATCH.');
X`009`009 done := true;
X`009`009end;
X`009 end else begin
X`009`009writeln ('You may not batch database.');
X`009`009done := true;
X`009 end;
X`009end;
X
X`009qualifier := 'DEBUG';
X`009status1 := cli$present (qualifier);
X`009if status1 = cli$_present then begin
X`009 if gen_debug then debug := true
X`009 else if userid = MM_userid then debug := true
X`009 else begin
X`009`009writeln ('You may not use /DEBUG.');
X`009`009debug := false
X`009 end
X`009end else debug := false;
X `032
X if do_rebuild or do_fix or do_batch then begin `032
X`009if open_database(playing := false) then begin
X`009 writeln('Database locked (file level lock).');
X`009 if do_rebuild then rebuild_system;
X`009 if do_fix then done := not fix_system;
X`009 if do_batch then done := not batch_system(file_name);
X`009 close_database;
X`009 writeln('Database freed (file level lock).');
X`009end else begin
X`009 writeln('Can''t lock database. Someone is playing Monster.');
X`009 done := true;
X`009end;
X end;
X
Xend;
X
X `032
X`091global`093 procedure prestart;
Xvar
X`009qualifier,
X`009value,
X`009s`009`009: string;
X`009value_length`009: word_unsigned;
X`009status1,
X`009status2`009`009: cond_value;
X
Xbegin
X
X`009qualifier := 'VERSION';
X`009status1 := cli$present (qualifier);
X`009if status1 = cli$_present then monster_version;
X
X`009qualifier := 'REAL_USERID';
X`009status1 := cli$present (qualifier);
X`009if status1 = cli$_present then begin
X`009`009status2 := cli$get_value (qualifier, value, value_length);
X`009`009if status2 = ss$_normal then begin
X`009`009`009if (userid <> lowcase(value)) then begin
X`009`009 `009`009if (userid = MM_userid) then begin
X`009`009`009`009`009userid := lowcase(value); `123 hurtta@finuh `125
X`009`009`009`009`009wizard := false;
X`009 `009`009`009end else begin
X`009`009`009`009`009writeln ('You may not pose as another player.');
X `009`009`009`009`009done := true;
X`009`009`009`009end;
X`009`009`009end else begin
X`009`009`009`009writeln('Do you find it interesting to pose as yourself?');
X`009`009`009end;
X`009`009end else begin
X`009`009`009writeln ('Something is wrong with /REAL_USERID.');
X`009`009`009done := true;
X`009`009end;
X`009end;
X
X`009qualifier := 'USERID';
X`009status1 := cli$present (qualifier);
X`009if status1 = cli$_present then begin
X`009`009status2 := cli$get_value (qualifier, value, value_length);
X`009`009if status2 = ss$_normal then begin
X`009`009`009s := lowcase(value);`009 `123 hurtta@finuh `125
X`009`009`009if s.length > veryshortlen-4 then begin
X`009`009`009`009s := substr (s, 1, veryshortlen-4);
X`009`009`009`009writeln ('Userid truncated to ', s, ', sorry.');
X`009`009`009end;
X`009`009`009userid := '"' + s + '"';
X`009`009`009myname := s;
X`009`009`009if (myname`0911`093 >= 'a') and (myname`0911`093 <= 'z') then be
Vgin
X`009`009`009 myname`0911`093 :=`032
X`009`009`009`009chr (ord ('A') +`032
X`009`009`009`009ord (myname`0911`093) - ord ('a'));
X`009`009`009end;
X`009`009end else begin
X`009`009`009writeln ('Something is wrong with /USERID.');
X`009`009`009done := true;
X`009`009end;
X`009end;
X
X`009qualifier := 'START';
X`009status1 := cli$present (qualifier);
X`009if status1 = cli$_present then done := false
X`009else if status1 = cli$_negated then done := true;
X
Xend;
X
X
Xend.
$ CALL UNPACK CLI.PAS;74 1750232940
$ create/nolog 'f'
XSYNTAX:`009function`009->`009name (p) / name (p,p) / name (p,p,p) /
X`009`009`009`009name (p,...)
X
X`009name `009`009->`009fname /
X`009`009`009`009GOSUB label /`032
X`009`009`009`009DEFINE variable /`032
X`009`009`009`009SET variable /`032
X`009`009`009`009LABEL label /
X`009`009`009`009SUBMIT label /
X`009`009`009`009FOR variable
X
X`009label`009`009->`009list of words
X
X`009p`009`009->`009function / const / variable
X
X`009const`009`009->`009"some text" /
X`009`009`009`009"some text"&
X`009`009`009`009const
X
X`009fname`009`009->`009+ / = / == / === / inv / pinv / players /
X`009`009`009`009objects / get / pget / drop / pdrop /
X`009`009`009`009and / or / move / pmove / pprint /
X`009`009`009`009print / oprint / if / where / null /
X`009`009`009`009attack / not / random / strip /
X experience / set experience / pluss /
X`009`009`009`009difference / times / quotient /
X`009`009`009`009set state / get state / less / number /
X`009`009`009`009health / all objects / all players /`032
X`009`009`009`009all rooms / control / include / exclude /
X`009`009`009`009get remote state / set remote state /
X`009`009`009`009remote objects / remote players / heal /
X`009`009`009`009duplicate / pduplicate / destroy / pdestroy /
X`009`009`009`009string head / string tail / head / tail /
X`009`009`009`009lookup object / lookup player / lookup room /
X`009`009`009`009parse object / parse player / parse room /
X`009`009`009`009privilege / userid / pprint raw / print raw /
X`009`009`009`009oprint raw / print null / mheal / mattack /
X`009`009`009`009list / lookup direction / get global flag /
X spell level / set spell level
X
X`009program`009`009->`009sentence +
X
X
X`009sentence`009->`009function /
X`009`009`009`009- function
X
XComments start with ! and end to end of line. ! isn't comment character insi
Vde
Xconst.
X
XSummary:`009+`009concatenate all parameters
X`009`009=`009compare two parameters
X`009`009==`009compare two parameters with spaces padding
X`009`009===`009compare two parameyers with spaces compressing`032
X`009`009`009`009and characters turning lowcase
X`009`009inv`009inventory of monster
X`009`009pinv`009inventory of player
X`009`009players`009list players in room
X`009`009objects`009list items in room
X`009`009get`009monster get items (defined by parameter) from ground
X`009`009pget`009player get items (defined by parameter) from ground
X`009`009drop`009monster drop (defined by parameter) items to ground
X`009`009pdrop`009player drop items (defined by parameter) items to ground
X`009`009and`009select the common elements of two parameters
X`009`009or `009select all elements from two parameters
X`009`009move`009monster jump to some room (defined by parameter)
X`009`009pmove`009player jump to some room (defined by parameter)
X`009`009pprint`009print message to players`032
X`009`009pprint raw`009(same)
X`009`009print`009print message to all players in the same room
X`009`009`009`009as monster
X`009`009print raw`009(same)
X`009`009oprint`009the same as print, but do not print to the
X original player (victim)
X`009`009oprint raw`009(same)
X`009`009print null`009run text through print -formatter
X`009`009if`009eval second or third parameter according to
X`009`009`009`009first parameter
X`009`009where`009room of any player or monster
X`009`009null`009eval all parameters, but do not return anything
X`009`009attack`009decrease player's force
X`009`009heal`009increase player's force
X`009`009mattack`009decrease monster's force
X`009`009mheal`009increase monster's force
X`009`009not`009return nothing, if parameter is empty, else return
X`009`009`009`009text TRUE
X`009`009random`009select one item (object) from item's (object's) list
X`009`009strip`009remove all other characters except letters a - z and`032
X`009`009`009`009A - Z and numbers from parameter `032
X`009`009`009`009and return result, upper case converted to`032
X`009`009`009`009lower
X`009`009experience`009return experience of any player
X`009`009set experience`009set player experience
X`009`009plus`009calculate integer value`032
X`009`009`009`009first parameter + second parameter
X`009`009difference`009calculate integer value
X`009`009`009`009first parameter - second parameter
X`009`009times`009calculate integer value
X`009`009`009`009first parameter * second parameter
X
X`009`009quotient`009calculate integer value
X`009`009`009`009first parameter div second parameter
X`009`009get state`009get value of permanent code variable
X`009`009set state`009set value of permanent code variable
X`009`009get global flag`009read value of given flags
X`009`009less`009return TRUE if first value is lower than second value
X`009`009number`009return value of parameter if parameter is integer
X`009`009health return health of any player
X`009`009set experience`009set players's experience
X`009`009all players`009list players and monsters of universe
X`009`009all objects`009list objects of universe
X`009`009all rooms`009list rooms of universe
X`009`009control`009shift control to monster named in first`032
X`009`009`009parameter during evaluating second parameter
X`009`009include`009return second parameter if first parameter
X`009`009`009includes second parameter
X`009`009exclude`009return the atoms of first parameter, excluding
X`009`009`009those in second parameter
X`009`009get remote state`009get value of permanent code
X`009`009`009`009`009variable of certain monster, specified
X`009`009`009`009`009by first parameter
X`009`009set remote state`009set value of permanent code
X`009`009`009`009`009variable of certain monster, specified
X`009`009`009`009`009by first parameter
X`009`009remote objects`009list items in certain room, specified by first
X`009`009`009`009parameter
X`009`009remote players`009list players in certain room, specified by`032
X`009`009`009`009first parameter
X`009`009duplicate`009monster make items to monster's inventory
X`009`009`009`009(order by parameter)
X`009`009pduplicate `009monster make items to player's inventory
X`009`009`009`009(order by parameter)
X`009`009destroy`009`009monster destroy items from monster's inventory
X`009`009`009`009(order by parameter)
X`009`009pdestroy`009monster destroy items from player's inventory
X`009`009`009`009(order by parameter)
X`009`009string head`009return first word of parameter
X`009`009string tail`009return parameter excluding first word
X`009`009head`009`009return first item of parameter
X`009`009tail`009`009return parameter excluding first item
X`009`009lookup player`009fill parameter's player names
X`009`009lookup room`009fill parameter's room names
X`009`009lookup object`009fill parameter's object names
X`009`009lookup direction`009fill parameter's direction names
X`009`009parse player`009parsing player name (with joker)
X`009`009parse room`009parsing room name (with joker)
X`009`009parse object`009parsing object name (with joker)
X`009`009privilege`009check given privileges (second parameter)
X`009`009`009`009`009of any player (first parameter)
X`009`009userid`009`009give userid of players
X`009`009list`009 concentenate list of parameters
X`009`009spell level`009return spell level of summoner`032
X`009`009`009`009`009of current spell
X`009`009set spell level`009set spell level of summoner (or learner)
X`009`009`009`009`009of current spell
X
XThe commands do not print anything except:
X`009pdrop`009`009may print unwear or unwield meassage
X`009pdestroy`009may print unwear or unwield meassage
X`009print`009`009message to players
X`009print raw`009message to players
X`009pprint`009`009message to victim
X`009pprint raw`009message to victim
X`009oprint`009`009message to players except victim
X`009oprint raw`009message to players except victim
X
XThe following commands require that monster is in privileged mode:
X`009pget`009`009all cases
X`009pdrop`009`009all cases
X`009pmove`009`009all cases
X`009
X`009`009`009pmove requires that monster has poof privilege
X`009`009`009(or requires that code is spell mode)
X`009`009`009if target isn't by monster's owner or public.
X
X`009`009`009move requires that monster has poof privilege
X`009`009`009(or requires that code is spell mode)
X`009`009`009if target isn't by monster's owner or public.
X
X`009heal`009`009all cases
X
X`009set experience requires that monster has experience privilege,
X`009`009`009experience of owner cannot be set
X
X`009control`009`009can't shift control from one owner's monster to`032
X`009`009`009other owner's monster
X
X`009get remote state`009requires that monster's owner is owner
X`009`009`009`009of current code, or that monster is public
X`009`009`009`009and current monster has owner privilege
X
X`009set remote state`009requires that monster's owner is owner
X`009`009`009`009of current code, or that monster is public
X`009`009`009`009and current monster has owner privilege
X
X`009pduplicate`009all cases
X`009`009`009requires that monster has owner privilege`032
X`009`009`009(or requires that code is spell mode)
X`009`009`009if object not owned by owner of current code
X`009`009`009
X`009`009`009duplicate requires that monster has owner privilege`032
X`009`009`009(or requires that code is spell mode)
X`009`009`009if object not owned by owner of current code
X
X`009pdestroy`009all cases
X`009`009`009requires that monster has owner privilege`032
X`009`009`009(or requires that code is spell mode)
X`009`009`009if object not owned by owner of current code
X`009
X`009`009`009destroy requires that monster has owner privilege`032
X`009`009`009(or requires that code is spell mode)
X`009`009`009if object not owned by owner of current code
X
X`009`009`009userid requires that monster has experience privilege
X
X`009mattack `009all cases
X`009`009`009mattack requires that the monster has manager`032
X`009`009`009privilege if the controlled monster or the`032
X`009`009`009player isn't in the same room as the target monster
X
X`009mheal `009`009all cases
X`009`009`009mheal requires that monster has also manager privilege
X`009`009`009for self healing
X`009`009`009mattack requires that the monster has manager`032
X`009`009`009privilege if the controlled monster or the`032
X`009`009`009player isn't in the same room as the target monster
X
X`009`009`009attack: monster's level limit attack power
X
XThe parameters of the following commands are object's (or other) list:
X`009and,or,get,pget,drop,pdrop,exclude,duplicate,pduplicate,
X`009destroy,pdestroy,head,tail,lookup room,lookup object,
X`009lookup object,lookup direction, privilege(only second parameter),
X`009userid, list, get global flag
X
XThe following commands return object's (or other) list:
X`009and,or,get,pget,drop,pdrop,inv,pinv,players,objects,all objects,
X`009all players,all rooms,exclude,remote players,remote objects,
X`009duplicate,pduplicate,destroy,pdestroy,lookup room,
X`009lookup object,lookup player,lookup direction,
X`009parse object,parse room,parse player,
X`009experience,userid,list, get global flag
X
XThe following commands return a numeric value:
X`009attack,experience,set experience,plus,difference,times,quotient,
X`009health,number,heal,mattack,mheal, spell level,
X`009set spell level
X
XThe following commands return TRUE or null string:
X`009not, less, get global flag (if parameter isn't list)
X
XExample of object's list:
X`009shovel, hat, ruby, note
X
XReturn:`009`009+`009concatenated parameters
X`009`009=`009"" or parameter
X`009`009==`009"" or parameter
X`009`009===`009"" or parameter (in lowcase)
X`009`009inv`009monster's inventory list`009`009> item list
X`009`009pinv`009player's inventory list`009`009`009> item list
X`009`009players`009list of players in room`009`009`009> item list
X`009`009objects`009list of objects in room`009`009`009> item list
X`009`009get`009succesfully taken objects`009`009> item list
X`009`009pget`009succesfully taken objects`009`009> item list
X`009`009drop`009succesfully dropped objects`009`009> item list
X`009`009pdrop`009succesfully dropped objects`009`009> item list
X`009`009and`009`009`009`009`009`009> item list
X`009`009or`009union of parameters`009`009`009> item list
X`009`009move`009room name if succesfully, else ""
X`009`009pmove`009room name if succesfully, else ""
X`009`009pprint`009message (parameters)
X`009`009print`009message (parameters)
X`009`009oprint`009message (parameters)
X`009`009pprint raw`009message(parameters)
X`009`009print raw`009message(parameters)
X`009`009oprint raw`009message(parameters)
X`009`009print null`009'message'(parameters)
X`009`009if`009second or third parameter
X`009`009where`009room name
X`009`009not`009"" or "TRUE"
X`009`009random`009item from item list
X`009`009strip`009stripped parameter
X`009`009attack`009used attack power, will be lower than
X`009`009`009`009parameter's value`009> numeric value
X`009`009heal`009parameter's value`009`009> numeric value
X`009`009mattack`009second parameter's value`009> numeric value
X`009`009mheal`009second parameter's value`009> numeric value
X`009`009set experience`009parameter's value`009> numeric value
X`009`009experience `009experience of given player > numeric value
X`009`009plus`009`009first + second`009`009> numeric value
X`009`009difference`009first - second`009`009> numeric value
X`009`009quotient`009first div second`009> numeric value
X`009`009get state`009permanent variable
X`009`009set state`009parameter's value
X`009`009get global flag`009List of TRUEs`009`009`009> item list
X`009`009less`009"" or "TRUE"
X`009`009number`009"" or parameter's value`009`009> numeric value
X`009`009health`009health of given player`009`009> numeric value
X`009`009set experience`009parameter's value`009> numeric value
X`009`009all players`009list of players`009`009`009> item list`032
X`009`009all rooms`009list of rooms`009`009`009> item list
X`009`009all objects`009list of objects`009`009`009> item list`032
X`009`009control`009second parameter
X`009`009include`009second parameter or ""`032
X`009`009exclude`009unmatched items from first parameter`009> item list
X`009`009get remote state`009permanent variable
X`009`009set remote state`009(second) parameter's value
X`009`009remote players`009list of players of certain room`009> item list
X`009`009remote objects`009list of objects of certain room`009> item list
X`009`009duplicate`009succesfully made objects`009> item list
X`009`009pduplicate`009succesfully made objects`009> item list
X`009`009destroy`009`009succesfully destroyed objects`009> item list
X`009`009pdestroy`009succesfully destroyed objects`009> item list
X`009`009string head`009head of string parameter`032
X`009`009string tail`009tail of string parameter
X`009`009head`009`009head of list parameter
X`009`009tail`009`009tail of list parameter (> item list)
X`009`009privilege`009privilege list`009`009`009> item list
X`009`009parse player`009player list`009`009`009> item list
X`009`009parse object`009object list`009`009`009> item list
X`009`009parse room`009room list`009`009`009> item list
X`009`009userid`009`009userid list`009`009`009> item list
X`009`009list`009concentenated lists`009`009`009> item list
X`009`009spell level`009summoner's spell level > numeric value
X`009`009set spell level parameter's value > numeric value
X `032
XThe following commands don't work with a hook, except by using a`032
Xcontrol function:
X`009`009inv
X`009`009get
X`009`009drop
X`009`009move `032
X`009`009pduplicate
X`009`009pdestroy
X
X`009`009set experience`009`009(use control function)
X`009`009userid`009`009`009(use control function)
X
XSpecial commands:
X`009`009GOSUB
X`009`009LABEL
X`009`009DEFINE `032
X`009`009SET
X`009`009SUBMIT
X`009`009FOR
X
XThe scope of variables is limited by DEFINE commands and executed GOSUB - LA
VBEL
Xcommands inside DEFINE commands. So the scope is defined at run-time.
X
XSUBMIT requires that the monster has manager privilege if the monster or the
Xprevious player isn't in the same room as the new player. The unit of delta
Xtime is uncertain.
X
XFOR evaluates the second parameter with every item of the first list paramet
Ver
X(it is assigned to variable) and returns that item when the result of the
Xevaluation wasn't null.
X
XDefault variables in all cases:
Xplayer name`009`009Player's personal name
Xmonster name`009`009Monster's name (when hook, value of this variable is "")
X`009`009`009(as the control function changes the controlled monster,
X`009`009`009 the value of this variable is also changed)
X
XLabels and default variables for Monster:
Xenter`009`009-`009`009`009entering room, start game or
X`009`009`009`009`009poof to room
Xleave`009`009target`009`009`009leaving room, quit game or
X`009`009`009`009`009poof from room
Xsay`009`009speech`009`009`009say something
Xattack`009`009-`009`009`009attacking to Monster
Xlook`009`009-`009`009`009look something in room
Xlook you`009-`009`009`009look monster
Xcommand`009`009command`009`009`009for Command Extension System
X
XLabels and default variables for hook of rooms:
Xstart`009`009-`009`009`009start game
Xenter`009`009-`009`009`009entering room
Xescaped`009`009-`009`009`009leaving room or poof from room
X`009`009`009`009`009activated when player is really leave
X`009`009`009`009`009room
Xleave`009`009target`009`009`009leaving room
Xpoof in`009`009-`009`009`009poof to room
Xpoof out`009target`009`009`009poof from room
Xsay`009`009speech`009`009`009say something
Xlook detail`009detail`009`009`009look detail in room
Xlook around`009-`009`009`009look around in room
Xcommand`009`009command`009`009`009for Command Extension System
Xwrong dir`009direction`009`009when user gives go <unmatched direction>
X
XLabels and default variables for hook of objects:
Xget fail`009-`009`009`009failing to get object
Xget succeed`009-`009`009`009getting object
Xdrop succeed`009-`009`009`009dropping object ( by drop -command )
Xdrop you`009-`009`009`009dropping object ( other reason )
Xuse succeed`009-`009`009`009using object
Xlook you`009-`009`009`009look object
Xcommand`009`009command`009`009`009for Command Extension System
Xstart`009`009-`009`009`009start game`032
Xenter`009`009-`009`009`009entering room
Xleave`009`009target`009`009`009leaving room
X
XLabels and default variables for spell's code:
Xsummon - wictim execute this when
X summoner attack's wictim
Xlearn book name when player reads book what
X learn's spell (that code
X must use set spell level for
X this).
XIn spell there is defined variables spell name and summoner name.
X
X
XLabels and default variables for global code:
Xstart`009`009-`009`009`009start games
Xquit`009`009-`009`009`009quit games
X
XCommand Extension System:
X
XWhen the user types an invalid command, the following will happen:
X
X1)`009form of command is: <something>`032
X`009to hook of room, run label command
X`009the value of variable command is <something>
X
X2)`009form of command is: <something> <object name>
X`009to hook of object, run label command
X`009the value of variable command is <something>
X
X3)`009form of command is: <something> <monster name>
X`009to monster's code run label command
X`009the value of variable command is <something>
X`009
XParameters of functions:
X
X+ `009`009(<line 1>,...,<line n>)`032
X= `009`009(<line 1>,<line 2>)`032
X== `009`009(<line 1>,<line 2>)`032
X=== `009`009(<line 1>,<line 2>)`032
Xinv`009`009()`032
Xpinv`009`009()`032
Xplayers`009`009()`032
Xobjects`009`009()`032
Xget`009`009(<object list>)`032
Xpget`009`009(<object list>)`032
Xdrop`009`009(<object list>)`032
Xpdrop`009`009(<object list>)`032
Xand`009`009(<item list>,<item list>)`032
Xor`009`009(<item list>,<item list>)`032
Xmove`009`009(<room's name>)`032
Xpmove`009`009(<room's name>)`032
Xpprint`009`009(<message part 1>,...,<message part n>)`032
Xprint`009`009(<message part 1>,...,<message part n>)`032
Xoprint`009`009(<message part 1>,...,<message part n>)`032
Xpprint raw`009(<message part 1>,...,<message part n>)`032
Xprint raw`009(<message part 1>,...,<message part n>)`032
Xoprint raw`009(<message part 1>,...,<message part n>)`032
Xprint null`009(<message part 1>,...,<message part n>)`032
Xif `009`009(<p1>,<action 1>,<action 2>)`032
Xwhere`009`009(<monster's or player's name>)`032
Xnull`009`009(<action 1>,<action 2>,<action 3>,...,<action n>)`032
Xattack`009`009(<attack force: nr>)`032
Xnot`009`009(<p1>)
Xrandom`009`009(<item list>)`032
Xstrip`009`009(<string>)`032
Xexperience`009(<player's name>)`032
Xset experience`009(<player's new experience>)`032
Xplus`009`009(<p1: nr>,<p2: nr>) `032
Xdifference`009(<p1: nr>,<p2: nr>)
Xtimes`009`009(<p1: nr>,<p2: nr>)
Xquotient`009(<p1: nr>,<p2: nr>)
Xget state`009()
Xset state`009(<string>)
Xget global flag`009(<flag list>)
Xless`009`009(<p1: nr>,<p2: nr>)
Xnumber`009`009(<p1: nr>)
Xhealth`009`009(<player's name>)
Xall players`009()
Xall objects`009()
Xall rooms`009()
Xcontrol`009`009(<monster's name>,<action>)
Xinclude`009`009(<string>,<substring>)
Xexclude`009`009(<item list>,<sub item list>)
Xremote object`009(<room name>)
Xremote players`009(<room name>)
Xheal`009`009(<healing amount: nr>)
Xduplicate`009(<object list>)
Xpduplicate`009(<object list>)
Xdestroy`009`009(<object list>)
Xpdestroy`009(<object list>)
Xstring head`009(<string>)
Xstring tail`009(<string>)
Xhead`009`009(<item list>)
Xtail`009`009(<item list>)
Xlookup object`009(<object list>)
Xlookup player`009(<player list>)
Xlookup room`009(<room list>)
Xlookup direction`009(<direction list>)
Xparse object`009(<parameter>)
Xparse player`009(<parameter>)
Xparse room`009(<parameter>)
Xexperience`009(<player name>,<privilege list>)
Xuserid`009`009(<player list>)
Xmheal`009`009(<monster name>,<heal amount: nr>)
Xmattack`009`009(<monster name>,<attck amont>: nr>)
Xlist`009`009(<item list 1>,...,<item list n>)
Xspell level ()
Xset spell level (level number)
X
XLABEL <label>`009`009(<action 1>,...,<action n>)
XGOSUB <label>`009`009(<param 1>,...,<param n>)
XDEFINE <variable>`009(<action>)
XSET <variable>`009`009(<value>)
XSUBMIT <label>`009`009(<delta time>,<player's name>)
XFOR <variable>`009`009(<list>,<action>)
$ CALL UNPACK COMMANDS.PAPER;12 1851499723
$ create/nolog 'f'
X! That file convert database to new format
X! Usage: MONSTER/BATCH=CONVERT.BATCH
XM ! Create MDL database
XA ! Create privilege database
XB ! Create health database
XS ! Create password database
XGL ! Create global flag database
XSP ! Clear/create spell database.
X! Make some fix's to database !
XD ! Reallocate descriptions
XI ! Repair index file
XG ! Calculate objects' number in existen
Vce
XJ ! Repair paths
XN ! Clear/create and recount quota datab
Vase.
XOW ! Check owners of rooms, objects and M
VDLs
XGU ! Mark monster active to global databa
Vse.
XG+ ! Mark monster database as valid.
X! Let's hope that's all !
XV ! View database capacity
XGV ! View global flags
X!
X! - Kari Hurtta (hurtta@finuh)
$ CALL UNPACK CONVERT.BATCH;6 1381040911
$ create/nolog 'f'
X`091 ENVIRONMENT, inherit ('Global','Guts','Database','Cli','Privusers','Par
Vser',
X`009`009`009'Interpreter','Queue') `093
XMODULE Custom ( Input, Output );
X`032
X`123+
XCOMPONENT: Modulin MON custom komennot on siiretty t`228nne.
X`032
XPROGRAM DESCRIPTION:
X`032
X Peli MONSTER`032
X`032
XAUTHORS:
X`032
X Kari Hurtta
X`032
XCREATION DATE: 29.9.1990
X`032
XDESIGN ISSUES:
X`032
X Tarkoitus on pienent`228`228 tiedoston MON.PAS kokoa.
X`032
X`032
XMODIFICATION HISTORY:
X`032
X Date `124 Name `124 Description
X--------------+---------+---------------------------------------------------
V----
X 5.10.1990 `124 `124 Spells
X 7.11.1990 `124 `124 Global descbibtions
X 24.01.1991 `124 `124 Look more exact value of status -funktion
X 6.05.1992 `124 `124 O_TRAP was leaven out from prog_kind
X-`125
X
Xvar system_id,disowned_id,public_id: `091global`093 shortstring;
X
X`009hiding : `091global`093 boolean := FALSE;`009 `123 is player hiding? `1
V25
X`009logged_act : `091global`093 boolean := FALSE;`009 `123 flag to indicate
V that a log_action
X`009`009`009`009`009 has been called, and the next call
X`009`009`009`009`009 to clear_command needs to clear the
X`009`009`009`009`009 action parms in the here roomrec `125
X
X
X
X`009userid: `091global`093 veryshortstring;`009`123 userid of this player `1
V25
X`009myslot: `091global`093 integer := 1;`009`123 here.people`091myslot`093..
V. is this player `125
X
X`009myname: `091global`093 shortstring;`009
X`009`009`009`009`123 personal name this player chose (setname) `125
X`009myexperience: `091global`093 integer;`009`123 how experienced I am `125
X`009mydisguise: `091global`093 integer;`009`123 what disguise I'm wearing `1
V25
X
X`032
X`091external`093
Xfunction put_token(room: integer;var aslot:integer;hidelev:integer := 0):boo
Vlean;
Xexternal;
X
Xprocedure do_program(object_name: string); forward;
X
Xprocedure do_y_altmsg;
Xforward;
X
Xprocedure do_group1;
Xforward;
X
Xprocedure do_group2;
Xforward;
X
Xprocedure custom_monster(name: string); forward;
X
X`091global`093 PROCEDURE custom_hook(var code: integer;
X`009`009`009owner: shortstring;
X`009`009`009default: string := '.MDL'); forward;
X
X`091global`093 FUNCTION spell_owner(sid: integer): string;
Xvar tmp: intrec;
X code: integer;
Xbegin
X tmp := anint;
X getint(N_SPELL);
X freeint;
X code := anint.int`091sid`093;
X anint := tmp;
X if code = 0 then begin
X`009writeln('%Error in spell_owner. Notify Monster Manager.');
X`009spell_owner := ''
X end else spell_owner := monster_owner(code);
Xend; `123 spell_owner `125
X
X`091global`093 FUNCTION is_spell_owner(sid: integer;
X public_ok: boolean := false): boolean;
Xvar owner: shortstring;
Xbegin
X owner := spell_owner(sid);
X if owner = userid then is_spell_owner := true
X else if owner_priv and not (owner = system_id) then is_spell_owner := tr
Vue
X else if manager_priv then is_spell_owner := true
X else if public_ok and (owner = public_id) then is_spell_owner := true
X else is_spell_owner := false;
Xend; `123 is_spell_owner `125
X
X
Xfunction trim_filename(name: shortstring): string;
Xvar i: integer;
X def: string;
Xbegin
X def := '';
X for i := 1 to length(name) do`032
X`009if ('a' <= name`091i`093) and ('z' >= name`091i`093) then
X`009 def := def + chr(ord(name`091i`093) - ord('a') + ord('A'))
X`009else if ('A' <= name`091i`093) and ('Z' >= name`091i`093) then
X`009 def := def + name`091i`093
X`009else if (name`091i`093 = ' ') or (name`091i`093 = '_') then
X`009 def := def + '_';
X def := def + '.MDL';
X trim_filename := def;
Xend; `123 trim_filename `125
X
X`091global`093
Xfunction sysdate:string;
Xvar
+-+-+-+-+-+-+-+- END OF PART 7 +-+-+-+-+-+-+-+-