===== Functions =====
Functions are defined in your script as shown in this example:
Function IsItemASword( $itemNum )
{
if ( $itemNum = 112 ) // Sword
{
return( 1 )
}
else if ( $itemNum = 113 ) // Sword 2
{
return( 1 )
}
return( 0 )
}
This example function would be called from another part of your script like this:
$isSword = IsItemASword( $gTaskItem1 )
Functions can have any number of parameters, and always return a value.