UOX3 Script Engine

API and Event handling

Console Related Methods

Print
Prototype
void Print( string );
Purpose Note: Include \n at the end of the string unless you're sending multiple messages
Example of Usage
console.Print( "Hello World!\n" );
Log
Prototype
void Log( logMsg );
void Log( logMsg, filename );
Purpose Logs a message either in default log file or in specified file. Note: Include \n at the end of the string unless you're sending multiple messages
Optional second parameter is the name of the file to log the message into
Example of Usage
console.Log( "Logging a custom message to default logfile!" );
console.Log( "Logging a custom message to a specific logfile!", "myCustomLogFile.log" );
Error
Prototype
void Error( errorMsg );
PurposeLogs an error-message in default error log file
Example of Usage
console.Error( "I found an error, and I'm logging it!" );
Warning
Prototype
void Warning( warningMsg );
PurposeLogs a warning-message in default log file
Example of Usage
console.Warning( "Logging a warning message!" );
PrintSectionBegin
Prototype
void PrintSectionBegin();
PurposePrints a section separator in the console
Example of Usage
console.PrintSectionBegin();
TurnYellow
Prototype
void TurnYellow();
PurposeActivates yellow text in console
Example of Usage
console.TurnYellow();
TurnRed
Prototype
void TurnRed();
PurposeActivates red text in console
Example of Usage
console.TurnRed();
TurnGreen
Prototype
void TurnGreen();
PurposeActivates green text in console
Example of Usage
console.TurnGreen();
TurnBlue
Prototype
void TurnBlue();
PurposeActivates blue text in console
Example of Usage
TurnBlue();
TurnNormal
Prototype
void TurnNormal();
PurposeActivates normal text in console
Example of Usage
console.TurnNormal();
TurnBrightWhite
Prototype
void TurnBrightWhite();
PurposeActivates bright white text in console
Example of Usage
console.TurnBrightWhite();
PrintDone
Prototype
void PrintDone();
void PrintDone( bool );
PurposePrints colored [done] message in console
Example of Usage
console.PrintDone();
PrintFailed
Prototype
void PrintFailed();
void PrintFailed( bool);
PurposePrints colored [failed] message in console
Example of Usage
console.PrintFailed();
PrintPassed
Prototype
void PrintPassed();
void PrintPassed( bool );
PurposePrints colored [skipped] message in console
Example of Usage
console.PrintPassed();
ClearScreen
Prototype
void ClearScreen()
Purpose Clear the console screen
Example of Usage
console.ClearScreen();
PrintBasedOnVal
Prototype
void PrintBasedOnVal( boolean );
Purpose Prints [done] or [failed] based on provided boolean (true/false)
Example of Usage
console.PrintBasedOnVal( true );
MoveTo
Prototype
void MoveTo( x, y );
Purpose Moves console cursor position to specified x, y location. If you want the same line, y == -1
Example of Usage
console.MoveTo( 100, 100 );
PrintSpecial
Prototype
void PrintSpecial( textColour, string );
PurposePrints a special tag in console similar to [done] and [failed], but with custom text and colour Available colours: 0 - Normal 1 - Blue 2 - Red 3 - Green 4 - Yellow 5 - Bright White
Example of Usage
console.PrintSpecial( 3, "Success" );
BeginShutDown
Prototype
void BeginShutdown();
Purpose Start the UOX3 shutdown sequence
Example of Usage
console.BeginShutdown();
Reload
Prototype
void Reload( reloadType )
Purpose

Reloads server data from console. Available reload types:
0 Reload INI
1 Reload Accounts
2 Reload Regions
3 Reload Spawn Regions
4 Reload Spells
5 Reload Commands
6 Reload Definition Files
7 Reload JS
8 Reload HTML

Example of Usage
console.Reload( 4 ); //Reloads spells
©Copyright 2000-2001 WWW.UOX3.NET (Daniel Stratton/Matthew Randall)