From the wonderful RedGuides Wiki
Run Lua scripts in EverQuest
View details
Authors brainiac, Knightly, dannuic
Software type Plugin
Config file MQ2Lua.yaml

Maintained Yes and supported

🏠Resource (review)
🥤Quick start •🤝Support •🛠️Repository

MQ2Lua brings the Lua programming language to EverQuest. Nearly everything MacroQuest related is available through the mq namespace.


Syntax Description
/lua {run | stop | pause | info | conf | reloadconf | ps | gui | parse} [ <params> ] Controls Lua scripts and Lua settings. Detailed help for each option is available by adding "help" as a param. e.g. /lua run help


These settings are easiest to configure via the GUI (/mqsettings).

Example MQ2Lua.yaml

turboNum: 500 # number of instructions per frame
luaDir: lua # directory that holds lua scripts, relative to MQ root
showMenu: true # show the GUI
luaRequirePaths: # additional directories to look for requires, written in lua require lookup format. appends the global package.path in lua environments
  - c:\myfolder\luareqs
  - c:\otherfolder\morereqs
dllRequirePaths: # additional directories to look for c modules, written in lua require lookup format. appends the global package.cpath in lua environments
  - d:\compile\dll
infoGC: 3600000 # Garbage Collection time for ps and info output so they don't always persist in memory. default is 1 hour.
squelchStatus: false # suppress lua messages

Writing Lua scripts

If you're interested in writing a Lua script for EverQuest, there's a good tutorial here, which also covers Events and Binds as well as LuaRocks Modules.

See also

Top-Level Object(s)

TLOs added by MQ2Lua:

TLO Data Type(s) Description
Lua lua luainfo A transparent accessor to the lua datatype. It takes no index because it is a global state.

Members. More may be available if inherited. Typical usage, /echo ${TLO.Member}

TLO Data Type Return Type Member Description
Lua lua int Turbo the turbo value
luainfo Script[<PID>] the accessor to get info on individual scripts. Accepts scriptname or a PID as an index. If no index provided, it will default to the last executed script that has finished running.
string CRequirePaths the semicolon-delimited value for dll require search paths
Dir the base lua scripts directory
PIDs a comma-delimited list of integer PIDs that have info to access
RequirePaths the semicolon-delimited value for lua require search paths
luainfo int PID the PID of the running or most recently executed version of this script
ReturnCount The number of returns from the script, will be 0 if the script has not ended
string Arguments a comma delimited list of arguments passed to the script
EndTime The time the most recent execution of the script ended or NULL if the script has not ended
Name the name of the script
Path the full path of the script
Return if not indexed, a comma-delimited list of return values. Accepts an integer index to get a single return value if there is more than one
StartTime The time the most recent execution of the script was started
Status The execution status of the script