Table of Contents

Script Language Syntax

The scripting language supports a limited range of the basic syntactical components that make up most similar-level programming languages

General Rules

Conditional Statements

if, else and else if are supported, for example… <codedoc>

if ( $itemNum = 112 )	
{
    *grantskill %PLAYER% Blacksmith
}
else if ( $itemNum = 113 )
{
    *grantskill %PLAYER% Scientist
}
else 
{
    *msg %PLAYER% You didnt learn anything new today
}

</codedoc>

Supported conditions inside an if or else if are:

Comments

Code comments are simple C-stylee, e.g <codedoc>

  // Check the item number
  if ( $itemNum = 112 )	
  {

*say Nothing (this line is commented out) } </codedoc> ===== Maths operators ===== Basic maths operators are supported in simple form. Compound operations are not yet supported so each line needs to be kept basic, e.g. : <codedoc> $var = $var + 1 $newvar = $var * 100 </codedoc> Currently only the 4 basic operators ( '+', '-', '/', '*' ) are supported.