• 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

Question - Question with developing scripts on here

Joined
Jul 17, 2022
RedCents
212¢
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