-
Notifications
You must be signed in to change notification settings - Fork 79
/
Readme.txt
85 lines (44 loc) · 2.56 KB
/
Readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Interface
=========
Reserved.
Scripting
=========
The script engine used is called ScriptDotNet, also known as S#.
Information regarding the syntax of S# itself can be found at http://www.protsyk.com/scriptdotnet/
Functions defined below follow a simple syntax: <return type> <function name>(<parameters>)
Scripts have only one object exposed to them named ScriptAPI.
All of the following functions are called from the context of ScriptAPI, IE: ScriptAPI.AddByte("Example");
byte AddByte(string name)
Adds unsigned byte as a field with given name to the structure view, and returns the value.
sbyte AddSByte(string name)
Adds signed byte as a field with given name to the structure view, and returns the value.
ushort AddUShort(string name)
Adds unsigned short as a field with given name to the structure view, and returns the value.
short AddShort(string name)
Adds signed short as a field with given name to the structure view, and returns the value.
uint AddUInt(string name)
Adds unsigned int as a field with given name to the structure view, and returns the value.
int AddInt(string name)
Adds signed int as a field with given name to the structure view, and returns the value.
float AddFloat(string name)
Adds 4 byte float as a field with given name to the structure view, and returns the value.
double AddDouble(string name)
Adds 4 byte double as a field with given name to the structure view, and returns the value.
bool AddBool(string name)
Adds 1 byte bool as a field with given name to the structure view, and returns the value (false when byte is 0, true when byte is 1).
long AddLong(string name)
Adds signed long as a field with given name to the structure view, and returns the value.
double AddDouble(string name)
Adds 8 byte double float as a field with given name to the structure view, and returns the value.
string AddPaddedString(string name, int length)
Adds fixed length string as a field with given name and length to the structure view, and returns the value.
void AddField(string name, int length)
Adds a field with given name and length to the structure view, and returns nothing.
void StartNode(string name)
Adds a sub node with given name as the new parent until required matching EndNode, and returns nothing.
void EndNode(bool expand)
Completes the last StartNode, expanding contents if expand is true, and returns nothing.
void Write(string file, string line)
Appends the given line of text to the given file, and returns nothing.
int Remaining()
Returns the number of bytes remaining unprocessed in the packet.