• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Discussion - Getting started with scripts (1 Viewer)

Joined
Oct 29, 2023
RedCents
10¢
Hi there,

I'm looking to begin writing my own custom scripts for MQ

These scripts would be akin to KissAssist (for example, I want to write my own custom script to automate the behaviour of a wizard)

Would I write these as Plugins or LuaScripts?

Forgive the newb question; is there any developer documentation for both approaches (what MQ2 APIs can I interact with?) and if so, would I need to upgrade my membership level to see these?


Cheers!
 
Hi there,

I'm looking to begin writing my own custom scripts for MQ

These scripts would be akin to KissAssist (for example, I want to write my own custom script to automate the behaviour of a wizard)

Would I write these as Plugins or LuaScripts?

Forgive the newb question; is there any developer documentation for both approaches (what MQ2 APIs can I interact with?) and if so, would I need to upgrade my membership level to see these?


Cheers!
Docs.macroquest.org is the place to start
 
You’re a rockstar, thanks bud!
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
 
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
Fortunately my editor of choice is Neovim, so being able to use Lua for this sounds great.

Thanks again, this is really useful 👌
 
Discussion - Getting started with scripts

Users who are viewing this thread

Back
Top