• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

Question - What is the best way to initialize a variable when logging in?

Taoden

Active member
I want to define a couple of global variables as soon as my character logs in. I tried using MQ2Events with a “Welcome to EverQuest!” trigger but for some reason that is not working properly.

I can probably accomplish this with some sort of MQ2React condition that checks something silly that will always be true, but that feels dirty.

Is there a recommended way to define custom variables when you login?
 
Last edited:
For starters we need to know what you're using to code these variables.
Macro?
Plugin?
Lua?

People will be able to better assist you with all the information needed.
For example, I could tell you that you could achieve this with a plugin using the gamestate and any number of the built in exported functions used for creating a plugin. But if you're writing stuff in Lua someone else would likely be able to better assist you. If you're using a macro I could tell you to try Lua or a plugin instead because while macros work, it's just not a real language and you'd be doing yourself a bit of a disservice starting with them as a learning tool when Lua is available.

Likely you'll be able to achieve it with a .cfg file. https://docs.macroquest.org/main/features/cfg-files/?h=cfg

But honestly it depends on what your goal is making the variable.
 
I am using two variables to store Boolean values that will be set by triggers in MQ2Events and read by triggers in MQ2React.

I have everything working as intended with the exception of initializing the variables.

It looks like the CFG files you linked to are probably the way to go. I will experiment with that. Thanks.
 
Question - What is the best way to initialize a variable when logging in?

Users who are viewing this thread

Back
Top
Cart