Skip to content
RubenatorX edited this page May 29, 2020 · 11 revisions

This library handles command registration for use from within the FFXI chat log or the Windower console.

localcommand=require('core.command')

✔️ Dependency Not Required

This library does not require an explicit dependency in the manifest.xml file for your package.

Tables

The command table has the following entries:


command.input

Inputs the given command to FFXI's internal command handler.

Definition

functioncommand.input(command : string,source : command_source='user')

Parameters

commandstring

The string to input.

sourcecommand_source [default: user]

Indicates the source of the command.

Return

This function does not return any values.



command.new

Creates a new command object, which can then be used to register functions to execute based on given sub-commands.

Definition

functioncommand.new(name : string) : command_object

Parameters

namestring

The name of the command. Will be used as the command prefix when entering commands, e.g. when using test as the name, the command can be triggered by typing /test ... into the console or chat log.

Return

command_objectcommand_object

The command object associated with the specified name. Can be used to register functions to specific commands.



command.delete

Deletes a previously created command, removing all its registered sub-commands and their handlers.

functioncommand.delete(command_object : command_object)

Parameters

command_objectcommand_object

The command object which was previously returned by command.new.

Return

This function does not return any values.

Clone this wiki locally