UOX3 Script Engine

API and Event handling

Socket Related Functions

GetString
Prototype
string GetString( socket, offset [, len] );
PurposeReturn a string from a socket at offset with optional length len
Example of Usage
var sName = GetString( sock, 0 );

 

GetByte
Prototype
unsigned char GetByte( socket, offset );
PurposeReturn a byte from a socket at offset
Example of Usage
var cName = GetByte( sock, 0 );

 

GetWord
Prototype
unsigned short GetWord( socket, offset );
PurposeReturn a 16bit word from a socket at offset
Example of Usage
var cName = GetWord( sock, 0 );

 

GetDWord
Prototype
long GetDWord( socket, offset );
PurposeReturn a 32bit word from a socket at offset
Example of Usage
var cName = GetDWord( sock, 0 );

 

CreateBuffer
Prototype
BUFID CreateBuffer( len );
PurposeCreates a buffer of length len
Example of Usage
var buf = CreateBuffer( 24 );

 

DestroyBuffer
Prototype
DestroyBuffer( buffer );
PurposeDestroys memory allocated with CreateBuffer
Example of Usage
DestroyBuffer( buf );

 

SendBuffer
Prototype
SendBuffer( socket, bufferID );
PurposeSends buffer bufferID to socket
Example of Usage
SendBuffer( sock, buf );

 

SetByte
Prototype
SetByte( socket, offset, value );
PurposeSets the byte at offset for socket to value
Example of Usage
SetByte( sock, 0, 64 );

 

SetWord
Prototype
SetWord( socket, offset, value );
PurposeSets the 16bit word at offset for socket to value
Example of Usage
SetWord( sock, 0, 0164 );

 

SetDWord
Prototype
SetDWord( socket, offset, value );
PurposeSets the 32bit word at offset for socket to value
Example of Usage
SetDWord( sock, 0, 01640164 );

 

SetString
Prototype
SetString( socket, offset, value );
PurposeSets the string at offset for socket to value
Example of Usage
SetString( sock, 0, "Die!" );

 

ReadBytes
Prototype
ReadBytes( socket, bytecount );
PurposeReads bytecount bytes from socket
Example of Usage
ReadBytes( sock, 12 );

 

RegisterPacketHandler
Prototype
Purpose
Example of Usage

 

UnregisterPacketHandler
Prototype
Purpose
Example of Usage
©Copyright 2000-2001 WWW.UOX3.NET (Daniel Stratton/Matthew Randall)