Script Functions for Calculations

You can use scripts to perform calculations. For more information, see Arithmetic Calculations in Scripts.

The following functions are available for basic arithmetic operations:

  • ADD
    Adds values

  • SUB
    Subtracts values

  • MULT

    Multiplies values

  • DIV

    Divides values

  • MOD

    Returns the remainder of a division

The following additional functions may also be useful in calculations:

  • RANDOM
    Generates a random number

  • GET_BIT
    Checks if a bit is set in a bit field