• 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

VSCode Function Mapping for .mac and .inc files

Here is a short guide for building a function list is VSCode that scans macro and include files for lines that start with 'Sub'. It then creates a context map which shows a list of all subs in the file and allows you to click on individual subs to jump to their location in the file.

1) Download the CodeMap extension.
1593719640359.png
2) Keypress Ctrl+Shift+P
3) Search for 'Preferences: Open Settings (JSON)'
4) add the following snippet to that settings.json file inside the curly brackets { }
INI:
"codemap.location": "explorer",
    "codemap.mac": [
        {
          "pattern": "^\\s*(Sub|sub) \\w*\\s*\(([^\)]*)\)",
          "clear": "Sub ",
          "icon": "function"
        }
    ],
    "codemap.inc": [
        {
          "pattern": "^\\s*(Sub|sub) \\w*\\s*\(([^\)]*)\)",
          "clear": "Sub ",
          "icon": "function"
        }
    ]
5) Enjoy the function jumping.
1593722788968.png
 

Attachments

  • 1593719821314.png
    1593719821314.png
    7.6 KB · Views: 16
Last edited:
Yeap. That syntax highlighting is great, but if anyone is up for it it could use some updating and possible extension for full language support.
 
Yeap. That syntax highlighting is great, but if anyone is up for it it could use some updating and possible extension for full language support.

I'm no regex master but I made several updates to the .tmlLanguage file. At least enough to make my scripts look like less of a crime scene. I dunno if he's accepting PRs for updates but I've attached it if anyone wants to take a stab.

(Extract into \.vscode\extensions\dewaynejohnsonbaugh.vscodemq2-0.7.0\syntaxes\)
 

Attachments

Nicely done!

Syntax highlighting working pretty well (way better than NP++)

Now curious why some commands are red - ie those are not recognized as valid MQ2:

/alt activate <- activate is red
/dzquit
/doortarget
/click left door <- door is red
/end <- well this being red would make sense

also MQ2Nav and MQ2AdvPath commands are red but that is to be expected
 
If you add "codemap.sortingEnabled": true, it will sort the names alphabetically.
If you use "codemap.location": "codemap", instead of explorer it put its in another window with a dedicated icon to click

JavaScript:
    "codemap.location": "codemap",
    "codemap.sortingEnabled": true,
    "codemap.mac": [
        {
          "pattern": "^\\s*(Sub|sub) \\w*\\s*\(([^\)]*)\)",
          "clear": "Sub ",
          "icon": "function"
        }
    ],
    "codemap.inc": [
        {
          "pattern": "^\\s*(Sub|sub) \\w*\\s*\(([^\)]*)\)",
          "clear": "Sub ",
          "icon": "function"
        }
    ]

vscode.png
 
Last edited by a moderator:
VSCode Function Mapping for .mac and .inc files

Users who are viewing this thread

Back
Top
Cart