!
! FILE : initgame.scr
!
! DESCRIPTION
!   Example introduction script.  This script is executed when the game
!   is first started.  The 'player' is initialized, but the character
!   creation screen has not been called yet.
!
!   The player attributes are loaded from statistics record # 0 (which
!   you can modify using the DCWORLD program).  These attributes are
!   modified as follows when the game starts:
!
!     group.gold        = 1000;   (1000 silver or 100 gold)
!     group.food        =   25;
!     player.name       = "John Doe";
!     player.type       = REGULAR;
!     player.class      = HUMAN;
!     player.level      = 1;
!     player.experience = 1;
!     player.energy     = 1000; (See note # 3 below)
!
! You may change any attribute within this script to accomodate your
! needs.  If you end the script with the CONTINUE statement, instead of
! the STOP statement, the character creation screen will be invoked and
! the player will be allowed to:
!
!  a) Set the player's name IF it was not changed from 'John Doe' to 
!     any other value by this script.
!
!  b) Set the player's character class IF it was not changed from the
!     default class (HUMAN).
!
!  c) Distribute 25 attribute points amongst the player's attributes
!     for strength, speed, aim, dexterity, hit-points, iq and power.
!     (see note # 3 below)
!
! IMPORTANT NOTES: The following special conditions affect the way the
! attributes may be distributed.
!
!  1) Any attribute that has a value greater than 9 may not be modified
!     by the user.  This allows you to specify a fixed starting value
!     for SOME of the attributes, and let the user set the other ones.
!
!  2) Any attribute that has an initial value less than 9 is automaticly
!     raised to 9 taking away from the initial 25 attribute points.  The
!     users may NOT lower an attribute below 9, nor may they raise any
!     attribute above 20.  This allows you to reduce the number of points
!     that are available for distribution.
!
!  3) If you set the 'group.energy' variable to a value between 0 and 40
!     the value will be used as the initial number of points available
!     instead of 25 (still subject to notes 1 and 2).  In such a case,
!     the group.energy attribute is set to 1000 AFTER character creation
!     takes place.
!
! Examples:
!   player.pwr  = 35;  ! Player starts with 35 power points. User may not
!                      ! change this value.
!                      
!   player.str  =  4;  ! By seting this value to 4, the game will take 5
!                      ! points of the 25 and assign them to this attribute
!                      ! which leaves only 20 points to be distributed by
!                      ! the player.
!
!   group.energy = 30; ! Distribute 30 points instead of 25
!
!------------------------------------------------------------------------
! If you don't wan't to use the character creation screen, you may set
! the attributes in many different ways, for example:
!
! You might get the name this way:
!   :XLOOP
!     write( "What is your name: " );
!     L0 = getstr( "Hey You" );
!     if S0 = "" goto XLOOP;  ! You HAVE to enter a name
!     player.name = S0;
!
! You might set the class using a menu, as follows:
!   L0 = select( "Wizard", "Elf", "Dwarf" );
!   on L0 goto XWIZ, XELF, XDWARF;
!   :XWIZ   player.class = WIZARD; goto XNEXT;
!   :XELF   player.class = ELF;    goto XNEXT;
!   :XDWARF player.class = DWARF;  goto XNEXT;
!   :XNEXT
!
! Or directly...
!   player.class = ELF;
!
! The standard attributes can be set directly in statistics record # 0
! (using the DCWORLD program) or in this script by direct assignment.
!
! IMPORTANT:  If you end this script with STOP, the character creation
! screen is NOT invoked, so you need to set BOTH attribute fields:
!   player.pwr  = 30;  ! Current Value
!   player.mpwr = 30;  ! Maximum Value
!
! The character creation screen automaticly copies all CURRENT values to
! the MAXIMUM values, so you don't have to set the maximum values if the
! screen is going to be invoked.
!
!***********************************************************************
! Cheat so we can test with high attributes.
!
! group.energy = 40; ! Number of points to distribute between the attributes
!                    ! that we do not modify here.  May be between 0 and 40.
!                    ! Default is 25 points.
!
! player.pwr   = 90; ! Pre-set pwr to 90
! player.iq    = 90; ! Pre-set iq  to 90
! player.hp    = 90; ! Pre-set hp  to 90
!
!***********************************************************************

music   ( "intro1.cmf" );  ! Play background music
viewpcx ( "intro1.pcx" );  ! Show a nice picture
wait    ( 120 );
music   ( "intro2.cmf" );  ! Play background music
readtext( "intro1.txt" );  ! Read some text.  Restores screen

writeln( "You will now get a chance to create your character.  You may" );
writeln( "select a name, a character class and customize your attributes:" );
write  ( "Press <SPACE> to continue" );
pause;

CONTINUE;                  ! Continue with normal character creation
