This page lists Windower-specific functions available through Lua. All of them are restricted to the
windower table and will be accessed through it. The following is a listing for all available functions directly inside the
windower table. For further nested packets, see one of these pages:
- FFXI - FFXI-related functions
- Text - Functions that create and modify text objects
- Prim - Functions that create and modify image primitives
- Packets - Functions that inject packets
- Regex - Regex related functions
- Console - Functions regarding the Windower console
- Chat - Functions regarding the FFXI chat input
An honorable mention go to
Furthermore, two functions are added to the
cothread - Coroutine to be closed
This will close the provided coroutine
co, preventing it from executing again. This is needed to terminate coroutine loops and is the only way to close them from outside the coroutine. A closed coroutine can not be resumed again.
fnfunction - Function to be scheduled
timenumber - Time in seconds when
fnis supposed to be run
fn delayed by
time seconds. Returns the scheduled coroutine.
timenumber - Time in seconds
Sleeps the current evaluation for the given period of time.
This table contains all Windower-specific functions.
modeinteger - Chatmode to use.
msgstring - Message to write. This function outputs to the chatlog. The chatmode argument roughly corresponds to color; take a look at the spellcast color test XML to see what these values look like.
pathstring - The path to the folder Creates the final directory in the path. Will throw an error (return false and an error message) if one of the middle directories does not exist.
strstring - Input string optionally containing auto-translated blocks
Removes all auto-translate formatting, if present, from the input string.
strstring - String to copy
Copies the provided string to the clipboard for use outside of FFXI (or to paste into the chatlog/console).
...any - Any number/type of arguments to be printed
Prints all its arguments to the debug lock, prepended by the thread ID and addon name.
pathstring - The path to the folder
Checks if the path is a valid directory address. Returns true or false.
filestring - The path to the file
argumentstable - List of arguments to pass
Executes a file on the system. Activity remains on the current window.
pathstring - The path to the file
Checks if the path is a valid file address. Returns true or false.
strstring - Input string optionally containing
%-variables Takes a string and replaces all occurrences of
strstring - The string to convert
Converts a Shift_JIS (FFXI flavor) string to a UTF-8 string used by addons and Windower in general (including the provided resources). This will rarely need to be used, as text read from the chatlog is already translated to UTF-8 before being passed to the incoming and outgoing text events.
pathstring - The path to the directory
Returns a table containing all files and directories within one directory.
Returns a string containing the contents of the clipboard, if applicable, otherwise returns nil.
Returns the currently set ingame chat filters.
Returns a table of the user's Windower settings. The structure is as follows:
urlstring - URL to open. This function opens a URL in the default browser. Similar to chatmon, it suffers the same limitation of some incompatibility, particularly with Firefox.
pathstring - The path to the file Plays a sound at the specified file path. Currently, .wav is the only accepted format.
name*x*string - Event name
fnfunction - Function to execute whenever the event is triggered Registers a function to execute whenever an event triggers. If multiple names are provided, one function will be assigned to all those events.
Returns the IDs of registered functions, which can be used to unregister them again (see below).
strstring - Command to send. This function is used to send a command to Windower. This command is treated as if it were entered into the windower console, so no
//prefix is necessary.
msgstring - Message to send. This function sends an IPC message to all other Windower instances that have the same addon loaded. This message is handled by the
idinteger - ID of the mob
namestring - New name to set for the mob This function changes the name of a mob to the string you specify. Can cause crashes. Beware.
strstring - The string to convert
Converts a UTF-8 string (default assumed for all addon files) to a Shift_JIS (FFXI flavor) string used by FFXI. This should be used every time non-ASCII characters are supposed to be output to the chatlog.
id*x*integer - ID of the event to unregister Stops a function from being executed by an event. The ID of the function is returned on registering the it with
strstring - Input string to match
patternstring - Pattern to match against Returns true if
pattern. Allowed tokens:
?matches any one character
*matches arbitrary many characters
|alternation, matches either the left of it or the right of it
This table also contains the following variables:
- Path to the current Windower installation (includes final slash)
- Path to the currently loaded addon directory (includes final slash)
- Path to playonline and ffxi install directory (includes final slash)