The script commands are documented as part of the official mapper documentation. They are sparse, just a list of commands with no examples. But the script source code from FO2 is also included with the mapper. So one of the best ways to understand scripts is look at them. And look here.