General Notes

Right now, the language is relatively primitive. Still, it provides everything you need.
&& and || operators are supported.
Preincrement/decrement is not supported.
Post increment is supported in standalone statements (i.e. score++); The following relational operators are supported: ==, !=, <=, >=
+= , -= , *= , and /= are supported.
There is no looping construct, but you don't really need one.
Variable are single unsigned bytes (0-255).
Comments with the // are supported. C-style comments aren't.

Amazingly, this seems to be enough to get a game working.

object attributes:

The following attributes can be tested or set in code:
 holder - the id of the object's parent (the parent being the room/container/supporter that has that object).
 description - the object's description. Example: "The wrench is old and rusty."
 intial_description - how the object is listed in the room. Example: A rusting wrench lies on the floor.
 n, s, e, w, ne, se, nw, sw, up, down, in, out - You might change these if your game layout changes at run time.
 mass - used to limit how much the player can carry.

object properties:

The following properties can be set to 0 or 1:
 portable
 openable
 open
 container - can you put things in it?
 supporter - can you put things on it?
 lit (or emittinglight)
 wearable
 beingworn
 lockable
 locked

 scenery - is this item explicitly listed when in a room?

There are three properties that are available for you to use however you see fit.
user1
user2
user3

built-in functions:


Output
print("some text"); //prints text
println("some text"); //prints text followed by a new line
printcr(); //prints a carriage return; Note: String concatenation is not supported.

Game Actions
look(); print room description
move(); move the player in the direction the player was trying to go

Random Numbers
rand(some number); creates a number between 0 and some number

Calling Functions
Any function you've created can be called using C syntax.

Variables

Variables are declared on the Variable tab in the Lantern, rather than in the code itself.
Variables are global, unsigned bytes (0-255).
Several commonly used variables are built-into the game:
 score
 moves
 health
 turnsWithoutLight
 dobj (the first noun in the sentence)
 iobj (the second noun in the sentence)

Examples

The following snippet would set the description of an object called lamp based on whether it is lit or not.
Putting this code in an Event would make it run after every turn.

if (lamp.lit == 1)
{
  lamp.description = "The lamp is glowing.";
}
else
{
  lamp.description = "The lamp is off.";
}
Since multiple objects can have the same name, use the Id Name when referring to an object in code.
Back to Table of Contents