Special Purpose Commands

Points

A points command must be followed by a single integer indicating the number of points to be awarded. The awarded points will be added to the variable SCORE.

If the notify directive has been set in the jacl.conf file, the following message will be displayed:

     [YOUR SCORE JUST WENT UP BY n POINTS]

Proxy

Any proxy command must be of the following format:


     proxy move

The proxy command is used to issue an in-game move as though it was typed by the player. The specified move may consist of multiple parameters, built up from plain text, item labels or item pointers. When the in-game move is issued, all the normal testing will take place and all usual messages will be displayed. The most common use for the proxy command is to translate one command into another similar command. For example, sometimes two different commands can be mapped to the same function:

     grammar put *held in *here >insert
     grammar insert *held in *here  >insert

With the above two grammar statments only the verb is different, so mapping them to the same function is possible. In some situations, however, this is not possible as the nouns appear in a different order. Below is an example of how the proxy command can save the day:

     grammar look at *here through *held >look_at_through

     {+look_at_through

     ;main function code tied to this syntax

     }

     grammar look through *held at *here >look_through_at

     {+look_through_at
     proxy "look at " noun2 " through " noun1 ; This will cause
                                              ; the alternate
                                              ; syntax to be used
     }

As you can see, when the second syntax is used, a proxy command is executed. This issues a command on the player's behalf that matches the first syntax, therefore arriving at the main function with noun1 and noun2 pointing to the correct objects. Below is an example of another way to solve this problem:
Don't forget to put spaces before and after any item labels or pointers referred to in a proxy command.

     grammar look at *here through *held >look_at_through

     {+look_at_through

     ;main function code tied to this syntax

     }

     grammar look through *held at *here >look_through_at

     {+look_through_at
     set noun3 = noun1
     set noun1 = noun2
     set noun2 = noun3
     execute "+look_at_through"
     }

In this case, the object pointers noun1 and noun2 are directly manipulated, then the function to handle the player's move is explicitly called.

Endgame

The endgame command will cause the TACL interpreter to present the player with the following prompt and options:

   Please type S to start again, R to restore, U to undo or Q to quit
   >

The endgame command is normally used when the player has either died or won the game.

This command is completely ignored by the JACL interpreter, as there is no program for the player to exit from (over than the browser). For this reason the game is normally ended by calling the library function +game_over, which contains an endgame command in addition to code specific to ending a web-based game.

Terminate

The terminate command will cause the TACL interpreter to exit immediately. It is of little use in TACL, and completely ignored by the JACL interpreter.