Open new window
Last update:

OasisOLC and Deaths Gate script reference

Script expressions

A false expression is any expression that evaluates to 0, or an empty string.
A true expression is any expression that evaluates to anything other than a false expression. The following list are the recognized operators. The higher the operator is on the list, the higher the precedence. The expression is evaluated from left to right. Parenthesis can be used to group.

Operator Name Examples
|| logical or 0 || ( ) = 0; 5 || 0 = 1
&& logical and
1 && 0 = 0; 5 && 3 = 1
== equivalence 5 == 3 = 0; dog == DoG = 1
!= inequality 0 != Z = 0; dog != d = 1
< less than 4 < 3 = 0; 4 < 5 = 1
> greater than 4 > 3 = 1; 4 > 4 = 0
<= less than or equal 4 <= 3 = 0; 4 <= 5 = 1
>= greater than or equal 4 >= 3 = 1; 4 >= 4 = 1
/= substring

"concatenate" /= "cat" = 1
"cat" /= "concatenate" = 0
Should be read like 'x contains substring y'

* multiplication 10 * 20 = 400
/ division 100 / 20 = 5
- subtraction 15 - 10 = 5
+ addition 10 + 15 = 25
! negation !() = 1; !0 = 1; !dog = 0;
© 2005 Thomas Arp (Welcor). All rights reserved.