• 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

Discussion - Getting started with scripts

amk92

New member
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
Cart