This file lists the SYNTAX of new functions not documented
in the DCGAMES 4.00 Script Reference Guide.

-----------------------------------------------------------------------
<ret> = LOS( <from>, <to> [, <tlist>] );

where:
<ret>   is TRUE (non zero) if a path straight line path between
        <from> and <to> contains only landscape tiles of the transparency
        given in the (optional) <tlist>.

<from>  is an X/Y location, which can be NPC, PLAYER, OBJECT or two
        numeric expressions. See examples.

<to>    is an X/Y location, which can be NPC, PLAYER, OBJECT or two
        numeric expressions. See examples.

<tlist> is a comma separated list of one or more transparency values
        to be checked.  The default is 0. Names for these values can
        be found in [LAND TRANSPARENCY] in the DCCTOKEN.DAT file,
        where CLEAR = 0 and SOLID = 1.  You can change this and create
        different "levels" of transparency (say 0 to 3) and allow 
        the player to "see" 0 to 2 during the day and 0 to 1 during 
        the night, for example.

Examples:
  The NPC animation routines use LOS to determine if the NPC can see
  the player. If they can, they "walk" towards the player (only the
  hostile NPCs do this).

    if LOS( npc, player ) then
      <move the npc...>
    endif;
 

-----------------------------------------------------------------------
<ret> = LOR( <from>, <to> [, <dlist>] );

where:
<ret>   is TRUE (non zero) if a path straight line path between
        <from> and <to> contains only landscape tiles of the DENSITY
        given in the (optional) <dlist>.

<from>  is an X/Y location, which can be NPC, PLAYER, OBJECT or two
        numeric expressions. See examples.

<to>    is an X/Y location, which can be NPC, PLAYER, OBJECT or two
        numeric expressions. See examples.

<dlist> is a comma separated list of one or more density values to be
        checked.  The default is 0. Names for these values can
        be found in [WORLD DENSITY] in the DCCTOKEN.DAT file, where
        FLAT = 0, ROUGH = 1, etc. Note that the default of 0 is not
        very useful. Players and NPCs can walk on different terrains
        depending on the type of vehicle or type of npc.  For example,
        a Sea Dragon can walk on DEEP and ROUGH WATER.

Examples:
    I didn't use LOR() in any of the examples so far. You might want
    to make it so that an NPC doesn't start moving towards a player
    unless they can SEE the player AND they can REACH the player:
      if LOS( npc, player ) and LOR( npc, player, LAND, ROUGH ) then
        <move the npc...>
      endif;
 
    Note that the above example applies only to land based NPCs. For
    Water based NPCs, it would be:
      if LOS( npc, player ) and LOR( npc, player, DEEP_WATER, ROUGH_WATER ) then
        <move the npc...>
      endif;
 
    Here is an example using LOR to see if a player can REACH a certain
    DOOR from where they are standing:

      if visible( world.doorx(1), world.doory(1) ) and
         LOR( player, world.doorx(1), world.doory(1), FLAT, ROUGH ) then
        <door is visible and player can reach it, so maybe take
         control of the player and "walk" him over to that door..>
        ..
      endif;
 
-----------------------------------------------------------------------
<svar> = SWRITE[LN]( ... );

Identical to a WRITE and WRITELN, except the value is written to the
string variable instead of the text window.

-----------------------------------------------------------------------
PWRITE[LN]( ... );

Identical to a WRITE and WRITELN, except the text is written to the
text window formed within a PCX image file displayed using VIEWPCX()
within the margins specified using SET_FRAME().

Example:
   set_frame( "scroll.pcx", 30, 40, 30, 40, 0 );
   viewpcx ( "scroll.pcx" );
   pwrite( "Name: ", object.name );
   write( "You see a ", object.class, " scroll." );

Note that PWRITE[LN] starts writting at the top of the image and
scrolls down. If you want to clear the image and start writting 
at the top again, you need to re-issue the set_frame() AND the
viewpcx() calls.

-----------------------------------------------------------------------
SET_FRAME( pcx, lft, top, rgt, bot, color );

Where:
  pcx is a file containing a PCX image file.
  lft is the margin from the left.
  top is the margin from the top.
  rgt is the margin on the right.
  bot is the margin on the bottom.
  color is the color to use for the text (default 0 = black).

----------------------------------------------------------------------

