Scripts are parsed bytewise.
Commands
Opcode
|
argument length (byte)
|
Function
|
0x00
|
3
|
Jump to 24byte offset
Offset
|
Length
|
Name
|
0
|
3
|
Script offset
|
|
0x01
|
1
|
Unknown
|
0x02
|
2
|
Setup a loop
Offset
|
Length
|
Name
|
0
|
2
|
Loop count
|
|
0x03
|
1
|
Execute loop
|
0x04
|
4
|
Unknown
|
0x07
|
2
|
Set event flag
Offset
|
Length
|
Name
|
0
|
1
|
Flag
|
1
|
1
|
Value
|
|
0x08
|
1
|
Unknown
|
0x09
|
4
|
Unknown
|
0x14
|
8
|
Port player
Offset
|
Length
|
Name
|
0
|
2
|
Map ID
|
2
|
2
|
Map X
|
4
|
2
|
Map Y
|
6
|
2
|
Unknown
|
|
0x1A
|
11
|
Display choice dialog
Offset
|
Length
|
Name
|
0
|
1
|
Unknown
|
1
|
2
|
Unknown
|
3
|
2
|
Cancel option
|
5
|
2
|
First option
|
7
|
2
|
Second option
|
9
|
2
|
Third option
|
|