home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-12-05 | 42.8 KB | 1,490 lines |
- Newsgroups: vmsnet.sources.games
- Path: uunet!stanford.edu!agate!spool.mu.edu!darwin.sura.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!news.funet.fi!hydra!klaava!hurtta
- From: Kari.Hurtta@Helsinki.FI
- Subject: Delta: Monster Helsinki 1.05 to 1.06 (part 3/5)
- Message-ID: <1992Dec6.174340.19673@klaava.Helsinki.FI>
- Followup-To: vmsnet.sources.d
- Sender: hurtta@klaava.Helsinki.FI (Kari Hurtta)
- Organization: University of Helsinki
- Date: Sun, 6 Dec 1992 17:43:40 GMT
- Lines: 1477
- Xref: uunet vmsnet.sources.games:560
-
- Archive-name: monster_helsinki_105_to_106/part3
- Author: Kari.Hurtta@Helsinki.FI
- Package: Delta from Helsinki Monster 1.05 to Helsinki Monster 1.06
- Environment: VMS, Pascal
- Part: 3/5
-
- -+-+-+-+-+-+-+-+ START OF PART 3 -+-+-+-+-+-+-+-+
- X- 123, 125
- X Monster reads a file named MONSTER.INIT from the directory where the`20
- X executable Monster program is. Monster finds out the directory from `20
- X the process image_name entry. There are the following entries:
- X- 129, 131
- X This entry includes the userid of Monster Manager. The userid must`20
- X be written in lowercase. The MM, who should also be the game
- X administrator, has the most power.`20
- X- 137, 139
- X Tells whether everyone may use the debug command. You must be able
- X to disable it because it gives away players too much information on
- X monsters. On the other hand,you also must be able to enable it
- X- 146, 148
- X If true, the Monster Manager can blow away ( exterminate, demolish )`20
- X and reformat the entire universe. It is preferable to set this to false.
- X It must be true when the MM wants to use the /REBUILD option.
- X- 154, 164
- X The home of the Monster database. The root directory protection must`20
- X be set to world:e and the datafiles Monster creates in it must be
- X set to world:rw for people to be able to play.
- X
- X4 Example
- Xroot: games_disk:<monster.database.db>`09`09`20
- X
- X3 coderoot
- X The codefiles for monsters are situated in the coderoot directory.`20
- X The directory must additionally have an ACL default world:rw for `20
- X files and ACL rw for the managers.
- X- 170, 182
- X The leveltable tells the levels of Monster. Certain privileges are
- X associated with levels. The highest level is Monster Manager ( not`20
- X shown in the leveltable ).
- X
- X4 Privileges
- X Value Name Meaning`20
- X 32 Monster Can create monsters that can modify players' context.
- X 16 Special Can make special items
- X 256 Spell Can create spells that can modify players' context.
- X 4 Global Can modify global descriptions and flags.
- X 8 Owner Can customize other players' item like the owner.
- X 64 Experience Can write MDL code that changes player scores.
- X 1 Manager Can execute the SYSTEM command.
- X- 210, 211
- X The experience entry for the Monster Manager. The level of the MM`20
- X is not in the leveltable.
- X- 217, 217
- X The health entry for the Monster Manager.
- X- 223, 223
- X The hit factor for the Monster Manager.
- X- 229, 229
- X The power entry for the Monster Manager.
- X- 235, 236
- X The maximum experience that players can reach. Notice that the`20
- X experience of the Monster Manager is MAXINT.
- X- 242, 242
- X When players reach this experience level they become immortal.
- X- 248, 250
- X Shows time when Monster is playable during workdays. The '+' mark`20
- X means that Monster is playable and the '-' mark means that it is`20
- X not. The marks denote time from 00-01 until 23-24 ( 11pm-12pm ).
- X- 256, 256
- X How many rooms players are allowed to make by default.
- X- 262, 262
- X How many rooms players are allowed to make without an exit request.
- X- 268, 268
- X How many accepts must players make.
- X- 273, 286
- X3 CHARTABLE
- X Monster's default character set is (Dec) Multinational character set.
- X This modify that table.
- X
- X Lines in this table have forms:
- X char <quoted character> <character type> <case modifier>
- X char <character number> <character type> <case modifier>
- X
- X There can also be one line with form:
- X charset <charset name>
- X4 quoted_character
- X Quoted character is enclosed to quote characters (").
- X
- X This argument tells what character is modified.
- X4 character_number
- X Number is decimal number of character (0-255).
- X
- X This argument tells what character is modified.
- X4 type
- X Character types have: none, letter, special and space.
- X
- X none: This is for non-printable characters (Monster usually
- X skips these characters)
- X letter: This is letter
- X special: This is character what possible some special meaning
- X in monster (for example numbers).
- X space: This character is treated as space
- X4 case_modifier
- X Case modifier have forms:
- X upper <character number>
- X upper <quoted character>
- X lower <character number>
- X lower <quoted character>
- X
- X This modifier tells correspond upper or lower case letter for
- X that character what is modified.
- X4 charset_name
- X This tells name of caharacter set, which is described in that chartable.
- X
- X Charset name can be on word. If it have more than one word, it must
- X close to quotaion marks(").
- X `20
- X4 Example
- X
- X CHARTABLE:
- X charset ISO646-FI
- X char "`7B" letter upper "`5B"
- X char "`7C" letter upper "\"
- X char "`7D" letter upeer "`5D"
- X char "`5D" letter lower "`7D"
- X char "\" letter lower "`7C"
- X char "`5B" letter lower "`7D"
- X END OF CHARTABLE
- X3 database_poltime
- X How often database is polled for interprocess communication.
- X
- X This value is VMS Delta-time format.
- X
- X4 Example
- X database_poltime: 0 ::1
- X
- X This is 1 second (0 days, 0 hours, 0 minutes and 1 second).
- X3 CLOSED_MESSAGE
- X This message is printed, when Playtime: -entry disallows playing.
- X4 Example
- X CLOSED MESSAGE:
- X Welcome to the game Monster!
- X
- X But what now?
- X
- X Goodgulf the Grey appears in a puff of orange smoke!
- X He is very angry...
- X
- X "What are you doing here? The Dungeon is now closed!"
- X
- X He waves his Iron Staff and yells "Begone!"
- X
- X You disappear in a burst of multicolored light...
- X
- X On wall you see announcement:
- X
- X **********************************************************************
- X * *
- X * Dungeon is closed on weekdays *
- X * between 09.00-17.00 *
- X * *
- X **********************************************************************
- X
- X END OF MESSAGE
- X3 mdl_buffers
- X How many MDL code is kept in memory.
- X4 Example
- X mdl_buffers: 20
- X3 allow_dcl_access
- X If this is true, then command 'dcl' is available.
- X2 Installation
- X In order to install Monster your must create several directories,`20
- X compile it, copy files to right directories, edit configuration`20
- X files and build a database for it.
- X3 Directories
- X Create four directories:
- X Directory for sources, from now on it is called the SOURCES directory.
- X Directory for MONSTER.EXE, MONSTER_DUMP.EXE, MONSTER_REBUILD.EXE and`20
- X MONSTER_WHO.EXE, from now on it is called the IMAGE directory.
- X Directory for *.MON files, from now on it is called the`20
- X DATABASE_MON directory.
- X Directory for CODE*.MON files, from now on it is called the`20
- X DATABASE_CODE directory.
- X
- X4 SOURCES
- X- 295, 295
- X Compiled files: MON.EXE, MONSTER_WHO.EXE, MONSTER_E.HLB,`20
- X- 299, 302
- X Files: COMMANDS.PAPER, MONSTER.HELP.
- X
- X Files created by /REBUILD: DESC.MON, EVENTS.MON, HEADER.MON,`20
- X INDEX.MON, INTFILE.MON, LINE.MON, NAMS.MON, OBJECTS.MON,`20
- X ROOMS.MON, SPELLS.MON.
- X- 308, 309
- X Command H (Add header blocks) in the System menu adds a number of`20
- X files in this directory!
- X- 343, 344
- X Copy MON.EXE, MONSTER_WHO.EXE, MONSTER_DUMP.EXE, MONSTER_REBUILD.EXE`20
- X and MONSTER_E.HLB to the "IMAGE" directory.
- X- 348, 349
- X Edit the following files: KEYS.PAS, MONSTER.CLD, MONSTER.INIT.
- X Edit KEYS.PAS before compiling Monster !
- X- 353, 358
- X Edit the keys array. You can change the number of lines of keys array`20
- X but you cannot change the length of lines of keys -array. Assign the`20
- X number of lines to the "maxkeys" constant.
- X
- X4 MONSTER.CLD
- X Insert the full specification of the IMAGE directory to the following`20
- X places:
- X- 370, 370
- X image <IMAGE -directory>monster_rebuild
- X- 377, 377
- X Edit places marked with the "<>" marks:
- X- 383, 389
- XREBUILD_OK: <set this to true before /REBUILD, afterwards to false>
- X
- Xroot: <full specification of the DATABASE_MON directory>
- Xcoderoot: <full specification of the DATABASE_CODE direcory>
- X `20
- XLEVELTABLE:
- X* Leveltable removed: see examples from the "initialization_file" part of`20
- X- 401, 402
- XPlaytime: <insert the right time into this: look examples from the`20
- X "initialization_file" part of this help>
- X- 407, 419
- X
- XCHARTABLE:
- XEND OF CHARTABLE
- X
- Xdatabase_poltime: 0 ::1
- X
- XCLOSED MESSAGE:
- XMonster is now closed !!
- XEND OF MESSAGE
- X
- Xmdl_buffers: 20
- X4 ILMOITUS.TXT
- X
- X This file is no longer needed.
- X Use instead 'CLOSED MESSAGE' -entry in MONSTER.INIT.
- X
- X3 Protection
- X Insert the following ACls into the DATABASE_MON and the`20
- X DATABASE_CODE directories`20
- X (to *.DIR file).
- X (IDENTIFIER=<your name>,
- X ACCESS=READ+WRITE+EXECUTE+DELETE+CONTROL)
- X (IDENTIFIER=<your name>,OPTIONS=DEFAULT,
- X ACCESS=READ+WRITE+EXECUTE+DELETE+CONTROL)
- X (DEFAULT_PROTECTION,SYSTEM:RWED,OWNER:RWED,GROUP,WORLD:RW)
- X
- X Insert similar ACLs for all other managers (of monster) into the`20
- X DATABASE_CODE directory.
- X- 431, 442
- X MONSTER_DUMP.EXE and MONSTER_REBUILD.EXE do not need to be`20
- X executable by the world.
- X
- X After building the database put protection (world:read+write) to
- X *.MON files
- X in DATABASE_MON and DATABASE_CODE directories.
- X
- X3 Database
- X Define the monster command by:
- X SET COMMAND MONSTER (in IMAGE directory)
- X
- X Build the monster universe with the MONSTER/REBUILD command.
- X- 446, 447
- X copy your old ( Rich Skrenta's ) monster database to the`20
- X DATABASE_MON directory and try: MONSTER/BATCH=CONVERT (No warranty!)
- X- 452, 458
- X ( CASTLE.DMP contains the distributed starter's castle )
- X
- X Change protection (world:read+write) to
- X *.MON files
- X in the DATABASE_MON and the DATABASE_CODE directories.
- X3 Publishing
- X Tells anybody that he can play Monster
- X- 471, 472
- X This text is from the release of the original Monster by Rich Skrenta.`20
- X- 1816, 1828
- X B Block the hook code.
- X C Type COMMANDS.PAPER.
- X D Delete the hook.
- X E Exit customizing the hook.
- X F Free the hook code.
- X G Get a program file, default extension is .MDL.
- X H This list.
- X L List the hook code.
- X M Run manually the hook code.
- X O List the hook code to a file.
- X P Change the hook privilege.
- X Q Exit customizing the hook.
- X V View the hook.
- X- 1833, 1834
- X - <privilege> Remove a privilege
- X + <privilege> Add a privilege
- X- 1846, 1860
- X D Customize the monster's privilege set.
- X E Exit customizing the monster
- X F Free the monster
- X G Get a program file, the default extension is .MDL
- X H This list
- X I Give the monster's health.
- X J Disable/Enable control access.
- X L List the monster code.
- X M Run manuallytthe monster code
- X N Change the monster name
- X O List the monster code to a file.
- X P Change the monster's privilege
- X Q Exit customizing the monster
- X S Write the monster's self description
- X V View the monster.
- X- 1865, 1866
- X - <privilege> Remove a privilege
- X + <privilege> Add a privilege
- X- 1877, 1877
- XDescription: Starts a subprocess for shell and leaves Monster running `
- V20
- X- 1883, 1887
- XDescription: Writes a description of <detail> or this room
- XRequirements: You are the owner of this room
- X or you have the Owner -privilege
- X or you have the Manager -privilege,`20
- X if the owner of this room is System
- X- 1897, 1897
- X if the owner of object is System
- X- 1902, 1902
- X if the owner of this room is System
- X- 1909, 1916
- XDescription: Sets the ownership of <object> or <monster> or <spell>
- X this room to Disowned
- XRequirements: You are the owner of the target
- X or you have the Owner -privilege, if target is this room
- X or you have the Owner -privilege,`20
- X if the target is object or monster
- X or you have the Manager -privilege,`20
- X if the owner of the target is System
- X- 1922, 1922
- XDescription: Drops an object
- X- 1949, 1954
- XDescription: Creates a new room with the name: <room>
- XRequirements: You are the owner of this room
- X or this room has some kind of exit with Accept
- X or you have the Owner -privilege
- X or you have the Manager -privilege,`20
- X if the owner of this room is System
- X- 1960, 1960
- XDescription: Gets an object
- X- 1967, 1967
- XDescription: Shows your health
- X- 1974, 1974
- XDescription: Hides an object or you
- X- 1981, 1981
- XDescription: Gives the inventory of <player> or your own inventory
- X- 1985, 1985
- XDescription: Creates a new exit from this room to <direction>
- X- 2006, 2006
- XDescription: Creates a new object with the name: <object>
- X- 2011, 2011
- X if the owner of this room is System
- X- 2015, 2020
- XDescription: Creates a new monster with the name <object>
- XRequirements: You are the owner of this room
- X or the room is public
- X or you have the Owner -privilege
- X or you have the Manager -privilege,`20
- X if the owner of this room is System
- X- 2033, 2033
- XDescription: Shows the objects of <player> or your objects
- X- 2044, 2044
- XDescription: Types objects of <player> or your objects
- X- 2055, 2055
- XDescription: Types the spells of <player> or your own spells
- X- 2087, 2087
- XDescription: Reroutes an exit to <direction>
- X- 2099, 2099
- X if the owner of this room is System
- X- 2112, 2113
- XDescription: Types all the rooms of <player> or your own rooms
- XRequirements: the target is either owned by you or public, or is disowned.
- X- 2125, 2125
- XDescription: Lists all the locations of an object
- X- 2154, 2154
- X if the owner of this room is System
- X- 2529, 2529
- X When player do something corresponding labels of monsters and hooks
- X- 2544, 2546
- X attack`09-`09`09`09attacking the monster
- X look`09`09-`09`09`09look something in room
- X look you`09-`09`09`09look the monster
- X- 2577, 2583
- X summon - the victim executes this when
- X summoner attacks him
- X learn book name when a player reads a spell
- X book (that code must use to set`20
- X`09`09`09`09`09spell level for this).
- X Spell codes have the default variables "spell name" and "summoner name."
- X- 2589, 2589
- X When a user types an invalid command, the following will happen:
- X- 2603, 2606
- X T`E4m`E4 dokumentaatio ei ole ajan tasalla. Tiedostossa
- X COMMANDS.PAPER on (toivottavasti) ajan tasalla oleva`20
- X dokumentaatio.
- X- 2644, 2644
- X - Aiempi = -funktio on nyt nimell`E4 ==. Siis = toimii nyt eri-
- X- 2727, 2729
- X Funktio: and (p1,p2,...,pn)
- X
- X Laskee parametrien p1 arvon.
- X- 2741, 2743
- X Parametreja pit`E4`E4 v`E4hint`E4`E4n olla kaksi.
- X4 and_then
- X Funktio: and then (p1,p2,...,pn)
- X `20
- X Laskee parametrien arvoja kunnes jonkun parametrin arvo on tyhj`E4
- X merkkijono (tai kaikki parametrit tuli lasketuksi).
- X
- X Palauttaa viimeisen lasketun paramatrin arvon.
- X
- X Tulkinta:
- X pN - totuusarvo / merkkijono
- X tulos - totuusarvo / merkkijono
- X4 or_else
- X Funktio: or else (p1,p2,...,pn)
- X
- X Laskee parametrien arvoja kunnes joku parametri palauttaa ei-tyhj`E4n
- X merkkijonon (tai kunnes kaikki paramatrit tuli lasketuksi).
- X
- X Palauttaa viimeisen lasketun paramaterin arvon.
- X
- X Tulkinta:
- X pN - totuusarvo / merkkijono
- X tulos - totuusarvo / merkkijono
- X4 get_global_flag
- X Funktio: get global flag (p1)
- X- 2747, 2769
- X Palauttaa argumentin p1 luettelemista globaaleista lipuista ne,
- X jotka ovat ep`E4tosia.
- X `20
- X Globaalit liput ovat: "Active", "Valid" ja "Wartime".
- X
- X Virhetilanteet:
- X - p1:n listassa oleva alkio ei ole globaali lippu
- X => kyseinen alkio tulkitaan globaaliksi lipuksi, joka on ep`E4tosi
- X
- X Tulkinta:
- X p1 - lista
- X tulos - lista
- X
- XHuomautus:`20
- X - Funktion toiminta on muuttunut. Aiemmein funktio palautti jokaista
- X globaalia lippua kohti, joka oli tosi, yhden "TRUE" -arvon listassa.`2
- V0
- X4 boolean_and`20
- X Funktio: boolean and(p1,...,pn)
- X
- X Laskee parametrien arvon.
- X
- X Palautaa "TRUE", jos kaikkien pametrien arvo oli ei tyhj`E4, muutoin
- X palauttaa "".
- X
- X Tulkinta:
- X p1 - totuusarvo
- X .
- X .
- X .
- X pn - totuusarvo
- X tulos - totuusarvo
- X4 boolean_or
- X Funktio: boolean or(p1,...,pn)
- X
- X Laskee parametrien arvon.
- X
- X Palautaa "TRUE", jos v`E4hint`E4`E4n yhden parametrien arvo oli ei tyhj`E4
- V,`20
- X muutoin palauttaa "".
- X
- X Tulkinta:
- X p1 - totuusarvo
- X .
- X .
- X .
- X pn - totuusarvo
- X tulos - totuusarvo
- X4 move
- X Funktio: move (p1)
- X- 2773, 2776
- X Siirt`E4`E4 monsterin p1:n ilmoittamaan huoneeseen.
- X
- X Palauttaa huoneen nimen, jonne siirsi monsterin.
- X- 2780, 2781
- X omistuksessa, niin monsterilla pit`E4`E4 olla poof -privile-
- X gio.
- X- 2785, 2785
- X > Tulos: tyhj`7B nimi/merkkijono
- X- 2789, 2792
- X - Suoritettava koodi ei ohjaa monsteria
- X- 2798, 2799
- X4 pmove
- X Funktio: pmove (p1)
- X- 2803, 2820
- X Siirt`E4`E4 (toiminnan laukaisseen) pelaajan p1:n ilmoittamaan`20
- X huoneeseen.
- X
- X Palauttaa huoneen nimen, jonne siirsi pelaajan.
- X
- X Vaatimukset:
- X - Jos kohde huone ei ole julkinen eik`E4 monsterin omistajan`20
- X omistuksessa, niin monsterilla pit`E4`E4 olla poof -privilegio.
- X - Koodi pit`E4`E4 olla privileged moodissa.
- X
- X Virhetilanteet:
- X - Kohde ei ole huone
- X > Tulos: tyhj`E4 nimi/merkkijono
- X - Siirto ei onnistu jostain syyst`E4 (esim. poof privilegio-
- X ta olisi tarvittu)
- X > Tulos: tyhj`E4 nimi/merkkijono
- X - Suoritettava koodi ei ohjaa monsteria ja poof privile-
- X giota olisi tarvittu
- X > Tulos: tyhj`E4 nimi/merkkijono
- X - Koodi ei ole privileged-moodissa
- X > Tulos: tyhj`E4 nimi/merkkijono
- X
- X Tulkinta:
- X p1 - nimi
- X tulos - nimi
- X4 if
- X Funktio: if (p1,p2,p3)
- X- 2823
- X Laskee parametrin p2 arvon, jos p1 ei ollut tyhj`E4, muutoin`20
- X laskee parametrin p3 arvon.
- X
- X Palauttaa p2 tai p3, riippuen siit`E4 kumman arvon laski.
- X
- X Tulkinta:
- X p1 - merkkijono
- X p2 - merkkijono
- X p3 - merkkijono
- X tulos - merkkijono
- X
- X Huomautus:
- X - Puuttuvat parametrit tulkitaan tyhjiksi (t`E4m`E4 koskee`20
- X my`F6s muita funktiota).
- X - Koodin ei siis tarvitse ohjata monsteria, jos poof`20
- X privilegiota ei tarvita.
- X4 where
- X Funktio: where (p1)
- X
- X Laskee parametrin p1 arvon.
- X
- X- 2854, 2855
- X- 2894, 2895
- X Palauttaa p1:n muutettuna isot kirjaimet muutettuina`20
- X pieniksi kirjaimiksi, numerot sellaisinaan ja muut`20
- X merkit korvattuna v`E4lily`F6nnill`E4.Monsterin merkkitau-
- X lukko m`E4`E4r`E4`E4 mitk`E4 merkit ovat kirjaimia - katso kohta`20
- X CHARTABLE alustustiedostossa MONSTER.INIT.
- X- 2905, 2906
- X j`E4 pelaajan puheesta.
- X - Merkit joiden tyyppi on "none" merkkitaulukossa pois-
- X tetaan kokonaan (ei korvata v`E4lily`F6nnill`E4).
- X- 3896, 3906
- X
- X3 Functions`20
- X
- X This documentation is not up-to-date. Especially, the
- X number of function parameters is not restricted to three
- X even if this document says so. The file COMMANDS.PAPER
- X contains the up-to-date documentation.
- X
- X N.B:
- X
- X In this documentation, "result" means the return value. `20
- X
- X4 +
- X Function: + (p1,p2)
- X
- X Evaluates p1 and p2.
- X
- X Returns p1 " " p2 ( p1, a space, and p2 concatenated ).
- X
- X Errors:
- X - the result string is over 1000 characters long
- X => the result is p1
- X
- X Interpretation:
- X p1, p2, result: strings
- X4 =`20
- X Function: =(p1, p2)
- X Function: ==(p1,p2)
- X Function: ===(p1,p2)
- X
- X Evaluates parameters p1 and p2.
- X
- X Functions =, == ja === return p1 when the evaluated parameters are`20
- X equal; otherwise an empty string is returned. The functions range from
- X "=", which is the strictest, to "===", which is a general purpose`20
- X predicate.
- X
- X Name`09`09Description
- X ----------------------------------------------------------------
- X = Are two argument values exactly the same string ?
- X
- X ==`09`09Are two argument values -- excluding spaces -- the`20
- X same string ?
- X
- X ===`09`09Are two argument values -- excluding spaces and`20
- X `09 the case -- the same string ?
- X ----------------------------------------------------------------
- X
- X Interpretation:
- X p1, p2 : string
- X result : string ( boolean )
- X
- X N.B:
- X - the previous function "=" is currently named "==".`20
- X4 inv
- X Function: inv ()
- X
- X Returns the list of items the monster is carrying.
- X
- X Errors:
- X - The code is not monster code ( e.g. the code is for a room )
- X => the result is an empty string
- X
- X Interpretation:
- X result : list
- X4 pinv
- X Function: pinv ()
- X
- X Returns the list of items of the player who triggered the action.
- X
- X Interpretation:
- X result : list
- X4 players
- X Function: players ()
- X
- X Returns the list of those players currently in the same room
- X with the monster.
- X
- X Errors:
- X - The code is not monster code.
- X => the result is the list of those players currently in the
- X same room with the player who triggered the action
- X
- X Interpretation:
- X result : list
- X4 objects
- X Function: objects ()
- X
- X Returns the list of the items currently in the same room with
- X the monster.
- X
- X Errors:
- X - the code is not monster code
- X => the result is the list of those players currently in the
- X same room with the player who triggered the action
- X
- X Interpretation:
- X result : list
- X4 get
- X Function: get (p1)
- X
- X Evaluates p1.
- X
- X Tries to pick up the items found in the list p1.
- X
- X Returns the list of the items successfully picked up.
- X
- X Errors:
- X - The code is not monster code
- X => No actions, an empty string/list is returned
- X
- X Interpretation:
- X p1 : list
- X result : list
- X4 drop
- X Function: drop (p1)
- X
- X Evaluates p1.
- X Forces the monster drop the items found in the list p1.
- X
- X Returns the list of the items that were dropped.
- X
- X Errors:
- X - The code is not monster code.
- X => No action, an empty string is returned
- X
- X Interpretation:
- X p1 : list
- X result : list
- X4 and
- X Function: and (p1,p2,...)
- X
- X Evaluates p1, p2, ..., pn.
- X
- X Returns a list of the items found in both p1 and p2.
- X Every item is included only once.
- X
- X Interpretation:
- X pN, result : list
- X N.B.
- X There must be at least two parameters.
- X4 move
- X Function: move (p1)
- X
- X Evaluates p1.
- X
- X The value of p1 is the room the monster is moved.
- X `20
- X Returns the name of the room the monster was transferred.
- X
- X Requirements:
- X - If the target room is not public or owned by the monster`20
- X owner, the monster must have the "poof" privilege.
- X
- X Errors:`20
- X - The target is not a room. `09
- X or`20
- X - Moving is unsuccessful ( e.g. the "poof" privilege would`20
- X have been needed )`20
- X or
- X - The code is not monster code.`20
- X => result is an empty string/name
- X
- X Interpretation:
- X p1, result : name
- X4 pmove
- X Function: pmove (p1)
- X
- X Evaluates p1.
- X
- X The player that triggered the action is moved to the room`20
- X found in p1.
- X
- X Returns the name of the room the player was moved.
- X
- X Requirements:
- X - If the target room is not public, or owned by the monster owner,
- X the monster must have the "poof" privilege.
- X - The code must be in the "privileged" mode.
- X
- X Errors:
- X - The target is not a room.
- X`09or
- X - The moving is unsuccessful`20
- X`09or
- X - The code is not monster code and the "poof" privilege
- X would have been needed.
- X`09or
- X - The code is not in the "privileged" mode.
- X => the result is an empty string/name
- X
- X Interpretation:
- X p1, result : name
- X4 if
- X Function: if (p1,p2,p3)
- X
- X Evaluates p1.
- X
- X Evaluates p2 if p1 was non-empty, otherwise evaluates p3.
- X
- X Returns either p2 or p3, depending on which one was evaluated.
- X
- X Interpretation:
- X p1, p2, p3, result : string`20
- X
- X Requirements:
- X - missing parameters are thought to be empty ( applicable
- X to all the other functions )
- X - The code does NOT have to be a monster code, if the
- X "poof" privilege is not needed.
- X4 where
- X Function: where (p1)
- X
- X Evaluates p1.
- X `20
- X Returns the name of the room the player p1 currently is.
- X
- X Errors:
- X - p1 is not a player name.
- X => the result is an empty string/name
- X - Player p1 is currently not playing.
- X => the result is the room where the player quitted.
- X Interpretation:
- X p1, result : name `20
- X4 null
- X Function: null (p1,p2,p3,...)
- X
- X Evaluates parameters p1, p2, p3, ...
- X
- X Returns an empty string.
- X
- X Interpretation:
- X`09p1, p2, p3, ... : string
- X N.B:
- X - Ideal for a sequential action
- X4 prog
- X Function: prog (p1, p2, p3, ...)
- X
- X Evaluates all parameters.
- X Return the value of the last parameter.
- X
- X Interpretation:
- X p1, p2, ... : string
- X N.B:
- X - Good for a sequential action
- X
- X4 not
- X Function: not (p1)
- X
- X Evaluates p1.
- X`20
- X Returns "TRUE" if p1 is empty; otherwise an empty string
- X is returned.
- X
- X Interpretation:
- X p1 : string
- X result : string ( ? ) / boolean`20
- X4 random
- X Function: random (p1)
- X
- X Evaluates p1.
- X
- X Returns one randomly chosen item from the list p1.
- X
- X Errors:
- X - p1 is empty
- X => the result is an empty string/name
- X
- X Interpretation:
- X p1 : list
- X result : name
- X4 strip
- X Function: strip (p1)
- X
- X Evaluates p1.
- X `20
- X Changes alphabets A-Z into lowercase and all other characters
- X into spaces. Returns the converted string.
- X
- X Interpretation:
- X p1, result : string
- X
- X N.B:
- X - Subsequent spaces are compressed into one`20
- X ( applicable to all the other functions, too )
- X - This function is useful for removing punctuation
- X marks from a player speech ( unfortunately some
- X non-standard alphabets, e.g. a-umlaut, are lost )
- X4 experience
- X Function: experience (p1)
- X
- X Evaluates p1.
- X
- X Returns the score of player p1.
- X
- X Errors:
- X - p1 is not a player name
- X => the result is an empty string/name
- X
- X Interpretation:
- X p1 : name
- X result : number
- X4 set_experience
- X Function: set experience (p1)
- X
- X Evaluates parameter p1.
- X
- X Sets p1 to be the experience of the player who triggered the action.
- X
- X Returns p1.
- X
- X Requirements:
- X - The monster must have the "experience" privilege
- X - The player cannot be the monster owner or the person
- X who loaded the monster code
- X
- X Errors:
- X - The code is not for a monster
- X => no action, an empty string is returned
- X - The monster does not have the "experience" privilege
- X => no action, an empty string is returned
- X - The player who triggered the action owns the monster or
- X loaded the code
- X => no action, an empty string is returned
- X
- X Interpretation:
- X p1, result : number
- X
- X N.B:
- X - The function cannot be used to change the monster's own experience
- X4 plus
- X Function: plus (p1,p2)
- X
- X Evaluates p1 and p2.
- X `20
- X Returns the sum of p1 and p2.
- X
- X Errors:
- X - p1 or p2 is not a number
- X`09or
- X - Overflow
- X => the result is an empty string`09
- X Interpretation:
- X p1, p2, result : number
- X4 difference
- X Function: difference(p1,p2)
- X
- X Evaluates p1 and p2.
- X `20
- X Returns p1 minus p2.
- X
- X Errors:
- X - p1 or p2 is not a number
- X`09or
- X - Overflow
- X => the result is an empty string`09
- X Interpretation:
- X p1, p2, result : number
- X4 times
- X Function: times(p1,p2)
- X
- X Evaluates p1 and p2.
- X
- X Returns p1 multiplied with p2.
- X
- X Errors:
- X - p1 or p2 is not a number
- X`09or
- X - Overflow
- X => the result is an empty string`09
- X Interpretation:
- X p1, p2, result : number
- X4 quotient
- X Function: quotient(p1,p2)
- X
- X Evaluates p1 and p2.
- X
- X Returns p1 divided by p2 ( integer division,
- X all fractions dropped )
- X
- X Errors:
- X - p1 or p2 is not a number
- X`09or
- X - Overflow
- X => the result is an empty string`09
- X Interpretation:
- X p1, p2, result : number
- X4 set_state
- X Function: set state(p1)
- X
- X Evaluates p1.
- X
- X Assigns the value of p1 to the code dependent ( static )
- X variable ( one per a code ).
- X
- X Returns the value of p1.
- X
- X Interpretation:
- X p1, result : string
- X
- X N.B:
- X - The variable is code dependent, that is, every monster,
- X and hook has its own variable ( state variable ).
- X - The function "control" does not affect the variable`20
- X "set state" uses.
- X5 Example
- X ! Example for using set state`20
- X ! and get state
- X ! and control
- X !
- X ! MDL code for the object "demo object"
- X !
- X ! There is also a monster called "demo monster"
- X ! it has no MDL code
- X ! but has the "experience" privilege
- X !
- X ! When player picks up this object first time, he gets 100 points
- X !
- X !
- X ! This is called when failed to get the object.
- X - LABEL get fail()
- X !
- X ! This is called when getting succeeded.
- X - LABEL get succeed(
- X if(and(get state(),player name), ! Is player name in the state var ?
- V`20
- X "",`09`09`09 ! Aye: Do not give points`20
- X GOSUB give point() ! Nay: Give points
- X )
- X )
- X !
- X ! This is called when dropping succeeded
- X - LABEL drop succeed()
- X !
- X ! This is called when the object is dropped unintentionally
- X - LABEL drop you()
- X !
- X ! This is called when the object is used successfully
- X - LABEL use succeed()
- X !
- X ! This is called when a player looks at the object
- X - LABEL look you()
- X !
- X ! This is called when a player commands 'something demo object'
- X - LABEL command(pprint("You can't ",command," demo object."))
- X !
- X ! This is called when a player starts a game session in the same
- X ! room with the object.
- X - LABEL start()
- X !
- X ! This is called when a player enters the room where the object is.
- X - LABEL enter()
- X !
- X ! This is called when a player leaves the room (or game) where object is.
- X - LABEL leave()
- X !
- X !`20
- X ! The following labels are the code's very own.
- X !
- X - LABEL give point(
- X `09control("demo monster",`09`09! For gaining the "experience" privilege
- X `09`09`09`09`09! from "demo monster"
- X `09 prog(set experience(`09`09! Set player's new experience
- X `09`09plus(`09`09`09! +
- X `09`09 experience( ! get player experience
- X player name),
- X `09`09 "100" ! Number 100, quotes are compulsory
- X )
- X ),
- X `09 set state(`09`09! Set code's new state
- X `09`09or(player name,`09`09! add player name to the state list
- X get state()`09! old state list
- X `09`09)
- X `09 )
- X )
- X )
- X )
- X
- X4 get_state
- X Function: get state(p1)
- X
- X Reads the value of the code dependent variable.
- X
- X Returns the value.
- X
- X Interpretation:
- X result : string
- X
- X N.B:
- X - see set_state for more information
- X4 less
- X Function: less(p1,p2)
- X
- X Evaluates p1 and p2.
- X
- X If the value of p1 is less than the value of p1, "TRUE"
- X is returnes; otherwise an empty string is returned.
- X
- X Errors:
- X - p1 or p2 is not a number
- X => the result is an empty string
- X
- X Interpretation:
- X p1, p2 : number
- X result : string / boolean`20
- X4 number
- X Function: number(p1)
- X
- X Evaluates p1.
- X `20
- X Returns the value of p1 if p1 is a number, otherwise an empty
- X string is returned.
- X
- X Interpretation:
- X p1, result : number`20
- X4 health
- X Function: health(p1)
- X
- X Evaluates p1.
- X
- X Returns the health of p1 ( player or monster ).
- X
- X Errors:
- X - p1 is not a player or monster name
- X => the result is an empty string
- X
- X Interpretation:
- X p1 : name
- X result : number
- X4 all_objects
- X Function: all objects()
- X
- X Returns the list of all objects.
- X
- X Errors:
- X - All the objects do not fit into a 1000-character list
- X => only those objects that fit into a 1000-character`20
- X list are returned
- X
- X Interpretation:
- X - result: list
- X
- X Huomautus:
- X - Every ( defined ) object is included only once ( even
- X if there exists 0 or multiple copies of it )
- X4 all_players
- X Function: all players()
- X
- X Returns the list of all players and monsters.
- X
- X Errors:
- X - All the players and monsters do not fit into a 1000-character
- X list
- X => only those players and monsters who fit into a`20
- X 1000-character list are returned
- X
- X Interpretation:
- X result : list
- X4 all_rooms
- X Function: all rooms()
- X
- X Returns the room list.
- X
- X Errors:
- X - The room list does not fit into a 1000-character list
- X => only those rooms that fit into a 1000-character list
- X ( in order of appearance ) are included
- X
- X Interpretation:
- X result : list
- X4 control
- X Function: control(p1,p2)
- X
- X Evaluates p1.
- X
- X While p2 is evaluated the function controls the monster called
- X p1. The code and the monster ( p1 ) must have the same owner.
- X
- X Returns p2.
- X
- X Errors:
- X - p1 is not a monster name
- X or
- X - The code and the monster ( p1 ) do not have the same owner
- X => p2 is not evaluated; the result is an empty string
- X
- X Interpretation:
- X p1 : name
- X p2, result : string
- X
- X N.B:
- X - Any required privilege is checked from the monster that
- X is controlled; the function may affect them.
- X - The function does not affect the privileged mode.
- X - While p2 is executed the "monster name" variable is`20
- X temporarily assigned the monster to be controlled, that
- X is, p1.
- X4 include
- X Function: include(p1,p2)
- X
- X Evaluates p1 and p2.
- X
- X Returns p2 if p1 includes p2; otherwise an empty string is
- X returned.
- X
- X Errors:
- X - p1 or p2 ( or both ) is an empty string
- X => the result is an empty string
- X Interpretation:
- X p1, p2, result : string
- X
- X N.B:
- X - The errors do actually fit into the normal behaviour,
- X they are not real errors, but those situations are`20
- X that special that they are worth mentioning
- X4 exclude
- X Function: exclude (p1,p2)
- X
- X Evaluates p1 and p2.
- X
- X Returns a list of those items in p1 not found in p2.
- X
- X Interpretation:
- X p1, p2, result : list
- X4 get_remote_state
- X Function: get remote state (p1)
- X
- X Evaluates p1.
- X
- X Returns the value of the static variable ( the "state" field )
- X of the monster named p1. The monster ( p1 ) must have the same
- X owner as the code, or the monster must be public and the ( other )
- X monster executing the code must have the object privilege.
- X
- X Errors:
- X - p1 is not a monster name
- X or
- X - p1 and the code have a different owner
- X or
- X - p1 is public and the code is not monster code
- X`09or
- X - p1 is public and the code ( that is monster code ) does
- X not have the object privilege
- X => the result is an empty string
- X
- X Interpretation:
- X p1 : name
- X result : string
- X4 set_remote_state
- X Function: set remote state (p1,p2)
- X
- X Evaluates p1 and p2.
- X
- X Assign the value of p2 to the static variable of the monster p1.
- X The monster p1 must have the same owner as the code, or it must
- X be public and the code ( or, to be precise, the monster`20
- X whose code it is ) must have the "object" privilege.
- X
- X Return p2.
- X
- X Errors:
- X - p1 is not a monster name
- X or
- X - p1 and the code have a different owner
- X or
- X - p1 is public and the code is not monster code
- X`09or
- X - p1 is public and the code ( that is monster code ) does
- X not have the object privilege
- X => the result is an empty string
- X
- X Interpretation:
- X p1 : name
- X p2, result : string
- X4 remote_objects
- X Function: remote objects (p1)
- X
- X Evaluates p1.
- X
- X Returns a list of objects lying on the ground in the room p1.
- X
- X Errors:
- X - p1 is not a room
- X => an empty string is returned
- X
- X Interpretation:
- X p1 : name
- X result : list
- X4 remote_players
- X Function: remote players (p1)
- X
- X Evaluates p1.
- X
- X Returns a list of players in the room p1.
- X
- X Errors:
- X - p1 is not a room
- X => an empty string is returned
- X
- X Interpretation:
- X p1 : name
- X result : list
- X
- X N.B:
- X - Monsters are excluded, making the behaviour a wee bit`20
- X different from the functions players(),
- X lookup players(), and parse players().
- X - The behaviour is similar to players(), except that the room
- X is chosen with a parameter.
- X4 heal
- X Function: heal (p1)
- X
- X Evaluates p1.
- X
- X Increases the health ( strength ) of the player who triggered`20
- X the action by p1 points.
- X
- X Returns p1.
- X
- X Errors:
- X - p1 is not a number or p1 is negative
- X => the result is an empty string
- X
- X Interpretation:
- X`FF p1, result : number
- X
- X N.B:
- X - If the present strength of a player added with the`20
- X increase is greater than his maximum strength only
- X the maximum health is set. However, the return value
- X is not affected.
- X4 duplicate
- X Function: duplicate (p1)
- X
- X Evaluates p1.
- X
- X One extra copy is created from the objects included in the
- X list p1. The copies are automatically picked up by the monster.
- X The objects and the monster must have the same owner, or the`20
- X monster must have the "object" privilege.
- X
- X Return a list of items the were successfully duplicated.
- X
- X Errors:
- X`09 - The code is not monster code
- X => no action; an empty string is returned
- X - An object does not have the same owner as the monster
- X and the monster does not have the "object" privilege,
- X or the object does not fit in ( the monster carries
- X too many objects )
- X => The object is neither copied nor ( naturally )`20
- X picked up by the monster.
- X
- X Interpretation:
- X p1, result : lista
- X4 pprint
- X Function: pprint (p1,p2,p3,...)
- X Function: pprint raw (p1,p2,p3,...)
- X
- X Evaluates p1, p2, p3, ...
- X
- X Parameter text is printed to the player who triggered the action.
- X One space is inserted after a parameter if the following parameter`20
- X starts with an alphanumeric. A colon (".") is inserted in the very`20
- X end if text ends with an alphanumeric. A sentence is capitalised.
- X
- X Pprint raw does not format text.
- X
- X Returns the printed text.
- X
- X Errors:
- X - Text is longer than 1000 chars
- X`09=> it is truncated ( somehow )
- X
- X Interpretation:
- X pN, result : string
- X
- X N.B:
- X - The function decides by itself how to split the text
- X into lines.
- X4 print
- X Function: print (p1,p2,p3,...)
- X Function: print raw (p1,p2,p3,...)
- X
- X Evaluates parameters.
- X
- X Parameter text is printed to all the players currently in the same`20
- X room with the monster.
- X One space is inserted after a parameter if the following parameter`20
- X starts with an alphanumeric. A colon (".") is inserted in the very`20
- X end if text ends with an alphanumeric. A sentence is capitalised.
- X
- X Print raw does not format text.
- X
- X Returns the printed text.
- X
- X Errors:
- X - Text is longer than 1000 chars
- X`09=> it is truncated ( somehow )
- X - The code is not monster code
- X => text is printed to all the players ( but not to the
- X`09player who triggered the action ) in the room
- X`09
- X Interpretation:
- X pN, result : string
- X
- X N.B:
- X - The function decides by itself how to split the text
- X - If the player ( who triggered the action ) is in the
- X same room with the monster the text is also printed`20
- X to him.
- X - Very long messages ( many lines ) may overload the`20
- X Monster event transmission system the result of which`20
- X may be the loss of some events.
- X4 oprint
- X Function: oprint (p1,p2,p3,...)
- X Function: oprint raw (p1,p2,p3,...)
- X
- X Evaluates parameters.
- X
- X Parameter text is printed to all the players currently in the
- X same room with the monster ( but not to the player who triggered
- X the action ).
- X One space is inserted after a parameter if the following parameter`20
- X starts with an alphanumeric. A colon (".") is inserted in the very`20
- X end if text ends with an alphanumeric. A sentence is capitalised.
- X
- X Oprint raw does not format text.
- X
- X Return the printed text.
- X
- X Errors:
- X - Text is longer than 1000 chars
- X`09=> it is truncated ( somehow )
- X
- X Interpretation:
- X pN, result : string
- X
- X N.B:
- X - The function decides by itself how to split the text
- X - If the player ( who triggered the action ) is in the
- X same room with the monster the text is also printed`20
- X to him.
- X - Very long messages ( many lines ) may overload the`20
- X Monster event transmission system the result of which`20
- X may be the loss of some events.
- X`20
- X Errors:
- X - The code is not monster code
- X => text is printed to all the players ( but not to the
- X`09player who triggered the action ) in the room
- X - The text is longer than 1000 chars
- X => it is truncated ( somehow )
- X Interpretation:
- X pN, result : string
- X
- X4 pget
- X Function: pget (p1)
- X
- X Evaluates p1.
- X
- X Picks up the objects found in the list p1 and gives them to
- X the player who triggered the action.
- X
- X Returns a list of the objects which were successfully picked up.
- X
- X Requirements:
- X - The code must be in the "privileged" mode.
- X
- X Errors:
- X - The code is not in the "privileged" mode
- X`09=> no action; p1 is not evaluated (!); the result is an`20
- X empty string
- X
- X Interpretation:
- X p1, result : list
- X4 pdrop
- X Function: pdrop (p1)
- X
- X Evaluates p1.
- X
- X The player who triggered the action is dropped all the objects
- X found in the list p1.
- X
- X Returns a list of the objects which were successfully dropped.
- X
- X Requirements:
- X`09- The code must be in the "privileged" mode.
- X
- X Errors:
- X - The code is not in the "privileged" mode
- X`09=> no action; p1 is not evaluated (!); the result is an`20
- X empty string
- X
- X Interpretation:
- X p1, result : list
- X
- X N.B:
- X - Informs everybody ( in the same room ) if the action
- X resulted in stripping off an object ( compare: wear
- X and wield )
- X4 pduplicate
- X Function: pduplicate (p1)
- X
- X Evaluates p1.
- X
- X The objects found in the list p1 are duplicated and given
- X to the player ( who, again, triggered the action ). The`20
- X objects and the code must have the same owner or the monster
- X must have the "object" privilege.
- X
- +-+-+-+-+-+-+-+- END OF PART 3 +-+-+-+-+-+-+-+-
- --
- - K E H / El{m{ on monimutkaista
- Kari.Hurtta@Helsinki.FI
-