# UOX3 Script Engine

### API and Event handling

### Command related functions

ExecuteCommand
Prototype |
Purpose |
Example of Usage |

CommandLevelReq
Prototype |
    bool CommandLevelReq( cmdName );
Purpose | Returns the command level required to execute cmdName
Example of Usage |
    if( CommandLevelReq( "add" ) <= 0 )
    {
    	TextMessage( pChar, "I can execute add" );
    }

CommandExists
Prototype |
    bool CommandExists( cmdName );
Purpose | Returns true if the command cmdName exists.
Example of Usage |
    if( !CommandExists( "add" ) )
    {
    	TextMessage( pChar, "No add command" );
    }

FirstCommand
Prototype |
    string FirstCommand();
Purpose | Returns the name of the first command in the table. If nothing, it's a 0 length string.
Example of Usage |
    var iName = FirstCommand();

NextCommand
Prototype |
    string NextCommand();
Purpose | Returns the name of the next command in the table. If nothing, it's a 0 length string.
Example of Usage |
    var iName2 = NextCommand();

FinishedCommandList
Prototype |
    bool FinishedCommandList();
Purpose | Returns true if there are no more commands left in the table.
Example of Usage |
    if( !FinishedCommandList() )
    {
    	var iName2 = NextCommand();
    }

RegisterCommand
Prototype |
Purpose |
Example of Usage |

UnregisterCommand
Prototype |
Purpose |
Example of Usage |

©Copyright 2000-2001 WWW.UOX3.NET (Daniel Stratton/Matthew Randall)