• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Lua - No Lua access to MQ2 Global Variables

Joined
Dec 21, 2020
RedCents
30¢
Within Lua, mq.TLO.Macro.Variable('macro_variable_name')() exposes an outer MQ2DataVar, but not a global variable. Can the global variables please also be exposed because it forces a macro to be running at all times (and not changed) in order to carry variables to exchange data between peers? Since global variables persist beyond a given macro, Lua scripts could communicate independently of whatever macro happens to be running at the time.
 
We don’t have a bug report for this and I wasn’t aware this was an issue. Can you give an example?
 
We don’t have a bug report for this and I wasn’t aware this was an issue. Can you give an example?
from any Lua script

mq.cmd('/declare myVarName int global 99')
val = mq.TLO.Macro.Variable('myVarName')()

this returns val as nil.

However, if you have a macro running then

mq.cmd('/declare myVarName int outer 99')
val = mq.TLO.Macro.Variable('myVarName')()

will return 99 for val.
 
Lua - No Lua access to MQ2 Global Variables

Users who are viewing this thread

Back
Top
Cart