img



img

Lua Invoke


By: _ForgeUser2337663
Addon | img 2,642




Description

___________________________________________________________________________________________________________________________

Does exactly what it says on the box.

Adds a /lua command which allows you to execute Lua code on the fly from the chat box.
This lets you do things like use Lua for quick calculations or access parts of the Addon API.

For example;
/lua return 16 * 2048
/lua Print(Apollo.GetString("ChatLog_MultiJournal"))
/lua s = {"This", " is ", "neat!"}; return unpack(s)

  • Output gets sent to the Debug channel.
  • Compile and Runtime errors are all caught and appropriate error messages are output to debug. No addon errors should occur.
  • Supports multiple return values.
  • Return values are converted using tostring to attempt to output useful information.
  • Stack tracing can be toggled using /lua trace (or /luatrace). Disabled by default.

This is offered as an alternative to the /eval command, not a replacement. Output should be cleaner, displayed along with the input that generated it, and faster to output values to the chat window. Stack trace info is only displayed if it is toggled on.

If you are a looking for a more feature-rich package, take a look at GeminiConsole over on the Wildstar forums or from wildstarnasa's git repository. It ties in with the rest of the Gemini package and offers integration with their GeminiLogging addon, along with features like multi-line input, partial chunk evaluation and expression inspection.

Feel free to use this however you like. If for whatever reason you use any portion of this code in your own project, credit in a comment of your source would be nice, but I won't hold you to it. :)




About Project

Created: December 14th 2023

Updated: December 14th 2023

Project ID: 17603

License: All Rights Reserved

__________________________________________

Game Versions:

1.01.03

1.01.03

1.01.03

1.01.03

1.01.03

__________________________________________

Flavors:

WoW Retail

__________________________________________

Categories

Companions

Battle

__________________________________________

Main File

_ForgeUser2337663_Lua Invoke.zip
  • Release
  • December 14th 2023

    __________________________________________

    Recent File

    _ForgeUser2337663_Lua Invoke.zip
  • Release
  • December 14th 2023

    __________________________________________

    Members

    img
    _ForgeUser2337663
    Owner

    __________________________________________

    Report