• 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 - Question with developing scripts on here

RCgaming10377

Active member
Hello, Me again. I have been learning Lua and feel like I have a pretty well understanding of Lua now and would like to start building my own custom scripts for me and others to use. I am just wondering how I can get started with developing scripts that work with MQ!
 
Hello, Me again. I have been learning Lua and feel like I have a pretty well understanding of Lua now and would like to start building my own custom scripts for me and others to use. I am just wondering how I can get started with developing scripts that work with MQ!
Here is the link to Lua.org
Convert macro stuff to Lua stuff?

Lua is the recommended route for *most* things these days, unlike the old macroquest macro language it is a #RealLanguage which means it comes with a bunch of functions and features automatically, things that macro language doesn't.

the above links will get you started with Lua, and show you some "Lua in MQ" stuff as well as help you convert something if that is what you wanted to do.
Since you've already gotten an understanding of Lua, you will be able to get doing cool stuff pretty immediately.

many script writers get their start by seeing how other things are done and modifying or expanding on them.

the macroquest docs will help you out a ton - book mark it - this will help you decide what to apply your Lua knowledge to from macroquest to do what you want

one of the biggest things folks new to Lua/MQ have is forgetting that you need () on the end of things that you want the information from.

Here is a thing that @kaen01 often shares for people who are looking to get the barebones structure of an imgui window displaying in Lua
Lua:
mq = require('mq')
require 'ImGui'

local Open,ShowUI = true, true

local function buildSimpleWindow()
    ImGui.Text('%s',  mq.TLO.Me.Name())
    ImGui.Separator();
    ImGui.Text('%s',  mq.TLO.Me.Class.ShortName())
end

local function simpleWindow()
    Open, ShowUI = ImGui.Begin('Simple Window', Open)
    if ShowUI then
        buildSimpleWindow()
    end
    ImGui.End()
end

mq.imgui.init('simplewindow', simpleWindow)

while Open do
    mq.delay(1000)
end
 
The Lua Event Manager LEM gives a nice framework to start creating situational events.
the benefit of LEM is, you don‘t need to create a potenially complex full working app, but can start creating additional functionallity to already existing automation solutions.
i started myself reading existing Lem-events available in the thread Lua Event Manager library
Using a working Event as a starting point. I cleaned out the functions of this working event and used this tempate to create my own events.

once you know what you want to achieve its mainly getting used to the necessary syntax, in order to get your own events running.
 
Question - Question with developing scripts on here

Users who are viewing this thread

Back
Top
Cart