This is the structure for an unencoded script file, you can extract a script file from the RESOURCE.* files with the SCI Decoder disponible on Baf's page (look at the links section).
Script structure :
1st two bytes : 82h 00h
They seem to always have these values.
3rd byte : Start of the first script block.
Script block structure :
1st two bytes : Block type
Type range from 0 to 10.
(1=Object, 2=Code, 5=Strings, 8=Pointers to strings)
2nd two bytes : Length of block
Total block size, starting from the first byte
5th byte : Start of block data
Rem.: There's no index to the script blocks, the blocks are chained, you need to calculate their positions by starting with the first one, adding its length to the pointer, then reading the second one, etc.
You can look at my C++ program that display the code section of a
script file :
scr_code.cpp