home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1996 October / PCO_10.ISO / filesbbs / imcombat.arj / IMMORTAL.ZIP / SCRIPT.DOC < prev    next >
Encoding:
Text File  |  1995-04-29  |  37.2 KB  |  918 lines

  1.                                      Immortal
  2.                                  Script Languange
  3.                                    Version 1.70
  4.                             Home: The Outer LiMiTS BBS
  5.                               SySop: Kenneth Bledsoe
  6.                                   (713) 344-0526
  7.                                   FIDO@ 1:106/50
  8.  
  9.         What is a Script File?
  10.           Well the easy way to describe it is a text file that tells 
  11.         iMMortal to do something. 
  12.  
  13.         What can you do with it?
  14.           You can create Encounters, mazes, change players stats, and 
  15.         just about anything else you want. Let your imagination be your
  16.         guide! You should be able to do just about anything you want with
  17.         it. 
  18.  
  19.         How do I write a script?
  20.           Read On!
  21.         
  22.         Before Diving head first.  Scan through the  commands listed here
  23.         to familiarize yourself with them.  Once you  have done that then
  24.         to make a script get into your favorite word processor and open a
  25.         new ASCii text file. {or load the demo script  "Random.TXT"  that
  26.         came with the original iMMortal package}  The commands or  pretty
  27.         straight foreward and they all come with examples so  if you have
  28.         a problem  go back and  look for an example of the command.  Once
  29.         you have completed  a script save it as  an ASCii file.  Then you
  30.         will need to convert it to a format iMMortal can understand.To do 
  31.         this all you need to do is run the program "Makescr.exe" with the 
  32.         name of your text file as a parameter. Ex.   Makescr.exe demo.txt
  33.         would create the file <demo.scr>  if the compiler  did not detect
  34.         any errors.  If an error is  encountered it will stop  processing
  35.         the script file and tell you what line the error occured on.  
  36.  
  37.         You have 50 variables to  use at your convience.  These variables
  38.         can be any  combination of characters up  255 in length.  You can
  39.         assign a value to them with the  ASSIGN command or compare values
  40.         with the IF command.  You can also ASSIGN numberic values to them
  41.         and INCREMENT  or DECREMENT  their  value  with  these  commands,
  42.         respectfully.  You can now  modify the player  variables  with by 
  43.         using the text control variables list below!
  44.  
  45.         Once script files  are  written  they  can  be  implemented  into 
  46.         iMMortal one of 3 ways.  Automatically, Once per Call, By Choice.
  47.         This is  accomplished  when installing the script on the map with 
  48.         iMMedit.
  49.         Auto   : When  a players  cordinates match those of an associated
  50.                  script file the script  file will begin iMMediatly! This
  51.                  Will happen EVERY TIME  the player is  in this location!  
  52.              EX: The Random Generator Tool uses this method!
  53.         Once   : Will work  the same  as AUTO but  the script  file  will
  54.                  activate only the FIRST time the user is here!  Once per     
  55.                  Call!
  56.              EX: This would be usefull for a script file that returns all
  57.                  the  players HitPoints,  but will prevent it from being
  58.                  abbused!
  59.         Choice : This will display a description to the user, entered in 
  60.                  iMMedit, and the user will have the choice to start the
  61.                  script or not! 
  62.              EX: This will display something similiar to the Arena!
  63.                  {Which by the way, was originally a script file.}
  64.                  
  65.         
  66.         Well the easy way to learn this  script  language  is to just get 
  67.         into it.  I hope you enjoy it as much as  I have. And once again, 
  68.         if you have any questions feel free to leave  me a message  on my 
  69.         BBS.  Comments and suggestions are also always  welcome.  
  70.         
  71.  
  72.  
  73.         Available Text Control Codes That can be implemented in the
  74.          writeln - write commands of the script file to display user
  75.          stats! or imbedded in The ANSi screens displayed by iMMortal!
  76.          They can also be imbedded in The Menu screens if you choose to
  77.          change any of these!
  78.  
  79.          Embedded Control <K> codes used to display System Stats or
  80.          change color..
  81.  
  82.          ^K[f;b = Change colors
  83.           NOTE : f = foregound; b = background
  84.                  The semi-colon MUST exist and be followed by a
  85.                  background color.. Valid color codes are listed
  86.                  under the Change Color Option...
  87.          Ex..  ^K[15;0   would be white on black.
  88.                ^K[31;0   would be blinking white on black..
  89.  
  90.          ^KD = Dungeon Name of Current Town
  91.          ^KT = Town Name of Current Town
  92.          ^KV = iMMortal version Number
  93.  
  94.  
  95.  
  96. {Special} ^KT^ =  Clear the current Line and place the Town Name in
  97.                   the center of the Line. This is ONLY available for
  98.                   the Town Name!
  99.  
  100.          These could be used to create custom Town Screens!
  101.  
  102.  
  103.  
  104.  
  105.          Embedded Control <F> codes used to display and Modify User Stats..
  106.  
  107.          ^FA = Alias    {You can NOT modify this variable}
  108.          ^FB = Bludgeoning Weapon Skill Percentage
  109.          ^FC = Piercing      "      "       "
  110.          ^FD = Slashing      "      "       "
  111.          ^FE = Experience Points not Spent
  112.          ^FF = Healing Salves
  113.          ^FG = Gold on Hand
  114.          ^FH = Hit Points
  115.          ^FI = Maximum Hit Points
  116.          ^FJ = Challenges Left for today
  117.          ^FK = Weapon Description (In Hand)      (Can NOT be modified)
  118.          ^FL = Armor Description (Wearing)       ( "   "   "     "   )
  119.          ^FM = Movement Points
  120.          ^FN = Find and Remove Traps Percentage
  121.          ^FO = Open Locks
  122.          ^FP = Pick Pockets
  123.          ^FQ = Move Silently
  124.          ^FR = Read Language
  125.          ^FS = Hide in Shadows
  126.          ^FT = Strength
  127.          ^FU = Intelligence
  128.          ^FV = Wisdom
  129.          ^FW = Dexterity
  130.          ^FX = Constitution
  131.          ^FY = Charisma
  132.  
  133.          Embedded Control <X> codes used to display and Modify User Magic Stats..
  134.  
  135.          ^XA = Magic Dart Percentage
  136.          ^XB = Flame Finger   "
  137.          ^XC = Invisibility
  138.          ^XD = Magic Darts
  139.          ^XE = Identify
  140.          ^XF = Fireball
  141.          ^XG = Web
  142.          ^XH = Haste
  143.          ^XI = Life Steal
  144.          ^XJ = Death Strike
  145.          ^XK = Base Magic Percentage
  146.          ^XL = Users Magic Points Remaining
  147.          ^XM = Cure Light wounds
  148.          ^XN = Bless
  149.          ^XO = Spiritual Fist
  150.          ^XP = Blind
  151.          ^XQ = Spiritual Armor
  152.          ^XR = Cure Serious Wounds
  153.          ^XS = Spiritual Weapon
  154.          ^XT = Flame Strike
  155.          ^XU = Heal
  156.          ^XV = Disinegrate
  157.          ^XW = base Prayer Percentage
  158.          ^XX = Users Prayer Points Remaining
  159.  
  160.  
  161.           Ask
  162.           ────────────────────────────────────────────────────────────
  163.           Syntax:       Ask <len> <var num>
  164.  
  165.           Description:  Waits for the user to enter a string of up to
  166.                         <len> characters and stores the string in the
  167.                         variable <var num>.  Valid values for <len>
  168.                         are 1 to 255 and <var num> may be any number
  169.                         between 1 and 50.
  170.  
  171.           Example:                                          Ask 30 5
  172.  
  173.                         Waits for the user to enter a string of up to
  174.                         30 characters in length.  The user's input is
  175.                         stored in variable number 5.
  176.  
  177.  
  178.           Assign
  179.           ────────────────────────────────────────────────────────────
  180.           Syntax:       Assign <var num> <"literal">
  181.  
  182.           Description:  Assigns the text specified in <"literal"> to
  183.                         variable number <var num>.  The literal
  184.                         portion of the assignment must be enclosed in
  185.                         quotation marks.
  186.  
  187.                  Note:  All text control codes are valid if used in the
  188.                         "literal" statement except for the ^K codes
  189.  
  190.                          Example : assign 1 "A"
  191.                          This assign the players name to variable one.
  192.  
  193.  
  194.          Example:      Assign 1 "Hi There!"
  195.                         Write "Var 1 is: ^1"
  196.  
  197.                         Would assign "Hi There!" to variable number
  198.                         one and output "Var 1 is: Hi There!" to the
  199.                         display.
  200.  
  201.           Attack
  202.           ────────────────────────────────────────────────────────────
  203.           Syntax:       Attack   <Options>  <Options>
  204.  
  205.           Description:  Player will be Attacked by a Random Monster.
  206.  
  207.           Example:      Attack
  208.  
  209.                         This command will grab a random enemy out of
  210.                         enemy file and the player will be able to
  211.                         fight the enemy or runaway.
  212.  
  213.  
  214.           Options       MAP
  215.  
  216.                         If this option is included on the command-Line
  217.                         the Fight routine will be a split screen fight
  218.                         like is displayed in the random encounters on the
  219.                         map. The lower half of the screen is cleared first.
  220.  
  221.           Options       EASY  MED  HARD  RUN
  222.  
  223.                         Any one of these choices will be valid if placed
  224.                         after attack. The enemy grabbed out of the database
  225.                         will be in the range of the passed option. If NO
  226.                         options are passed then the enemy will be totaly
  227.                         random..
  228.  
  229.           Options       #???  Where ??? is the number of the monster in
  230.                         the database you wish to throw at the player!
  231.                         You asked for it you got it! The Monster number
  232.                         is in the lower right corner of the enemy
  233.                         editor.
  234.  
  235.           Example:      Attack Easy    {Will get a fairly easy monster}
  236.                         Attack Run     {Will get one of the hardest
  237.                                         enemies out of the database}
  238.                         Attack #100    {Would grab monster 100 out of the
  239.                                         database, which just so happens
  240.                                         to be a Wyvern}
  241.  
  242.           Note 0:{well} If you use the # option, there is a fail safe
  243.                  {did}  so if the number is larger than the database
  244.                  {not}  that it will just select a random monster, so I
  245.                  {want} would suggest using one of the original 300 or
  246.                  {to}   if you add one of your own and release the script
  247.                  {start}send the stats in a text file with script and
  248.                  {over} explain how to get this monster working in that
  249.                  {sigh} script!
  250.  
  251.           Note 1:       If the player dies the program will jump to
  252.                         a label in the script named ":Dead". If this
  253.                         Label is not found iMMortal will cease
  254.                         processing the script file and return to the
  255.                         game (where the player will be ushered out of
  256.                         the game since he is dead)
  257.  
  258.           Note 2:       If the player runs away from the fight the
  259.                         program will jump to the label name ":Runaway"
  260.                         if this label is not found then the program will
  261.                         resume from the previuos command line.
  262.  
  263.           Note 3:       If you use this command it would be best to
  264.                         set the goto label :Dead just after the quit
  265.                         command to prevent iMMortal from running the
  266.                         portion of the script following the :Dead label
  267.                         if the player is still alive.
  268.  
  269.           Note 4:       If I get enough input I will consider letting
  270.                         you input the Enemy Data into the scriptfile
  271.                         so you can decide what the enemy is that the
  272.                         player will have to deal with.
  273.  
  274.  
  275.           Example      clearscreen
  276.                        assign 1 0
  277.                        :attack
  278.                        attack
  279.                        writeln "Congratulations You Won"
  280.                        increment 1
  281.                        goto attack
  282.                        quit
  283.                        :dead
  284.                        writeln "Sorry You have been Defeated after ^1 fights"
  285.                        waitforenter
  286.                        quit
  287.  
  288.                        The following example will cause the player to
  289.                        continiously fight a random enemy until he is
  290.                        killed then display how many fights he won.
  291.  
  292.  
  293.           ChangeColor
  294.           ────────────────────────────────────────────────────────────
  295.           Syntax:       ChangeColor <foreground> <background>
  296.  
  297.           Description:  Changes the color of the text if the user has
  298.                         ANSI graphics enabled.  The color selected
  299.                         remains the default color for all subsequent
  300.                         text displayed, until the end of the
  301.                         questionnaire script or until the next
  302.                         ChangeColor command is encountered.
  303.  
  304.           Example:      ChangeColor 1  0
  305.  
  306.                         Changes the text color to a blue foreground on
  307.                         a black background until the end of the script
  308.                         is reached or until another ChangeColor
  309.                         command is encountered.
  310.  
  311.  
  312.  
  313.           Foreground Colors                  Background Colors
  314.  
  315.           0  - Black                         0 - Black
  316.           1  - Blue                          1 - Blue
  317.           2  - Green                         2 - Green
  318.           3  - Cyan                          3 - Cyan
  319.           4  - Red                           4 - Red
  320.           5  - Magneta                       5 - Magneta
  321.           6  - Brown                         6 - Brown
  322.           7  - LightGray                     7 - LightGray
  323.           8  - DarkGray
  324.           9  - LightBlue
  325.           10 - LightGreen
  326.           11 - LightCyan
  327.           12 - LightRed
  328.           13 - LightMagneta
  329.           14 - Yellow
  330.           15 - White
  331.  
  332.           NOTE: Add 16 to the Foreground color to enable Blink.
  333.  
  334.           ClearEOL
  335.           ────────────────────────────────────────────────────────────
  336.           Syntax:       ClearEOL
  337.  
  338.           Description:  Clears the end of line from the current
  339.                         cursor position without moving the cursor!
  340.  
  341.           Example:      ClearEOL
  342.  
  343.           ClearScreen
  344.           ────────────────────────────────────────────────────────────
  345.           Syntax:       ClearScreen
  346.  
  347.           Description:  Clears the user's screen if the user has
  348.                         ANSI enabled.  Otherwise, this command
  349.                         will send a carriage return line feed to
  350.                         the screen.
  351.  
  352.           Example:      ClearScreen
  353.  
  354.                         This would simply clear the user's screen.
  355.  
  356.  
  357.            Decrement
  358.            ────────────────────────────────────────────────────────────
  359.           Syntax:       Decrement <varnum> <amount>
  360.  
  361.           Description:  Lowers the value of the user variable number by
  362.                         amount. If the user variable is not a a valid number
  363.                         the command will be ignored. Text Control Codes are
  364.                         valid. This will allow you to Modify Player Stats!
  365.                         Use with Caution!! Do Not make the game to easy to
  366.                         Play!!
  367.  
  368.  
  369.           Example:      Assign 1 "3"
  370.                         Decrement 1 1
  371.                         Write "User variable 1 = ^1"
  372.                         quit
  373.  
  374.                         The following example would display
  375.                         User variable 1 = 2
  376.  
  377.            Example2:    Assign 1 "3A"
  378.                         Increment 1
  379.                         Write "User variable 1 = ^1"
  380.                         quit
  381.  
  382.                         The following example would display
  383.                         User variable 1 = 3A
  384.  
  385.            Note:        The Decrement command was ignored because
  386.                         the user variable 1 was not a valid number.
  387.  
  388.            Note:        Text control codes are allowed as a <varnum>.
  389.                         This will allow you to modify certain user
  390.                         stats. For a listing of Text Control Codes
  391.                         See the begining of this Document.
  392.                         Range checking is performed by this operation!
  393.  
  394.            Note:        User Variables are also valid if used in the  
  395.                         amount slot.
  396.                        
  397.            Example3:    random 1 500
  398.                         Decrement ^FG ^1
  399.                         ;This would subtract a random amount in the range 
  400.                         ;of 0 to 499 gold from the users gold in
  401.                         ;Hand!
  402.  
  403.  
  404.  
  405.  
  406.           DisplayFile
  407.           ────────────────────────────────────────────────────────────
  408.           Syntax:       DisplayFile <1-8 character filename+plus extension>
  409.  
  410.           Description:  Causes an ANSi/ASCii text file to be displayed
  411.                         The text file must exist in the Script directory.
  412.  
  413.           Example:      DisplayFile iMMortal.ANS
  414.  
  415.                         Would display the file iMMortal.ANS from the
  416.                         SCRIPT files directory.  Once the file has been
  417.                         displayed the user is returned to the
  418.                         script file.
  419.  
  420.  
  421.  
  422.  
  423.           EndIF
  424.           ────────────────────────────────────────────────────────────
  425.           Syntax:       EndIF
  426.  
  427.           Description:  Used in conjunction with the IF command, this
  428.                         signifies the end of an IF.  The function of
  429.                         IF and EndIF are more fully explained under
  430.                         the EndIF command in this section.
  431.  
  432.           Example:      See the IF script command.
  433.  
  434.  
  435.  
  436.           GetChoice
  437.           ────────────────────────────────────────────────────────────
  438.           Syntax:       GetChoice <valid choices> <var num>
  439.  
  440.           Description:  Waits for the user to enter one of the
  441.                         characters in <valid choices> and stores the
  442.                         response in the variable <var num>.  The
  443.                         character entered is not case-sensitive.
  444.  
  445.           Example:      GetChoice YN 2
  446.  
  447.                         This command would wait for the user to press
  448.                         either the "Y" or the "N" character, storing
  449.                         the response in variable number 2.
  450.  
  451.           GiveArmor
  452.           ────────────────────────────────────────────────────────────
  453.           Syntax:       GiveArmor  <"Description"> <"UN-Description">
  454.                                    <Absorbtion> <Bonus> <Identified>
  455.  
  456.           Description:  Places this Armor in the players inventory
  457.                         if there is room for it. If there is No room
  458.                         then the player is warned he has NO room for it.
  459.  
  460.           Note:         The Descriptions MUST be enclosed in " " and
  461.                         the Abs and Bonus's MUST exist. Also User
  462.                         variables are allowed for the description,
  463.                         absorbtion, and bonus parameters.
  464.                         User Variables are Identified By The ^ symbol.
  465.  
  466.                         See GiveWeapon For Example.
  467.  
  468.           GiveWeapon
  469.           ────────────────────────────────────────────────────────────
  470.           Syntax:       GiveWeapon <"Description"> <"UN-Description">
  471.                                    <Damage> <Bonus> <Identified> <SKILL Type>
  472.  
  473.           Description:  Places this weapon in the players inventory
  474.                         if there is room for it. If there is No room
  475.                         then the player is warned he has NO room for it.
  476.  
  477.           <Description> The description given to the user if the weapon is
  478.                         identified.
  479.  
  480.           <UN-Desc..>   The description given to the user if the weapon is
  481.                         not identified.
  482.  
  483.           <Damage>
  484.           <Bonus>       Must be in the range of -128..128
  485.  
  486.           <Identified>  Must be on of these
  487.                         TRUE   FALSE
  488.                         If true then the player knows what the weapon is
  489.                         if flase then he will need to get it Identified
  490.                         first...
  491.  
  492.           <Skill Types> Must be ONE of these Three Player Skills
  493.                         BLUDGEONING   SLASHING    PIERCING
  494.  
  495.           Note:         The Description MUST be enclosed in " " and
  496.                         the damage and Bonus's MUST exist. Also User
  497.                         variables are allowed for any of the Description,
  498.                         Damage, and Bonus Slots.
  499.                         User Variables are Identified By The ^ symbol.
  500.  
  501.  
  502.           Example:      GiveWeapon "+1 BroadSword" "BroadSword" ^1 ^2 TRUE Slashing
  503.  
  504.                         This would place the value of user variable one in
  505.                         the damage slot and user variable 2 in the Bonus slot
  506.  
  507.                         GiveWeapon "^1" 10 20
  508.  
  509.  
  510.           Goto
  511.           ────────────────────────────────────────────────────────────
  512.           Syntax:       Goto <label>
  513.  
  514.           Description:  Causes the script interpreter to jump to the
  515.                         label specified as <label>.  The label may be
  516.                         1 to 244 characters in length and may contain
  517.                         any combination of letters and numbers. Labels
  518.                         should be preceded by the colon ":" character.
  519.                         Thereis no limit to the amount of labels allowed
  520.                         in a scriptfile;
  521.  
  522.           Example:      IF 5 = "Y"
  523.                           Goto MyLabel
  524.                         EndIF
  525.                         Quit
  526.  
  527.                         :MyLabel
  528.                         Display "Here we are!|"
  529.                         Quit
  530.  
  531.                         In this example, if variable number five is
  532.                         equal to "Y", the script interpreter will jump
  533.                         to the label MyLabel and continue processing
  534.                         from that point.
  535.  
  536.           GotoXY
  537.           ────────────────────────────────────────────────────────────
  538.           Syntax:       Goto <X> <Y>
  539.  
  540.           Description:  Forces the Cursor to jump to the new Cordinates.
  541.                         Ranges...
  542.                         X = 1..80
  543.                         y = 1..24
  544.  
  545.  
  546.           Example:      GotoXY 1 1
  547.                         Writeln "The Cursor is Home"
  548.                         Quit
  549.  
  550.  
  551.           IF
  552.           ────────────────────────────────────────────────────────────
  553.           Syntax:       IF <var num[~]> <operator> <operand>
  554.  
  555.           Description:  This command is used to perform comparisons
  556.                         within your script file and take actions based
  557.                         on the results of the comparisons.  The result
  558.                         of an IF comparison is considered to be either
  559.                         true or false.  If the comparison is found to
  560.                         be true, then all lines up to the next EndIF
  561.                         are processed by the interpreter.  In case you
  562.                         aren't familiar with logical comparisons,
  563.                         refer to the examples listed below and later
  564.                         in this chapter.  They will help you to better
  565.                         understand the purpose and functionality of
  566.                         this command.
  567.  
  568.           NOTE:  Text Control Codes can be used in place of
  569.                         variable Numbers. And all text control codes
  570.                         are assumed to ba numeric comparison.
  571.                         ie.. You cannot compare Town Names, Player Names etc.
  572.                         Only Numeric Stats like Gold, Exp. etc..
  573.  
  574.  
  575.                         Specifically, this command compares the
  576.                         contents of the variable <var num> with the
  577.                         contents of <operand> using the type of
  578.                         comparison specified in <operator>.
  579.  
  580.                         <Var num> may be any variable number between 1
  581.                         and 50 followed by the optional numeric
  582.                         identifier "~".  When a tilde character "~" is
  583.                         specified after <var num> it indicates that a
  584.                         numeric comparison is to be made instead of a
  585.                         text string comparison.
  586.  
  587.                         <Operator> may be any combination of:
  588.  
  589.                            =       Equal to...
  590.                            <       Less than...
  591.                            >       Greater than...
  592.  
  593.                         <Operand> values may be:
  594.  
  595.                         *   Literal text enclosed in quotation marks.
  596.                         *   A variable number specified as <#var num>.
  597.  
  598.                         When comparing the contents of a variable
  599.                         specified as <var num> with the contents of
  600.                         another variable specified as <operand>, the
  601.                         <operand> variable number must be preceded by
  602.                         the # character.
  603.  
  604.           NOTE:  This command may not be nested.  That is to say that
  605.           you cannot use an IF command between other IF and EndIF
  606.           commands.
  607.  
  608.           Examples:     IF 1 <> #2
  609.  
  610.                         Would return true if the contents of variable
  611.                         number one was not equal to the contents of
  612.                         variable number 2.
  613.  
  614.                         IF 5~ <= 20
  615.  
  616.                         Would return true if the value of variable
  617.                         number five was less than or equal to the
  618.                         amount of 20.  Notice that the "~" was used
  619.                         to indicate that a numeric comparison was to
  620.                         be made.
  621.  
  622.  
  623.                         IF 5 = "ROSENBERG"
  624.                         Display "Hey, that's where I live!|"
  625.                         EndIF
  626.  
  627.                         In this example, the interpreter would check
  628.                         to see if variable number 5 was equal to the
  629.                         string ROSENBERG.  If true, the text "Hey,
  630.                         that's where I live!" would be displayed.  If
  631.                         the contents of variable number 5 did not
  632.                         match, the statement would have been
  633.                         considered to be false and the interpreter
  634.                         would jump to the EndIF statement.
  635.  
  636.                         IF 1 <> #2
  637.                         Display "Variables 1 and 2 are different!|"
  638.                         EndIF
  639.  
  640.                         In this example, the contents of variable
  641.                         numbers one and two would be compared.  If
  642.                         they were not equal, the text "Variables 1 and
  643.                         2 are different!" would be displayed.
  644.  
  645.  
  646.           IFSKILL
  647.           ────────────────────────────────────────────────────────────
  648.           Syntax:       IFSKILL <skill>
  649.  
  650.           {And it works NOW!}
  651.           Description:  This command is basically just a skill check.
  652.                         It works the same ways as the IF command except
  653.                         this will command will return a true value if
  654.                         the player is successfull at the skill in
  655.                         question or false if he fails. It also can check
  656.                         to see if the player has room for a new weapon and
  657.                         or armor
  658.  
  659.                         <skill>  Current Skills supported by this command.
  660.  
  661.                         <pp>    {Pick Pockets}
  662.                         <ol>    {Open Locks}
  663.                         <frt>   {Find and Remove Traps}
  664.                         <ms>    {Move Silently}
  665.                         <hide>  {Hide in Shadows}
  666.                         <ws>    {Players Weapon in Hand Skill}
  667.                         <rl>    {Read Languages} {Arts And Language Skill}
  668.                         <weaponfull>
  669.                                 {Returns true if all the players Weapon Slots}
  670.                                 {are Full}
  671.                         <armorfull> {Same as weapon}
  672.  
  673.           Example:      IFSKILL weaponfull
  674.                         MENUCOMMAND DropWeapon
  675.                         ENDIF
  676.                         GIVEWEAPON  "BroadSword" 10 2
  677.  
  678.  
  679.           Example:      IFSKILL pickpocket
  680.                         WRITELN "You Managed To Pick Someone's Pocket"
  681.                         GOTO END
  682.                         ENDIF
  683.                         WRITELN "What a miserable attempt to Steal."
  684.                         END:
  685.                         QUIT
  686.  
  687.  
  688.  
  689.           Increment
  690.            ────────────────────────────────────────────────────────────
  691.           Syntax:       Increment <varnum> <amount>
  692.  
  693.           Description:  Raise the value of the user variable number by
  694.                         amount. If the user variable is not a a valid number
  695.                         the command will be ignored.
  696.                         
  697.  
  698.           Example:      Assign 1 "3"
  699.                         Increment 1
  700.                         Write "User variable 1 = ^1"
  701.                         quit
  702.  
  703.                         The following example would display
  704.                         User variable 1 = 3
  705.  
  706.            Example2:    Assign 1 "3A"
  707.                         Increment 1
  708.                         Write "User variable 1 = ^1"
  709.                         quit
  710.  
  711.                         The following example would display
  712.                         User variable 1 = 3A
  713.  
  714.            Note:        The Increment command was ignored because
  715.                         the user variable 1 was not a valid number.
  716.  
  717.            Note:        Text control codes are allowed as a <varnum>.
  718.                         This will allow you to modify certain user
  719.                         stats. For a listing of Text Control Codes
  720.                         See the begining of this Document.
  721.                         Range checking is performed by this operation!
  722.  
  723.            Note:        User Variables are allowed if used in the amount
  724.                         position
  725.  
  726.            Example3:    random 1 500
  727.                         Increment ^FG ^1
  728.                         ;This would increase the users gold in hand by
  729.                         ;a random amount of 0 to 499!
  730.  
  731.           MenuCommand
  732.           ────────────────────────────────────────────────────────────
  733.           Syntax:       Menucommand   <menu>
  734.  
  735.           Description:  Used to execute a standard menu item available from
  736.                         the town main menu.
  737.  
  738.                         Available menus
  739.  
  740.                         <EXCHANGE>     Swap Weapons and Armor
  741.                         <SKILL>        Display users skills
  742.                         <INVENTORY>    Display backpack
  743.                         <STATS>        Display User Stats
  744.                         <DROPARMOR>    Drop Armor Routine
  745.                         <DROPWEAPON>   Drop Weapon Routine
  746.  
  747.               Example:  Menucommand  Stats
  748.  
  749.  
  750.           Random
  751.           ────────────────────────────────────────────────────────────
  752.           Syntax:       Random  <VarNum>  <Range>
  753.  
  754.           Description:  Used to insert a random value into the specified
  755.                         user value in the range of 0 - (range-1).
  756.  
  757.           Example :     Random  1  500
  758.                         Would assign a random value into user variable number
  759.                         1 within the range of  0 - 499.
  760.  
  761.  
  762.  
  763.  
  764.           Return
  765.           ────────────────────────────────────────────────────────────
  766.           Syntax:       Return
  767.  
  768.           Description:  Used to return from the Last GOTO statement
  769.                         Called!
  770.  
  771.           Example:     writeln "      What A Wimp!"
  772.                        goto pressenter
  773.                        quit
  774.  
  775.                        :pressenter
  776.                        changecolor 2 0
  777.                        writeln " "
  778.                        write  "      Press "
  779.                        changecolor 13 0
  780.                        write "["
  781.                        changecolor 15 0
  782.                        write "Enter"
  783.                        changecolor 13 0
  784.                        write "] "
  785.                        changecolor 2 0
  786.                        write "To Continue "
  787.                        waitenter
  788.                        return
  789.  
  790.                         In this example, if variable number five is
  791.                         equal to "Y", the script interpreter will jump
  792.                         to the label MyLabel and continue processing
  793.                         from that point.
  794.  
  795.  
  796.  
  797.           Quit
  798.           ────────────────────────────────────────────────────────────
  799.           Syntax:       Quit
  800.  
  801.           Description:  Terminates the script and returns operation to
  802.                         the Game.
  803.  
  804.           Example:      Quit
  805.  
  806.                         This command would simply cause iMMortal
  807.                         to stop processing the script and return to
  808.                         the game.
  809.  
  810.  
  811.  
  812.           WaitEnter
  813.           ────────────────────────────────────────────────────────────
  814.           Syntax:       WaitEnter
  815.  
  816.           Description:  Waits for the user to press the <ENTER> key.
  817.                         Any other keys the user might press are
  818.                         ignored.
  819.  
  820.           Example:      Write "Press [Enter] to continue"
  821.                         WaitEnter
  822.  
  823.                         Displays the text "Press [Enter] to continue"
  824.                         and then waits for the user to press <ENTER>.
  825.                         Also, the communications driver outbound
  826.                         buffer is flushed prior to processing this
  827.                         command.
  828.  
  829.           Write / Writeln
  830.           ────────────────────────────────────────────────────────────
  831.           Syntax:       Write   "<text>"    Write   "<text ^5>"
  832.                         Writeln "<text>"    Writeln "<text ^5>"
  833.  
  834.  
  835.           Description:  Displays the specified text on the screen.  If
  836.                         the writeln command is used, a carriage
  837.                         return line feed sequence is displayed after
  838.                         the text.  if the write command is used then
  839.                         the cursor remains positioned at the end of
  840.                         the text displayed.
  841.  
  842.                         You can also display the contents of a user
  843.                         variable by preceding the user variable with
  844.                         the caret symbol "^" .  "^5" Would display the
  845.                         contents of user variable number 5.
  846.  
  847.           Note:         The User Variable must be located inside in the
  848.                         parenthesis.
  849.  
  850.                         All text to be displayed MUST be enclosed in
  851.                         quotation marks as shown in the example below.
  852.  
  853.           Note:         Text Control Codes are Valid!
  854.                         For a LIst of text control Codes See the
  855.                         begining of this Doc.
  856.  
  857.           Example:      Writeln "Welcome aboard!"
  858.                         Write   "Welcome aboard!"
  859.  
  860.                         In the first example, the text Welcome aboard!
  861.                         would be displayed to the user and the cursor
  862.                         would be positioned at the beginning of the
  863.                         next line since the writeln command was specified.
  864.  
  865.                         assign 5 "Kenneth"
  866.                         Writeln "Hello ^5"
  867.  
  868.                         This example would display the Hello Kenneth
  869.                         followed by a carriage return and line feed.
  870.  
  871.  
  872.  
  873.           Example Script
  874.           ════════════════════════════════════════════════════════════
  875.           The following examples demonstrate the use of the automatic
  876.           script files that iMMortal supports. While these are not
  877.           extremely elaborate, they will give you an idea of how you
  878.           might apply these to your system.  You may wish to read
  879.           through each script, cross-referencing the script commands
  880.           listed in the previous section.
  881.  
  882. ;Note the use of the Semi-Colon to tell the compiler to ignore this line.
  883. ;This is the Random Encounter script included with iMMortal
  884. ;Cause iMMortal To Initiate a random encounter
  885. attack
  886. quit
  887.  
  888. ;DeaD Label iMMortal Jumps here if player is Killed during Attack Command
  889. :DEAD
  890. quit
  891.  
  892. ;RunAway Label iMMortal Jumps here if players is Killed during Attack Command
  893. :RUNAWAY
  894. changecolor 12 0
  895. writeln "      What A Wimp!"
  896. goto pressenter
  897. quit
  898.  
  899.  
  900. ;Press Enter Loop
  901. :pressenter
  902. changecolor 2 0
  903. writeln " "
  904. write  "      Press "
  905. changecolor 13 0
  906. write "["
  907. changecolor 15 0
  908. write "Enter"
  909. changecolor 13 0
  910. write "] "
  911. changecolor 2 0
  912. write "To Continue "
  913. waitenter
  914. return
  915.  
  916.  
  917. Enjoy!
  918.