UOX3 Script Engine

API and Event handling

Speech Related Methods

SysMessage
Prototype
void SysMessage( string message );
PurposeSends a string as a sysmessage
Example of Usage
mySock.SysMessage( "Isn't the world great?" );

 

TextMessage
Prototype
void TextMessage( message );
void TextMessage( message, allHear, txtHue );
void TextMessage( message, allHear, txtHue, speechTarget, speechTargetSerial, speechFontType );
PurposeCauses the object to say a message.

The function has 5 extra optional arguments (if including an optional parameter, make sure to also include the preceding argument):
allHear (broadcast true/false)
txtHue (colour of the text sent to the client)
speechTarget (intended target of message. 0 = only visible to sender and receiver, 1 = visible to all players in range, 2 = visible to all NPCs and players in range, 3 = visible to all PCs everywhere + NPCs in range, 4 = visible to all PCs everywhere (broadcast), 5 = only visible to receiver)
speechTargetSerial (serial of the receiver of the message, used if speechTarget is 0 or 5)
speechFontType (type of font to use. Defaults to normal. 0 = bold, 1 = normal with shadow, 2 = bold with shadow, 3 = normal, 4 = gothic, 5 = italic, 6 = small and dark, 7 = colourful, 8 = runic (only works with CAPS), 9 = small and light)
Example of Usage
myChar.TextMessage( "Hello world!" );
myChar.TextMessage( "Public, ice-coloured message sent to everyone as if I said it.", true, 0x0480 );
myChar.TextMessage( "Private, ice-coloured message just for me!", false, 0x0480 ); myItem.TextMessage( "This is a private message from an item to a character!", false, 0, 0, myChar.serial ); myItem.TextMessage( "THIS IS A MESSAGE IN RUNIC LETTERS VISIBLE TO ALL", true, 0, 3, null, 8 );

 

EmoteMessage
Prototype
void EmoteMessage( string message );
PurposeCauses a Char to emote message. Note that you need to manually put in the start and end *
Example of Usage
myChar.EmoteMessage( "*look around*" );

 

YellMessage
Prototype
void YellMessage( string message );
PurposeCauses the char to yell message.
Example of Usage
myChar.YellMessage( "Yeehaa!" );

 

WhisperMessage
Prototype
void WhisperMessage( string message );
PurposeCauses the Char to whisper message.
Example of Usage
myChar.WhisperMessage( "He you, i've got something for you!" );

 

Speech Related Functions

GetDictionaryEntry
Prototype
string GetDictionaryEntry( entryNum [, language ] );
PurposePulls entry from the dictionary file based on language (or default).
Example of Usage
var textString = GetDictionaryEntry( 1, socket.Language );

 

BroadcastMessage
Prototype
void BroadcastMessage( string toSend );
PurposeSends toSend to every client in the world
Example of Usage
BroadcastMessage( "You're all going to die a hideous and painful death" );

 

ConsoleMessage
Prototype
void ConsoleMessage( string toSend );
PurposePrints out a string to the server console
Example of Usage
ConsoleMessage( "Isn't the world great?" );

 

Yell
Prototype
void Yell( socket, string message, commandlevel );
PurposeGlobally sends the message to anyone matching the provided commandlevel
Example of Usage
Yell( pSock, "Isn't the world great?", 2 );
©Copyright 2000-2001 WWW.UOX3.NET (Daniel Stratton/Matthew Randall)