This file lists the program codes for the new built in Random Happening
Program (RHP) system.  See OUTLANDS.TXT under the section [EXTRA SETUP
INFO] for how to install your RHPs into The Outlands Tavern.  Remember
that if you distribute your programs, please give me credit for writing
The Outlands Tavern!
                                        
Look at PROGRAM.SMP to see how these can be used.

The RHP language uses codes that have a @ on both sides.
New codes are indicated with a *.  Unless otherwise notified, codes will
work with previous versions and programs.
(1,x) gives version of LORDCAVE that the code dosn't work with.
---------------------------------------------------------------------------
This first set is just normal commands with no parameters.
@;@@PROGRAM@ xxxxxxxxxxx  What program its for, LORDCAVE or OUTLANDS
                          (1,1.3e)
@;@@VERSION@ xxxx         Version of program the script is compatible with
                          (1,1.3e)
@;@        Comment, everyting on a line with this at the front will be
           ignored (works in recording)
@CLEAR@    Clear the screen (works in recording)
@MORE@     Pause for keypress with "<MoRE>"
@DELAY@    Small delay (250 milliseconds)
@END@      Stop program and pause
@KILL@     Stop program, pause, and kill player (player is notified)
@EXIT@     Stop program, pause, and exit to LORD
@GETROOM@  Stop program, pause, give the player a room and exit to BBS (1)
@PRISON@   Stop program, pause, puts player in prison and exit to BBS (1)
@STATS@    Shows the player's stats (1,1.3e)
@RUNRHP@ xxxxxxxx.xxx  Quit current RHP and run xxxxxxxx.xxx (1,1.3e)
---------------------------------------------------------------------------
This set is for writing to a player's MAIL?.DAT and LORD's LOGNOW.TXT.
@MAIL@      Start writing to mail
@MAILEND@   Stop writing to mail
@NEWS@      Start writing to LOGNOW.TXT
@NEWSLINE@  Stop writing to LOGNOW.TXT and add a line "-=-=-=-" centered
@NEWSEND@   Stop writing to LOGNOW.TXT
---------------------------------------------------------------------------
The following two sets can be used in mail and news recordings.

The next set is for designating setions to go to.
@#xxxxxxxx         Section designation, no maximun length
@GOTO@ @#xxxxxxxx  Go to section xxxxxxxx after this command
---------------------------------------------------------------------------
The one in this section is for writing lengths of spaces.
@SPACE@ x  Write x spaces to screen/file
---------------------------------------------------------------------------
This new set is for testing existing information and can be used in main
or news recording.
Example: @IF@ FEMALE @GOTO@ @#Help (if player is female, goto section
                                    @#Help)
Example: @IF@ EXPERIENCE>0 @GOTO@ @#Help (if experience is greater than 0,
                                          goto section @#Help)
Example @IF@ FIGHTER `9Good job! (if player is a Death Knight, write
                                  `9Good job! to file/screen)
@IF@ condition command  Test condition, if true do command.  Command can
                        be any RHP @ command or one line text.
conditions:
 FEMALE     : returns if player is female
 MALE       : returns if player is male
 FIGHTER    : returns if player is currently a Death Knight
 MAGIC      : returns if player is currently a Magic User
 THIEF      : returns if player is currently a Thief
 HORSE      : returns if player has a horse
 FAIRY      : returns if player has a fairy
 MARRIED    : returns if player is married, works with Violet and Seth
              Able marrages as well as player to player.
 SPIRITS    : returns if player is in high spirits
 WEIRDEVENT : returns if player will have a weird event in the forest
 x<y        : returns if number x is less than a number y
 x>y        : returns if number x is greater than a number y
 x<>y       : returns if x is not equal to y
 x=y        : returns if x is equal to y
Any number can be used as x or y or you can use player stats.
Player stats that can be used as x or y:
 DRUNKLEVEL : Level of drunkedness
 FOREST     : Forest fights
 FIGHTS     : Player fights
 KIDS       : Kids
 DEFENCE    : Defence
 STRENGTH   : Strength
 EXPERIENCE : Experience
 LAYS       : Lays
 SKILL      : Current skill type amount
 HITPOINTS  : Current HitPoints
 HITMAX     : Max HitPoints
 GEMS       : Gems
 GOLD       : Gold in hand
 BANK       : Gold in bank
 CHARM      : Charm
 WEAPON     : Weapon number
 ARMOUR     : Armour number
 LEVEL      : Player's level
 KILLS      : Number of player kills
 ALLGOLD    : Total amount of gold
 WINS       : Number of times player has won
---------------------------------------------------------------------------
The following set is for prompting for input.  The single character
section is used to act on input.  The program runner acts on the first
matching section found, so don't use the same selections nested.
Example: @PROMPT@ CD (prompts for C and D selections, must be an @##C and
                      @##D sections later.)
@YESNO@        Prompt for Y/n, Y and N sections
@PROMPT@ xx..  Prompt for selections xx.., selections must be capitalized
               The first selection will be the default one
@RANDOM@ x     Random number between 1 and x, each number a section
@##x           Single character section, can be called with @GOTO@
---------------------------------------------------------------------------
The following set has some special properties.  If you put a = before the
number x, it makes that attribute equal to x.  If you put %, it adds /
subtracts x% of the existing attribute to the attribute.  Ones marked with
a $ can be used in mail without the = option and may just increment the
attribute by 1.  Player is notified with a 'You LOSE/GAIN x <type>!' in
both mail and on screen, except not in mail for those that just increment.
NEW: Putting *LEVEL mulitpies the number times the player's level
Example: @EXPERIENCE@ %-15 (Subtracts 15% of experience)
Example: @GOLD@ =0 (Sets gold in hand to 0)
Example: @EXPERIENCE@ 4*LEVEL (Adds 4 times the player's level of
                               experience)
@DRUNKLEVEL@    Level of drunkedness
@FOREST@ x      Forest fights $
@FIGHTS@ x      Player fights $
@KIDS@ x        Kids $(increments number by 1, ignores x)
@DEFENCE@ x     Defence $
@STRENGTH@ x    Strength $
@EXPERIENCE@ x  Experience $
@LAYS@ x        Lays $(increments number by 1, ignores x)
@SKILL@ x       Current Skill type (if resulting number is above 40 the
                Skill value is set to 40, no uses are given) $(increments
                numer by 1, ignores x)
@HITPOINTS@ x   Current HitPoints
@HITMAX@ x      Max HitPoints $
@GEMS@ x        Gems
@GOLD@ x        Gold in Hand $
@BANK@ x        Gold in Bank $
@CHARM@ x       Charm $(increments number by 1, ignores x, = option can
                be used)
@KILLS@ x       Number of player kills
---------------------------------------------------------------------------
These codes are special player value changers that don't act like the
earlier ones.  They cannot be used in mail.  Player is NOT notified.
@FAIRY@       Changes if user has a fairy.  Takes no parameters.  If user
              has a fairy, its taken else one is given.
@HORSE@       Changes if user has a horse.  Takes no parameters.  If user
              has a horse, its taken else one is given.
@SEX@         Changes user's sex.  Takes no parameters.
@ARMOUR@      Changed!  Changes armour name to built in name.
@WEAPON@      Changed!  Changes weapon name to built in name.
@WEIRDEVENT@  Changes if user will have a weird event in the forest, that
              is if they will find gems when entering.
@SPIRITS@     Changes the player's spirits, from high to low or from low
              to high.
@HEAL@        Heal the player.
---------------------------------------------------------------------------
Variables like these work like the older LORD style codes, you put them in
a string to output and they get replaced by the corresponding value.  Place
the word you want in between @*@ like so:
  Example: `4Hello, @*@NAME@*@!
these all require v1.4 in order to work:
ALLGOLD    : Player's total gold
ARMOUR     : Player's armour name (same as `a)
BANK       : Player's bank gold
CHARM      : Player's charm
CLASS      : Player's class (eg. "Death Knight")
DEFENCE    : Player's defence
DRUNKLEVEL : Player's drunk level
EXPERIENCE : Player's experience
FIGHTS     : Player's human fights left
FOREST     : Player's forest fights left
GOLD       : Player's gold on hand
HITPOINTS  : Player's current hitpoints
HITMAX     : Player's maximum hitpoints
KILLS      : Player's number of player kills
KIDS       : Player's number of kids
LAYS       : Player's number of lays
LEVEL      : Player's level
NAME       : Player's name (same as `n lord code)
MARRIED    : Player's spouce's name (same as `m)
STRENGTH   : Player's strength
SKILL      : Player's skill level for current class
WEAPON     : Player's weapon name (same as `w)
WINS       : Number of times player has won
---------------------------------------------------------------------------
The following codes can be put anywhere in a line, even in mail and news
recording.  They are case sensitive!
`n  Put player's name
`a  Put player's armour name
`w  Put player's weapon name
`m  Put player's spouce's name if married
`l  Do not linefeed (put at the end of a line)
`s  Put player's sex (he/she)
`o  Put player's opposite sex (he/she)
`[  Put player's sex possesive (his/her)
`]  Put player's opposite sex possesive (his/her)
`<  Put player's sex (him/her)
`>  Put player's opposite sex (him/her)






