home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / vmsnet / monhl105 / delta3 < prev    next >
Encoding:
Text File  |  1992-12-05  |  42.8 KB  |  1,490 lines

  1. Newsgroups: vmsnet.sources.games
  2. 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
  3. From: Kari.Hurtta@Helsinki.FI
  4. Subject: Delta: Monster Helsinki 1.05 to 1.06 (part 3/5)
  5. Message-ID: <1992Dec6.174340.19673@klaava.Helsinki.FI>
  6. Followup-To: vmsnet.sources.d
  7. Sender: hurtta@klaava.Helsinki.FI (Kari Hurtta)
  8. Organization: University of Helsinki
  9. Date: Sun, 6 Dec 1992 17:43:40 GMT
  10. Lines: 1477
  11. Xref: uunet vmsnet.sources.games:560
  12.  
  13. Archive-name: monster_helsinki_105_to_106/part3
  14. Author: Kari.Hurtta@Helsinki.FI
  15. Package: Delta from Helsinki Monster 1.05 to Helsinki Monster 1.06
  16. Environment: VMS, Pascal
  17. Part: 3/5
  18.  
  19. -+-+-+-+-+-+-+-+ START OF PART 3 -+-+-+-+-+-+-+-+
  20. X-  123,  125
  21. X  Monster reads a file named MONSTER.INIT from the directory where the`20
  22. X  executable Monster program is. Monster finds out the directory from `20
  23. X  the process image_name entry. There are the following entries:
  24. X-  129,  131
  25. X  This entry includes the userid of Monster Manager. The userid must`20
  26. X  be written in lowercase. The MM, who should also be the game
  27. X  administrator, has the most power.`20
  28. X-  137,  139
  29. X  Tells whether everyone may use the debug command. You must be able
  30. X  to disable it because it gives away players too much information on
  31. X  monsters. On the other hand,you also must be able to enable it
  32. X-  146,  148
  33. X  If true, the Monster Manager can blow away ( exterminate, demolish )`20
  34. X  and reformat the entire universe. It is preferable to set this to false.
  35. X  It must be true when the MM wants to use the /REBUILD option.
  36. X-  154,  164
  37. X  The home of the Monster database. The root directory protection must`20
  38. X  be set to world:e and the datafiles Monster creates in it must be
  39. X  set to world:rw for people to be able to play.
  40. X
  41. X4 Example
  42. Xroot:    games_disk:<monster.database.db>`09`09`20
  43. X
  44. X3 coderoot
  45. X  The codefiles for monsters are situated in the coderoot directory.`20
  46. X  The directory must additionally have an ACL default world:rw  for `20
  47. X  files and ACL rw for the managers.
  48. X-  170,  182
  49. X  The leveltable tells the levels of Monster. Certain privileges are
  50. X  associated with levels. The highest level is Monster Manager ( not`20
  51. X  shown in the leveltable ).
  52. X
  53. X4 Privileges
  54. X  Value    Name       Meaning`20
  55. X  32       Monster    Can create monsters that can modify players' context.
  56. X  16       Special    Can make special items
  57. X  256      Spell      Can create spells that can modify players' context.
  58. X  4        Global     Can modify global descriptions and flags.
  59. X  8        Owner      Can customize other players' item like the owner.
  60. X  64       Experience Can write MDL code that changes player scores.
  61. X  1        Manager    Can execute the SYSTEM command.
  62. X-  210,  211
  63. X  The experience entry for the Monster Manager. The level of the MM`20
  64. X  is not in the leveltable.
  65. X-  217,  217
  66. X  The health entry for the Monster Manager.
  67. X-  223,  223
  68. X  The hit factor for the Monster Manager.
  69. X-  229,  229
  70. X  The power entry for the Monster Manager.
  71. X-  235,  236
  72. X  The maximum experience that players can reach.  Notice that the`20
  73. X  experience of the Monster Manager is MAXINT.
  74. X-  242,  242
  75. X  When players reach this experience level they become immortal.
  76. X-  248,  250
  77. X  Shows time when Monster is playable during workdays. The '+' mark`20
  78. X  means that Monster is playable and the '-' mark means that it is`20
  79. X  not. The marks denote time from 00-01 until 23-24 ( 11pm-12pm ).
  80. X-  256,  256
  81. X  How many rooms players are allowed to make by default.
  82. X-  262,  262
  83. X  How many rooms players are allowed to make without an exit request.
  84. X-  268,  268
  85. X  How many accepts must players make.
  86. X-  273,  286
  87. X3 CHARTABLE
  88. X  Monster's default character set is (Dec) Multinational character set.
  89. X  This modify that table.
  90. X
  91. X  Lines in this table have forms:
  92. X     char <quoted character> <character type> <case modifier>
  93. X     char <character number> <character type> <case modifier>
  94. X
  95. X  There can also be one line with form:
  96. X     charset <charset name>
  97. X4 quoted_character
  98. X  Quoted character is enclosed to quote characters (").
  99. X
  100. X  This argument tells what character is modified.
  101. X4 character_number
  102. X  Number is decimal number of character (0-255).
  103. X
  104. X  This argument tells what character is modified.
  105. X4 type
  106. X  Character types have: none, letter, special and space.
  107. X
  108. X     none:     This is for non-printable characters (Monster usually
  109. X                 skips these characters)
  110. X     letter:   This is letter
  111. X     special:  This is character what possible some special meaning
  112. X                 in monster (for example numbers).
  113. X     space:    This character is treated as space
  114. X4 case_modifier
  115. X  Case modifier have forms:
  116. X     upper <character number>
  117. X     upper <quoted character>
  118. X     lower <character number>
  119. X     lower <quoted character>
  120. X
  121. X  This modifier tells correspond upper or lower case letter for
  122. X  that character what is modified.
  123. X4 charset_name
  124. X  This tells name of caharacter set, which is described in that chartable.
  125. X
  126. X  Charset name can be on word. If it have more than one word, it must
  127. X  close to quotaion marks(").
  128. X `20
  129. X4 Example
  130. X
  131. X  CHARTABLE:
  132. X  charset ISO646-FI
  133. X  char "`7B" letter upper "`5B"
  134. X  char "`7C" letter upper "\"
  135. X  char "`7D" letter upeer "`5D"
  136. X  char "`5D" letter lower "`7D"
  137. X  char "\" letter lower "`7C"
  138. X  char "`5B" letter lower "`7D"
  139. X  END OF CHARTABLE
  140. X3 database_poltime
  141. X  How often database is polled for interprocess communication.
  142. X
  143. X  This value is VMS Delta-time format.
  144. X
  145. X4 Example
  146. X  database_poltime: 0 ::1
  147. X
  148. X  This is 1 second (0 days, 0 hours, 0 minutes and 1 second).
  149. X3 CLOSED_MESSAGE
  150. X   This message is printed, when Playtime: -entry disallows playing.
  151. X4 Example
  152. X  CLOSED MESSAGE:
  153. X  Welcome to the game Monster!
  154. X
  155. X  But what now?
  156. X
  157. X  Goodgulf the Grey appears in a puff of orange smoke!
  158. X  He is very angry...
  159. X
  160. X  "What are you doing here? The Dungeon is now closed!"
  161. X
  162. X  He waves his Iron Staff and yells "Begone!"
  163. X
  164. X  You disappear in a burst of multicolored light...
  165. X
  166. X  On wall you see announcement:
  167. X
  168. X  **********************************************************************
  169. X  *                                                                    *
  170. X  *                    Dungeon is closed on weekdays                   *
  171. X  *                         between 09.00-17.00                        *
  172. X  *                                                                    *
  173. X  **********************************************************************
  174. X
  175. X  END OF MESSAGE
  176. X3 mdl_buffers
  177. X  How many MDL code is kept in memory.
  178. X4 Example
  179. X  mdl_buffers: 20
  180. X3 allow_dcl_access
  181. X  If this is true, then command 'dcl' is available.
  182. X2 Installation
  183. X  In order to install Monster your must create several directories,`20
  184. X  compile it, copy files to right directories,  edit configuration`20
  185. X  files and build a database for it.
  186. X3 Directories
  187. X  Create four directories:
  188. X    Directory for sources, from now on it is called the SOURCES directory.
  189. X    Directory for MONSTER.EXE, MONSTER_DUMP.EXE, MONSTER_REBUILD.EXE and`20
  190. X      MONSTER_WHO.EXE, from now on it is called the IMAGE directory.
  191. X    Directory for *.MON files, from now on it is called the`20
  192. X      DATABASE_MON directory.
  193. X    Directory for CODE*.MON files, from now on it is called the`20
  194. X      DATABASE_CODE directory.
  195. X
  196. X4 SOURCES
  197. X-  295,  295
  198. X  Compiled files: MON.EXE, MONSTER_WHO.EXE, MONSTER_E.HLB,`20
  199. X-  299,  302
  200. X  Files: COMMANDS.PAPER, MONSTER.HELP.
  201. X
  202. X  Files created by /REBUILD: DESC.MON, EVENTS.MON, HEADER.MON,`20
  203. X  INDEX.MON, INTFILE.MON, LINE.MON, NAMS.MON, OBJECTS.MON,`20
  204. X  ROOMS.MON, SPELLS.MON.
  205. X-  308,  309
  206. X  Command H (Add header blocks) in the System menu adds a number of`20
  207. X  files in this directory!
  208. X-  343,  344
  209. X  Copy MON.EXE, MONSTER_WHO.EXE, MONSTER_DUMP.EXE, MONSTER_REBUILD.EXE`20
  210. X  and MONSTER_E.HLB to the "IMAGE" directory.
  211. X-  348,  349
  212. X  Edit the following files: KEYS.PAS, MONSTER.CLD, MONSTER.INIT.
  213. X  Edit KEYS.PAS before compiling Monster !
  214. X-  353,  358
  215. X  Edit the keys array. You can change the number of lines of keys array`20
  216. X  but you cannot change the length of lines of keys -array. Assign the`20
  217. X  number of lines to the "maxkeys" constant.
  218. X
  219. X4 MONSTER.CLD
  220. X   Insert the full specification of the IMAGE directory to the following`20
  221. X   places:
  222. X-  370,  370
  223. X  image <IMAGE -directory>monster_rebuild
  224. X-  377,  377
  225. X  Edit places marked with the "<>" marks:
  226. X-  383,  389
  227. XREBUILD_OK: <set this to true before /REBUILD, afterwards to false>
  228. X
  229. Xroot:     <full specification of the DATABASE_MON directory>
  230. Xcoderoot: <full specification of the DATABASE_CODE direcory>
  231. X      `20
  232. XLEVELTABLE:
  233. X* Leveltable removed: see examples from the "initialization_file" part of`20
  234. X-  401,  402
  235. XPlaytime: <insert the right time into this: look examples from the`20
  236. X           "initialization_file" part of this help>
  237. X-  407,  419
  238. X
  239. XCHARTABLE:
  240. XEND OF CHARTABLE
  241. X
  242. Xdatabase_poltime: 0 ::1
  243. X
  244. XCLOSED MESSAGE:
  245. XMonster is now closed !!
  246. XEND OF MESSAGE
  247. X
  248. Xmdl_buffers: 20
  249. X4 ILMOITUS.TXT
  250. X
  251. X  This file is no longer needed.
  252. X  Use instead 'CLOSED MESSAGE' -entry in MONSTER.INIT.
  253. X
  254. X3 Protection
  255. X  Insert the following ACls into the DATABASE_MON and the`20
  256. X  DATABASE_CODE directories`20
  257. X  (to *.DIR file).
  258. X          (IDENTIFIER=<your name>,
  259. X             ACCESS=READ+WRITE+EXECUTE+DELETE+CONTROL)
  260. X          (IDENTIFIER=<your name>,OPTIONS=DEFAULT,
  261. X             ACCESS=READ+WRITE+EXECUTE+DELETE+CONTROL)
  262. X          (DEFAULT_PROTECTION,SYSTEM:RWED,OWNER:RWED,GROUP,WORLD:RW)
  263. X
  264. X  Insert similar ACLs for all other managers (of monster) into the`20
  265. X  DATABASE_CODE directory.
  266. X-  431,  442
  267. X  MONSTER_DUMP.EXE and MONSTER_REBUILD.EXE do not need to be`20
  268. X  executable by the world.
  269. X
  270. X  After building the database put protection (world:read+write) to
  271. X        *.MON files
  272. X  in DATABASE_MON and DATABASE_CODE directories.
  273. X
  274. X3 Database
  275. X  Define the monster command by:
  276. X      SET COMMAND MONSTER (in IMAGE directory)
  277. X
  278. X  Build the monster universe with the MONSTER/REBUILD command.
  279. X-  446,  447
  280. X  copy your old ( Rich Skrenta's ) monster database to the`20
  281. X  DATABASE_MON directory and try: MONSTER/BATCH=CONVERT (No warranty!)
  282. X-  452,  458
  283. X  ( CASTLE.DMP contains the distributed starter's castle )
  284. X
  285. X  Change protection (world:read+write) to
  286. X        *.MON files
  287. X  in the DATABASE_MON and the DATABASE_CODE directories.
  288. X3 Publishing
  289. X  Tells anybody that he can play Monster
  290. X-  471,  472
  291. X  This text is from the release of the original Monster by Rich Skrenta.`20
  292. X- 1816, 1828
  293. X  B       Block the hook code.
  294. X  C       Type COMMANDS.PAPER.
  295. X  D       Delete the hook.
  296. X  E       Exit customizing the hook.
  297. X  F       Free the hook code.
  298. X  G       Get a program file, default extension is .MDL.
  299. X  H       This list.
  300. X  L       List the hook code.
  301. X  M       Run manually the hook code.
  302. X  O       List the hook code to a file.
  303. X  P       Change the hook privilege.
  304. X  Q       Exit customizing the hook.
  305. X  V       View the hook.
  306. X- 1833, 1834
  307. X  - <privilege>   Remove a privilege
  308. X  + <privilege>   Add a privilege
  309. X- 1846, 1860
  310. X  D       Customize the monster's privilege  set.
  311. X  E       Exit customizing the monster
  312. X  F       Free the monster
  313. X  G       Get a program file, the default extension is .MDL
  314. X  H       This list
  315. X  I       Give the monster's health.
  316. X  J       Disable/Enable control access.
  317. X  L       List the monster code.
  318. X  M       Run manuallytthe monster code
  319. X  N       Change the monster name
  320. X  O       List the monster code to a file.
  321. X  P       Change the monster's privilege
  322. X  Q       Exit customizing the monster
  323. X  S       Write the monster's self description
  324. X  V       View the monster.
  325. X- 1865, 1866
  326. X  - <privilege>   Remove a privilege
  327. X  + <privilege>   Add a privilege
  328. X- 1877, 1877
  329. XDescription:   Starts a subprocess for shell and  leaves  Monster  running `
  330. V20
  331. X- 1883, 1887
  332. XDescription:   Writes a description of <detail> or this room
  333. XRequirements:  You are the owner of this room
  334. X               or you have the Owner -privilege
  335. X               or you have the Manager -privilege,`20
  336. X                  if the owner of this room is System
  337. X- 1897, 1897
  338. X                  if the owner of object is System
  339. X- 1902, 1902
  340. X                  if the owner of this room is System
  341. X- 1909, 1916
  342. XDescription:   Sets the ownership of <object> or <monster> or <spell>
  343. X                  this room to Disowned
  344. XRequirements:  You are the owner of the target
  345. X               or you have the Owner -privilege, if target is this room
  346. X               or you have the Owner -privilege,`20
  347. X                  if the target is object or monster
  348. X               or you have the Manager -privilege,`20
  349. X                  if the owner of the target is System
  350. X- 1922, 1922
  351. XDescription:   Drops an object
  352. X- 1949, 1954
  353. XDescription:   Creates a new room with the name: <room>
  354. XRequirements:  You are the owner of this room
  355. X               or this room has some kind of exit with Accept
  356. X               or you have the Owner -privilege
  357. X               or you have the Manager -privilege,`20
  358. X                  if the owner of this room is System
  359. X- 1960, 1960
  360. XDescription:   Gets an object
  361. X- 1967, 1967
  362. XDescription:   Shows your health
  363. X- 1974, 1974
  364. XDescription:   Hides an object or you
  365. X- 1981, 1981
  366. XDescription:   Gives the inventory of <player> or your own inventory
  367. X- 1985, 1985
  368. XDescription:   Creates a new exit from this room to <direction>
  369. X- 2006, 2006
  370. XDescription:  Creates a new object with the name: <object>
  371. X- 2011, 2011
  372. X                 if the owner of this room is System
  373. X- 2015, 2020
  374. XDescription:  Creates a new monster with the name <object>
  375. XRequirements: You are the owner of this room
  376. X              or the room is public
  377. X              or you have the Owner -privilege
  378. X              or you have the Manager -privilege,`20
  379. X                 if the owner of this room is System
  380. X- 2033, 2033
  381. XDescription:  Shows the objects of <player> or your objects
  382. X- 2044, 2044
  383. XDescription:  Types objects of <player> or your objects
  384. X- 2055, 2055
  385. XDescription:  Types the spells of <player> or your own spells
  386. X- 2087, 2087
  387. XDescription:  Reroutes an exit to <direction>
  388. X- 2099, 2099
  389. X                 if the owner of this room is System
  390. X- 2112, 2113
  391. XDescription:  Types all the rooms of <player> or your own rooms
  392. XRequirements: the target is either owned by you or public, or is disowned.
  393. X- 2125, 2125
  394. XDescription:  Lists all the locations of an object
  395. X- 2154, 2154
  396. X                 if the owner of this room is System
  397. X- 2529, 2529
  398. X  When player do something corresponding labels of monsters and hooks
  399. X- 2544, 2546
  400. X  attack`09-`09`09`09attacking the monster
  401. X  look`09`09-`09`09`09look something in room
  402. X  look you`09-`09`09`09look the monster
  403. X- 2577, 2583
  404. X  summon        -                       the victim executes this when
  405. X                                        summoner attacks him
  406. X  learn         book name               when a player reads a spell
  407. X                                        book (that code must use to set`20
  408. X`09`09`09`09`09spell level for this).
  409. X  Spell codes have the default variables "spell name" and "summoner name."
  410. X- 2589, 2589
  411. X  When a user types an invalid command, the following will happen:
  412. X- 2603, 2606
  413. X  T`E4m`E4 dokumentaatio ei ole ajan tasalla. Tiedostossa
  414. X  COMMANDS.PAPER on (toivottavasti) ajan tasalla oleva`20
  415. X  dokumentaatio.
  416. X- 2644, 2644
  417. X   - Aiempi = -funktio on nyt nimell`E4 ==. Siis = toimii nyt eri-
  418. X- 2727, 2729
  419. X  Funktio: and (p1,p2,...,pn)
  420. X
  421. X  Laskee parametrien p1 arvon.
  422. X- 2741, 2743
  423. X     Parametreja pit`E4`E4 v`E4hint`E4`E4n olla kaksi.
  424. X4 and_then
  425. X  Funktio: and then (p1,p2,...,pn)
  426. X `20
  427. X  Laskee parametrien arvoja kunnes jonkun parametrin arvo on tyhj`E4
  428. X  merkkijono (tai kaikki parametrit tuli lasketuksi).
  429. X
  430. X  Palauttaa viimeisen lasketun paramatrin arvon.
  431. X
  432. X  Tulkinta:
  433. X     pN    - totuusarvo / merkkijono
  434. X     tulos - totuusarvo / merkkijono
  435. X4 or_else
  436. X  Funktio: or else (p1,p2,...,pn)
  437. X
  438. X  Laskee parametrien arvoja kunnes joku parametri palauttaa ei-tyhj`E4n
  439. X  merkkijonon (tai kunnes kaikki paramatrit tuli lasketuksi).
  440. X
  441. X  Palauttaa viimeisen lasketun paramaterin arvon.
  442. X
  443. X  Tulkinta:
  444. X     pN    - totuusarvo / merkkijono
  445. X     tulos - totuusarvo / merkkijono
  446. X4 get_global_flag
  447. X  Funktio: get global flag (p1)
  448. X- 2747, 2769
  449. X  Palauttaa argumentin p1 luettelemista globaaleista lipuista ne,
  450. X  jotka ovat ep`E4tosia.
  451. X `20
  452. X  Globaalit liput ovat: "Active", "Valid" ja "Wartime".
  453. X
  454. X  Virhetilanteet:
  455. X    - p1:n listassa oleva alkio ei ole globaali lippu
  456. X      => kyseinen alkio tulkitaan globaaliksi lipuksi, joka on ep`E4tosi
  457. X
  458. X  Tulkinta:
  459. X     p1    - lista
  460. X     tulos - lista
  461. X
  462. XHuomautus:`20
  463. X    - Funktion toiminta on muuttunut. Aiemmein funktio palautti jokaista
  464. X      globaalia lippua kohti, joka oli tosi, yhden "TRUE" -arvon listassa.`2
  465. V0
  466. X4 boolean_and`20
  467. X  Funktio: boolean and(p1,...,pn)
  468. X
  469. X  Laskee parametrien arvon.
  470. X
  471. X  Palautaa "TRUE", jos kaikkien pametrien arvo oli ei tyhj`E4, muutoin
  472. X  palauttaa "".
  473. X
  474. X  Tulkinta:
  475. X    p1    - totuusarvo
  476. X       .
  477. X       .
  478. X       .
  479. X    pn    - totuusarvo
  480. X    tulos - totuusarvo
  481. X4 boolean_or
  482. X  Funktio: boolean or(p1,...,pn)
  483. X
  484. X  Laskee parametrien arvon.
  485. X
  486. X  Palautaa "TRUE", jos v`E4hint`E4`E4n yhden parametrien arvo oli ei tyhj`E4
  487. V,`20
  488. X  muutoin palauttaa "".
  489. X
  490. X  Tulkinta:
  491. X    p1    - totuusarvo
  492. X       .
  493. X       .
  494. X       .
  495. X    pn    - totuusarvo
  496. X    tulos - totuusarvo
  497. X4 move
  498. X  Funktio: move (p1)
  499. X- 2773, 2776
  500. X  Siirt`E4`E4 monsterin p1:n ilmoittamaan huoneeseen.
  501. X
  502. X  Palauttaa huoneen nimen, jonne siirsi monsterin.
  503. X- 2780, 2781
  504. X        omistuksessa, niin monsterilla pit`E4`E4 olla poof -privile-
  505. X        gio.
  506. X- 2785, 2785
  507. X        > Tulos: tyhj`7B nimi/merkkijono
  508. X- 2789, 2792
  509. X      - Suoritettava koodi ei ohjaa monsteria
  510. X- 2798, 2799
  511. X4 pmove
  512. X  Funktio: pmove (p1)
  513. X- 2803, 2820
  514. X  Siirt`E4`E4  (toiminnan laukaisseen)  pelaajan p1:n  ilmoittamaan`20
  515. X  huoneeseen.
  516. X
  517. X  Palauttaa huoneen nimen, jonne siirsi pelaajan.
  518. X
  519. X  Vaatimukset:
  520. X      - Jos kohde huone ei ole julkinen eik`E4 monsterin omistajan`20
  521. X        omistuksessa, niin monsterilla pit`E4`E4 olla poof -privilegio.
  522. X      - Koodi pit`E4`E4 olla privileged moodissa.
  523. X
  524. X  Virhetilanteet:
  525. X      - Kohde ei ole huone
  526. X        > Tulos: tyhj`E4 nimi/merkkijono
  527. X      - Siirto ei onnistu jostain syyst`E4 (esim. poof privilegio-
  528. X        ta olisi tarvittu)
  529. X        > Tulos: tyhj`E4 nimi/merkkijono
  530. X      - Suoritettava koodi ei ohjaa monsteria ja  poof  privile-
  531. X        giota olisi tarvittu
  532. X        > Tulos: tyhj`E4 nimi/merkkijono
  533. X      - Koodi ei ole privileged-moodissa
  534. X        > Tulos: tyhj`E4 nimi/merkkijono
  535. X
  536. X  Tulkinta:
  537. X      p1    - nimi
  538. X      tulos - nimi
  539. X4 if
  540. X  Funktio: if (p1,p2,p3)
  541. X- 2823
  542. X  Laskee parametrin p2 arvon, jos p1 ei ollut tyhj`E4, muutoin`20
  543. X  laskee parametrin p3 arvon.
  544. X
  545. X  Palauttaa p2 tai p3, riippuen siit`E4 kumman arvon laski.
  546. X
  547. X  Tulkinta:
  548. X     p1    - merkkijono
  549. X     p2    - merkkijono
  550. X     p3    - merkkijono
  551. X     tulos - merkkijono
  552. X
  553. X  Huomautus:
  554. X      - Puuttuvat parametrit tulkitaan tyhjiksi (t`E4m`E4 koskee`20
  555. X        my`F6s muita funktiota).
  556. X      - Koodin ei siis tarvitse ohjata monsteria,  jos  poof`20
  557. X        privilegiota ei tarvita.
  558. X4 where
  559. X  Funktio: where (p1)
  560. X
  561. X  Laskee parametrin p1 arvon.
  562. X
  563. X- 2854, 2855
  564. X- 2894, 2895
  565. X  Palauttaa p1:n muutettuna isot kirjaimet muutettuina`20
  566. X  pieniksi kirjaimiksi, numerot sellaisinaan ja muut`20
  567. X  merkit korvattuna v`E4lily`F6nnill`E4.Monsterin merkkitau-
  568. X  lukko m`E4`E4r`E4`E4 mitk`E4 merkit ovat kirjaimia - katso kohta`20
  569. X  CHARTABLE alustustiedostossa MONSTER.INIT.
  570. X- 2905, 2906
  571. X       j`E4 pelaajan puheesta.
  572. X     - Merkit joiden tyyppi on "none" merkkitaulukossa pois-
  573. X       tetaan kokonaan (ei korvata v`E4lily`F6nnill`E4).
  574. X- 3896, 3906
  575. X
  576. X3 Functions`20
  577. X
  578. X  This documentation is not up-to-date. Especially, the
  579. X  number of function parameters is not restricted to three
  580. X  even if this document says so. The file COMMANDS.PAPER
  581. X  contains the up-to-date documentation.
  582. X
  583. X  N.B:
  584. X
  585. X  In this documentation, "result" means the return value. `20
  586. X
  587. X4 +
  588. X  Function: + (p1,p2)
  589. X
  590. X  Evaluates p1 and p2.
  591. X
  592. X  Returns p1 " " p2 ( p1, a space, and p2 concatenated ).
  593. X
  594. X  Errors:
  595. X     - the result string is over 1000 characters long
  596. X       => the result is p1
  597. X
  598. X  Interpretation:
  599. X    p1, p2, result: strings
  600. X4 =`20
  601. X  Function: =(p1, p2)
  602. X  Function: ==(p1,p2)
  603. X  Function: ===(p1,p2)
  604. X
  605. X  Evaluates parameters p1 and p2.
  606. X
  607. X  Functions =, == ja === return p1 when the evaluated parameters are`20
  608. X  equal; otherwise an empty string is returned. The functions range from
  609. X  "=", which is the strictest, to "===", which is a general purpose`20
  610. X  predicate.
  611. X
  612. X  Name`09`09Description
  613. X  ----------------------------------------------------------------
  614. X  =             Are two argument values exactly the same string ?
  615. X
  616. X  ==`09`09Are two argument values -- excluding spaces -- the`20
  617. X                same string ?
  618. X
  619. X  ===`09`09Are two argument values -- excluding spaces and`20
  620. X   `09        the case -- the same string ?
  621. X  ----------------------------------------------------------------
  622. X
  623. X  Interpretation:
  624. X    p1, p2 : string
  625. X    result : string ( boolean )
  626. X
  627. X  N.B:
  628. X   - the previous function "=" is currently named "==".`20
  629. X4 inv
  630. X  Function: inv ()
  631. X
  632. X  Returns the list of items the monster is carrying.
  633. X
  634. X  Errors:
  635. X     - The code is not monster code ( e.g. the code is for a room )
  636. X       => the result is an empty string
  637. X
  638. X  Interpretation:
  639. X    result : list
  640. X4 pinv
  641. X  Function: pinv ()
  642. X
  643. X  Returns the list of items of the player who triggered the action.
  644. X
  645. X  Interpretation:
  646. X   result : list
  647. X4 players
  648. X  Function: players ()
  649. X
  650. X  Returns the list of those players currently in the same room
  651. X  with the monster.
  652. X
  653. X  Errors:
  654. X   - The code is not monster code.
  655. X     => the result is the list of those players currently in the
  656. X     same room with the player who triggered the action
  657. X
  658. X  Interpretation:
  659. X     result : list
  660. X4 objects
  661. X  Function: objects ()
  662. X
  663. X  Returns the list of the items currently in the same room with
  664. X  the monster.
  665. X
  666. X  Errors:
  667. X   - the code is not monster code
  668. X      => the result is the list of those players currently in the
  669. X      same room with the player who triggered the action
  670. X
  671. X  Interpretation:
  672. X     result : list
  673. X4 get
  674. X  Function: get (p1)
  675. X
  676. X  Evaluates p1.
  677. X
  678. X  Tries to pick up the items found in the list p1.
  679. X
  680. X  Returns the list of the items successfully picked up.
  681. X
  682. X  Errors:
  683. X     - The code is not monster code
  684. X       => No actions, an empty string/list is returned
  685. X
  686. X  Interpretation:
  687. X     p1     : list
  688. X     result : list
  689. X4 drop
  690. X  Function: drop (p1)
  691. X
  692. X  Evaluates p1.
  693. X  Forces the monster drop the items found in the list p1.
  694. X
  695. X  Returns the list of the items that were dropped.
  696. X
  697. X  Errors:
  698. X     - The code is not monster code.
  699. X       => No action, an empty string is returned
  700. X
  701. X  Interpretation:
  702. X     p1     : list
  703. X     result : list
  704. X4 and
  705. X  Function: and (p1,p2,...)
  706. X
  707. X  Evaluates p1, p2, ..., pn.
  708. X
  709. X  Returns a list of the items found in both p1 and p2.
  710. X  Every item is included only once.
  711. X
  712. X  Interpretation:
  713. X     pN, result : list
  714. X  N.B.
  715. X    There must be at least two parameters.
  716. X4 move
  717. X  Function: move (p1)
  718. X
  719. X  Evaluates p1.
  720. X
  721. X  The value of p1 is the room the monster is moved.
  722. X `20
  723. X  Returns the name of the room the monster was transferred.
  724. X
  725. X  Requirements:
  726. X      - If the target room is not public or owned by the monster`20
  727. X        owner, the monster must have the "poof" privilege.
  728. X
  729. X  Errors:`20
  730. X     - The target is not a room. `09
  731. X       or`20
  732. X     - Moving is unsuccessful ( e.g. the "poof" privilege would`20
  733. X       have been needed )`20
  734. X       or
  735. X     - The code is not monster code.`20
  736. X       => result is an empty string/name
  737. X
  738. X  Interpretation:
  739. X      p1, result : name
  740. X4 pmove
  741. X  Function: pmove (p1)
  742. X
  743. X  Evaluates p1.
  744. X
  745. X  The player that triggered the action is moved to the room`20
  746. X  found in p1.
  747. X
  748. X  Returns the name of the room the player was moved.
  749. X
  750. X  Requirements:
  751. X      - If the target room is not public, or owned by the monster owner,
  752. X        the monster must have the "poof" privilege.
  753. X      - The code must be in the "privileged" mode.
  754. X
  755. X  Errors:
  756. X      - The target is not a room.
  757. X`09or
  758. X      - The moving is unsuccessful`20
  759. X`09or
  760. X      - The code is not monster code and the "poof" privilege
  761. X        would have been needed.
  762. X`09or
  763. X      - The code is not in the "privileged" mode.
  764. X        => the result is an empty string/name
  765. X
  766. X  Interpretation:
  767. X      p1, result : name
  768. X4 if
  769. X  Function: if (p1,p2,p3)
  770. X
  771. X  Evaluates p1.
  772. X
  773. X  Evaluates p2 if p1 was non-empty, otherwise evaluates p3.
  774. X
  775. X  Returns either p2 or p3, depending on which one was evaluated.
  776. X
  777. X  Interpretation:
  778. X     p1, p2, p3, result : string`20
  779. X
  780. X  Requirements:
  781. X      - missing parameters are thought to be empty ( applicable
  782. X        to all the other functions )
  783. X      - The code does NOT have to be a monster code, if the
  784. X        "poof" privilege is not needed.
  785. X4 where
  786. X  Function: where (p1)
  787. X
  788. X  Evaluates p1.
  789. X `20
  790. X  Returns the name of the room the player p1 currently is.
  791. X
  792. X  Errors:
  793. X     - p1 is not a player name.
  794. X       => the result is an empty string/name
  795. X     - Player p1 is currently not playing.
  796. X       => the result is the room where the player quitted.
  797. X  Interpretation:
  798. X     p1, result : name   `20
  799. X4 null
  800. X  Function: null (p1,p2,p3,...)
  801. X
  802. X  Evaluates parameters p1, p2, p3, ...
  803. X
  804. X  Returns an empty string.
  805. X
  806. X  Interpretation:
  807. X`09p1, p2, p3, ... : string
  808. X  N.B:
  809. X     - Ideal for a sequential action
  810. X4 prog
  811. X  Function: prog (p1, p2, p3, ...)
  812. X
  813. X  Evaluates all parameters.
  814. X  Return the value of the last parameter.
  815. X
  816. X  Interpretation:
  817. X     p1, p2, ... : string
  818. X  N.B:
  819. X    - Good for a sequential action
  820. X
  821. X4 not
  822. X  Function: not (p1)
  823. X
  824. X  Evaluates p1.
  825. X`20
  826. X  Returns "TRUE" if p1 is empty; otherwise an empty string
  827. X  is returned.
  828. X
  829. X  Interpretation:
  830. X     p1  : string
  831. X     result : string ( ? ) / boolean`20
  832. X4 random
  833. X  Function: random (p1)
  834. X
  835. X  Evaluates p1.
  836. X
  837. X  Returns one randomly chosen item from the list p1.
  838. X
  839. X  Errors:
  840. X     - p1 is empty
  841. X       => the result is an empty string/name
  842. X
  843. X  Interpretation:
  844. X     p1     : list
  845. X     result : name
  846. X4 strip
  847. X  Function: strip (p1)
  848. X
  849. X  Evaluates p1.
  850. X `20
  851. X  Changes alphabets A-Z into lowercase and all other characters
  852. X  into spaces. Returns the converted string.
  853. X
  854. X  Interpretation:
  855. X     p1, result : string
  856. X
  857. X   N.B:
  858. X     - Subsequent spaces are compressed into one`20
  859. X       ( applicable to all the other functions, too )
  860. X     - This function is useful for removing punctuation
  861. X       marks from a player speech ( unfortunately some
  862. X       non-standard alphabets, e.g. a-umlaut, are lost )
  863. X4 experience
  864. X  Function: experience (p1)
  865. X
  866. X  Evaluates p1.
  867. X
  868. X  Returns the score of player p1.
  869. X
  870. X  Errors:
  871. X     - p1 is not a player name
  872. X       => the result is an empty string/name
  873. X
  874. X  Interpretation:
  875. X     p1     : name
  876. X     result : number
  877. X4 set_experience
  878. X  Function: set experience (p1)
  879. X
  880. X  Evaluates parameter p1.
  881. X
  882. X  Sets p1 to be the experience of the player who triggered the action.
  883. X
  884. X  Returns p1.
  885. X
  886. X  Requirements:
  887. X     - The monster must have the "experience" privilege
  888. X     - The player cannot be the monster owner or the person
  889. X       who loaded the monster code
  890. X
  891. X  Errors:
  892. X     - The code is not for a monster
  893. X       => no action, an empty string is returned
  894. X     - The monster does not have the "experience" privilege
  895. X       => no action, an empty string is returned
  896. X     - The player who triggered the action owns the monster or
  897. X       loaded the code
  898. X       => no action, an empty string is returned
  899. X
  900. X  Interpretation:
  901. X     p1, result : number
  902. X
  903. X  N.B:
  904. X     - The function cannot be used to change the monster's own experience
  905. X4 plus
  906. X  Function: plus (p1,p2)
  907. X
  908. X  Evaluates p1 and p2.
  909. X `20
  910. X  Returns the sum of p1 and p2.
  911. X
  912. X  Errors:
  913. X     - p1 or p2 is not a number
  914. X`09or
  915. X     - Overflow
  916. X       => the result is an empty string`09
  917. X  Interpretation:
  918. X     p1, p2, result : number
  919. X4 difference
  920. X  Function: difference(p1,p2)
  921. X
  922. X  Evaluates p1 and p2.
  923. X `20
  924. X  Returns p1 minus p2.
  925. X
  926. X  Errors:
  927. X     - p1 or p2 is not a number
  928. X`09or
  929. X     - Overflow
  930. X       => the result is an empty string`09
  931. X  Interpretation:
  932. X     p1, p2, result : number
  933. X4 times
  934. X  Function: times(p1,p2)
  935. X
  936. X  Evaluates p1 and p2.
  937. X
  938. X  Returns p1 multiplied with p2.
  939. X
  940. X  Errors:
  941. X     - p1 or p2 is not a number
  942. X`09or
  943. X     - Overflow
  944. X       => the result is an empty string`09
  945. X  Interpretation:
  946. X     p1, p2, result : number
  947. X4 quotient
  948. X  Function: quotient(p1,p2)
  949. X
  950. X  Evaluates p1 and p2.
  951. X
  952. X  Returns p1 divided by p2 ( integer division,
  953. X  all fractions dropped )
  954. X
  955. X  Errors:
  956. X     - p1 or p2 is not a number
  957. X`09or
  958. X     - Overflow
  959. X       => the result is an empty string`09
  960. X  Interpretation:
  961. X     p1, p2, result : number
  962. X4 set_state
  963. X  Function: set state(p1)
  964. X
  965. X  Evaluates p1.
  966. X
  967. X  Assigns the value of p1 to the code dependent ( static )
  968. X  variable ( one per a code ).
  969. X
  970. X  Returns the value of p1.
  971. X
  972. X  Interpretation:
  973. X     p1, result : string
  974. X
  975. X  N.B:
  976. X     - The variable is code dependent, that is, every monster,
  977. X       and hook has its own variable ( state variable ).
  978. X     - The function "control" does not affect the variable`20
  979. X       "set state" uses.
  980. X5 Example
  981. X  ! Example for using set state`20
  982. X  !               and get state
  983. X  ! and control
  984. X  !
  985. X  ! MDL code for the object "demo object"
  986. X  !
  987. X  ! There is also a monster called "demo monster"
  988. X  !    it has no MDL code
  989. X  !    but has the "experience" privilege
  990. X  !
  991. X  ! When player picks up this object first time, he gets 100 points
  992. X  !
  993. X  !
  994. X  ! This is called when failed to get the object.
  995. X  - LABEL get fail()
  996. X  !
  997. X  ! This is called when getting succeeded.
  998. X  - LABEL get succeed(
  999. X        if(and(get state(),player name), ! Is player name in the state var ?
  1000. V`20
  1001. X           "",`09`09`09         ! Aye: Do not give points`20
  1002. X           GOSUB give point()            ! Nay: Give points
  1003. X          )
  1004. X    )
  1005. X  !
  1006. X  ! This is called when dropping succeeded
  1007. X  - LABEL drop succeed()
  1008. X  !
  1009. X  ! This is called when the object is dropped unintentionally
  1010. X  - LABEL drop you()
  1011. X  !
  1012. X  ! This is called when the object is used successfully
  1013. X  - LABEL use succeed()
  1014. X  !
  1015. X  ! This is called when a player looks at the object
  1016. X  - LABEL look you()
  1017. X  !
  1018. X  ! This is called when a player commands 'something demo object'
  1019. X  - LABEL command(pprint("You can't ",command," demo object."))
  1020. X  !
  1021. X  ! This is called when a player starts a game session in the same
  1022. X  ! room with the object.
  1023. X  - LABEL start()
  1024. X  !
  1025. X  ! This is called when a player enters the room where the object is.
  1026. X  - LABEL enter()
  1027. X  !
  1028. X  ! This is called when a player leaves the room (or game) where object is.
  1029. X  - LABEL leave()
  1030. X  !
  1031. X  !`20
  1032. X  ! The following labels are the code's very own.
  1033. X  !
  1034. X  - LABEL give point(
  1035. X  `09control("demo monster",`09`09! For gaining the "experience" privilege
  1036. X  `09`09`09`09`09! from "demo monster"
  1037. X  `09  prog(set experience(`09`09! Set player's new experience
  1038. X  `09`09plus(`09`09`09! +
  1039. X  `09`09    experience(         ! get player experience
  1040. X                         player name),
  1041. X  `09`09    "100"               ! Number 100, quotes are compulsory
  1042. X                  )
  1043. X                 ),
  1044. X  `09      set state(`09`09! Set code's new state
  1045. X  `09`09or(player name,`09`09! add player name to the state list
  1046. X                     get state()`09! old state list
  1047. X  `09`09)
  1048. X  `09      )
  1049. X            )
  1050. X          )
  1051. X    )
  1052. X
  1053. X4 get_state
  1054. X  Function: get state(p1)
  1055. X
  1056. X  Reads the value of the code dependent variable.
  1057. X
  1058. X  Returns the value.
  1059. X
  1060. X  Interpretation:
  1061. X     result : string
  1062. X
  1063. X  N.B:
  1064. X     - see set_state for more information
  1065. X4 less
  1066. X  Function: less(p1,p2)
  1067. X
  1068. X  Evaluates p1 and p2.
  1069. X
  1070. X  If the value of p1 is less than the value of p1, "TRUE"
  1071. X  is returnes; otherwise an empty string is returned.
  1072. X
  1073. X  Errors:
  1074. X     - p1 or p2 is not a number
  1075. X       => the result is an empty string
  1076. X
  1077. X  Interpretation:
  1078. X     p1, p2 : number
  1079. X     result : string / boolean`20
  1080. X4 number
  1081. X  Function: number(p1)
  1082. X
  1083. X  Evaluates p1.
  1084. X `20
  1085. X  Returns the value of p1 if p1 is a number, otherwise an empty
  1086. X  string is returned.
  1087. X
  1088. X  Interpretation:
  1089. X    p1, result : number`20
  1090. X4 health
  1091. X  Function: health(p1)
  1092. X
  1093. X  Evaluates p1.
  1094. X
  1095. X  Returns the health of p1 ( player or monster ).
  1096. X
  1097. X  Errors:
  1098. X     - p1 is not a player or monster name
  1099. X       => the result is an empty string
  1100. X
  1101. X  Interpretation:
  1102. X     p1     : name
  1103. X     result : number
  1104. X4 all_objects
  1105. X  Function: all objects()
  1106. X
  1107. X  Returns the list of all objects.
  1108. X
  1109. X  Errors:
  1110. X     - All the objects do not fit into a 1000-character list
  1111. X       => only those objects that fit into a 1000-character`20
  1112. X       list are returned
  1113. X
  1114. X  Interpretation:
  1115. X     - result: list
  1116. X
  1117. X  Huomautus:
  1118. X     - Every ( defined ) object is included only once ( even
  1119. X       if there exists 0 or multiple copies of it )
  1120. X4 all_players
  1121. X  Function: all players()
  1122. X
  1123. X  Returns the list of all players and monsters.
  1124. X
  1125. X  Errors:
  1126. X     - All the players and monsters do not fit into a 1000-character
  1127. X       list
  1128. X       => only those players and monsters who fit into a`20
  1129. X       1000-character list are returned
  1130. X
  1131. X  Interpretation:
  1132. X     result : list
  1133. X4 all_rooms
  1134. X  Function: all rooms()
  1135. X
  1136. X  Returns the room list.
  1137. X
  1138. X  Errors:
  1139. X   - The room list does not fit into a 1000-character list
  1140. X     => only those rooms that fit into a 1000-character list
  1141. X     ( in order of appearance ) are included
  1142. X
  1143. X  Interpretation:
  1144. X     result : list
  1145. X4 control
  1146. X  Function: control(p1,p2)
  1147. X
  1148. X  Evaluates p1.
  1149. X
  1150. X  While p2 is evaluated the function controls the monster called
  1151. X  p1. The code and the monster ( p1 ) must have the same owner.
  1152. X
  1153. X  Returns p2.
  1154. X
  1155. X  Errors:
  1156. X     - p1 is not a monster name
  1157. X       or
  1158. X     - The code and the monster ( p1 ) do not have the same owner
  1159. X       => p2 is not evaluated; the result is an empty string
  1160. X
  1161. X  Interpretation:
  1162. X     p1         : name
  1163. X     p2, result : string
  1164. X
  1165. X  N.B:
  1166. X     - Any required privilege is checked from the monster that
  1167. X       is controlled; the function may affect them.
  1168. X     - The function does not affect the privileged mode.
  1169. X     - While p2 is executed the "monster name" variable is`20
  1170. X       temporarily assigned the monster to be controlled, that
  1171. X       is, p1.
  1172. X4 include
  1173. X  Function: include(p1,p2)
  1174. X
  1175. X  Evaluates p1 and p2.
  1176. X
  1177. X  Returns p2 if p1 includes p2; otherwise an empty string is
  1178. X  returned.
  1179. X
  1180. X  Errors:
  1181. X     - p1 or p2 ( or both ) is an empty string
  1182. X       => the result is an empty string
  1183. X  Interpretation:
  1184. X     p1, p2, result : string
  1185. X
  1186. X  N.B:
  1187. X    - The errors do actually fit into the normal behaviour,
  1188. X      they are not real errors, but those situations are`20
  1189. X      that special that they are worth mentioning
  1190. X4 exclude
  1191. X  Function: exclude (p1,p2)
  1192. X
  1193. X  Evaluates p1 and p2.
  1194. X
  1195. X  Returns a list of those items in p1 not found in p2.
  1196. X
  1197. X  Interpretation:
  1198. X    p1, p2, result : list
  1199. X4 get_remote_state
  1200. X  Function: get remote state (p1)
  1201. X
  1202. X  Evaluates p1.
  1203. X
  1204. X  Returns the value of the static variable ( the "state" field )
  1205. X  of the monster named p1. The monster ( p1 ) must have the same
  1206. X  owner as the code, or the monster must be public and the ( other )
  1207. X  monster executing the code must have the object privilege.
  1208. X
  1209. X  Errors:
  1210. X      - p1 is not a monster name
  1211. X        or
  1212. X      - p1 and the code have a different owner
  1213. X        or
  1214. X      - p1 is public and the code is not monster code
  1215. X`09or
  1216. X      - p1 is public and the code ( that is monster code ) does
  1217. X        not have the object privilege
  1218. X        => the result is an empty string
  1219. X
  1220. X  Interpretation:
  1221. X     p1     : name
  1222. X     result : string
  1223. X4 set_remote_state
  1224. X  Function: set remote state (p1,p2)
  1225. X
  1226. X  Evaluates p1 and p2.
  1227. X
  1228. X  Assign the value of p2 to the static variable of the monster p1.
  1229. X  The monster p1 must have the same owner as the code, or it must
  1230. X  be public and the code ( or, to be precise, the monster`20
  1231. X  whose code it is ) must have the "object" privilege.
  1232. X
  1233. X  Return p2.
  1234. X
  1235. X  Errors:
  1236. X      - p1 is not a monster name
  1237. X        or
  1238. X      - p1 and the code have a different owner
  1239. X        or
  1240. X      - p1 is public and the code is not monster code
  1241. X`09or
  1242. X      - p1 is public and the code ( that is monster code ) does
  1243. X        not have the object privilege
  1244. X        => the result is an empty string
  1245. X
  1246. X  Interpretation:
  1247. X     p1         : name
  1248. X     p2, result : string
  1249. X4 remote_objects
  1250. X  Function: remote objects (p1)
  1251. X
  1252. X  Evaluates p1.
  1253. X
  1254. X  Returns a list of objects lying on the ground in the room p1.
  1255. X
  1256. X  Errors:
  1257. X      - p1 is not a room
  1258. X        => an empty string is returned
  1259. X
  1260. X  Interpretation:
  1261. X     p1     : name
  1262. X     result : list
  1263. X4 remote_players
  1264. X  Function: remote players (p1)
  1265. X
  1266. X  Evaluates p1.
  1267. X
  1268. X  Returns a list of players in the room p1.
  1269. X
  1270. X  Errors:
  1271. X      - p1 is not a room
  1272. X        => an empty string is returned
  1273. X
  1274. X  Interpretation:
  1275. X     p1     : name
  1276. X     result : list
  1277. X
  1278. X  N.B:
  1279. X     - Monsters are excluded, making the behaviour a wee bit`20
  1280. X       different from the functions players(),
  1281. X       lookup players(), and parse players().
  1282. X     - The behaviour is similar to players(), except that the room
  1283. X       is chosen with a parameter.
  1284. X4 heal
  1285. X  Function: heal (p1)
  1286. X
  1287. X  Evaluates p1.
  1288. X
  1289. X  Increases the health ( strength ) of the player who triggered`20
  1290. X  the action by p1 points.
  1291. X
  1292. X  Returns p1.
  1293. X
  1294. X  Errors:
  1295. X      - p1 is not a number or p1 is negative
  1296. X        => the result is an empty string
  1297. X
  1298. X  Interpretation:
  1299. X`FF    p1,  result : number
  1300. X
  1301. X  N.B:
  1302. X      - If the present strength of a player added with the`20
  1303. X        increase is greater than his maximum strength only
  1304. X        the maximum health is set. However, the return value
  1305. X        is not affected.
  1306. X4 duplicate
  1307. X  Function: duplicate (p1)
  1308. X
  1309. X  Evaluates p1.
  1310. X
  1311. X  One extra copy is created from the objects included in the
  1312. X  list p1. The copies are automatically picked up by the monster.
  1313. X  The objects and the monster must have the same owner, or the`20
  1314. X  monster must have the "object" privilege.
  1315. X
  1316. X  Return a list of items the were successfully duplicated.
  1317. X
  1318. X  Errors:
  1319. X`09  - The code is not monster code
  1320. X            => no action; an empty string is returned
  1321. X          - An object does not have the same owner as the monster
  1322. X            and the monster does not have the "object" privilege,
  1323. X            or the object does not fit in ( the monster carries
  1324. X            too many objects )
  1325. X            => The object is neither copied nor ( naturally )`20
  1326. X            picked up by the monster.
  1327. X
  1328. X  Interpretation:
  1329. X     p1, result : lista
  1330. X4 pprint
  1331. X  Function: pprint (p1,p2,p3,...)
  1332. X  Function: pprint raw (p1,p2,p3,...)
  1333. X
  1334. X  Evaluates p1, p2, p3, ...
  1335. X
  1336. X  Parameter text is printed to the player who triggered the action.
  1337. X  One space is inserted after a parameter if the following parameter`20
  1338. X  starts with an alphanumeric. A colon (".") is inserted in the very`20
  1339. X  end if text ends with an alphanumeric. A sentence is capitalised.
  1340. X
  1341. X  Pprint raw does not format text.
  1342. X
  1343. X  Returns the printed text.
  1344. X
  1345. X  Errors:
  1346. X     - Text is longer than 1000 chars
  1347. X`09=> it is truncated ( somehow )
  1348. X
  1349. X  Interpretation:
  1350. X     pN, result : string
  1351. X
  1352. X  N.B:
  1353. X     - The function decides by itself how to split the text
  1354. X       into lines.
  1355. X4 print
  1356. X  Function: print (p1,p2,p3,...)
  1357. X  Function: print raw (p1,p2,p3,...)
  1358. X
  1359. X  Evaluates parameters.
  1360. X
  1361. X  Parameter text is printed to all the players currently in the same`20
  1362. X  room with the monster.
  1363. X  One space is inserted after a parameter if the following parameter`20
  1364. X  starts with an alphanumeric. A colon (".") is inserted in the very`20
  1365. X  end if text ends with an alphanumeric. A sentence is capitalised.
  1366. X
  1367. X  Print raw does not format text.
  1368. X
  1369. X  Returns the printed text.
  1370. X
  1371. X  Errors:
  1372. X     - Text is longer than 1000 chars
  1373. X`09=> it is truncated ( somehow )
  1374. X     - The code is not monster code
  1375. X        => text is printed to all the players ( but not to the
  1376. X`09player who triggered the action ) in the room
  1377. X`09
  1378. X  Interpretation:
  1379. X     pN, result : string
  1380. X
  1381. X  N.B:
  1382. X     - The function decides by itself how to split the text
  1383. X     - If the player ( who triggered the action ) is in the
  1384. X       same room with the monster the text is also printed`20
  1385. X       to him.
  1386. X     - Very long messages ( many lines ) may overload the`20
  1387. X       Monster event transmission system the result of which`20
  1388. X       may be the loss of some events.
  1389. X4 oprint
  1390. X  Function: oprint (p1,p2,p3,...)
  1391. X  Function: oprint raw (p1,p2,p3,...)
  1392. X
  1393. X  Evaluates parameters.
  1394. X
  1395. X  Parameter text is printed to all the players currently in the
  1396. X  same room with the monster ( but not to the player who triggered
  1397. X  the action ).
  1398. X  One space is inserted after a parameter if the following parameter`20
  1399. X  starts with an alphanumeric. A colon (".") is inserted in the very`20
  1400. X  end if text ends with an alphanumeric. A sentence is capitalised.
  1401. X
  1402. X  Oprint raw does not format text.
  1403. X
  1404. X  Return the printed text.
  1405. X
  1406. X  Errors:
  1407. X     - Text is longer than 1000 chars
  1408. X`09=> it is truncated ( somehow )
  1409. X
  1410. X  Interpretation:
  1411. X     pN, result : string
  1412. X
  1413. X  N.B:
  1414. X     - The function decides by itself how to split the text
  1415. X     - If the player ( who triggered the action ) is in the
  1416. X       same room with the monster the text is also printed`20
  1417. X       to him.
  1418. X     - Very long messages ( many lines ) may overload the`20
  1419. X       Monster event transmission system the result of which`20
  1420. X       may be the loss of some events.
  1421. X`20
  1422. X  Errors:
  1423. X     - The code is not monster code
  1424. X        => text is printed to all the players ( but not to the
  1425. X`09player who triggered the action ) in the room
  1426. X     - The text is longer than 1000 chars
  1427. X        => it is truncated ( somehow )
  1428. X  Interpretation:
  1429. X      pN, result : string
  1430. X
  1431. X4 pget
  1432. X  Function: pget (p1)
  1433. X
  1434. X  Evaluates p1.
  1435. X
  1436. X  Picks up the objects found in the list p1 and gives them to
  1437. X  the player who triggered the action.
  1438. X
  1439. X  Returns a list of the objects which were successfully picked up.
  1440. X
  1441. X  Requirements:
  1442. X     - The code must be in the "privileged" mode.
  1443. X
  1444. X  Errors:
  1445. X     - The code is not in the "privileged" mode
  1446. X`09=> no action; p1 is not evaluated (!); the result is an`20
  1447. X        empty string
  1448. X
  1449. X  Interpretation:
  1450. X     p1, result : list
  1451. X4 pdrop
  1452. X  Function: pdrop (p1)
  1453. X
  1454. X  Evaluates p1.
  1455. X
  1456. X  The player who triggered the action is dropped all the objects
  1457. X  found in the list p1.
  1458. X
  1459. X  Returns a list of the objects which were successfully dropped.
  1460. X
  1461. X  Requirements:
  1462. X`09- The code must be in the "privileged" mode.
  1463. X
  1464. X  Errors:
  1465. X     - The code is not in the "privileged" mode
  1466. X`09=> no action; p1 is not evaluated (!); the result is an`20
  1467. X        empty string
  1468. X
  1469. X  Interpretation:
  1470. X     p1, result : list
  1471. X
  1472. X  N.B:
  1473. X     - Informs everybody ( in the same room ) if the action
  1474. X       resulted in stripping off an object ( compare: wear
  1475. X       and wield )
  1476. X4 pduplicate
  1477. X  Function: pduplicate (p1)
  1478. X
  1479. X  Evaluates p1.
  1480. X
  1481. X  The objects found in the list p1 are duplicated and given
  1482. X  to the player ( who, again, triggered the action ). The`20
  1483. X  objects and the code must have the same owner or the monster
  1484. X  must have the "object" privilege.
  1485. X
  1486. +-+-+-+-+-+-+-+-  END  OF PART 3 +-+-+-+-+-+-+-+-
  1487. -- 
  1488. - K E H                                      /  El{m{ on monimutkaista
  1489.   Kari.Hurtta@Helsinki.FI
  1490.