├── .github └── workflows │ └── main.yml ├── .vscode └── settings.json ├── CHANGELOG.md ├── README.md ├── _Bit32.lua ├── imgui ├── imgui.lua ├── imgui_additional.lua ├── imgui_enums.lua ├── imgui_userdata.lua └── implot.lua ├── mq ├── _constants.lua ├── _datatype.lua ├── _itemlinks.lua ├── actors.lua ├── alias.lua ├── datatype │ ├── _achievement.lua │ ├── _achievementcategory.lua │ ├── _achievementmanager.lua │ ├── _achievementobjective.lua │ ├── _advlootitem.lua │ ├── _alert.lua │ ├── _alertlist.lua │ ├── _altability.lua │ ├── _argb.lua │ ├── _array.lua │ ├── _augtype.lua │ ├── _auratype.lua │ ├── _bandolier.lua │ ├── _bandolieritem.lua │ ├── _bank.lua │ ├── _body.lua │ ├── _bool.lua │ ├── _buff.lua │ ├── _cachedBuff.lua │ ├── _character.lua │ ├── _charselectlist.lua │ ├── _class.lua │ ├── _corpse.lua │ ├── _currentzone.lua │ ├── _cursorattachment.lua │ ├── _deity.lua │ ├── _dynamiczone.lua │ ├── _dzmember.lua │ ├── _dztimer.lua │ ├── _event.lua │ ├── _everquest.lua │ ├── _evolvingitem.lua │ ├── _fellowship.lua │ ├── _fellowshipmember.lua │ ├── _float.lua │ ├── _framelimiter.lua │ ├── _friends.lua │ ├── _ground.lua │ ├── _group.lua │ ├── _groupmember.lua │ ├── _heading.lua │ ├── _int.lua │ ├── _inventory.lua │ ├── _invslot.lua │ ├── _item.lua │ ├── _itemfilterdata.lua │ ├── _itemspell .lua │ ├── _keyring.lua │ ├── _keyringitem.lua │ ├── _lua.lua │ ├── _macro.lua │ ├── _macroquest.lua │ ├── _math.lua │ ├── _menu.lua │ ├── _mercenary.lua │ ├── _merchant.lua │ ├── _pet.lua │ ├── _petbuff.lua │ ├── _plugin.lua │ ├── _pointmerchant.lua │ ├── _pointmerchantitem.lua │ ├── _race.lua │ ├── _raid.lua │ ├── _raidmember.lua │ ├── _range.lua │ ├── _skill.lua │ ├── _social.lua │ ├── _solvent.lua │ ├── _spawn.lua │ ├── _spell.lua │ ├── _switch.lua │ ├── _target.lua │ ├── _task.lua │ ├── _taskmember.lua │ ├── _taskobjective.lua │ ├── _textureanimation.lua │ ├── _ticks.lua │ ├── _time.lua │ ├── _timer.lua │ ├── _timestamp.lua │ ├── _type.lua │ ├── _window.lua │ ├── _worldlocation.lua │ ├── _xtarget.lua │ └── _zone.lua ├── enum │ └── _commands.lua ├── global.lua ├── mq.lua ├── plugins │ ├── DanNet │ │ ├── _TLO.lua │ │ └── _datatypes.lua │ ├── EQBC │ │ └── _TLO.lua │ ├── MoveUtils │ │ └── _TLO.lua │ ├── NetBots │ │ ├── _TLO.lua │ │ └── _datatypes.lua │ └── Twist │ │ └── _TLO.lua └── tlo │ ├── _Achievement.lua │ ├── _AdvLoot.lua │ ├── _AdvPath.lua │ ├── _Ground.lua │ ├── _Navigation.lua │ └── _PortalSetter.lua └── zep └── zep.lua /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Release Please 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | release-please: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: google-github-actions/release-please-action@v3 13 | with: 14 | release-type: simple 15 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": false 3 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [1.1.0](https://github.com/macroquest/mq-definitions/compare/v1.0.3...v1.1.0) (2023-11-19) 4 | 5 | 6 | ### Features 7 | 8 | * add ImGuiSliderFlags ([017fd3e](https://github.com/macroquest/mq-definitions/commit/017fd3ebc9face68d8c6bbbfa6a4b82d442feda2)) 9 | * Add mq.CreateTexture ([b6a549d](https://github.com/macroquest/mq-definitions/commit/b6a549d6601e7ea40166bc750ec269073fcfd3af)) 10 | 11 | ## [1.0.3](https://github.com/macroquest/mq-definitions/compare/v1.0.2...v1.0.3) (2023-11-04) 12 | 13 | 14 | ### Bug Fixes 15 | 16 | * **spawn:** updates missing members ([fb8942e](https://github.com/macroquest/mq-definitions/commit/fb8942e9643b3121f838623cf7dd5d3c92fbd00c)) 17 | 18 | ## [1.0.2](https://github.com/macroquest/mq-definitions/compare/v1.0.1...v1.0.2) (2023-10-29) 19 | 20 | 21 | ### Bug Fixes 22 | 23 | * Fix a few item defs and add one missing ([#48](https://github.com/macroquest/mq-definitions/issues/48)) ([f720fb6](https://github.com/macroquest/mq-definitions/commit/f720fb6c33d766ff531c75c96e099be0de52f428)) 24 | 25 | ## [1.0.1](https://github.com/macroquest/mq-definitions/compare/v1.0.0...v1.0.1) (2023-04-10) 26 | 27 | 28 | ### Bug Fixes 29 | 30 | * updates buff duration to timestamp datatype ([8a2107e](https://github.com/macroquest/mq-definitions/commit/8a2107e2f23980161e3a7d38ad2a9100ff239fce)) 31 | 32 | ## 1.0.0 (2023-03-04) 33 | 34 | 35 | ### Features 36 | 37 | * added GetCurSel to window datatype ([62b613e](https://github.com/macroquest/mq-definitions/commit/62b613e53bc539dc7f4c38bedea2a99202086bb6)) 38 | * adding placeholder files for missing classes ([f3f3dea](https://github.com/macroquest/mq-definitions/commit/f3f3dea8d4ae8cfc04b4f83864ab44d4337b1de1)) 39 | * Adds Achievement TLO and assoc datamembers ([197b83d](https://github.com/macroquest/mq-definitions/commit/197b83d43dfe657018a94c36ee25fb08dec02493)) 40 | * adds advlootitem datatype ([4069106](https://github.com/macroquest/mq-definitions/commit/40691061546de770dd97fd7da7fdb05ae36f60aa)) 41 | * Adds Alert TLO and Datatypes ([c42b34e](https://github.com/macroquest/mq-definitions/commit/c42b34e4e59d5e7cad0810b3398758c3a03b5b29)) 42 | * adds aura and aug types ([43403bd](https://github.com/macroquest/mq-definitions/commit/43403bdfad1965dbf235ebcc5dba47c3aff05965)) 43 | * adds bandolier and assoc datatypes ([b8d6684](https://github.com/macroquest/mq-definitions/commit/b8d668495a628269098d661089b50bfb6a9f4632)) 44 | * adds command enums e.g. COMMANDS.beep ([fc59173](https://github.com/macroquest/mq-definitions/commit/fc59173235db02e434682ac9c53801f8f554a2ca)) 45 | * Adds correct inhertance to corpse ([40d0830](https://github.com/macroquest/mq-definitions/commit/40d08302f49f1e307bc8e09ba7d24f8f49998e29)) 46 | * adds DynamicZone TLO and datamembers ([d687729](https://github.com/macroquest/mq-definitions/commit/d6877291ae9cd196cf56f6bed07b6b2ad4707344)) 47 | * adds everquest TLO and datatype ([0d4548a](https://github.com/macroquest/mq-definitions/commit/0d4548aba47fb721b62c7cfde3d2e8135e69ae8e)) 48 | * adds itemfilterdata datatype ([dab1c95](https://github.com/macroquest/mq-definitions/commit/dab1c95ab3aab68ff24338eb3a33c0aec800e470)) 49 | * adds keyring and assoc data types ([e04e0f6](https://github.com/macroquest/mq-definitions/commit/e04e0f6c0e096d8f6be974ebba956ffb5901e274)) 50 | * Adds new Ground TLO Search form ([49b0821](https://github.com/macroquest/mq-definitions/commit/49b0821dfcbbd0ce98dfe079c96df0231b69775d)) 51 | * adds NumBagSlots on character datatype ([1c0a76f](https://github.com/macroquest/mq-definitions/commit/1c0a76fe6c1a66335f70c407c73dee5a2d0eaa7b)) 52 | * Adds ZoneBound/X/Y/Z to Character Datatype ([70fe042](https://github.com/macroquest/mq-definitions/commit/70fe042eaa909a3dcd2fab77e3726446ef1f81c8)) 53 | * corrects corpse datatype methods ([3ca4005](https://github.com/macroquest/mq-definitions/commit/3ca40052e7572ae61c524f0a461c8f5973b69ffd)) 54 | * corrects corpse TLO form ([8c07718](https://github.com/macroquest/mq-definitions/commit/8c077183d0a7784c024b5b66bbab660a63d1725c)) 55 | * updated def and description for math.distance ([7e8ed19](https://github.com/macroquest/mq-definitions/commit/7e8ed199aa5ff26ccb6ec4daf0369d5611e8a152)) 56 | * updates corpse and cursor ([8d1e0a5](https://github.com/macroquest/mq-definitions/commit/8d1e0a52fd446d3580771ade1eb18eeb0d39a207)) 57 | * updates item w/members returning augtype and auratype ([2d796d7](https://github.com/macroquest/mq-definitions/commit/2d796d7f8713b7b0eeb5c9ee41a49b508018472e)) 58 | 59 | 60 | ### Bug Fixes 61 | 62 | * adds additional sig to setwindowpos ([#36](https://github.com/macroquest/mq-definitions/issues/36)) ([6a75c28](https://github.com/macroquest/mq-definitions/commit/6a75c28b2bb147ab44a5b4be71f9754019fc2993)) 63 | * adds missing fields and corrects inheritance ([245217f](https://github.com/macroquest/mq-definitions/commit/245217f4c8fc37ab4611d05f41504bc79347db3b)) 64 | * adds missing signature to getWindowPos ([#34](https://github.com/macroquest/mq-definitions/issues/34)) ([c1a6801](https://github.com/macroquest/mq-definitions/commit/c1a68011196f2739935b3e1febd23d6de30260b1)) 65 | * adds Release-Please workflow ([c5904c7](https://github.com/macroquest/mq-definitions/commit/c5904c76f9c9eee0d924759cb6d09489efb9ff7d)) 66 | * adds split return types based on field/function ([47d0dd8](https://github.com/macroquest/mq-definitions/commit/47d0dd8cbc146e3a46d91a7314f44ebf8ff9145a)) 67 | * corrects branch name ([247fa5e](https://github.com/macroquest/mq-definitions/commit/247fa5ecf4c410ded9472e99d0beb2847ee68586)) 68 | * corrects mercenary and raid datatypes ([211b5c9](https://github.com/macroquest/mq-definitions/commit/211b5c92055fc6d6540ea2762227ec895db3c246)) 69 | * corrects mercenary inheritance and adds alias ([#35](https://github.com/macroquest/mq-definitions/issues/35)) ([668c7bb](https://github.com/macroquest/mq-definitions/commit/668c7bb19c57041e99cfaeedf88c2250914455df)) 70 | * corrects optional condition on mq.delay() ([80c4d42](https://github.com/macroquest/mq-definitions/commit/80c4d420aa91c9426851e398e71f882ac309fe31)) 71 | * corrects pet class declaration to extend spawn ([9b576f7](https://github.com/macroquest/mq-definitions/commit/9b576f7ffa7e2cbc91e62722c87bccd38a561b21)) 72 | * corrects release-please version and syntax ([ec7da67](https://github.com/macroquest/mq-definitions/commit/ec7da6705131a3ac2ed672c3b8ffa377673a0ea2)) 73 | * corrects return type on silenced ([872e54f](https://github.com/macroquest/mq-definitions/commit/872e54f67735861c9a2ad8aec2aa30cd434eb2d2)) 74 | * uses alias in place of repetative code ([9ec636a](https://github.com/macroquest/mq-definitions/commit/9ec636af02a779e0665434c593ff702dae402013)) 75 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Macroquest Lua Definitions Library 2 | ## Overview 3 | The definitive set of Lua code definitions for Macroquest, ImGui Lua Bindings w/custom features, and Macroquest core Lua helpers. This library is designed to help you write Lua scripts for Macroquest with greater speed and fewer runtime errors, thanks to LuaLS dynamic type checking, syntax checking, and diagnostic tools. 4 | 5 | ## Prerequisites 6 | To get started you'll need the following. 7 | - [Microsoft VS Code](https://code.visualstudio.com/download) 8 | - [The LuaLS Extenstion](https://marketplace.visualstudio.com/items?itemName=sumneko.lua) 9 | - This library installed to a known location on your computer 10 | 11 | If You already have these, jump ahead to "Getting Started", otherwise continue with the next section. 12 | 13 | ## Installation 14 | 15 | ### Microsoft Visual Studio Code 16 | - Install the latest version of Visual Studio Code from the [here](https://code.visualstudio.com/download) 17 | 18 | 19 | ### LuaLS (Lua Language Server Extension) 20 | - Install LuaLS either from here [VSCode Marketplace - Lua Language Server Extension](https://marketplace.visualstudio.com/items?itemName=sumneko.lua) 21 | - Or the extension can be installed directly from within VSCode. Search Extensions for "Lua Language Server" as seen here, and install the one by "sumneko" 22 | ![image](https://user-images.githubusercontent.com/414568/189777359-887c937a-5453-4ea0-a8f0-5c41ea4d6b66.png) 23 | 24 | ### Install these files on your computer 25 | - RedGuides Users can simply "Watch" the resource [here](https://www.redguides.com/community/resources/mq-vs-code-lua-autocomplete-definition-library.2583/) and the files will automatically be placed in a directory called "mq-defintions" under your lua directory when you run the RedGuides launcher. 26 | - If you are not a RedGuides user, or wish to install the files yourself, you can clone the repository from GitHub, or download the zip file from GitHub. 27 | - Unless you need the definitions in a separate location, e.g you're writing scripts for different versions EQ Live and EQ Emu, it is highly recommended that you put the definitions under your Lua directory (i.e. a subdirectory called mq-definitions under the lua directory). This installation will require no additional configurations and you'll be up and running right away. 28 | - Download the zip from Gihub by following this [link](https://github.com/macroquest/mq-definitions/archive/refs/heads/master.zip), or you can use the web interface. 29 | - Clone the repository 30 | - If you do not have Git for Windows installed, you can get it at [gitforwindows.org](https://gitforwindows.org/) 31 | - `git clone https://github.com/macroquest/mq-definitions.git` 32 | 33 | ## Getting Started 34 | At this point, you should have: 35 | - VS Code Installed and Working 36 | - with the LuaLS Extension installed 37 | - and the files downloaded to a known directory on your computer 38 | 39 | - _If you put your mq-defintions in a folder location other than under the lua directory, then you will need to complete the next step, to define where the LuaLS extension can locate the definition files and the Macroquest Lua directory._ 40 | 41 | - Create or modify [settings file for VS Code](https://code.visualstudio.com/docs/getstarted/settings#_workspace-settingsjson-location) with these settings: 42 | ```json 43 | { 44 | "Lua.runtime.version": "LuaJIT", 45 | "Lua.workspace.library": [ 46 | "path/to/mq-definitions", 47 | "path/to/macroquest/lua", 48 | ], 49 | } 50 | ``` 51 | 52 | ## How to Use 53 | 54 | When requiring the Macroquest, ImGui, or other supported libaries in your Lua script, autocompletion will be provided for fields, methods and enum types. 55 | 56 | - Definitions support the following requires. *Note:* This is case sensitive. 57 | ```lua 58 | local mq = require('mq') 59 | local imgui = require('ImGui') 60 | local actors = require('actors') 61 | local icons = require('mq/icons') 62 | local utils = require('mq/utils') 63 | local packageman = require('mq/packageman') 64 | . . . 65 | ``` 66 | -------------------------------------------------------------------------------- /_Bit32.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---@class Bit32 4 | bit32 = {} 5 | 6 | ---Performs bitwise `or` across all provided values and returns the result 7 | ---@generic T:number 8 | ---@vararg T 9 | ---@return T 10 | function bit32.bor(...) end 11 | 12 | ---Performs bitwise `and` across all provided values and returns the result 13 | ---@vararg number 14 | ---@return number 15 | function bit32.band(...) end 16 | 17 | ---Performs bitwise `not` on the provided value and returns the result 18 | ---@param value number 19 | ---@return number 20 | function bit32.bnot(value) end 21 | 22 | ---Performs bitwise `xor` (exclusive or) across the provided values and returns the result 23 | ---@vararg number 24 | ---@return number 25 | function bit32.bxor(...) end 26 | 27 | ---Performs bitwise left shift on the provided value and returns the result 28 | ---@param value number 29 | ---@param shift number 30 | ---@return number 31 | function bit32.lshift(value, shift) end 32 | 33 | ---Performs bitwise right shift on the provided value and returns the result 34 | ---@param value number 35 | ---@param shift number 36 | ---@return number 37 | function bit32.rshift(value, shift) end 38 | 39 | ---Performs bitwise rotate left on the provided value and returns the result 40 | ---@param value number 41 | ---@param shift number 42 | ---@return number 43 | function bit32.rol(value, shift) end 44 | 45 | ---Performs bitwise rotate right on the provided value and returns the result 46 | ---@param value number 47 | ---@param shift number 48 | ---@return number 49 | function bit32.ror(value, shift) end 50 | 51 | ---Sets or clears a bit mask on the provided value, and returns the result. 52 | ---@param value number 53 | ---@param mask number 54 | ---@param enable boolean If true, sets bits. Otherwise, clears bits. 55 | ---@return number 56 | function bit32.setflag(value, mask, enable) end 57 | -------------------------------------------------------------------------------- /imgui/imgui_additional.lua: -------------------------------------------------------------------------------- 1 | ---@meta ImGui 2 | 3 | -- 4 | -- MQ Additions to ImGui 5 | -- 6 | 7 | -- Register a callback with the ImGui subsystem to be called every frame 8 | ---@param name string 9 | ---@param render fun() 10 | function ImGui.Register(name, render) end 11 | 12 | -- Unregister a call back with the ImGui subsystem. The named callback will no longer 13 | -- be called every frame 14 | ---@param name string 15 | function ImGui.Unregister(name) end 16 | 17 | -- Draw an EverQuest CTextureAnimation 18 | ---@param texture CTextureAnimation 19 | ---@param width? number 20 | ---@param height? number 21 | ---@param drawBorder? bool 22 | function ImGui.DrawTextureAnimation(texture, width, height, drawBorder) end 23 | ---@param texture CTextureAnimation 24 | ---@param size? ImVec2 25 | ---@param drawBorder? bool 26 | function ImGui.DrawTextureAnimation(texture, size, drawBorder) end 27 | 28 | -- Draw a help marker with tooltip text 29 | ---@param text string 30 | ---@param width? number 31 | ---@param font? ImFont 32 | function ImGui.HelpMarker(text, width, font) end 33 | 34 | 35 | -- 36 | -- MQ Console Widget 37 | -- 38 | 39 | ---A console widget which displays a console buffer of colored text in a scrollable 40 | ---view. The Render function may only be called from an ImGui update function. It is 41 | ---safe to call any other function from anywhere in the script. 42 | ---@class ConsoleWidget 43 | ---Controls autoscroll. If autoscroll is enabled, then 44 | ---the view will stick to the end if it is already scrolled to the end. 45 | ---@field public autoScroll boolean 46 | ---Sets/Gets the maximum number of lines held in the console buffer. 47 | ---@field public maxBufferLines number 48 | ---Sets/Gets the the opacity of the console. 49 | ---@field public opacity number 50 | ImGui.ConsoleWidget = {} 51 | 52 | ---Creates a new console widget. `id` is a standard ImGui id and shoudl be unique for 53 | ---the current scope. This `id` will be given to a Child frame (via `BeginChild`) and so 54 | ---it can be styled similarly. 55 | ---@param id string Id of the console widget 56 | ---@return ConsoleWidget 57 | function ImGui.ConsoleWidget.new(id) end 58 | 59 | ---Render the console widget. 60 | --- 61 | ---`displaySize`: The default value is 0, 0. This will cause the widget to fill all 62 | ---available space. Specifying a non-zero height or width will limit the size of the 63 | ---widget in that dimension. 64 | --- 65 | ---This function should only be called from an ImGui update callback. 66 | ---@param displaySize? ImVec2 Size of the console widget. 67 | function ImGui.ConsoleWidget:Render(displaySize) end 68 | 69 | ---Clears the console buffer. 70 | function ImGui.ConsoleWidget:Clear() end 71 | 72 | ---Returns true if the console is scrolled to the bottom of the buffer. 73 | ---@return boolean 74 | function ImGui.ConsoleWidget:IsCursorAtEnd() end 75 | 76 | ---Scrolls the view to the bottom of the buffer during the next render call. 77 | function ImGui.ConsoleWidget:ScrollToBottom() end 78 | 79 | ---Append a line of text to the buffer using the default color. 80 | ---@param text string text string to append to the console buffer. 81 | function ImGui.ConsoleWidget:AppendText(text) end 82 | 83 | ---Append a line of text to the buffer using a format string and the default color. 84 | ---Follows the same pattern of behavior as string.format. 85 | ---@param format string Format string to append to the console buffer. 86 | ---@vararg any 87 | function ImGui.ConsoleWidget:AppendText(format, ...) end 88 | 89 | ---Append a line of colored text to the buffer. 90 | ---@param color ImVec4|ImU32 The default color of the text. 91 | ---@param text string text string to append to the console buffer. 92 | function ImGui.ConsoleWidget.AppendText(color, text) end 93 | 94 | ---Append a line of colored, formatted text to the buffer. 95 | ---@param color ImVec4|ImU32 The default color of the text. 96 | ---@param format string Format string to append to the console buffer 97 | ---@vararg any 98 | function ImGui.ConsoleWidget:AppendText(color, format, ...) end 99 | 100 | ---Append unformatted text to the buffer. The line is not terminated, so multiple 101 | ---calls will continue on the same line. 102 | ---@param text string Text string to append to the buffer. 103 | function ImGui.ConsoleWidget.AppendTextUnformatted(text) end 104 | 105 | ---Append unformatted text to the buffer. The line is not terminated, so multiple 106 | ---calls will continue on the same line. 107 | ---@param color ImVec4|ImU32 Optional: The default color of the text. 108 | ---@param text string Text string to append to the buffer. 109 | function ImGui.ConsoleWidget.AppendTextUnformatted(color, text) end 110 | -------------------------------------------------------------------------------- /imgui/imgui_userdata.lua: -------------------------------------------------------------------------------- 1 | ---@meta ImGui 2 | 3 | -- 4 | -- ## ImGui User Types 5 | -- 6 | 7 | 8 | -- ### ImVec2 9 | 10 | ---@class ImVec2 11 | ---@field x number 12 | ---@field y number 13 | ---@operator add(ImVec2): ImVec2 14 | ---@operator add(number): ImVec2 15 | ---@operator mul(ImVec2): ImVec2 16 | ---@operator mul(number): ImVec2 17 | ---@operator div(ImVec2): ImVec2 18 | ---@operator div(number): ImVec2 19 | ---@operator sub(ImVec2): ImVec2 20 | ---@operator sub(number): ImVec2 21 | ImVec2 = {} 22 | 23 | ---@param x number 24 | ---@param y number 25 | ---@return ImVec2 26 | function ImVec2(x, y) end 27 | ---@return ImVec2 28 | function ImVec2() end 29 | 30 | 31 | -- ### ImVec4 32 | 33 | ---@class ImVec4 34 | ---@field x number 35 | ---@field y number 36 | ---@field z number 37 | ---@field w number 38 | ---@operator add(ImVec4): ImVec4 39 | ---@operator add(number): ImVec4 40 | ---@operator mul(ImVec4): ImVec4 41 | ---@operator mul(number): ImVec4 42 | ---@operator div(ImVec4): ImVec4 43 | ---@operator div(number): ImVec4 44 | ---@operator sub(ImVec4): ImVec4 45 | ---@operator sub(number): ImVec4 46 | ImVec4 = {} 47 | 48 | -- Construct an ImVec4 from components. If creating a color, these correspond with Red, Green, Blue, and Alpha, repsectively. 49 | ---@param x number 50 | ---@param y number 51 | ---@param z number 52 | ---@param w number 53 | ---@return ImVec4 54 | function ImVec4(x, y, z, w) end 55 | 56 | -- Construct an ImVec4 representing a color, from an ImU32 color number 57 | ---@param color ImU32 58 | ---@return ImVec4 59 | function ImVec4.FromImU32(color) end 60 | 61 | -- Convert ImVec4 to a ImU32 62 | ---@return ImU32 63 | function ImVec4:ToImU32() end 64 | 65 | 66 | -- 67 | -- ## ImGuiStyle 68 | -- 69 | 70 | ---@class ImGuiStyle 71 | ---@field Alpha number Global alpha applies to everything in Dear ImGui. 72 | ---@field DisabledAlpha number Additional alpha multiplier applied by BeginDisabled(). Multiply over current value of Alpha. 73 | ---@field WindowPadding ImVec2 Padding within a window. 74 | ---@field WindowRounding number Radius of window corners rounding. Set to 0.0f to have rectangular windows. Large values tend to lead to variety of artifacts and are not recommended. 75 | ---@field WindowBorderSize number Thickness of border around windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly). 76 | ---@field WindowMinSize ImVec2 Minimum window size. This is a global setting. If you want to constraint individual windows, use SetNextWindowSizeConstraints(). 77 | ---@field WindowTitleAlign ImVec2 Alignment for title bar text. Defaults to (0.0f,0.5f) for left-aligned,vertically centered. 78 | ---@field WindowMenuButtonPosition ImGuiDir Side of the collapsing/docking button in the title bar (None/Left/Right). Defaults to ImGuiDir_Left. 79 | ---@field ChildRounding number Radius of child window corners rounding. Set to 0.0f to have rectangular windows. 80 | ---@field ChildBorderSize number Thickness of border around child windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly). 81 | ---@field PopupRounding number Radius of popup window corners rounding. (Note that tooltip windows use WindowRounding) 82 | ---@field PopupBorderSize number Thickness of border around popup/tooltip windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly). 83 | ---@field FramePadding ImVec2 Padding within a framed rectangle (used by most widgets). 84 | ---@field FrameRounding number Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets). 85 | ---@field FrameBorderSize number Thickness of border around frames. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly). 86 | ---@field ItemSpacing ImVec2 Horizontal and vertical spacing between widgets/lines. 87 | ---@field ItemInnerSpacing ImVec2 Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label). 88 | ---@field CellPadding ImVec2 Padding within a table cell 89 | ---@field TouchExtraPadding ImVec2 Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much! 90 | ---@field IndentSpacing number Horizontal indentation when e.g. entering a tree node. Generally == (FontSize + FramePadding.x*2). 91 | ---@field ColumnsMinSpacing number Minimum horizontal spacing between two columns. Preferably > (FramePadding.x + 1). 92 | ---@field ScrollbarSize number Width of the vertical scrollbar, Height of the horizontal scrollbar. 93 | ---@field ScrollbarRounding number Radius of grab corners for scrollbar. 94 | ---@field GrabMinSize number Minimum width/height of a grab box for slider/scrollbar. 95 | ---@field GrabRounding number Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs. 96 | ---@field LogSliderDeadzone number The size in pixels of the dead-zone around zero on logarithmic sliders that cross zero. 97 | ---@field TabRounding number Radius of upper corners of a tab. Set to 0.0f to have rectangular tabs. 98 | ---@field TabBorderSize number Thickness of border around tabs. 99 | ---@field TabMinWidthForCloseButton number Minimum width for close button to appears on an unselected tab when hovered. Set to 0.0f to always show when hovering, set to FLT_MAX to never show close button unless selected. 100 | ---@field TabBarBorderSize number Thickness of tab-bar separator, which takes on the tab active color to denote focus. 101 | ---@field TableAngledHeadersAngle number Angle of angled headers (supported values range from -50.0f degrees to +50.0f degrees). 102 | ---@field ColorButtonPosition ImGuiDir Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right. 103 | ---@field ButtonTextAlign ImVec2 Alignment of button text when button is larger than text. Defaults to (0.5f, 0.5f) (centered). 104 | ---@field SelectableTextAlign ImVec2 Alignment of selectable text. Defaults to (0.0f, 0.0f) (top-left aligned). It's generally important to keep this left-aligned if you want to lay multiple items on a same line. 105 | ---@field SeparatorTextBorderSize number Thickkness of border in SeparatorText() 106 | ---@field SeparatorTextAlign ImVec2 Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center). 107 | ---@field DisplayWindowPadding ImVec2 Window position are clamped to be visible within the display area or monitors by at least this amount. Only applies to regular windows. 108 | ---@field DisplaySafeAreaPadding ImVec2 If you cannot see the edges of your screen (e.g. on a TV) increase the safe area padding. Apply to popups/tooltips as well regular windows. NB: Prefer configuring your TV sets correctly! 109 | ---@field DockingSeparatorSize number Thickness of resizing border between docked windows 110 | ---@field MouseCursorScale number Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). We apply per-monitor DPI scaling over this scale. May be removed later. 111 | ---@field AntiAliasedLines boolean Enable anti-aliased lines/borders. Disable if you are really tight on CPU/GPU. Latched at the beginning of the frame (copied to ImDrawList). 112 | ---@field AntiAliasedLinesUseTex boolean Enable anti-aliased lines/borders using textures where possible. Require backend to render with bilinear filtering. Latched at the beginning of the frame (copied to ImDrawList). 113 | ---@field AntiAliasedFill boolean Enable anti-aliased edges around filled shapes (rounded rectangles, circles, etc.). Disable if you are really tight on CPU/GPU. Latched at the beginning of the frame (copied to ImDrawList). 114 | ---@field CurveTessellationTol number Tessellation tolerance when using PathBezierCurveTo() without a specific number of segments. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality. 115 | ---@field CircleTessellationMaxError number Maximum error (in pixels) allowed when using AddCircle()/AddCircleFilled() or drawing rounded corner rectangles with no explicit segment count specified. Decrease for higher quality but more geometry. 116 | ---@field Colors ImVec4[] 117 | ---@field HoverStationaryDelay number Delay for IsItemHovered(ImGuiHoveredFlags_Stationary). Time required to consider mouse stationary. 118 | ---@field HoverDelayShort number Delay for IsItemHovered(ImGuiHoveredFlags_DelayShort). Usually used along with HoverStationaryDelay. 119 | ---@field HoverDelayNormal number Delay for IsItemHovered(ImGuiHoveredFlags_DelayNormal). " 120 | ---@field HoverFlagsForTooltipMouse ImGuiHoveredFlags Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using mouse. 121 | ---@field HoverFlagsForTooltipNav ImGuiHoveredFlags Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using keyboard/gamepad. 122 | local ImGuiStyle = {} 123 | 124 | ---@return ImGuiStyle 125 | function ImGuiStyle.new() end 126 | 127 | -- To scale your entire UI (e.g. if you want your app to use High DPI or generally be DPI aware) you may use this helper function. Scaling the fonts is done separately and is up to you. 128 | -- 129 | -- Important: This operation is lossy because we round all sizes to integer. If you need to change your scale multiples, call this over a freshly initialized ImGuiStyle structure rather than scaling multiple times. 130 | ---@param scaleFactor number 131 | function ImGuiStyle:ScaleAllSizes(scaleFactor) end 132 | 133 | 134 | -- 135 | -- ## ImGuiIO 136 | -- 137 | 138 | ---@class ImGuiIO 139 | ---@field public ConfigFlags ImGuiConfigFlags See ImGuiConfigFlags enum. Set by user/application. Gamepad/keyboard navigation options, etc. 140 | ---@field public DisplaySize ImVec2 Main display size, in pixels (generally == GetMainViewport()->Size). May change every frame. 141 | ---@field public DeltaTime number Time elapsed since last frame, in seconds. May change every frame. 142 | ---@field public Fonts ImFontAtlas Font atlas: load, rasterize and pack one or more fonts into a single texture. 143 | ---@field public FontGlobalScale number Global scale all fonts 144 | ---@field public FontDefault ImFont 145 | ---@field public Framerate number Estimate of application framerate (rolling average over 60 frames, based on io.DeltaTime), in frame per second. Solely for convenience. Slow applications may not want to use a moving average or may want to reset underlying buffers occasionally. 146 | ---@field public MouseDelta ImVec2 Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta. 147 | ---@field public MousePos ImVec2 Mouse position, in pixels. Set to ImVec2(-FLT_MAX, -FLT_MAX) if mouse is unavailable (on another screen, etc.) 148 | ---@field public KeyCtrl boolean Keyboard modifier down: Control 149 | ---@field public KeyShift boolean Keyboard modifier down: Shift 150 | ---@field public KeyAlt boolean Keyboard modifier down: Alt 151 | ---@field public KeySuper boolean Keyboard modifier down: Cmd/Super/Windows 152 | ImGuiIO = {} 153 | 154 | 155 | -- 156 | -- ## Misc data structures 157 | -- 158 | 159 | 160 | -- ### ImGuiWindowClass 161 | -- ### ImGuiPayload 162 | -- ### ImGuiTableColumnSortSpecs 163 | -- ### ImGuiTableSortSpecs 164 | 165 | 166 | -- 167 | -- ## Helpers 168 | -- 169 | 170 | -- ### ImGuiTextFilter 171 | 172 | 173 | -- ### ImGuiListClipper 174 | -- Manually clip large list of items. 175 | -- 176 | -- If you have lots evenly spaced items and you have random access to the list, you can perform coarse 177 | -- clipping based on visibility to only submit items that are in view. 178 | -- 179 | -- The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. 180 | -- 181 | -- (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally 182 | -- fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily 183 | -- scale using lists with tens of thousands of items without a problem) 184 | -- 185 | -- Usage: 186 | -- ```lua 187 | -- local clipper = ImGuiListClipper.new(); 188 | -- clipper:Begin(1000); -- We have 1000 elements, evenly spaced. 189 | -- while clipper:Step() do 190 | -- local row 191 | -- for row = clipper.DisplayStart, clipper.DisplayEnd - 1, 1 do 192 | -- ImGui::Text("line number %d", row); 193 | -- end 194 | -- end 195 | -- clipper:End() 196 | -- ``` 197 | -- 198 | -- Generally what happens is: 199 | -- - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not. 200 | -- - User code submit that one element. 201 | -- - Clipper can measure the height of the first element 202 | -- - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element. 203 | -- - User code submit visible elements. 204 | -- - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc. 205 | ---@class ImGuiListClipper 206 | ---@field public DisplayStart number First item to display, updated by each call to Step() 207 | ---@field public DisplayEnd number End of items to display (exclusive) 208 | ImGuiListClipper = {} 209 | 210 | ---@param itemsCount number Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step) 211 | ---@param itemsHeight? number Use -1.0f to be calculated automatically on first step. Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing(). 212 | function ImGuiListClipper:Begin(itemsCount, itemsHeight) end 213 | 214 | -- Automatically called on the last call of Step() that returns false. 215 | function ImGuiListClipper:End() end 216 | 217 | -- Call until it returns false. The DisplayStart/DisplayEnd fields will be set and you can process/draw those items. 218 | ---@return boolean 219 | function ImGuiListClipper:Step() end 220 | 221 | -- Call IncludeItemByIndex() or IncludeItemsByIndex() *BEFORE* first call to Step() if you need a range of items to not be clipped, regardless of their visibility. 222 | -- (Due to alignment / padding of certain items it is possible that an extra item may be included on either end of the display range). 223 | ---@param itemBegin number 224 | ---@param itemEnd number Is exclusive e.g. use (42, 42+1) to make item 42 never clipped. 225 | function ImGuiListClipper:IncludeItemsByIndex(itemBegin, itemEnd) end 226 | 227 | ---@param itemIndex number 228 | function ImGuiListClipper:IncludeItemByIndex(itemIndex) end 229 | 230 | ---@return ImGuiListClipper 231 | function ImGuiListClipper.new() end 232 | 233 | 234 | -- ### ImColor 235 | 236 | ---@class ImColor 237 | ImColor = {} 238 | 239 | 240 | -- 241 | -- ## Drawing API 242 | -- 243 | 244 | 245 | -- ### ImDrawListSplitter 246 | 247 | 248 | -- ### ImDrawList 249 | 250 | ---@class ImDrawList 251 | ---@field public Flags ImDrawListFlags 252 | ImDrawList = {} 253 | 254 | 255 | ---@class ImDrawListSharedData 256 | ---@field public TexUvWhitePixel ImVec2 257 | ---@field public Font ImFont 258 | ---@field public FontSize number 259 | ---@field public CurveTessellationTol number 260 | ---@field public CircleSegmentMaxError number 261 | ---@field public ClipRectFullscreen ImVec4 262 | ---@field public InitialFlags ImDrawListFlags 263 | ImDrawListSharedData = {} 264 | 265 | ---@param maxError number 266 | function ImDrawListSharedData:SetCircleTessellationMaxError(maxError) end 267 | 268 | --- Constructs a new ImDrawList from ImDrawListSharedData 269 | ---@param sharedData ImDrawListSharedData 270 | ---@return ImDrawList 271 | function ImDrawList.new(sharedData) end 272 | 273 | --- Render-level scissoring. This is passed down to your render function but not used 274 | --- for CPU-side coarse clipping. Prefer using higher-level ImGui.PushClipRect() to affect 275 | --- logic (hit-testing and widget culling) 276 | ---@param clipRectMin ImVec2 277 | ---@param clipRectMax ImVec2 278 | ---@param intersectWithCurrentClipRect? boolean default: false 279 | function ImDrawList:PushClipRect(clipRectMin, clipRectMax, intersectWithCurrentClipRect) end 280 | 281 | function ImDrawList:PushClipRectFullScreen() end 282 | 283 | function ImDrawList:PopClipRect() end 284 | 285 | ---@param textureId ImTextureID 286 | function ImDrawList:PushTextureID(textureId) end 287 | 288 | function ImDrawList:PopTextureID() end 289 | 290 | ---@return ImVec2 291 | function ImDrawList:GetClipRectMin() end 292 | 293 | ---@return ImVec2 294 | function ImDrawList:GetClipRectMax() end 295 | 296 | 297 | -- #### Primitives 298 | -- - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. 299 | -- - For rectangular primitives, "p_min" and "p_max" represent the upper-left and lower-right corners. 300 | -- - For circle primitives, use "num_segments == 0" to automatically calculate tessellation (preferred). 301 | -- In older versions (until Dear ImGui 1.77) the AddCircle functions defaulted to num_segments == 12. 302 | -- In future versions we will use textures to provide cheaper and higher-quality circles. 303 | -- Use AddNgon() and AddNgonFilled() functions if you need to guarantee a specific number of sides. 304 | 305 | ---@param p1 ImVec2 306 | ---@param p2 ImVec2 307 | ---@param col ImU32 308 | ---@param thickness? number default: 1.0 309 | function ImDrawList:AddLine(p1, p2, col, thickness) end 310 | 311 | ---@param pMin ImVec2 312 | ---@param pMax ImVec2 313 | ---@param col ImU32 314 | ---@param rounding? number default: 0.0 315 | ---@param flags? ImDrawFlags default: 0 316 | ---@param thickness? number default: 1.0 317 | function ImDrawList:AddRect(pMin, pMax, col, rounding, flags, thickness) end 318 | 319 | ---@param pMin ImVec2 320 | ---@param pMax ImVec2 321 | ---@param col ImU32 322 | ---@param rounding? number default: 0.0 323 | ---@param flags? ImDrawFlags default: 0 324 | function ImDrawList:AddRectFilled(pMin, pMax, col, rounding, flags) end 325 | 326 | ---@param pMin ImVec2 327 | ---@param pMax ImVec2 328 | ---@param colUpperLeft number 329 | ---@param colUpperRight number 330 | ---@param colBottomRight number 331 | ---@param colBottomLeft number 332 | function ImDrawList:AddRectFilledMultiColor(pMin, pMax, colUpperLeft, colUpperRight, colBottomRight, colBottomLeft) end 333 | 334 | ---@param p1 ImVec2 335 | ---@param p2 ImVec2 336 | ---@param p3 ImVec2 337 | ---@param p4 ImVec2 338 | ---@param col ImU32 339 | ---@param thickness? number default: 1.0 340 | function ImDrawList:AddQuad(p1, p2, p3, p4, col, thickness) end 341 | 342 | ---@param p1 ImVec2 343 | ---@param p2 ImVec2 344 | ---@param p3 ImVec2 345 | ---@param p4 ImVec2 346 | ---@param col ImU32 347 | function ImDrawList:AddQuadFilled(p1, p2, p3, p4, col) end 348 | 349 | ---@param p1 ImVec2 350 | ---@param p2 ImVec2 351 | ---@param p3 ImVec2 352 | ---@param col ImU32 353 | ---@param thickness? number default: 1.0 354 | function ImDrawList:AddTriangle(p1, p2, p3, col, thickness) end 355 | 356 | ---@param p1 ImVec2 357 | ---@param p2 ImVec2 358 | ---@param p3 ImVec2 359 | ---@param col ImU32 360 | function ImDrawList:AddTriangleFilled(p1, p2, p3, col) end 361 | 362 | ---@param center ImVec2 363 | ---@param radius number 364 | ---@param col ImU32 365 | ---@param numSegments? number @default: 0 (automatic) 366 | ---@param thickness? number @default: 1.0 367 | function ImDrawList:AddCircle(center, radius, col, numSegments, thickness) end 368 | 369 | ---@param center ImVec2 370 | ---@param radius number 371 | ---@param col ImU32 372 | ---@param numSegments? number @default: 0 (automatic) 373 | function ImDrawList:AddCircleFilled(center, radius, col, numSegments) end 374 | 375 | ---@param center ImVec2 376 | ---@param radius number 377 | ---@param col ImU32 378 | ---@param numSegments number 379 | ---@param thickness? number @default: 1.0 380 | function ImDrawList:AddNgon(center, radius, col, numSegments, thickness) end 381 | 382 | ---@param center ImVec2 383 | ---@param radius number 384 | ---@param col ImU32 385 | ---@param numSegments number 386 | function ImDrawList:AddNgonFilled(center, radius, col, numSegments) end 387 | 388 | ---@param pos ImVec2 389 | ---@param col ImU32 390 | ---@param text string 391 | function ImDrawList:AddText(pos, col, text) end 392 | 393 | function ImDrawList:AddText(font, fontSize, pos, col, text) end 394 | 395 | ---@param points ImVec2[] 396 | ---@param col ImU32 397 | ---@param flags ImDrawFlags 398 | ---@param thickness number 399 | function ImDrawList:AddPolyline(points, col, flags, thickness) end 400 | 401 | ---@param points ImVec2[] 402 | ---@param col ImU32 403 | function ImDrawList:AddConvexPolyFilled(points, col) end 404 | 405 | ---@param p1 ImVec2 406 | ---@param p2 ImVec2 407 | ---@param p3 ImVec2 408 | ---@param p4 ImVec2 409 | ---@param col ImU32 410 | ---@param thickness number 411 | ---@param numSegments? number 412 | function ImDrawList:AddBezierCubic(p1, p2, p3, p4, col, thickness, numSegments) end 413 | 414 | ---@param p1 ImVec2 415 | ---@param p2 ImVec2 416 | ---@param p3 ImVec2 417 | ---@param col ImU32 418 | ---@param thickness number 419 | ---@param numSegments? number 420 | function ImDrawList:AddBezierQuadratic(p1, p2, p3, col, thickness, numSegments) end 421 | 422 | 423 | -- #### Image primitives 424 | -- - Read FAQ to understand what ImTextureID is. 425 | -- - "pMin" and "pMax" represent the upper-left and lower-right corners of the rectangle. 426 | -- - "uvMin" and "uvMax" represent the normalized texture coordinates to use for those corners. Using (0,0)->(1,1) texture coordinates will generally display the entire texture. 427 | 428 | ---@param userTextureID ImTextureID 429 | ---@param pMin ImVec2 430 | ---@param pMax ImVec2 431 | ---@param uvMin? ImVec2 @min texture coordinate, default: (0, 0) 432 | ---@param uvMax? ImVec2 @max texture coordinate, default: (1, 1) 433 | ---@param col? ImU32 @color, default: White 434 | function ImDrawList:AddImage(userTextureID, pMin, pMax, uvMin, uvMax, col) end 435 | 436 | ---@param userTextureID ImTextureID 437 | ---@param p1 ImVec2 438 | ---@param p2 ImVec2 439 | ---@param p3 ImVec2 440 | ---@param p4 ImVec2 441 | ---@param uv1? ImVec2 @texture coordinate 1, default: (0, 0) 442 | ---@param uv2? ImVec2 @texture coordinate 2, default: (1, 0) 443 | ---@param uv3? ImVec2 @texture coordinate 3, default: (1, 1) 444 | ---@param uv4? ImVec2 @texture coordinate 4, default: (0, 1) 445 | ---@param col? ImU32 @ color, default: white 446 | function ImDrawList:AddImageQuad(userTextureID, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col) end 447 | 448 | ---@param userTextureID ImTextureID 449 | ---@param pMin ImVec2 450 | ---@param pMax ImVec2 451 | ---@param uvMin ImVec2 452 | ---@param uvMax ImVec2 453 | ---@param col ImU32 454 | ---@param rounding number 455 | ---@param flags? ImDrawFlags @default: None 456 | function ImDrawList:AddImageRounded(userTextureID, pMin, pMax, uvMin, uvMax, col, rounding, flags) end 457 | 458 | 459 | -- #### Paths 460 | -- Stateful path API, add points then finish with PathFillConvex() or PathStroke() 461 | -- - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. 462 | 463 | function ImDrawList:PathClear() end 464 | 465 | ---@param pos ImVec2 466 | function ImDrawList:PathLineTo(pos) end 467 | 468 | ---@param pos ImVec2 469 | function ImDrawList:PathLineToMergeDuplicate(pos) end 470 | 471 | ---@param col ImU32 472 | function ImDrawList:PathFillConvex(col) end 473 | 474 | ---@param col ImU32 475 | ---@param flags? ImDrawFlags 476 | ---@param thickness? number 477 | function ImDrawList:PathStroke(col, flags, thickness) end 478 | 479 | ---@param center ImVec2 480 | ---@param radius number 481 | ---@param aMin number 482 | ---@param aMax number 483 | ---@param numSegments? number 484 | function ImDrawList:PathArcTo(center, radius, aMin, aMax, numSegments) end 485 | 486 | --- Use precomputed angles for a 12 steps circle 487 | ---@param center ImVec2 488 | ---@param radius number 489 | ---@param aMinOf12 number 490 | ---@param aMaxOf12 number 491 | function ImDrawList:PathArcToFast(center, radius, aMinOf12, aMaxOf12) end 492 | 493 | --- Cubic bezier (4 control points) 494 | ---@param p2 ImVec2 495 | ---@param p3 ImVec2 496 | ---@param p4 ImVec2 497 | ---@param thickness number 498 | ---@param numSegments? number 499 | function ImDrawList:PathBezierCubicCurveTo(p2, p3, p4, thickness, numSegments) end 500 | 501 | --- Quadratic bezier (3 control points) 502 | ---@param p2 ImVec2 503 | ---@param p3 ImVec2 504 | ---@param thickness number 505 | ---@param numSegments? number 506 | function ImDrawList:PathBezierQuadraticCurveTo(p2, p3, thickness, numSegments) end 507 | 508 | ---@param rectMin ImVec2 509 | ---@param rectMax ImVec2 510 | ---@param rounding? number 511 | ---@param flags? ImDrawFlags 512 | function ImDrawList:PathRect(rectMin, rectMax, rounding, flags) end 513 | 514 | 515 | -- #### Advanced: Channels 516 | -- - Use to split render into layers. By switching channels to can render out-of-order (e.g. submit FG primitives before BG primitives) 517 | -- - Use to minimize draw calls (e.g. if going back-and-forth between multiple clipping rectangles, prefer to append into separate channels then merge at the end) 518 | -- - This API shouldn't have been in ImDrawList in the first place! 519 | -- Prefer using your own persistent instance of ImDrawListSplitter as you can stack them. 520 | -- Using the ImDrawList::ChannelsXXXX you cannot stack a split over another. 521 | 522 | ---@param count number 523 | function ImDrawList:ChannelsSplit(count) end 524 | 525 | ---@param n number 526 | function ImDrawList:ChannelsSetCurrent(n) end 527 | 528 | function ImDrawList:ChannelsMerge() end 529 | 530 | 531 | -- #### Custom 532 | 533 | ---@param texture CTextureAnimation 534 | ---@param pos ImVec2 535 | ---@param size? ImVec2 536 | function ImDrawList:AddTextureAnimation(texture, pos, size) end 537 | 538 | 539 | -- 540 | -- ## Font API 541 | -- 542 | 543 | -- ### ImFontConfig 544 | -- ### ImFontGlyph 545 | -- ### ImFontGlyphRangesBuilder 546 | -- ### ImFontAtlasCustomRect 547 | -- enum ImFontAtlasFlags_ 548 | 549 | 550 | -- ### ImFontAtlas 551 | 552 | ---@class ImFontAtlas 553 | ---@field public TexID ImTextureID 554 | ---@field public TexWidth number 555 | ---@field public TexHeight number 556 | ImFontAtlas = {} 557 | 558 | 559 | -- ### ImFont 560 | 561 | ---@class ImFont 562 | ImFont = {} 563 | 564 | 565 | -- 566 | -- Viewports 567 | -- 568 | 569 | ---@class ImGuiViewport 570 | ---@field public ID number 571 | ---@field public Flags ImGuiViewportFlags 572 | ---@field public Pos ImVec2 573 | ---@field public Size ImVec2 574 | ---@field public WorkPos ImVec2 575 | ---@field public WorkSize ImVec2 576 | ---@field public DpiScale number 577 | ---@field public ParentViewportId number 578 | ImGuiViewport = {} 579 | 580 | ---@return ImVec2 581 | function ImGuiViewport:GetCenter() end 582 | 583 | ---@return ImVec2 584 | function ImGuiViewport:GetWorkCenter() end 585 | 586 | ---@class ImGuiDragDropPayload 587 | ---@field public Data any -------------------------------------------------------------------------------- /mq/_constants.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---@class Mq 4 | ---@field MAX_AUG_SOCKETS integer -------------------------------------------------------------------------------- /mq/_datatype.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@module 'mq' 3 | 4 | --- Macro DataType and TLO related APIs 5 | 6 | ---Represents the value held by an instance of the DataType 7 | ---@alias TypeVar any 8 | 9 | ---Represents the type of return value from a member. Can be either the name of the 10 | ---type, or an instance of the DataType. 11 | ---@alias MQType string|DataType 12 | 13 | ---Instance of a DataType created with `DataType.new` 14 | ---@class DataType 15 | ---DataType.ToString: Convert a value of the datatype into a string. The contents 16 | ---held by `value` are defined by the implementation of the datatype. 17 | ---@field public TypeName string The name of the data type. 18 | local DataType = {} 19 | 20 | 21 | ---A function matching the signature of a datatype member: 22 | --- 23 | --- * `index` is an optional text string passed in by the caller. 24 | --- 25 | --- * `value` is the current value of the instance of the datatype this method belongs to. Its value 26 | --- is defined by the implementation of the custom datatype. 27 | ---@alias DataTypeMemberFunction fun(index?: string, var?: TypeVar): type: MQType, var: TypeVar|nil 28 | 29 | ---A function matching the signature of a datatype method: 30 | --- 31 | --- * `index` is an optional text string passed in by the caller. 32 | --- 33 | --- * `value` is the current value of the instance of the datatype this method belongs to. Its value 34 | --- is defined by the implementation of the custom datatype. 35 | ---@alias DataTypeMethodFunction fun(index?: string, var?: TypeVar): nil 36 | 37 | ---@class DataTypeParameters 38 | ---@field public Members table | nil 39 | ---@field public Methods table | nil 40 | ---@field public ToString? fun(var?: TypeVar): string Function used to convert datatype to a string 41 | 42 | 43 | mq.DataType = {} 44 | 45 | ---Create a new DataType object 46 | --- 47 | ---@see DataTypeParameters 48 | ---@param name string Name of the datatype to create 49 | ---@param params DataTypeParameters Parameters that define the datatype. 50 | ---@return DataType type The definition of the datatype that is created. 51 | function mq.DataType.new(name, params) end 52 | 53 | ---The callback function that is the implementation of the TLO. 54 | --- 55 | --- * `index` is an optional text string that is passed in by the caller. 56 | --- 57 | ---The return value is the same for TLOs as it is for DataType members: The function 58 | ---should return both the datatype and the value of the datatype. The datatype can be 59 | ---represented as either an instance of the datatype (`DataType`) or a string 60 | ---which is the name of the datatype. 61 | ---@alias TopLevelObjectFunction fun(index?: string): type: MQType, value: TypeVar|nil 62 | 63 | ---Register a new TLO function with MacroQuest. 64 | --- 65 | ---@see TopLevelObjectFunction for details of the callback type. 66 | ---@param name string 67 | ---@param callback TopLevelObjectFunction 68 | function mq.AddTopLevelObject(name, callback) end 69 | 70 | ---Remove a TLO that was previously added with AddTopLevelObject 71 | ---@param name string 72 | ---@return boolean 73 | function mq.RemoveTopLevelObject(name) end 74 | -------------------------------------------------------------------------------- /mq/_itemlinks.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---@enum LinkTypes 4 | mq.LinkTypes = { 5 | Item = 0, 6 | Player = 1, 7 | Spam = 2, 8 | Achievement = 3, 9 | Dialog = 4, 10 | Command = 5, 11 | Spell = 6, 12 | Faction = 7, 13 | Invalid = -1, 14 | } 15 | 16 | 17 | ---@class TextTagInfo 18 | ---@field type LinkTypes 19 | ---@field link string 20 | ---@field text string 21 | local TextTagInfo = {} 22 | 23 | 24 | ---@class DialogLinkInfo 25 | ---@field keyword string 26 | ---@field text string 27 | local DialogLinkInfo = {} 28 | 29 | 30 | ---@class ItemLinkInfo 31 | ---@field itemID integer 32 | ---@field sockets integer[] 33 | ---@field socketLuck integer[] 34 | ---@field isEvolving boolean 35 | ---@field evolutionGroup integer 36 | ---@field evolutionLevel integer 37 | ---@field ornamentationIconID integer 38 | ---@field luck integer 39 | ---@field itemHash integer 40 | ---@field itemName string 41 | local ItemLinkInfo = {} 42 | 43 | ---@return boolean 44 | function ItemLinkInfo:IsSocketed() end 45 | 46 | 47 | ---@class SpellLinkInfo 48 | ---@field spellID integer 49 | ---@field spellName string 50 | local SpellLinkInfo = {} 51 | 52 | 53 | --- Extracts all links from the given string, returning them in an array 54 | ---@param line string The text line to extract links from 55 | ---@return TextTagInfo[] 56 | function mq.ExtractLinks(line) end 57 | 58 | --- Executes a link as if it has been clicked by the user 59 | ---@param link TextTagInfo 60 | function mq.ExecuteTextLink(link) end 61 | 62 | --- Format an achievement into an achievement link 63 | ---@param achievement achievement 64 | ---@param playerName string 65 | ---@return string 66 | function mq.FormatAchievementLink(achievement, playerName) end 67 | 68 | --- Format text into a dialog link 69 | ---@param keyword string 70 | ---@param text string 71 | ---@return string 72 | function mq.FormatDialogLink(keyword, text) end 73 | 74 | --- Format an item into an item link 75 | ---@param item item 76 | ---@return string 77 | function mq.FormatItemLink(item) end 78 | 79 | --- Format a spell into a spell link 80 | ---@param spell spell 81 | ---@param nameOverride? string Optional override for the spell name 82 | ---@return string 83 | function mq.FormatSpellLink(spell, nameOverride) end 84 | 85 | --- Parse a dialog link from a line of text 86 | ---@param line string 87 | ---@return DialogLinkInfo 88 | function mq.ParseDialogLink(line) end 89 | 90 | --- Parse an item link from a line of text 91 | ---@param line string 92 | ---@return ItemLinkInfo 93 | function mq.ParseItemLink(line) end 94 | 95 | --- Parse a spell link from a line of text 96 | ---@param line string 97 | ---@return SpellLinkInfo 98 | function mq.ParseSpellLink(line) end 99 | 100 | --- Strip links from a line of text 101 | ---@param line string 102 | ---@return string 103 | function mq.StripTextLinks(line) end 104 | -------------------------------------------------------------------------------- /mq/actors.lua: -------------------------------------------------------------------------------- 1 | ---@meta actors 2 | 3 | ---@class Actors 4 | actors = {} 5 | 6 | -- registers an actor and sets the message callback 7 | ---@param name string # The name of the mailbox 8 | ---@param message_handler fun(message: Message) # The lua function message handler 9 | ---@return Dropbox # The dropbox interface to the actor 10 | ---@overload fun(message_handler: fun(message: Message)): Dropbox # An overload that registers the script actor 11 | function actors.register(name, message_handler) end 12 | 13 | -- The send method to send a message to an actor anonymously 14 | ---@param address Address # The address to send to 15 | ---@param payload any # The message content 16 | ---@param response_callback fun(status: integer, message: Message) # The response callback for RPC messages 17 | ---@overload fun(address: Address, payload: any) # Send an addressed non-RPC message 18 | ---@overload fun(payload: any, response_callback: fun(status: integer, message: Message)) # Send an RPC message to all script actors with the same script 19 | ---@overload fun(payload: any) # Send a non-RPC message to all script actors with the same script 20 | function actors.send(address, payload, response_callback) end 21 | 22 | ---@enum actors.ResponseStatus 23 | actors.ResponseStatus = { 24 | ConnectionClosed = -1, -- Connection was closed during send 25 | NoConnection = -2, -- Connection could not be found 26 | RoutingFailed = -3, -- Could not find a way to route message to any recipient 27 | AmbiguousRecipient = -4, -- Message could not be routed to a single recipient 28 | } 29 | 30 | ---@class Address 31 | ---@field public mailbox? string # The mailbox of the actor 32 | ---@field public script? string # The script the actor is in 33 | ---@field public pid? integer # The windows process ID 34 | ---@field public name? string # A standalone application registered name 35 | ---@field public account? string # The account of the target client 36 | ---@field public server? string # The server shortname of the target client 37 | ---@field public character? string # The character name of the target client 38 | ---@field public absolute_mailbox? boolean # Used if the target actor is outside of lua 39 | address = {} 40 | 41 | ---@class Message 42 | ---@field public content any # The message content, can be a table or any primitive 43 | ---@field public sender Address # The address of the sender 44 | message = {} 45 | 46 | -- replies to an RPC message to be handled by the sender's response callback 47 | ---@param status integer # The message status integer 48 | ---@param payload any # The content of the message being sent back 49 | ---@overload fun(payload: any) # Overload that defaults status to 0 50 | function message:reply(status, payload) end 51 | 52 | -- sends a message back to the sender to be handled by the sender's message handler 53 | ---@param payload any # The content of the message being sent back 54 | function message:send(payload) end 55 | 56 | ---@class Dropbox 57 | dropbox = {} 58 | 59 | -- The send method to send a message from one actor to another 60 | ---@param address Address # The address to send to 61 | ---@param payload any # The message content 62 | ---@param response_callback fun(status: integer, message: Message) # The response callback for RPC messages 63 | ---@overload fun(address: Address, payload: any) # Send an addressed non-RPC message 64 | ---@overload fun(payload: any, response_callback: fun(status: integer, message: Message)) # Send an RPC message to all actors with the same mailbox 65 | ---@overload fun(payload: any) # Send a non-RPC message to all actors with the same mailbox 66 | function dropbox:send(address, payload, response_callback) end 67 | 68 | -- The unregister method to remove the actor from the central post office 69 | function dropbox:unregister() end 70 | 71 | return actors 72 | -------------------------------------------------------------------------------- /mq/alias.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | --[[ Primitives ]] 4 | ---@alias MQBoolean fun(): boolean 5 | ---@alias MQInt fun(): integer 6 | ---@alias MQFloat fun(): number 7 | ---@alias MQString fun(): string 8 | 9 | --[[ Userdata ]] 10 | ---@alias MQAltAbility altability | fun(): string|nil 11 | ---@alias MQBuff buff | fun(): string|nil 12 | ---@alias MQCachedBuff cachedbuff | fun(): string|nil 13 | ---@alias MQCharacter character | fun(): string|nil 14 | ---@alias MQCurrentZone currentzone | fun(): string|nil 15 | ---@alias MQFellowship fellowship | fun(): "TRUE" | "FALSE" 16 | ---@alias MQGround ground | fun(): string|nil 17 | ---@alias MQGroupMember groupmember | fun(): string|nil 18 | ---@alias MQHeading heading | fun(): string|nil 19 | ---@alias MQInvSlot invslot | fun(): string|nil 20 | ---@alias MQItem item | fun(): string|nil 21 | ---@alias MQMerchant merchant | fun(): string|nil 22 | ---@alias MQMercenary mercenary | fun(): string|nil 23 | ---@alias MQPet pet | fun(): string|'NO PET' 24 | ---@alias MQRaidMember raidmember | fun(): string|nil 25 | ---@alias MQSpawn spawn | fun(): string|nil 26 | ---@alias MQSpell spell | fun(): string|nil 27 | ---@alias MQSwitch switch | fun(filter): switch|string|nil 28 | ---@alias MQTarget target | fun(): string|nil 29 | ---@alias MQTimeStamp timestamp | fun(): string|nil 30 | ---@alias MQWindow window | fun(): "TRUE" | "FALSE" 31 | ---@alias MQZone zone | fun(): string|nil -------------------------------------------------------------------------------- /mq/datatype/_achievement.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class achievement 3 | ---@field Completed MQBoolean # If the achievement has been completed 4 | ---@field Description MQString # The achievement's description 5 | ---@field Hidden MQBoolean # If the achievement is hidden 6 | ---@field IconID MQInt # ID of the Achievement state. See [Achievement Icon](https://docs.macroquest.org/reference/data-types/datatype-achievement/#achievement-icon) for more information. 7 | ---@field ID MQInt # The achivement's unique ID 8 | ---@field Index MQInt # The index of the achivement. See [Achievement Indices](https://docs.macroquest.org/reference/top-level-objects/tlo-achievement/#note-about-achievement-indices) for more information. 9 | ---@field Locked MQBoolean # If the achievement is locked 10 | ---@field Name MQString # The achievement's name 11 | ---@field ObjectiveCount MQInt # The number of objectives in this achievement 12 | ---@field Open MQBoolean # If the achievement is open 13 | ---@field Points MQInt # The point value for the achievement 14 | ---@field State MQString # The achievement state. See [Achievement State](https://docs.macroquest.org/reference/data-types/datatype-achievement/#achievement-state) for more information. 15 | local achievement = {} 16 | 17 | ---@diagnostic disable: duplicate-set-field 18 | ---Find an objective by it's Description 19 | ---@param description string 20 | ---@return achievementobj 21 | function achievement.Objective(description) end 22 | 23 | ---Find an objective by it's Id 24 | ---@param id integer|string 25 | ---@return achievementobj 26 | function achievement.Objective(id) end 27 | ---@diagnostic enable: duplicate-set-field 28 | 29 | ---Generate an cheivement link. An optional name can be 30 | ---provided to display in the achievement, otherwise the 31 | ---current character's name will be used. 32 | ---@param name? string 33 | ---@return string 34 | function achievement.Link(name) end 35 | 36 | ---@return time # Calendar time when the achievement was completed. 37 | function achievement.CompletedTime() end -------------------------------------------------------------------------------- /mq/datatype/_achievementcategory.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class achievementcat 3 | ---@field ID MQInt #The unique ID for the category 4 | ---@field Name MQString #The category's display name 5 | ---@field Description MQString #The category's Description 6 | ---@field AchievementByIndex fun(index:integer|string):achievement Find an achievement by its index in this category 7 | ---@field AchievementCount MQInt #The number of achievements in this category 8 | ---@field CategoryByIndex fun(index:integer|string):integer Find a child category by its index in this category 9 | ---@field CategoryCount MQInt #The number of child categories in this category 10 | ---@field Points MQInt #The total earned points of achievements in this category 11 | ---@field CompletedAchievements MQInt #The number of achievements earned in this category and its subcategories 12 | ---@field TotalAchievements MQInt #The total number of achievements in this category and its subcategories 13 | ---@field ImageTextureName MQString #Name of the image texure that is used to represent this category in the Achievements Window 14 | ---@field Index MQInt #The index of the category in the achievement manager. For more information see [Achievement Indices](https://docs.macroquest.org/reference/top-level-objects/tlo-achievement/#note-about-achievement-indices) 15 | achievementcat = {} 16 | 17 | ---Find an achievement in this category by its ID 18 | ---@param id integer|string 19 | ---@return achievement 20 | function achievementcat.Achievement(id) end 21 | 22 | ---Find an achievement in this category by its Name 23 | ---@param name string 24 | ---@return achievement 25 | function achievementcat.Achievement(name) end 26 | 27 | ---Find a child category by its ID 28 | ---@param id integer|string 29 | ---@return achievementcat 30 | function achievementcat.Category(id) end 31 | 32 | ---Find a child category by its Name 33 | ---@param name string 34 | ---@return achievementcat 35 | function achievementcat.Category(name) end -------------------------------------------------------------------------------- /mq/datatype/_achievementmanager.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class achievementmgr 3 | ---@field AchievementByIndex fun(index:integer|string):achievement Find an achievement by its index 4 | ---@field AchievementCount MQInt #The number of achievements in the mananger 5 | ---@field CategoryByIndex fun(index:integer|string):achievementcat Find an achievement category by its index 6 | ---@field CategoryCount MQInt #The number of achievement categories in the mananger 7 | ---@field Points MQInt #The total number of accumulated achievement points 8 | ---@field CompletedAchievements MQInt #The number of completed achievements 9 | ---@field TotalAchievements MQInt #The number of available achievements 10 | ---@field Ready MQBoolean #Indicates that the manager has loaded all achievement data is ready to be used 11 | achievementmgr = {} 12 | 13 | ---Find an achievement by its ID 14 | ---@param id integer|string 15 | ---@return achievement 16 | function achievementmgr.Achievement(id) end 17 | 18 | ---Find an achievement by its Name 19 | ---@param name string 20 | ---@return achievement 21 | function achievementmgr.Achievement(name) end 22 | 23 | ---Find an achievement category by its ID 24 | ---@param id integer|string 25 | ---@return achievementcat 26 | function achievementmgr.Category(id) end 27 | 28 | ---Find an achivement category by its Name. 29 | ---Note: Using this method, only top-level categories are returned from the achievement manager 30 | ---@param name string 31 | ---@return achievementcat 32 | function achievementmgr.Category(name) end 33 | -------------------------------------------------------------------------------- /mq/datatype/_achievementobjective.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class achievementobj 3 | ---@field ID MQInt 4 | ---@field Description MQString 5 | ---@field Count MQInt 6 | ---@field RequiredCount MQString 7 | ---@field Completed MQBoolean 8 | ---@field Index MQInt -------------------------------------------------------------------------------- /mq/datatype/_advlootitem.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class advlootitem # Represents a discrete item being looted in an AdvLoot window 3 | ---@field public AlwaysGreed MQBoolean # The Always Greed (AG) state of the item. 4 | ---@field public AlwaysNeed MQBoolean # The Always Need (AN) state of the item. 5 | ---@field public AutoRoll MQBoolean # The Auto Roll state (dice icon) of the item. 6 | ---@field public Corpse MQSpawn The spawn representing the corpse that is being looted, if available. 7 | ---@field public Greed MQBoolean # The Greed (GD) state of the item. 8 | ---@field public IconID MQInt # The ID of the icon for the item. 9 | ---@field public ID MQInt # The ID of the item. 10 | ---@field public Index MQInt The positional index of the item. 11 | ---@field public Name MQString # The name of the item. 12 | ---@field public Need MQBoolean # The Need (ND) state of the item. 13 | ---@field public Never MQBoolean # The Never (NV) state of the item. 14 | ---@field public No MQBoolean # No The No state of the item. 15 | ---@field public NoDrop MQBoolean # Indicates if the item is NO DROP. 16 | ---@field public StackSize MQInt # The size of the stack of items being looted. -------------------------------------------------------------------------------- /mq/datatype/_alert.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class alert 3 | ---@field public Size MQInt # Get the number of alerts 4 | ---@field public List alertlist | fun(index):alertlist # Get the item from the list at the specified index -------------------------------------------------------------------------------- /mq/datatype/_alertlist.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class alertlist MQDatatype 3 | ---@field public AlertList MQInt #Any spawn on the associated alert list 4 | ---@field public bAlert MQBoolean #Indicates usage of alert filter 5 | ---@field public bAura MQBoolean #Any aur. 6 | ---@field public bBanker MQBoolean #Any banker 7 | ---@field public bBanner MQBoolean #Any banner 8 | ---@field public bCampfire MQBoolean #Any campfire 9 | ---@field public bDps MQBoolean #Any player that is a DPS class 10 | ---@field public bExactName MQBoolean #Name match requiries an exact match 11 | ---@field public bFellowship MQBoolean #Any member of the fellowship 12 | ---@field public bGM MQBoolean #Any player flagged as a GM 13 | ---@field public bGroup MQBoolean #Any member of the group 14 | ---@field public bHealer MQBoolean #Any player that is a healer class 15 | ---@field public bKnight MQBoolean #Any player that is a knight 16 | ---@field public bKnownLocation MQBoolean #Indicates usage of a loc filter 17 | ---@field public bLFG MQBoolean #Any player that is flagged as LFG 18 | ---@field public bLight MQBoolean #Indicates usage of a light filter 19 | ---@field public bLoS MQBoolean #Any spawn in line of sight 20 | ---@field public bMerchant MQBoolean #Any merchant 21 | ---@field public bNamed MQBoolean #Any "named" NPC 22 | ---@field public bNearAlert MQBoolean #Indicates usage of nearalert filter 23 | ---@field public bNoAlert MQBoolean #Indicates usage of noalert filter 24 | ---@field public bNoGroup MQBoolean #Exclude any player that is in the group 25 | ---@field public bNoGuild MQBoolean #Exclude any player that is in the guild 26 | ---@field public bNoPet MQBoolean #Exclude any spawn that is a pet 27 | ---@field public bNotNearAlert MQBoolean #Indicates usage of notnearalert filter 28 | ---@field public BodyType MQString #Any spawn with given body type 29 | ---@field public bRaid MQBoolean #Any member of the raid 30 | ---@field public bSlower MQBoolean #Any player that is a slower 31 | ---@field public bSpawnID MQBoolean #Indicates usage of the id filter 32 | ---@field public bTank MQBoolean #Any player that is a tank class 33 | ---@field public bTargetable MQBoolean #Any spawn that is targetable 34 | ---@field public bTargNext MQBoolean #Indicates usage of the next filter 35 | ---@field public bTargPrev MQBoolean #Indicates usage of the prev filter 36 | ---@field public bTrader MQBoolean #Any player that is a trader 37 | ---@field public bTributeMaster MQBoolean #Any NPC that is a tribute master 38 | ---@field public Class MQString #Any spawn that is the given class 39 | ---@field public FRadius MQInt #Any spawn that is given distance from the given loc filter 40 | ---@field public FromSpawnID MQInt #Search starts at given spawn id 41 | ---@field public GuildID MQInt Any member of the guild with the given id 42 | ---@field public Light MQString #Any spawn that is equipped with the given light source 43 | ---@field public MaxLevel MQInt #Any spawn that is at this level or lower 44 | ---@field public MinLevel MQInt #Any spawn that is at this level or greater 45 | ---@field public Name MQString #Any spawn with the given name 46 | ---@field public NearAlertList MQInt #Any spawn near the given alert list 47 | ---@field public NoAlertList MQInt #Excludes any spawn in the given alert list 48 | ---@field public NotID MQInt #Excludes any spawn with the given id 49 | ---@field public NotNearAlertList MQInt #Excludes any spawn near the given alert list 50 | ---@field public PlayerState MQInt #Any spawn with the given state 51 | ---@field public Race MQString #Any spawn with the given race 52 | ---@field public Radius MQInt #Excludes the spawn if any player is within this distance (nopcnear filter) 53 | ---@field public SortBy MQInt #Indicates the sort order of the filter 54 | ---@field public Spawn MQSpawn If an ID or Name is part of the filter, attempts to return a spawn with the matching ID or Name 55 | ---@field public SpawnID MQInt #Any spawn with the given Spawn ID 56 | ---@field public SpawnType MQInt #Any spawn with the given type 57 | ---@field public xLoc MQInt #x component of the loc filter 58 | ---@field public yLoc MQInt #y component of the loc filter 59 | ---@field public ZRadius MQInt #z distance component of the loc filter -------------------------------------------------------------------------------- /mq/datatype/_altability.lua: -------------------------------------------------------------------------------- 1 | --- @class altability 2 | --- @field public AARankRequired MQFloat # Rank required to train 3 | --- @field public CanTrain MQBoolean # Returns true/false on if the Alternative Ability can be trained 4 | --- @field public Cost MQFloat # Base cost to train 5 | --- @field public Description MQString # Basic description 6 | --- @field public ID MQInt # ID 7 | --- @field public Index MQFloat # Returns the index number of the Alternative Ability 8 | --- @field public MaxRank MQFloat # Max rank available in this ability 9 | --- @field public MinLevel MQFloat # Minimum level to train 10 | --- @field public MyReuseTime MQFloat # Reuse time with any hastened AA abilties 11 | --- @field public Name MQString # Name 12 | --- @field public NextIndex MQFloat # Returns the next index number of the Alternative Ability 13 | --- @field public PointsSpent MQFloat # Returns the amount of points spent on an AA 14 | --- @field public Passive MQBoolean # Returns true/false on if the Alternative Ability is passive 15 | --- @field public RequiresAbility MQAltAbility # Required ability (if any) 16 | --- @field public Rank MQFloat # Returns the Rank of the AA 17 | --- @field public RequiresAbilityPoints MQFloat # Points required in above ability 18 | --- @field public ReuseTime MQFloat # Reuse time in seconds 19 | --- @field public ShortName MQString # Short name 20 | --- @field public Spell MQSpell # Spell used by the ability (if any) 21 | --- @field public Type MQFloat # Type (1-6) -------------------------------------------------------------------------------- /mq/datatype/_argb.lua: -------------------------------------------------------------------------------- 1 | --- @class argb 2 | --- @field public A MQFloat Alpha 3 | --- @field public R MQFloat Red 4 | --- @field public G MQFloat Green 5 | --- @field public B MQFloat Blue 6 | --- @field public Int MQInt The integer formed by ARGB 7 | --- @field public ToString MQString The hex value of the integer formed by ARGB -------------------------------------------------------------------------------- /mq/datatype/_array.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class array 3 | ---@deprecated public Dimensions number Number of dimensions in the array 4 | ---@deprecated public Size number Total number of elements in the array 5 | ---@deprecated public ToString string None 6 | 7 | -------------------------------------------------------------------------------- /mq/datatype/_augtype.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class augtype Describes data about an augmentation slot in an item 3 | ---@field public Empty MQBoolean True if the slot is empty 4 | ---@field public Infusable MQBoolean True if this is a hidden energeian power source slot 5 | ---@field public Item MQItem The item socketed in this slot, if any 6 | ---@field public Name MQString THe name of the item socketed in this slot, if any 7 | ---@field public Slot MQInt Index of the augment slot 8 | ---@field public Solvent MQInt Item ID of the solvent used to remove this item, if any 9 | ---@field public Type MQInt Type Type of augment slot 10 | ---@field public Visible MQBoolean True if this slot is visible to the user -------------------------------------------------------------------------------- /mq/datatype/_auratype.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class auratype Describes an auratype 3 | ---@field public ID MQInt ID of the Aura 4 | ---@field public Name MQString Name of the Aura 5 | ---@field public SpawnID MQInt ID of the spawn that emits aura -------------------------------------------------------------------------------- /mq/datatype/_bandolier.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class bandolier Used to access information about bandolier sets on your character 3 | ---@field public Active MQBoolean Indicates if the bandolier set is active 4 | ---@field public Index MQInt Returns the index number of the bandolier set 5 | ---@field public Item fun(index:integer|string): bandolieritem Provides information about the specified item. Returns the Nth item in the set (Primary, Secondary, Ranged, Ammo) 6 | ---@field public Name MQString Returns the name of the bandolier set 7 | local bandolier = {} 8 | 9 | ---Activate the bandolier profile 10 | function bandolier.Activate() end -------------------------------------------------------------------------------- /mq/datatype/_bandolieritem.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class bandolieritem 3 | ---@field public IconID MQInt Returns the icon id for the item 4 | ---@field public ID MQInt Returns the item id for the item 5 | ---@field public Name MQString Returns the name of the item -------------------------------------------------------------------------------- /mq/datatype/_bank.lua: -------------------------------------------------------------------------------- 1 | ---@alias itemsizenumber 0 | 1 | 2 | 3 | 4 2 | ---@alias itemsizestring "tiny" | "small" | "medium" | "large" | "giant" 3 | 4 | --- @class bank 5 | --- @field public BagSlots MQInt How many bag slots (base slots for bags/items) your bank has. 6 | --- @field public FreeSlots fun(size: itemsizenumber|itemsizestring): number How many free (empty) slots your bank has. This includes slots where you have a bag and the bag has empty slots. It accepts an index specifying one of the case insensitive bag sizes (tiny, small, medium, large, giant) or the corresponding number (0, 1, 2, 3, 4). 7 | --- @field public TotalSlots MQInt How many total slots your bank has. 8 | --- @field public Platinum MQInt How much platinum you have in your bank. 9 | --- @field public Gold MQInt How much gold you have in your bank. 10 | --- @field public Silver MQInt How much silver you have in your bank. 11 | --- @field public Copper MQInt How much copper you have in your bank. -------------------------------------------------------------------------------- /mq/datatype/_body.lua: -------------------------------------------------------------------------------- 1 | --- @class body 2 | --- @field public ID number THe ID of the body type 3 | --- @field public Name string The full name of the body type 4 | --- @field public ToString string The full name of the body type -------------------------------------------------------------------------------- /mq/datatype/_bool.lua: -------------------------------------------------------------------------------- 1 | --- @class bool 2 | --- @field public ToString MQString # "TRUE" for non-zero, or "FALSE" for zero -------------------------------------------------------------------------------- /mq/datatype/_buff.lua: -------------------------------------------------------------------------------- 1 | --- @class buff : spell 2 | --- @field public Counters MQFloat # The number of counters added by the buff 3 | --- @field public Dar MQFloat # The remaining damage absorption of the buff (if any). This is not entirely accurate, it will only show you to the Dar of your spell when it was initially cast, or what it was when you last zoned (whichever is more recent). 4 | --- @field public Duration timestamp # The time remaining before the buff fades (not total duration) 5 | --- @field public ID MQInt # The ID of the buff or shortbuff slot 6 | --- @field public Level MQFloat # The level of the person that cast the buff on you (not the level of the spell) 7 | --- @field public Mod MQFloat # The modifier to a bard song 8 | --- @field public Spell MQSpell # The spell 9 | --- @field public ToString MQString # Same as Name 10 | local buff = nil 11 | 12 | ---Removes the named/partial name buff 13 | function buff.Remove() end 14 | 15 | --[[ 16 | 17 | Caster 18 | CountersCorruption 19 | CountersCurse 20 | CountersDisease 21 | CountersPoison 22 | Dar 23 | Duration 24 | HitCount 25 | ID 26 | Level 27 | Mod 28 | Spell 29 | TotalCounters 30 | 31 | ]] 32 | -------------------------------------------------------------------------------- /mq/datatype/_cachedBuff.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---Using CachedBuff to get buff info on targets, group members etc, only requires you to target the entity once. 3 | ---The upside is obviously that we don't have to target back and forth constantly. 4 | ---@class cachedbuff : spell 5 | ---@field public CasterName MQString #Returns the name of the caster who applied the cached buff 6 | ---@field public Caster MQString #Same as *CasterName*, added for conistency. 7 | ---@field public Count MQInt #Returns the amount of buffs catched, or -1 it none 8 | ---@field public Duration ticks #Returns a count of "ticks" 9 | ---@field public OriginalDuration MQInt #Returns the original duration of the buff 10 | ---@field public Slot MQInt #Returns the buff slot the target had the buff in 11 | ---@field public Spell MQSpell #Access the spell 12 | ---@field public SpellID MQInt #Returns the buff's spell ID 13 | ---@field public Staleness timestamp|fun(): timestamp How long has it been since this information was refreshed 14 | -------------------------------------------------------------------------------- /mq/datatype/_charselectlist.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/macroquest/mq-definitions/d3f332eeca65f73e64053046bb6589c018e433c0/mq/datatype/_charselectlist.lua -------------------------------------------------------------------------------- /mq/datatype/_class.lua: -------------------------------------------------------------------------------- 1 | ---@class class 2 | ---@field public CanCast MQBoolean # Can cast seplls, including Bard 3 | ---@field public ClericType MQBoolean # Cleric/Paladin? 4 | ---@field public DruidType MQBoolean # Druid/Ranger? 5 | ---@field public HealerType MQBoolean # Cleric/Druid/Shaman? 6 | ---@field public ID MQInt # The class's ID # 7 | ---@field public MercType MQBoolean # Mercenary? 8 | ---@field public Name MQString # The long name, as in "Ranger" 9 | ---@field public NecromancerType MQBoolean # Necromancer/Shadow Knight? 10 | ---@field public PureCaster MQBoolean # Any one of: Cleric, Druid, Shaman, Necromancer, Wizard, Mage, Enchanter 11 | ---@field public ShamanType MQBoolean # Shaman/Beastlord? 12 | ---@field public ShortName MQString # The short name as in "RNG" -------------------------------------------------------------------------------- /mq/datatype/_corpse.lua: -------------------------------------------------------------------------------- 1 | ---@class corpse : spawn # Data related to the current lootable corpse. See [Corpse](https://docs.macroquest.org/reference/top-level-objects/tlo-corpse/) 2 | ---@field public Items MQFloat # Number of items on the corpse 3 | ---@field public Open MQBoolean # Corpse open? 4 | local corpse = {} 5 | 6 | ---@diagnostic disable: duplicate-set-field 7 | --- Finds an item by partial name in this corpse (use = for exact match) 8 | ---@param name string 9 | ---@return MQItem 10 | function corpse.Item(name) end 11 | 12 | --- Nth item on the corpse 13 | ---@param index integer 14 | ---@return MQItem 15 | function corpse.Item(index) end 16 | ---@diagnostic enable: duplicate-set-field -------------------------------------------------------------------------------- /mq/datatype/_currentzone.lua: -------------------------------------------------------------------------------- 1 | --- @class currentzone 2 | --- @field public Dungeon boolean Are we in a dungeon 3 | --- @field public Gravity MQFloat Gravity 4 | --- @field public ID number Zone ID 5 | --- @field public Indoor boolean Are we indoors? 6 | --- @field public MaxClip MQFloat Maximum clip plane allowed in zone 7 | --- @field public MinClip MQFloat Minimum clip plane allowed in zone 8 | --- @field public Name string Full zone name 9 | --- @field public NoBind boolean Can we bind here? 10 | --- @field public Outdoor boolean Are we outdoors? 11 | --- @field public ShortName string Short zone name 12 | --- @field public SkyType number Sky type 13 | --- @field public Type number Zone type:0=Indoor Dungeon 1=Outdoor 2=Outdoor City 3=Dungeon City 4=Indoor City 5=Outdoor Dungeon 14 | --- @field public FOgOnOff number off 15 | --- @field public ToString string Same as Name -------------------------------------------------------------------------------- /mq/datatype/_cursorattachment.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---@alias cursorattachmenttype "ITEM" | "MONEY" | "MEMORIZE_SPELL" | "SOCIAL" | "MENU_BUTTON" | "ABILITY" | "COMBAT" | "INVSLOT" | "SPELL_GEM" | "PET_COMMAND" | "SKILL" | "MELEE_ABILITY" | "LEADERSHIP_ABILITY" | "ITEM_LINK" | "KRONO_SLOT" | "COMMAND" | "COMBAT_ABILITY" | "MOUNT_KEYRING" | "ILLUSION_KEYRING" | "FAMILIAR_KEYRING" | "TELEPORT_KEYRING" 4 | 5 | ---@class cursorattachment # This datatype deals strictly with information items on a keyring 6 | ---@field Index MQInt The index of the cursor attachment 7 | ---@field Type cursorattachmenttype Where on this keyring list 8 | ---@field Item MQItem The item attached to the cursor 9 | ---@field Spell MQSpell The spell attached to the cursor 10 | ---@field ButtonText string The Text of the button attached to the cursor 11 | ---@field Quanity MQInt The quantity of the item attached to the cursor 12 | ---@field ItemID MQInt The ID of the item attached to the cursor 13 | ---@field IconID MQInt The Icon ID of the item attached to the cursor 14 | -------------------------------------------------------------------------------- /mq/datatype/_deity.lua: -------------------------------------------------------------------------------- 1 | --- @class deity 2 | --- @field public ID number The deity's ID # 3 | --- @field public Name string The full deity name 4 | --- @field public Team string The team name 5 | --- @field public ToString string Same as Name -------------------------------------------------------------------------------- /mq/datatype/_dynamiczone.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class dynamiczone 3 | ---@field public InRaid fun():boolean 4 | ---@field public Leader fun():dzmember The leader of the dynamic zone 5 | ---@field public LeaderFlagged MQBoolean #Returns true if the dzleader can successfully enter the dz (this also means the dz is actually Loaded.)Example: ${DynamicZone.LeaderFlagged} 6 | ---@field public MaxMembers MQInt #Maximum number of characters that can enter this dynamic zone 7 | ---@field public Members MQInt #Current number of characters in the dynamic zone 8 | ---@field public MinMembers MQInt #Minimum of members required 9 | ---@field public Name MQString #The full name of the dynamic zone 10 | dynamiczone = {} 11 | 12 | ---Find the dynamic zone member by id 13 | ---@param id integer|string 14 | ---@return dzmember 15 | function dynamiczone.Member(id) end 16 | 17 | ---Find the dynamic zone member by name 18 | ---@param name string 19 | ---@return dzmember 20 | function dynamiczone.Member(name) end 21 | 22 | ---comment 23 | ---@param id integer|string 24 | ---@return dztimer 25 | function dynamiczone.Timer(id) end 26 | 27 | ---comment 28 | ---@param name string 29 | ---@return dztimer 30 | function dynamiczone.Timer(name) end 31 | 32 | return dynamiczone -------------------------------------------------------------------------------- /mq/datatype/_dzmember.lua: -------------------------------------------------------------------------------- 1 | --- @class dzmember 2 | --- @field public Flagged boolean Returns true if the dzmember can successfully enter the dz.Example:${DynamicZone.Member[x].Flagged} where x is either index or the name. 3 | --- @field public Name string The name of the member 4 | --- @field public Status string The status of the member - one of the following: Unknown, Online, Offline, In Dynamic Zone, Link Dead 5 | --- @field public ToString string Same as Name -------------------------------------------------------------------------------- /mq/datatype/_dztimer.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class dztimer 3 | ---@field ExpeditionName MQString #The name of the expedition 4 | ---@field EventName MQString #The name of the event 5 | ---@field Timer fun():timestamp The timestamp indicating when this lockout expires 6 | ---@field EventID MQInt #ID of the event. Value only unique per Expedition. Non-event lockouts (Replay Timer) will have a -1 event ID 7 | -------------------------------------------------------------------------------- /mq/datatype/_event.lua: -------------------------------------------------------------------------------- 1 | --- @class event 2 | --- @field public List string Returns a list of loaded Events, separated by commas 3 | --- @field public Triggered integer Returns the number of events which have been triggered but not checked by /doevents 4 | --- @field public ToString string Returns a list of loaded Events, separated by commas -------------------------------------------------------------------------------- /mq/datatype/_everquest.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class everquest # Data types related to the current EverQuest session 3 | ---@field public GameState MQString Shows the current game state. Values: CHARSELECT, INGAME, PRECHARSELECT, UNKNOWN 4 | ---@field public LoginName MQString Your station name 5 | ---@field public Server MQString Full name of your server 6 | ---@field public LastCommand MQString Last command entered 7 | ---@field public LastTell MQString Name of the last person to send you a tell 8 | ---@field public Running MQInt Running time of current MQ session, in milliseconds 9 | ---@field public MouseX MQInt Mouse's X location 10 | ---@field public MouseY MQInt Mouse's Y location 11 | ---@field public Ping MQInt Your current ping 12 | ---@field public LClickedObject MQBoolean Returns True if an object has been left clicked 13 | ---@field public WinTitle MQString Titlebar text of the Evequest window 14 | ---@field public PID MQInt Your current (Process ID) 15 | ---@field public PPriority MQInt Returns the processor priorty that Everquest is set to. Values: UNKNOWN, LOW, BELOW NORMAL, NORMAL, ABOVE NORMAL, HIGH, REALTIME 16 | ---@field public ChatChannels MQInt Returns the number of channels currently joined 17 | ---@field public ChatChannel fun(channel:integer): string Returns the name of the channel number 18 | ---@field public ViewportX MQInt EverQuest viewport upper left (X) position 19 | ---@field public ViewportY MQInt EverQuest viewport upper left (Y) position 20 | ---@field public ViewportXMax MQInt EverQuest lower right (X) position 21 | ---@field public ViewportYMax MQInt EverQuest lower right (Y) position 22 | ---@field public ViewportXCenter MQInt EverQuest viewport center (X) position 23 | ---@field public ViewportYCenter MQInt EverQuest viewport center (Y) position 24 | ---@field public ScreenMode MQInt Returns the screenmode as in integer, 2 is Normal and 3 is No Windows 25 | ---@field public LayoutCopyInProgress MQBoolean Returns True if a layout copy is in process and False if not 26 | ---@field public LastMouseOver fun(): window Returns the last window you moused over 27 | ---@field public CharSelectList MQInt Currently returns the zone ID the character is currenty in 28 | ---@field public CurrentUI MQString Return a string representing the currently loaded UI skin 29 | ---@field public IsDefaultUILoaded MQBoolean Returns a True or False if the "Default" UI skin is the one loaded 30 | ---@field public HWND MQInt Window Handle 31 | ---@field public Foreground MQBoolean Returns True if EverQuest is in the foreground 32 | ---@field public ValidLoc fun(coordinates:string): boolean Returns true if the given coordinates are valid 33 | ---@field public Path MQString Path to your EverQuest folder -------------------------------------------------------------------------------- /mq/datatype/_evolvingitem.lua: -------------------------------------------------------------------------------- 1 | --- @class evolving 2 | --- @field public ExpPct MQFloat Percentage of experience that the item has gained 3 | --- @field public ExpOn MQBoolean #Is evolving item experience turned on for this item? 4 | --- @field public Level MQInt #The level of the evolving item. 5 | --- @field public MaxLevel MQInt #The maximum level of the evolving item 6 | --- @field public ToString MQString #Same as ExpOn -------------------------------------------------------------------------------- /mq/datatype/_fellowship.lua: -------------------------------------------------------------------------------- 1 | --- @class fellowship 2 | --- @field public Campfire MQBoolean #TRUE if campfire is up, FALSE if not 3 | --- @field public CampfireDuration ticks | fun(): ticks Time left on current campfire 4 | --- @field public CampfireX MQFloat #Campfire X location 5 | --- @field public CampfireY MQFloat #Campfire Y location 6 | --- @field public CampfireZ MQFloat #Campfire Z location 7 | --- @field public CampfireZone MQZone Zone information for the zone that contains your campfire 8 | --- @field public ID MQInt #Fellowship ID 9 | --- @field public Leader MQString #Fellowship leader's name 10 | --- @field public Members MQInt #Number of members in the fellowship 11 | --- @field public MotD MQString #Fellowship Message of the Day 12 | --- @field public ToString MQString #TRUE if currently in a fellowship, FALSE if not 13 | local fellowship = nil 14 | 15 | ---@diagnostic disable: duplicate-set-field 16 | ---@param name string # Character name 17 | ---@return fellowshipmember 18 | function fellowship.Member(name) end 19 | 20 | ---Find an item in a list box by partial match (use window.List[=text] for exact). Only works on list boxes. Use of y is optional and allows selection of the column of the window to search in. 21 | ---@param index integer|string # Index 22 | ---@return fellowshipmember 23 | function fellowship.Member(index) end 24 | 25 | ---@diagnostic enable: duplicate-set-field 26 | -------------------------------------------------------------------------------- /mq/datatype/_fellowshipmember.lua: -------------------------------------------------------------------------------- 1 | --- @class fellowshipmember 2 | --- @field public Class fun(): class Member's class 3 | --- @field public Level MQInt #Member's level 4 | --- @field public LastOn fun(): ticks How long since member was last online 5 | --- @field public Name MQString #Member's name 6 | --- @field public Zone MQZone Zone information for the member's zone 7 | --- @field public ToString MQString #player name -------------------------------------------------------------------------------- /mq/datatype/_float.lua: -------------------------------------------------------------------------------- 1 | --- @class float 2 | --- @field public Deci string The number as a string with one place of precision, i.e. ###.# 3 | --- @field public Centi string The number as a string with two places of precision, i.e. ###.## 4 | --- @field public Int number Integer portion of the number truncated rather than rounded, e.g. 12.779 returns 12 5 | --- @field public Milli string The number as a string with three places of precision, i.e. ###.### 6 | --- @field public Precision string The number as a string with # places of precision 7 | --- @field public ToString string Same as Centi -------------------------------------------------------------------------------- /mq/datatype/_framelimiter.lua: -------------------------------------------------------------------------------- 1 | ---@class framelimiter 2 | ---@field public BackgroundFPS MQFloat # Value of the target background fps setting. 3 | ---@field public ClearScreen MQBoolean # Value of the clear screen when not rendering setting. 4 | ---@field public CPU MQFloat # Current CPU usage as % 5 | ---@field public Enabled MQBoolean # TRUE if the frame limiter feature is currently active. 6 | ---@field public ForegroundFPS MQFloat # Value of the target foreground fps setting. 7 | ---@field public MinSimulationFPS MQFloat # Value of the minimum simualtion rate setting. 8 | ---@field public RenderFPS MQFloat # Current graphics scene frame rate (visible fps). 9 | ---@field public SaveByChar MQBoolean # TRUE if settings for the frame limiter are being saved by character. 10 | ---@field public SimulationFPS MQFloat # Current simulation frame rate (game updates per second). 11 | ---@field public Status MQString # Either "Foreground" or "Background". 12 | -------------------------------------------------------------------------------- /mq/datatype/_friends.lua: -------------------------------------------------------------------------------- 1 | --- @class friends 2 | --- @field public ToString MQString # Number of friends on your friends list 3 | local friends = nil 4 | 5 | ---@diagnostic disable: duplicate-set-field 6 | ---@param name string 7 | ---@return boolean 8 | function friends.Friend(name) end 9 | 10 | ---@param index integer|string 11 | ---@return string # Returns the name of friend list member at [index] 12 | function friends.Friend(index) end 13 | ---@diagnostic enable: duplicate-set-field -------------------------------------------------------------------------------- /mq/datatype/_ground.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class ground 3 | ---@field public ID MQInt # Ground item ID (not the same as item ID, this is like spawn ID) 4 | ---@field public Distance MQFloat # Distance from player to ground item 5 | ---@field public X MQFloat # X coordinate 6 | ---@field public Y MQFloat # Y coordinate 7 | ---@field public Z MQFloat # Z coordinate 8 | ---@field public Heading MQHeading # Ground item is facing this heading 9 | ---@field public Name MQString # Name 10 | ---@field public HeadingTo MQHeading # Direction player must move to meet this ground item 11 | ---@field public LineOfSight MQBoolean # Returns TRUE if ground spawn is in line of sight 12 | ---@field public DisplayName MQFloat # Displays name of the grounspawn 13 | ---@field public Distance3D MQFloat # Distance from player to ground item 14 | ---@field public SubID MQInt # ??? 15 | ---@field public ZoneID MQInt # ID of the zone 16 | ---@field public First MQGround 17 | ---@field public Last MQGround 18 | ---@field public Next MQGround 19 | ---@field public Prev MQGround 20 | ---@field public DoFace fun() # Will cause the toon to face the called for spawn if it exists 21 | ---@field public DoTarget fun() # Will cause the toon to target the called for spawn if it exists 22 | ---@field public Grab fun() # Picks up the ground spawn 23 | ---@field public W MQFloat # X coordinate (Westward-positive) 24 | ---@field public N MQFloat # Y coordinate (Northward-positive) 25 | ---@field public U MQFloat # Z coordinate (Upward-positive) 26 | ---@field public ToString MQString # Same as ID -------------------------------------------------------------------------------- /mq/datatype/_group.lua: -------------------------------------------------------------------------------- 1 | --- @class group 2 | --- @field public AnyoneMissing MQBoolean # TRUE if someone is missing in group, offline, in other zone or simply just dead 3 | --- @field public CasterMercCount MQFloat # Count of how many Caster DPS mercenaries are in your group 4 | --- @field public Cleric MQString # Will now return the cleric as a spawntype if a cleric is in the group (not a mercenary but a REAL cleric) 5 | --- @field public GroupSize MQFloat # Number of members in your group, including yourself 6 | --- @field public HealerMercCount MQFloat # Count of how many Healer mercenaries are in your group 7 | --- @field public Injured fun(amount: integer): MQInt # Will return the numbers of people in the group that has a hp percent lower than [amount] 8 | --- @field public Leader MQGroupMember # Data on the leader of the group 9 | --- @field public LowMana fun(amount: integer): MQInt # Will return the number of people in the group that have a mana percent lower than [amount] 10 | --- @field public MainAssist MQGroupMember # Data on the main assist of the group 11 | --- @field public MainTank MQGroupMember # Data on the main tank of the group 12 | --- @field public MarkNpc MQGroupMember # Data on the group member who can mark NPCs, if one is assigned 13 | --- @field public MasterLooter MQGroupMember # Data on the Master Looter of the group, if one is assigned 14 | --- @field public MeleeMercCount MQFloat # Count of how many Melee DPS mercenaries are in your group 15 | --- @field public Members MQFloat # Total number of group members, excluding yourself 16 | --- @field public MercenaryCount MQFloat # Count of how many Mercenaries are in the group 17 | --- @field public MouseOver MQString # Returns the name of the group member your mouse is hovering over 18 | --- @field public Offline MQBoolean # Will return a TRUE if offline, and FALSE if online 19 | --- @field public OtherZone MQBoolean # Will return a Bool TRUE if online but in another zone and FALSE if online and in same zone as you. 20 | --- @field public Present MQInt # Number of group members present in zone (not including you) 21 | --- @field public Puller MQGroupMember # Data on the puller of the group 22 | --- @field public TankMercCount MQFloat # Count of how many Tank mercenaries are in your group 23 | --- @field public ToString MQString # Same as Members 24 | Group = nil 25 | 26 | ---Accesses #th member of your group; 0 is you, 1 is the first person in the group list, etc. 27 | ---@param index integer|string 28 | ---@return MQGroupMember 29 | function Group.Member(index) end 30 | 31 | ---Which number in the group the PC with name is 32 | ---@param name string 33 | ---@return integer 34 | function Group.Member(name) end -------------------------------------------------------------------------------- /mq/datatype/_groupmember.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class groupmember : spawn 3 | ---@field public Index MQFloat #Which number in the group the member is 4 | ---@field public Leader MQBoolean #TRUE if the member is the group's leader, FALSE otherwise 5 | ---@field public Level MQFloat #The member's level 6 | ---@field public MainAssist MQBoolean #TRUE if the member is designated as the group's Main Assist, FALSE otherwise 7 | ---@field public MainTank MQBoolean #TRUE if the member is designated as the group's Main Tank, FALSE otherwise 8 | ---@field public Mercenary MQBoolean #TRUE if the member is a mercenary, FALSE otherwise 9 | ---@field public Name MQString #The name of the group member. This works even if they are not in the same zone as you. 10 | ---@field public Offline MQBoolean #TRUE if the member is offline and FALSE if online 11 | ---@field public OtherZone MQBoolean #TRUE if the member is online but in another zone and FALSE if online and in same zone as you. 12 | ---@field public Present MQBoolean #TRUE if the member is online and in same zone and FALSE if online and not in same zone as you. 13 | ---@field public Puller MQBoolean #TRUE if the member is designated as the group's Puller, FALSE otherwise 14 | ---@field public Spawn spawn Accesses the group member's spawn directly. This is only really needed to access Spawn.Name, instead of GroupMember.Name, as spawn is inherited automatically. 15 | ---@field public ToString MQString #Same as Name -------------------------------------------------------------------------------- /mq/datatype/_heading.lua: -------------------------------------------------------------------------------- 1 | --- @class heading 2 | --- @field public Clock MQFloat # The nearest clock direction, e.g. 1-12 3 | --- @field public Degrees MQFloat # Heading in degrees 4 | --- @field public DegreesCCW MQFloat # Heading in degrees counter-clockwise. This is the way the rest of MQ and EQ uses it. 5 | --- @field public Name MQString # The long compass direction, e.g. "south by southeast" 6 | --- @field public ShortName MQString # The short compass direction, e.g. "SSE" -------------------------------------------------------------------------------- /mq/datatype/_int.lua: -------------------------------------------------------------------------------- 1 | --- @class int 2 | --- @field public Float MQFloat The number as a float (123 is represented as 123.0) 3 | --- @field public Hex string The hex value of the integer (10 is represented as 0xA) 4 | --- @field public Reverse number Endianness reversed 5 | --- @field public ToString string The number -------------------------------------------------------------------------------- /mq/datatype/_inventory.lua: -------------------------------------------------------------------------------- 1 | --- @class inventory 2 | --- @field public Bank bank Your bank, only including the primary slots and currencies (not including shared or other features) -------------------------------------------------------------------------------- /mq/datatype/_invslot.lua: -------------------------------------------------------------------------------- 1 | --- @class invslot 2 | --- @field public ID MQInt # ID of this item slot (usable directly by /itemnotify) 3 | --- @field public Item MQItem # Item data for the item in this slot 4 | --- @field public Name MQString # For inventory slots not inside packs, the slot name, otherwise NULL 5 | --- @field public Pack MQInvSlot # Container that must be opened to access the slot with /itemnotify 6 | --- @field public Slot MQInt # Slot number inside the pack which holds the item, otherwise NULL 7 | --- @field public ToString MQString # Same as ID -------------------------------------------------------------------------------- /mq/datatype/_item.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---@diagnostic disable: duplicate-doc-field 4 | ---@class item Contains the properties that describe an item 5 | ---@field public AC MQFloat AC value on item 6 | ---@field public AGI MQFloat AGI value on item 7 | ---@field public Accuracy MQFloat Accuracy 8 | ---@field public Attack MQFloat Attack value on item 9 | ---@field public Attuneable MQBoolean Attuneable? 10 | ---@field public AugRestrictions MQFloat Augment Restrictions 11 | ---@field public Augs MQFloat Number of augs on this item 12 | ---@field public AugSlot fun(slot:integer): augtype Retreive the augment in the specified slot number 13 | ---@field public AugSlot1 MQFloat Aug slot 1 14 | ---@field public AugSlot2 MQFloat Aug slot 2 15 | ---@field public AugSlot3 MQFloat Aug slot 3 16 | ---@field public AugSlot4 MQFloat Aug slot 4 17 | ---@field public AugSlot5 MQFloat Aug slot 5 18 | ---@field public AugSlot6 MQFloat Aug slot 6 19 | ---@field public AugType MQFloat Augment Type 20 | ---@field public Avoidance MQFloat Avoidance 21 | ---@field public BuyPrice MQFloat The cost to buy this item from active merchant 22 | ---@field public Blessing string Name of the blessing this item gives 23 | ---@field public CastTime MQFloat Spell effect's cast time (in seconds) 24 | ---@field public CHA MQFloat CHA value on item 25 | ---@field public Charges MQFloat Charges 26 | ---@field public Clairvoyance MQFloat Clairvoyance 27 | ---@field public Class fun(filter: number|string): MQString Returns the th long class name of the listed classes on an item. Items suitable for ALL classes will effectively have all 17 classes listed. 28 | ---@field public Classes MQFloat The number of classes that can use the item. Items suitable for ALL classes will return 16. 29 | ---@field public Clicky itemspell Activatable spell effect, if any. 30 | ---@field public CombatEffects MQFloat CombatEffects 31 | ---@field public Container MQFloat Number of slots, if this is a container 32 | ---@field public Damage MQInt Damage Shield Mitigation 33 | ---@field public DamageShieldMitigation MQFloat Damage Shield Mitigation 34 | ---@field public DamShield MQFloat Damage Shield value on item 35 | ---@field public Deity MQString Returns the th deity of the listed deities on an item. Items with no deity restrictions will return NULL for all values of . 36 | ---@field public Deities MQFloat The number of deities that can use the item. Items with no deity restrictions will return 0. 37 | ---@field public DEX MQFloat DEX value on item 38 | ---@field public DMGBonusType MQString "None", "Magic", "Fire", "Cold", "Poison", "Disease" 39 | ---@field public DoTShielding MQFloat DoT Shielding 40 | ---@field public EffectType MQString Spell effect type (see below for spell effect types) 41 | ---@field public Endurance MQFloat Endurance 42 | ---@field public EnduranceRegen MQFloat Endurance regen 43 | ---@field public Evolving evolving Does this item have Evolving experience on? 44 | ---@field public Focus itemspell|fun():itemspell Return first focus effect, if any. 45 | ---@field public Focus2 itemspell|fun():itemspell Return second focus effect, if any. 46 | ---@field public FreeStack MQFloat The number of items needed to fill all the stacks of the item you have (with a stacksize of 20).If you have 3 stacks (1, 10, 20 in those stacks), you have room for 60 total and you have 31 on you, so FreeStack would return 29. 47 | ---@field public Haste MQFloat Haste value on item 48 | ---@field public HealAmount MQFloat HealAmount (regen?) 49 | ---@field public HeroicAGI MQFloat Heroic AGI value on item 50 | ---@field public HeroicCHA MQFloat Heroic CHA value on item 51 | ---@field public HeroicDEX MQFloat Heroic DEX value on item 52 | ---@field public HeroicINT MQFloat Heroic INT value on item 53 | ---@field public HeroicSTA MQFloat Heroic STA value on item 54 | ---@field public HeroicSTR MQFloat Heroic STR value on item 55 | ---@field public HeroicSvCold MQFloat Heroic SvCold value on item 56 | ---@field public HeroicSvCorruption MQFloat Heroic SvCorruption value on item 57 | ---@field public HeroicSvDisease MQFloat Heroic SvDisease value on item 58 | ---@field public HeroicSvFire MQFloat Heroic SvFire value on item 59 | ---@field public HeroicSvMagic MQFloat Heroic SvMagic value on item 60 | ---@field public HeroicSvPoison MQFloat Heroic SvPoison value on item 61 | ---@field public HeroicWIS MQFloat Heroic WIS value on item 62 | ---@field public HP MQFloat HP value on item 63 | ---@field public HPRegen MQFloat HPRegen value on item 64 | ---@field public Icon MQFloat Item Icon 65 | ---@field public ID MQFloat Item ID 66 | ---@field public InstrumentMod MQFloat Instrument Modifier Value 67 | ---@field public INT MQFloat INT value on item 68 | ---@field public InvSlot MQFloat Inventory Slot Number (Historic and now deprecated, use ItemSlot and ItemSlot2) 69 | ---@field public Item item Item in th slot, if this is a container or has augs 70 | ---@field public ItemDelay MQFloat Returns the delay of the weapon 71 | ---@field public ItemLink fun(clickable?: string): MQString just prints the actual hexlink for an item (not clickable) unless [CLICKABLE] is included 72 | ---@field public Items MQFloat Number of items, if this is a container. 73 | ---@field public ItemSlot MQFloat Item Slot number see Slot Names 74 | ---@field public ItemSlot2 MQFloat Item Slot sub number see Slot Names 75 | ---@field public Inspect fun() Opens the item display window for this item 76 | ---@field public LDoNTheme MQString "All", "Deepest Guk", "Miragul's", "Mistmoore", "Rujarkian", "Takish", "Unknown" 77 | ---@field public Lore MQBoolean Lore? 78 | ---@field public Magic MQBoolean Magic? 79 | ---@field public Mana MQFloat Mana value on item 80 | ---@field public ManaRegen MQFloat ManaRegen value on item 81 | ---@field public MaxPower MQFloat Max power on an power source 82 | ---@field public MerchQuantity MQFloat Quantity of item active merchant has 83 | ---@field public Name MQString Name 84 | ---@field public NoDrop MQBoolean No Trade? 85 | ---@field public NoRent MQBoolean Temporary? 86 | ---@field public Power MQFloat Power left on power source 87 | ---@field public Purity MQFloat Purity of item 88 | ---@field public Race fun(filter: number|string): MQString Returns the th long race name of the listed races on an item. Items suitable for ALL races will effectively have all 15 races listed. 89 | ---@field public Races MQFloat The number of races that can use the item. Items suitable for ALL races will return 15. 90 | ---@field public Range integer Range of the item 91 | ---@field public RequiredLevel MQFloat Returns the Required Level of an item. Items with no required level will return 0. 92 | ---@field public SellPrice MQFloat Price to sell this item at this merchant 93 | ---@field public Shielding MQFloat Shielding 94 | ---@field public Size MQFloat Item size:1 SMALL2 MEDIUM3 LARGE4 GIANT 95 | ---@field public SizeCapacity MQFloat If item is a container, size of items it can hold:1 SMALL2 MEDIUM3 LARGE4 GIANT 96 | ---@field public Spell MQSpell Spell effect 97 | ---@field public SpellDamage MQFloat Spell damage 98 | ---@field public SpellShield MQFloat SpellShield 99 | ---@field public STA MQFloat STA value on item 100 | ---@field public Stack MQFloat Number of items in the stack 101 | ---@field public Stacks MQFloat Number of stacks of the item in your inventory 102 | ---@field public Stackable MQBoolean Stackable? 103 | ---@field public StackCount MQFloat The total number of the stackable item in your inventory 104 | ---@field public StackSize MQFloat Maximum number if items that can be in the stack 105 | ---@field public STR MQFloat STR value on item 106 | ---@field public StrikeThrough MQFloat StrikeThrough 107 | ---@field public StunResist MQFloat Stun resist 108 | ---@field public svCold MQFloat svCold value on item 109 | ---@field public svCorruption MQFloat svCorruption value on item 110 | ---@field public svDisease MQFloat svDisease value on item 111 | ---@field public svFire MQFloat svFire value on item 112 | ---@field public svMagic MQFloat svMagic value on item 113 | ---@field public svPoison MQFloat svPoison value on item 114 | ---@field public Timer ticks Returns the number of ticks remaining on an item recast timer 115 | ---@field public TimerReady MQFloat Returns the number of seconds remaining on an item recast timer 116 | ---@field public Tradeskills MQBoolean Tradeskills? 117 | ---@field public Type MQString Type 118 | ---@field public Tribute MQFloat Tribute value of the item 119 | ---@field public Value MQFloat Item value in coppers 120 | ---@field public Weight MQFloat Item weight 121 | ---@field public WIS MQFloat WIS value on item 122 | ---@field public Worn itemspell|fun():itemspell Passive worn effect, if any 123 | ---@field public WornSlot fun(slot: number|string): invslot invslot The th invslot this item can be worn in (fingers/ears count as 2 slots) 124 | ---@field public WornSlot fun(slot: string): MQBoolean Can item be worn in invslot with this name? (worn slots only) 125 | ---@field public WornSlots MQFloat The number of invslots this item can be worn in (fingers/ears count as 2 slots) 126 | ---@field public ToString MQString Same as Name 127 | -------------------------------------------------------------------------------- /mq/datatype/_itemfilterdata.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class itemfilterdata 3 | ---@field AutoRoll fun(): boolean The Auto Roll state (dice icon) 4 | ---@field Greed fun(): boolean The Greed (GD) state 5 | ---@field IconID MQInt The ID of the icon 6 | ---@field ID MQInt The ID of the item 7 | ---@field Name fun(): string The Name of the item 8 | ---@field Need fun(): boolean The Need (ND) state 9 | ---@field Never fun(): boolean The Never (NV) state 10 | ---@field Types MQInt Bit field representing all the loot filter flags for this item 11 | -------------------------------------------------------------------------------- /mq/datatype/_itemspell .lua: -------------------------------------------------------------------------------- 1 | --- @class itemspell 2 | --- @field public CastTime timestamp Cast time (unadjusted) 3 | --- @field public EffectiveCasterLevel MQInt #Effective level that is used to cast the spell. 4 | --- @field public EffectType MQInt #The type of item spell effect. 5 | --- @field public MaxCharges MQInt #The maximum number of charges supported by this spell. 6 | --- @field public OverrideDescription MQString #Overrides the normal spell description string, if set. 7 | --- @field public OverrideName MQString #Overrides the normal spell name string, if set. 8 | --- @field public ProcRate MQInt #Combat effect proc rate. 9 | --- @field public RecastType MQInt #Recast type of the spell. 10 | --- @field public RequiredLevel MQInt #Level required for the spell to be usable. 11 | --- @field public Spell MQSpell The spell. 12 | --- @field public SpellID MQInt #ID of the Spell. 13 | --- @field public TimerID MQInt #Timer ID of the spell. -------------------------------------------------------------------------------- /mq/datatype/_keyring.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class keyring # This datatype represents information about a keyring (a.k.a. a collection of mounts illusions, etc.) 3 | ---@field public Count MQInt The number of items in this keyring 4 | ---@field public Stat keyringitem|fun(): keyringitem The keyring item assigned as the stat item. -------------------------------------------------------------------------------- /mq/datatype/_keyringitem.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class keyringitem # This datatype deals strictly with information items on a keyring 3 | ---@field Index MQInt Where on this keyring list 4 | ---@field Item MQItem The item on the keyring 5 | ---@field Name MQString Name of the keyring item -------------------------------------------------------------------------------- /mq/datatype/_lua.lua: -------------------------------------------------------------------------------- 1 | --- @class LuaInfo 2 | --- @field public PID MQInt #The PID of the running or most recently executed version of this script 3 | --- @field public Name MQString #The name of the script 4 | --- @field public Path MQString #The full path of the script 5 | --- @field public Arguments MQString #A comma delimited list of arguments passed to the script 6 | --- @field public StartTime MQString #The time the most recent execution of the script was started 7 | --- @field public EndTime MQString #The time the most recent execution of the script ended or NULL if the script has not ended 8 | --- @field public ReturnCount MQInt #The number of returns from the script, will be 0 if the script has not ended 9 | --- @field public Return fun(index: integer): string string If not indexed, a comma-delimited list of return values. Accepts an integer index to get a single return value if there is more than one 10 | --- @field public Status MQString #The execution status of the script 11 | --- 12 | --- @class Lua 13 | --- @field public PIDs MQString #A comma-delimited list of integer PIDs that have info to access 14 | --- @field public Dir MQString #The base lua scripts directory 15 | --- @field public Turbo MQInt #The turbo value 16 | --- @field public RequirePaths MQString #The semicolon-delimited value for lua require search paths 17 | --- @field public CRequirePaths MQString #The semicolon-delimited value for dll require search paths 18 | --- @field public Script fun(pid: integer|string): LuaInfo The accessor to get info on individual scripts. Accepts a PID as an index, or will default to the last executed script that has finished running -------------------------------------------------------------------------------- /mq/datatype/_macro.lua: -------------------------------------------------------------------------------- 1 | --- @class Macro 2 | --- @field public CurCommand MQString #list the current line number, macro name and code of the macro being processed 3 | --- @field public CurLine MQFloat #The current line number of the macro being processed 4 | --- @field public CurSub MQString #The current sub routine 5 | --- @field public isOuterVariable MQBoolean #true if the provided parameter is a defined outer variable 6 | --- @field public isTLO MQBoolean #true if the provided parameter an existing TLO 7 | --- @field public MemUse MQFloat #How much memory the macro is using 8 | --- @field public Name MQString #The name of the macro currently running 9 | --- @field public Params MQFloat #The number of parameters that were passed to the current subroutine 10 | --- @field public Paused MQBoolean #NULL if no macro running, FALSE if mqpause is off, TRUE if mqpause is on 11 | --- @field public Return MQString #The value that was returned by the last completed subroutine 12 | --- @field public RunTime MQFloat #How long the macro has been running (in seconds) 13 | --- @field public StackSize MQFloat #StackSize? 14 | --- @field public Undeclared fun() will list all undeclared variables 15 | --- @field public Variable fun(name: string): int|boolean|fun(): any # Attemps to get Macro variable into LUA -------------------------------------------------------------------------------- /mq/datatype/_macroquest.lua: -------------------------------------------------------------------------------- 1 | --- @class macroquest 2 | --- @field public BuildDate MQString #Date that MQ2Main.dll was built 3 | --- @field public BuildName MQString #Name of the build (Live, Test, Emu) 4 | --- @field public ChatChannel MQBoolean #Returns TRUE if channel name is joined 5 | --- @field public ChatChannels MQFloat #Returns the number #of channels currently joined 6 | --- @field public Error MQString #Last normal error message 7 | --- @field public GameState MQString #Returns "INGAME, CHARSELECT, PRECHARSELECT, UNKNOWN" 8 | --- @field public LastCommand MQString #Last command entered 9 | --- @field public LastTell MQString #Name of last person to send you a tell 10 | --- @field public LClickedObject MQBoolean #Returns TRUE if an object has been left clicked 11 | --- @field public LoginName MQString #Your station name 12 | --- @field public MouseX MQFloat #Mouse's X location 13 | --- @field public MouseY MQFloat #Mouse's Y location 14 | --- @field public MQ2DataError MQString #Last MQ2Data parsing error message 15 | --- @field public Path fun(relativePath?: string): string Directory that Macroquest.exe launched from. Relative path is added to the MQ directory 16 | --- @field public Ping MQFloat #Your current ping 17 | --- @field public Running MQFloat #Running time of current MQ2 session, in milliseconds 18 | --- @field public Server MQString #Full name of your server 19 | --- @field public SyntaxError MQString #Last syntax error message 20 | --- @field public ViewportX MQFloat #EverQuest viewport upper left (X) position 21 | --- @field public ViewportXCenter MQFloat #EverQuest viewport center (X) position 22 | --- @field public ViewportXMax MQFloat #EverQuest viewport lower right (X) position 23 | --- @field public ViewportY MQFloat #EverQuest viewport upper left (Y) position 24 | --- @field public ViewportYCenter MQFloat #EverQuest viewport center (Y) position 25 | --- @field public ViewportYMax MQFloat #EverQuest viewport lower right (Y) position 26 | --- @field public ToString MQString #None 27 | -------------------------------------------------------------------------------- /mq/datatype/_math.lua: -------------------------------------------------------------------------------- 1 | --- @class math 2 | --- @field public Abs fun(number: number|string): MQFloat The absolute value of the result of n 3 | --- @field public Acos fun(degrees: number|string): MQFloat Arccosine of n (in degrees) 4 | --- @field public Asin fun(degrees: number|string): MQFloat Arcsine of n (in degrees) 5 | --- @field public Atan fun(degrees: number|string): MQFloat Arctangent of n (in degrees) 6 | --- @field public Cos fun(degrees: number|string): MQFloat Cosine of n (in degrees) 7 | --- @field public Dec number Decimal value of a hexidecimal string 8 | --- @field public Hex string Returns hexidecimal value of int n 9 | --- @field public Not number Bitwise complement of n 10 | --- @field public Rand number Random integer. Rand[5] range 0 to 4. Rand[100,200] range 100 to 199 11 | --- @field public Sin fun(degrees: number|string): MQFloat Sine of n (in degrees) 12 | --- @field public Sqrt MQFloat Square root of n 13 | --- @field public Tan fun(degrees: number|string): MQFloat Tangent of n (in degrees) 14 | --- @field public ToString string NULL 15 | local math = nil 16 | 17 | ---Calculates the distance between two points on the map; 1, 2, or 3 dimensions may be provided. 18 | ---Format is y1,x1,z1:y2,x2,z2 19 | ---Defaults to your character's current location 20 | ---@param coordinates string 21 | ---@return MQFloat 22 | function math.Distance(coordinates) end 23 | 24 | ---Performs a mathematical calculation [expression] 25 | ---@param expression string 26 | ---@return MQFloat 27 | function math.Calc(expression) end -------------------------------------------------------------------------------- /mq/datatype/_menu.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/macroquest/mq-definitions/d3f332eeca65f73e64053046bb6589c018e433c0/mq/datatype/_menu.lua -------------------------------------------------------------------------------- /mq/datatype/_mercenary.lua: -------------------------------------------------------------------------------- 1 | --- @class mercenary: spawn 2 | --- @field public AAPoints MQInt #AA Points spent on mercenary abilities 3 | --- @field public Stance MQString #Current stance of the mercenary 4 | --- @field public State MQString #Current state of the mercenary (returns "DEAD", "SUSPENDED", "ACTIVE", or "UNKNOWN") 5 | --- @field public StateID MQInt #Current state ID of the mercenary as a number. 6 | --- @field public Index MQString #Index 7 | --- @field public ToString MQString #Same as Name -------------------------------------------------------------------------------- /mq/datatype/_merchant.lua: -------------------------------------------------------------------------------- 1 | ---@class merchant 2 | ---@field public Buy fun(num_of_items:integer) Buys # of whatever is selected with Merchant.SelectItem[xxx] 3 | ---@field public Full MQBoolean #Returns TRUE if the merchant's inventory is full 4 | ---@field public Item item Item MQFloat # on the merchant's list 5 | ---@field public Items MQFloat #Number of items on the merchant 6 | ---@field public ItemsReceived MQBoolean #True if the merchants itemlist has been filled in. 7 | ---@field public Markup MQFloat The MQFloat #used to calculate the buy and sell value for an item (this is what is changed by charisma and ffun()). This value is capped at 1.05Markup*Item Value = Amount you buy item forItem Value*(1/Markup) = Amount you sell item for 8 | ---@field public Open MQBoolean #Returns TRUE if merchant is open 9 | ---@field public OpenWindow fun() Will open the merchant closest to you, or if you have a merchant target 10 | ---@field public SelectedItem item The currently selected item in the merchant window, and item type 11 | ---@field public SelectItem fun(item:string) Select item specified or partial match that fits. Use SelectItem[=xxx] for EXACT match(its not case sensitive) 12 | ---@field public Sell fun(num_of_items:integer|string) Sell # of whatever is selected with /seletitem. See examples 13 | ---@field public ToString MQBoolean #Same as Open -------------------------------------------------------------------------------- /mq/datatype/_pet.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---@diagnostic disable: duplicate-set-field 4 | ---@class pet : spawn 5 | ---@field Combat MQBoolean #Combat state 6 | ---@field Ghold MQBoolean #GHold state 7 | ---@field Hold MQBoolean #Hold state 8 | ---@field ReGroup MQBoolean #ReGroup state 9 | ---@field Stance MQString #Returns the pet's current stance (e.g. FOLLOW, GUARD) 10 | ---@field Stop MQBoolean #Stop state 11 | ---@field Target MQSpawn Returns the pet's current target 12 | ---@field Taunt MQBoolean #Taunt state 13 | ---@field Focus MQBoolean #Focus state 14 | ---@field ID MQInt #returns pet ID 15 | local pet = {} 16 | 17 | ---Returns the slot number for the buff name 18 | ---@param buffname string Buffname 19 | ---@return integer Slotnumber 20 | function pet.Buff(buffname) end 21 | 22 | ---Returns the buff name given the slot number 23 | ---@param slotnumber integer|string 24 | ---@return string Buffname 25 | function pet.Buff(slotnumber)end 26 | 27 | ---Buff time remaining for pet buff given buff name, in milliseconds 28 | ---@param buffname string Buffname 29 | ---@return integer Time in miliseconds 30 | function pet.BuffDuration(buffname)end 31 | 32 | ---Buff time remaining for pet buff given buff slot number, in milliseconds 33 | ---@param slotnumber integer|string Slotnumber 34 | ---@return integer Time in miliseconds 35 | function pet.BuffDuration(slotnumber)end 36 | -------------------------------------------------------------------------------- /mq/datatype/_petbuff.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/macroquest/mq-definitions/d3f332eeca65f73e64053046bb6589c018e433c0/mq/datatype/_petbuff.lua -------------------------------------------------------------------------------- /mq/datatype/_plugin.lua: -------------------------------------------------------------------------------- 1 | --- @class plugin 2 | --- @field public Name MQString # Name of the plugin 3 | --- @field public Version MQFloat # Version number of the plugin 4 | --- @field public IsLoaded MQBoolean # Is the plugin loaded? 5 | --- @field public ToString MQString # Same as Name 6 | -------------------------------------------------------------------------------- /mq/datatype/_pointmerchant.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/macroquest/mq-definitions/d3f332eeca65f73e64053046bb6589c018e433c0/mq/datatype/_pointmerchant.lua -------------------------------------------------------------------------------- /mq/datatype/_pointmerchantitem.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/macroquest/mq-definitions/d3f332eeca65f73e64053046bb6589c018e433c0/mq/datatype/_pointmerchantitem.lua -------------------------------------------------------------------------------- /mq/datatype/_race.lua: -------------------------------------------------------------------------------- 1 | --- @class race 2 | --- @field public ID MQInt #The ID of the race 3 | --- @field public Name MQString #The name of the race 4 | --- @field public ToString MQString #The name of the race -------------------------------------------------------------------------------- /mq/datatype/_raid.lua: -------------------------------------------------------------------------------- 1 | ---@diagnostic disable: duplicate-set-field 2 | 3 | ---@meta 4 | ---@class raid 5 | ---@field public AverageLevel MQInt #Average level of raid members (more accurate than in the window) 6 | ---@field public Invited MQBoolean #Have I been invited to the raid? 7 | ---@field public Leader MQRaidMember # Raid leader 8 | ---@field public Locked MQBoolean #Returns TRUE if the raid is locked 9 | ---@field public Looter MQInt #Number of specified looters 10 | ---Loot type: 11 | --- - 1 Leader 12 | --- - 2 Leader & GroupLeader 13 | --- - 3 Leader & Specified 14 | ---@field public LootType MQInt 15 | ---@field public MasterLooter MQRaidMember # Raid Master Looter 16 | ---@field public Members MQInt #Total number of raid members 17 | ---@field public Target MQRaidMember # Raid target (clicked in raid window) 18 | ---@field public TotalLevels MQInt #Sum of all raid members' levels 19 | ---@field public ToString MQString #None 20 | local raid = {} 21 | 22 | ---Raid member by name 23 | ---@param name string 24 | ---@return raidmember 25 | function raid.Member(name) end 26 | 27 | ---Raid member by index 28 | ---@param index integer|string 29 | ---@return raidmember 30 | function raid.Member(index) end 31 | 32 | ---Specified looter by name 33 | ---@param name string 34 | ---@return string 35 | function raid.Looter(name) end 36 | 37 | ---Specified looter by index 38 | ---@param index integer|string 39 | ---@return string 40 | function raid.Looter(index) end 41 | 42 | ---Raid main assist 43 | ---@param index integer|string 44 | ---@return raidmember 45 | function raid.MainAssist(index) end 46 | -------------------------------------------------------------------------------- /mq/datatype/_raidmember.lua: -------------------------------------------------------------------------------- 1 | --- @class raidmember : spawn 2 | --- @field public Class class Raid member's class (works without being in zone) 3 | --- @field public Group number Current group number (or 0) 4 | --- @field public GroupLeader boolean Returns TRUE if the member is a group leader 5 | --- @field public Level number Raid member's level (works without being in zone) 6 | --- @field public Looter boolean Allowed to loot with current loot rules and looters? 7 | --- @field public Name string Raid member's name 8 | --- @field public RaidLeader boolean Returns TRUE if the member is the raid leader 9 | --- @field public Spawn MQSpawn Spawn object for this player if available (must be in zone) 10 | --- @field public ToString string Same as Name -------------------------------------------------------------------------------- /mq/datatype/_range.lua: -------------------------------------------------------------------------------- 1 | --- @class range 2 | range = nil 3 | 4 | ----True if N is between the range of #1 and #2, inclusive. 5 | ----Is 50 between 33 and 66? ${Range.Between[33,66:50]} returns TRUE 6 | ---@param n integer|string 7 | ---@param range string 8 | ---@return boolean is n Between the range of #1 and #2 both numbers included 9 | function range.Between(n, range) end 10 | 11 | ----True if N is within the range of #1 and #2, exclusive. 12 | ----Is 50 Inside 33 and 66? ${Range.Inside[33,66:50]} returns TRUE 13 | ---@param n integer|string 14 | ---@param range string 15 | ---@return boolean is n Inside the range of #1 and #2 both number excluded 16 | function range.Inside(n, range) end 17 | -------------------------------------------------------------------------------- /mq/datatype/_skill.lua: -------------------------------------------------------------------------------- 1 | --- @class skill 2 | --- @field public Activated MQBoolean # Returns TRUE if the skill has been activated 3 | --- @field public AltTimer MQBoolean # Returns TRUE if the skill uses the kick/bash/slam/backstab/frenzy timer 4 | --- @field public ID MQInt # Skill number 5 | --- @field public MinLevel MQInt # Minimum level for your class 6 | --- @field public Name MQString # Name of the skill 7 | --- @field public ReuseTime MQFloat # Reuse timer (what number format? ticks, seconds, deciseconds?) 8 | --- @field public SkillCap MQInt # Skill cap based on your current level and class. 9 | --- @field public StartingSkill MQInt # Base skill level for your class 10 | --- @field public ToString MQString # Same as Name -------------------------------------------------------------------------------- /mq/datatype/_social.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---@class social # This datatype accesses you EQ Social Buttons 4 | ---@field Name string # The Label of the Social 5 | ---@field TimerBegin integer # Timer Begin of the Social 6 | ---@field TimerEnd integer # Timer End of the Social 7 | ---@field Color integer # Social Color code index 8 | local social = {} 9 | 10 | ---@param index integer # 0-4 index of the cmd line you want 11 | ---@return MQString 12 | function social.Cmd(index) end 13 | -------------------------------------------------------------------------------- /mq/datatype/_solvent.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/macroquest/mq-definitions/d3f332eeca65f73e64053046bb6589c018e433c0/mq/datatype/_solvent.lua -------------------------------------------------------------------------------- /mq/datatype/_spawn.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class spawn 3 | ---@field public AARank MQFloat # AA rank number 4 | ---@field public AATitle MQString # AA Title name 5 | ---@field public ActorDef MQString # Actor Defintion 6 | ---@field public Address MQFloat # Unknown? 7 | ---@field public AFK MQBoolean # AFK? 8 | ---@field public Aggressive MQBoolean # Returns TRUE or FALSE if a mob is aggressive or not 9 | ---@field public Animation MQFloat # Current animation ID. See Animations for a list of animations. 10 | ---@field public Anonymous MQBoolean # Anonymous 11 | ---@field public Assist MQBoolean # Current Raid or Group assist target? 12 | ---@field public AssistName MQString # Name of current Raid or Group assist target 13 | ---@field public bAlwaysShowAura MQBoolean # Show Auras? 14 | ---@field public bBetaBuffed MQBoolean # Am I Beta Buffed? 15 | ---@field public Binding MQBoolean # Binding wounds? 16 | ---@field public Blind MQFloat # Blind? Not sure why this is a number? 17 | ---@field public Body body Body type 18 | ---@field public bShowHelm MQBoolean # Showing Helm? 19 | ---@field public bStationary MQBoolean # Stationary spawn? Not to be confused with "Moving" 20 | ---@field public bTempPet MQBoolean # Is the spawn a Temporary Pet? 21 | ---@field public Buyer MQBoolean # Is a buyer? (ie. Buyer in the bazaar) 22 | ---@field public bWaitingForPort MQBoolean # Am I waiting to accept a port? 23 | ---@field public CachedBuffCount MQFloat # Number of Buffs cached 24 | ---@field public CanSplashLand MQBoolean # TRUE/FALSE on if a splash spell can land...NOTE! This check is ONLY for line of sight to the targetindicator (red/green circle) 25 | ---@field public Casting MQSpell Spell, if currently casting (only accurate on yourself, not NPCs or other group members) 26 | ---@field public CeilingHeightAtCurrLocation MQFloat #Ceiling Height 27 | ---@field public Class class # Class 28 | ---@field public CleanName MQString # The "cleaned up" name 29 | ---@field public CollisionCounter MQInt 30 | ---@field public CombatSkillTicks any 31 | ---@field public ConColor MQString # GREY, GREEN, LIGHT BLUE, BLUE, WHITE, YELLOW, RED 32 | ---@field public ContractorID MQInt 33 | ---@field public CorpseDragCount MQInt 34 | ---@field public CurrentEndurance MQFloat # Current Endurance points (only updates when target/group) 35 | ---@field public CurrentHPs MQFloat # Current hit points 36 | ---@field public CurrentMana MQFloat # Current Mana points (only updates when target/group) 37 | ---@field public Dead MQBoolean # Dead? 38 | ---@field public Deity deity # Deity 39 | ---@field public DisplayName MQString # Name displayed in game (same as EQ's %T) 40 | ---@field public Distance MQFloat # Distance from player in (x,y) 41 | ---@field public Distance3D MQFloat # Distance from player in (x,y,z) in 3D 42 | ---@field public DistanceN MQFloat # Distance from player in Y plane (North/South) 43 | ---@field public DistancePredict MQFloat # Estimated distance in (x,y), taking into account the spawn's movement speed but not the player's 44 | ---@field public DistanceU MQFloat # Distance from player in Z plane (Up/Down) 45 | ---@field public DistanceW MQFloat # Distance from player in X plane (East/West) 46 | ---@field public DistanceX MQFloat # Distance from player in X plane 47 | ---@field public DistanceY MQFloat # Distance from player in Y plane 48 | ---@field public DistanceZ MQFloat # Distance from player in Z plane 49 | ---@field public DraggingPlayer MQBoolean # Am I currently dragging someone? 50 | ---@field public DragNames MQString # What are the names of the dragging players? 51 | ---@field public DoAssist fun() # Assists the spawn 52 | ---@field public DoFace fun() # Faces target 53 | ---@field public DoTarget fun() # Targets spawn 54 | ---@field public Ducking MQBoolean # Ducking? 55 | ---@field public Equipment fun(slot_or_name): MQFloat # Returns a inttype, it takes numbers 0-8 or names: head chest arms wrists hands legs feet primary offhand 56 | ---@field public EQLoc MQString # Location using EQ format 57 | ---@field public FD fun(): number 58 | ---@field public FeetWet MQBoolean # Feet wet/swimming? 59 | ---@field public Feigning MQBoolean # Feigning? 60 | ---@field public Following MQSpawn # The spawn a player is following using /follow on - also returns your pet's target via ${Me.Pet.Following} 61 | ---@field public Fleeing MQBoolean # Is your target moving away from you? 62 | ---@field public FloorZ MQFloat # What is the Z portion of the current location. 63 | ---@field public Gender MQString # Gender 64 | ---@field public GM MQBoolean # GM or Guide? 65 | ---@field public GMRank MQFloat # GM Rank 66 | ---@field public GroupLeader MQBoolean # Group leader? 67 | ---@field public Guild MQString # Guild name 68 | ---@field public GuildStatus MQString # Guild status (Leader, Officer, Member) NOTE GuildStatus is no longer present in BETA/TEST/LIVE versions and only available in UF and ROF EMU builds. 69 | ---@field public Heading heading # Heading in this direction 70 | ---@field public HeadingTo heading # Heading player must travel in to reach this spawn 71 | ---@field public HeadingToLoc heading # Heading to the coordinates y,x from the spawn 72 | ---@field public Height MQFloat # Height 73 | ---@field public Holding MQFloat # Represents what the pc/npc is holding 74 | ---@field public HoldingAnimation MQInt 75 | ---@field public Hovering MQBoolean # Hovering? 76 | ---@field public ID MQFloat # Spawn ID 77 | ---@field public InPvPArea fun(): number 78 | ---Returns true if the spawn is invisible, false if not. 79 | --- 80 | ---Options: 81 | --- - ANY/0 82 | --- - NORMAL/1 83 | --- - UNDEAD/2 84 | --- - ANIMAL/3 85 | --- - SOS/4 86 | ---@field public Invis fun(option?:string|integer): boolean 87 | ---@field public Invited MQBoolean # Invited to group? 88 | ---@field public Inviter MQString # Name of Inviter 89 | ---@field public IsBerserk MQBoolean # Berserk? 90 | ---@field public IsPassenger MQBoolean # Passenger? 91 | ---@field public IsSummoned MQBoolean # Summoned? 92 | ---@field public LastCastNum MQFloat # No idea... 93 | ---@field public LastCastTime MQFloat # No idea... 94 | ---@field public Level MQFloat # Level 95 | ---@field public LeftClick fun() # Left clicks the spawn 96 | ---@field public Levitating MQBoolean # Levitating? 97 | ---@field public LFG MQBoolean # LFG? 98 | ---@field public Light MQString # Name of the light class this spawn has 99 | ---@field public LineOfSight MQBoolean # Returns TRUE if spawn is in LoS 100 | ---@field public Linkdead MQBoolean # Linkdead? 101 | ---@field public Loc MQString # Loc of the spawn 102 | ---@field public LocYX MQString # LocYX of the spawn 103 | ---@field public LocYXZ MQString # LocYXZ of the spawn 104 | ---@field public Look MQFloat # Looking this angle 105 | ---@field public Mark MQFloat # Current Raid or Group marked npc mark number (raid first) 106 | ---@field public Master MQSpawn # Master, if it is charmed or a pet 107 | ---@field public MaxEndurance MQFloat # Maximum Endurance points (only updates when target/group) 108 | ---@field public MaxHPs MQFloat # Maximum hit points 109 | ---@field public MaxMana MQFloat # Maximum Mana points (only updates when target/group) 110 | ---@field public MaxRange MQFloat # The max distance from this spawn for it to hit you 111 | ---@field public MaxRangeTo MQFloat # The Max distance from this spawn for you to hit it 112 | ---@field public MercID MQInt 113 | ---@field public Mount MQSpawn Mount 114 | ---@field public Moving MQBoolean # Moving? 115 | ---@field public MQLoc MQString # Location using MQ format 116 | ---@field public Name MQString # Name 117 | ---@field public Named MQBoolean # Is this a "named" spawn (ie. does it's name not start with an "a" or an "an") 118 | ---@field public NearestSpawn spawn Find the nearest spawn matching this Spawn Search, to this spawn (most efficient on yourself) 119 | ---@field public Next MQSpawn # Next spawn in the list 120 | ---@field public Owner MQSpawn # Owner, if mercenary 121 | ---@field public Prev MQSpawn # Previous spawn in the list 122 | ---@field public Pet MQPet Pet 123 | ---@field public PctEndurance MQInt # Current endurance as a percentage 124 | ---@field public PctHPs MQFloat # Current hit points as a percentage 125 | ---@field public PctMana MQInt # Current mana as a percentage 126 | ---@field public PlayerState MQFloat # returns a mask as an inttype which has the following meaning:0=Idle 1=Open 2=WeaponSheathed 4=Aggressive 8=ForcedAggressive 0x10=InstrumentEquipped 0x20=Stunned 0x40=PrimaryWeaponEquipped 0x80=SecondaryWeaponEquipped 127 | ---@field public Primary MQFloat # Item ID of anything that may be in the Primary slot 128 | ---@field public pTouchingSwitch MQFloat # Have no idea what this is... 129 | ---@field public Race race Race 130 | ---@field public RightClick fun() # Right clicks the spawn 131 | ---@field public Roleplaying MQBoolean # Roleplaying? 132 | ---@field public Secondary MQFloat # Item ID of anything that may be in the Secondary slot 133 | ---@field public SeeInvis MQFloat 134 | ---@field public Sitting MQBoolean # Sitting? 135 | ---@field public Sneaking MQBoolean # Sneaking? 136 | ---@field public SpawnStatus MQFloat # No idea 137 | ---@field public Speed MQFloat # How fast is this spawn moving 138 | ---@field public Standing MQBoolean # Standing? 139 | ---@field public StandState MQFloat # StandState 140 | ---@field public State MQString # STAND, SIT, DUCK, BIND, FEIGN, DEAD, STUN, HOVER, MOUNT, UNKNOWN 141 | ---@field public Stunned MQBoolean # Stunned? 142 | ---@field public Stuck MQBoolean # Stuck? 143 | ---@field public Suffix MQString # Suffix attached to name, eg. of 144 | ---@field public Surname MQString # Last name 145 | ---@field public Targetable MQBoolean # Is the spawn targetable? 146 | ---@field public TargetOfTarget MQTarget # My targets target 147 | ---@field public TimeBeenDead MQFloat # If not dead, this is some huge number. Not sure. 148 | ---@field public Title MQString # Prefix/Title before name 149 | ---@field public Trader MQBoolean # Trader? 150 | ---@field public Type MQString # PC, NPC, Untargetable, Mount, Pet, Corpse, Chest, Trigger, Trap, Timer, Item, Mercenary, Aura, Object, Banner, Campfire, Flyer 151 | ---@field public Underwater MQBoolean # Underwater? 152 | ---@field public X MQFloat # X coordinate 153 | ---@field public Y MQFloat # Y coordinate 154 | ---@field public Z MQFloat # Z coordinate 155 | ---@field public N MQFloat # X, the Northward-positive coordinate 156 | ---@field public W MQFloat # Y, the Westward-positive coordinate 157 | ---@field public U MQFloat # Z, the Upward-positive coordinate 158 | ---@field public E MQFloat # Shortcut for -X (makes Eastward positive) 159 | ---@field public S MQFloat # Shortcut for -Y (makes Southward positive) 160 | ---@field public D MQFloat # Shortcut for -Z (makes Downward positive) 161 | ---@field public FindBuff fun(predicate: string): MQBuff # Try find a given buff/debuff given predicate from cachedbuffs 162 | ---@field public Aggressive MQBoolean # Is the spawn aggressive towards you 163 | local spawn = {} 164 | 165 | ---@diagnostic disable: duplicate-set-field 166 | ---Returns the cachedbuff given the index or first one found 167 | ---Data must be populated first by targeting 168 | ---@param index? integer|string 169 | ---@return MQCachedBuff 170 | function spawn.Buff(index)end 171 | 172 | ---Returns the cachedbuff given the spell name 173 | ---Data must be populated first by targeting 174 | ---@param spellName string 175 | ---@return MQCachedBuff 176 | function spawn.Buff(spellName)end 177 | ---@diagnostic enable: duplicate-set-field 178 | 179 | ---@return integer # Returns the number of cached buffs on the spawn. (Same as CachedBuffCount) 180 | function spawn.BuffCount() end 181 | 182 | ---@diagnostic disable: duplicate-set-field 183 | ---Returns the cachedbuff given the spell id 184 | ---Data must be populated first by targeting 185 | ---Refer to [DataType:CachedBuff](https://docs.macroquest.org/reference/data-types/datatype-cachedbuff/) for additional information 186 | ---@param spellId integer|string 187 | ---@return MQCachedBuff 188 | function spawn.CachedBuff(spellId)end 189 | 190 | ---Returns the cachedbuff given the predicate (see https://docs.macroquest.org/main/features/cached-buffs/) 191 | ---Data must be populated first by targeting 192 | ---Refer to [DataType:CachedBuff](https://docs.macroquest.org/reference/data-types/datatype-cachedbuff/) for additional information 193 | ---@param predicate string 194 | ---@return MQCachedBuff 195 | function spawn.CachedBuff(predicate)end 196 | 197 | ---Returns the cachedbuff given the index or first one found where caster is the caller 198 | ---Data must be populated first by targeting 199 | ---@param index? integer|string 200 | ---@return MQCachedBuff 201 | function spawn.MyBuff(index)end 202 | 203 | ---Returns the cachedbuff given the spell name where caster is the caller 204 | ---Data must be populated first by targeting 205 | ---@param spellName string 206 | ---@return MQCachedBuff 207 | function spawn.MyBuff(spellName)end 208 | 209 | ---Returns the remaining duration of the spell at the given index or first one found where the caster is the caller 210 | ---Data must be populated first by targeting 211 | ---@param index? integer|string 212 | ---@return ticks 213 | function spawn.MyBuffDuration(index)end 214 | 215 | ---Returns the remaining duration of the given spell where the caster is the caller 216 | ---Data must be populated first by targeting 217 | ---@param spellName string 218 | ---@return ticks 219 | function spawn.MyBuffDuration(spellName)end 220 | ---@diagnostic enable: duplicate-set-field 221 | -------------------------------------------------------------------------------- /mq/datatype/_spell.lua: -------------------------------------------------------------------------------- 1 | --- @class spell 2 | --- @field public AERange MQFloat # AE range (group spells use this for their range) 3 | --- @field public BaseName MQString # Base name of the spell without rank information. 4 | --- @field public CastOnAnother MQString # Message when cast on others 5 | --- @field public CastOnYou MQString # Message when cast on yourself 6 | --- @field public CastTime timestamp # Cast time (unadjusted) 7 | --- @field public Category MQString # Spell category name 8 | --- @field public CategoryID MQInt # Spell category id 9 | --- @field public CounterType MQString # The resist counter. Will be one of "Disease", "Poison", "Curse" or "Corruption" 10 | --- @field public CounterNumber MQInt # The number of counters that the spell adds 11 | --- @field public Description string # The number of counters that the spell adds 12 | --- @field public Duration ticks # Duration of the spell (if any) 13 | --- @field public DurationValue1 ticks # Duration of the spell (if any) 14 | --- @field public DurationWindow MQInt # Type of Duration of the spell 0 = long buff window, 1 = short buff window 15 | --- @field public Extra string # extra spell information 16 | --- @field public FizzleTime timestamp # Time to recover after fizzle 17 | --- @field public GemIcon MQInt # Icon number of the spell. Exmaple ${Spell[blah].GemIcon} 18 | --- @field public HastePct MQFloat # Percentage of haste, example of use ${Me.Hasted.HastePct} or ${Spell[Speed of Milyex].HastePct} 19 | --- @field public ID MQInt # Spell ID 20 | --- @field public Inspect fun(): nil # Brings up in-game inspect window 21 | --- @field public IsSkill MQBoolean # Is this spell a skill? 22 | --- @field public IsSwarmSpell MQBoolean # Is this spell a Swarm spell? 23 | --- @field public Level MQInt # Level 24 | --- @field public Link MQString # Prints the link to the spell 25 | --- @field public Location MQFloat # Appears to be max distance 26 | --- @field public Mana MQInt # Mana cost (unadjusted) 27 | --- @field public EnduranceCost MQInt # Endurance cost (unadjusted) 28 | --- @field public MyCastTime timestamp # Adjusted cast time 29 | --- @field public MyRange MQFloat # Adjusted spell range, including focus effects, etc. 30 | --- @field public Name MQString # Spell Name 31 | --- @field public NumEffects MQInt # The number of effects the spell has 32 | --- @field public PushBack MQFloat # Push back amount 33 | --- @field public Range MQFloat # Maximum range to target (use AERange for AE and group spells) 34 | --- @field public Rank MQInt # Returns either 1, 2 or 3 for spells and 4-30 for clickys and potions. 35 | --- @field public RankName MQSpell # Returns the spell/combat ability name rank character has. 36 | --- @field public RecastTime MQFloat #T ime to recast after successful cast 37 | --- @field public RecoveryTime timestamp Same as FizzleTime 38 | --- @field public ResistAdj MQInt # Resist adjustment 39 | --- @field public ResistType MQString # See below for Resist Types 40 | --- @field public Skill MQString # See below for Skill Types 41 | --- @field public SlowPct MQFloat # Percentage of slow, example of use ${Target.Slowed.SlowPct} or ${Spell[Slowing Helix].SlowPct} 42 | --- @field public SpellIcon MQInt # Icon number of the spell. Exmaple ${Spell[blah].SpellIcon} 43 | --- @field public SpellType MQString # The spell type, Will be one of "Beneficial(Group)", "Beneficial", "Detrimental" or "Unknown" 44 | --- @field public Beneficial MQBoolean # Is this spell a beneficial spell type 45 | --- @field public Stacks MQBoolean # Does the selected spell stack with your current buffs (duration is in ticks) 46 | --- @field public StacksSpawn fun(id: integer|string): MQBoolean # Does the selected spell stack with the spawns current buffs (duration is in ticks) 47 | --- @field public StacksPet MQBoolean # Does the selected spell stack with your pet's current buffs (duration is in ticks) 48 | --- @field public StacksTarget MQBoolean # Does the selected spell stack with your target's current buffs (duration is in ticks) 49 | --- @field public StacksWith MQBoolean # Alias for .WillStack - see entry for more details 50 | --- @field public StacksWithDiscs MQBoolean # Will this stack with active discs 51 | --- @field public Subcategory MQString # Spell sub category name 52 | --- @field public SubcategoryID MQInt # Spell sub category id 53 | --- @field public NewStacks MQBoolean # See entry for more details 54 | --- @field public TargetType MQString # See below for Target Types 55 | --- @field public WearOff MQString # The "wear off" message 56 | --- @field public WillLand MQInt # Returns the buff slot the spell will land in on yourself if it will land, or 0 57 | --- @field public ToString MQString # Same as Name 58 | local spell = nil 59 | 60 | ---@param name string # The spell name 61 | ---@return boolean # Does the selected spell stack with the specific SPELL name, DOES NOT work with AAs. 62 | function spell.WillStack(name) end 63 | 64 | ---@param index integer|string # The reagent index [1-4] 65 | ---@return MQInt # Number of reagents used for this spell in given [index] 66 | function spell.ReagentCount(index) end 67 | 68 | ---@param index integer|string # The reagent index [1-4] 69 | ---@return MQInt # ID of the reagent item used for this spell in given [index] 70 | function spell.ReagentID(index) end 71 | 72 | ---@param index integer|string # The reagent index [1-4] 73 | ---@return MQInt # ID of the reagent item used for this spell in given [index] 74 | function spell.NoExpendReagentID(index) end 75 | 76 | ---@param index integer|string # The index to retrieve the spell attribute value of 77 | ---@return integer 78 | function spell.Attrib(index) end 79 | 80 | ---@param index integer|string # The index to retrieve the trigger value of 81 | ---@return MQSpell 82 | function spell.Trigger(index) end 83 | 84 | ---@param index integer|string # The index to retrieve the base value of 85 | ---@return integer 86 | function spell.Base(index) end 87 | 88 | ---@param index integer|string # The index to retrieve the base2 value of 89 | ---@return integer 90 | function spell.Base2(index) end 91 | 92 | ---@param index integer|string # The index to retrieve the max value of 93 | ---@return integer 94 | function spell.Max(index) end 95 | 96 | ---@param spa integer|string # The SPA number to check against the spell attributes 97 | ---@return MQBoolean # Does the spell contain the specified SPA. 98 | function spell.HasSPA(spa) end 99 | -------------------------------------------------------------------------------- /mq/datatype/_switch.lua: -------------------------------------------------------------------------------- 1 | --- @class switch 2 | --- @field public D MQFloat D coordinate (Upward-positive) 3 | --- @field public DefaultHeading heading Heading of "closed" switch 4 | --- @field public DefaultN MQFloat Y coordinate of "closed" switch (Northward-positive) 5 | --- @field public DefaultU MQFloat Z coordinate of "closed" switch (Upward-positive) 6 | --- @field public DefaultW MQFloat X coordinate of "closed" switch (Westward-positive) 7 | --- @field public DefaultX MQFloat X coordinate of "closed" switch 8 | --- @field public DefaultY MQFloat Y coordinate of "closed" switch 9 | --- @field public DefaultZ MQFloat Z coordinate of "closed" switch 10 | --- @field public Distance MQFloat Distance from player to switch in (x,y) 11 | --- @field public Heading heading Switch is facing this heading 12 | --- @field public HeadingTo heading Direction player must move to meet this switch 13 | --- @field public ID number Switch ID 14 | --- @field public LineOfSight boolean Returns TRUE if the switch is in LoS 15 | --- @field public N MQFloat Y coordinate (Northward-positive) 16 | --- @field public Name string Name 17 | --- @field public Open boolean Open? 18 | --- @field public Toggle fun() Toggles the selected switch 19 | --- @field public ToString string Same as ID 20 | --- @field public W MQFloat X coordinate (Westward-positive) 21 | --- @field public X MQFloat X coordinate 22 | --- @field public Y MQFloat Y coordinate 23 | --- @field public Z MQFloat Z coordinate -------------------------------------------------------------------------------- /mq/datatype/_target.lua: -------------------------------------------------------------------------------- 1 | --- @class target : spawn 2 | --- @field public Aego MQCachedBuff # Returns the name of the Aego spell if the Target has one 3 | --- @field public AggroHolder MQSpawn # Returns the target's current target. 4 | --- @field public Beneficial MQCachedBuff # Returns the name of the Beneficial spell if the Target has one. This will skip "player" casted buffs, but will show NPC Casted buffs and some AA buffs. 5 | --- @field public BuffDuration timestamp|fun(val:string|integer): timestamp Returns the duration remaining on this target buff by index number or by spell name 6 | --- @field public BuffsPopulated MQBoolean # Returns TRUE when the target's buffs are finished populating. 7 | --- @field public Brells MQString # Returns the name of the Brells spell if the Target has one 8 | --- @field public Charmed MQCachedBuff # Returns the name of the Charmed spell if the Target has one 9 | --- @field public Clarity MQCachedBuff # Returns the name of the Clarity spell if the Target has one 10 | --- @field public Corrupted MQCachedBuff # Returns the name of any the Corruption spell if Target has one 11 | --- @field public Cursed MQCachedBuff # Returns the name of the Curse spell if Target has one 12 | --- @field public Crippled MQCachedBuff # Returns the name of the Cripple spell if the Target has one 13 | --- @field public Diseased MQCachedBuff # Returns the name of a Disease spell if the Target has one 14 | --- @field public Dotted MQCachedBuff # Returns the name of a DOT spell if the Target has one 15 | --- @field public DSed MQCachedBuff # Returns the name of the Damage Shield spell if the Target has one 16 | --- @field public Focus MQCachedBuff # Returns the name of the Focus spell if the Target has one 17 | --- @field public Growth MQCachedBuff # Returns the name of the Growth spell if the Target has one 18 | --- @field public Hasted MQCachedBuff # Returns the name of the Haste spell if the Target has one 19 | --- @field public HybridHP MQCachedBuff # Returns the name of the Hybrid HP spell if the Target has one 20 | --- @field public Maloed MQCachedBuff # Returns the name of the Malo spell if the Target has one 21 | --- @field public MaxMeleeTo MQFloat # The Max distance from the target for you to hit it 22 | --- @field public Mezzed MQCachedBuff # Returns the name of the Mez spell if the Target has one 23 | --- @field public PctAggro MQInt # Returns your % Aggro with this Target 24 | --- @field public Poisoned MQCachedBuff # Returns the name of a Poison spell if the Target has one 25 | --- @field public Pred MQCachedBuff # Returns the name of the Predator spell if the Target has one 26 | --- @field public Rooted MQCachedBuff # Returns the name of the Rooted spell if the Target has one 27 | --- @field public Regen MQCachedBuff # Returns the name of the Regen spell if the Target has one 28 | --- @field public RevDSed MQCachedBuff # Returns the name of the Reverse Damage Shield spell if the Target has one 29 | --- @field public SE MQCachedBuff # Returns the name of the Spiritual Enlightenment spell if the Target has one 30 | --- @field public Shining MQCachedBuff # Returns the name of the Shining spell if the Target has one 31 | --- @field public Skin MQCachedBuff # Returns the name of the Skin spell if the Target has one 32 | --- @field public Slowed MQCachedBuff # Returns the name of the Slow spell if the Target has one 33 | --- @field public Snared MQCachedBuff # Returns the name of the Snare spell if the Target has one 34 | --- @field public Strength MQCachedBuff # Returns the name of the Strength spell if the Target has one 35 | --- @field public SV MQCachedBuff # Returns the name of the Spiritual Vitality spell if the Target has one 36 | --- @field public Symbol MQCachedBuff # Returns the name of the Symbol spell if the Target has one 37 | --- @field public Tashed MQCachedBuff # Returns the name of the Tash spell if the Target has one 38 | --- @field public ToString MQString # Same as Name -------------------------------------------------------------------------------- /mq/datatype/_task.lua: -------------------------------------------------------------------------------- 1 | --- @class task 2 | --- @field public Index MQString # Returns the task's place on the tasklist 3 | --- @field public Objective.Instruction string Returns a tasks's Objectives 4 | --- @field public Objective.Status string Returns the status of the objective in the format amount done Vs total IE 0/3 5 | --- @field public Objective.Zone string Returns the zone the objective is to be performed in 6 | --- @field public CurrentCount number Returns the current count of the .Type needed to complete a objective 7 | --- @field public RequiredCount number Returns the required count of the .Type needed to complete a objective 8 | --- @field public Optional boolean Returns true or false if a objective is optional 9 | --- @field public RequiredItem string Returns a string of the required item to complete a objective. 10 | --- @field public RequiredSkill string Returns a string of the required skill to complete a objective. 11 | --- @field public RequiredSpell string Returns a string of the required spell to complete a objective. 12 | --- @field public DZSwitchID number Returns an int of the switch used in a objective. 13 | --- @field public ID number Returns an int of the task ID 14 | --- @field public Step string Returns description of current step in the task 15 | --- @field public Select string Selects the task 16 | --- @field public Title string Returns name of the shared task 17 | --- @field public Timer ticks Returns amount of time before task expires 18 | --- @field public Members number Returns number of members in task 19 | --- @field public Member taskmember Returns specified member in task by index or name 20 | --- @field public Leader string Returns task leader's name 21 | --- @field public WindowIndex number Returns the Quest Window List Index. (if the window actually has the list filled) 22 | --- @field public Type string Returns a string that can be one of the following: Unknown,None,Deliver,Kill,Loot,Hail,Explore,Tradeskill,Fishing,Foraging,Cast,UseSkill,DZSwitch,DestroyObject,Collect,Dialogue -------------------------------------------------------------------------------- /mq/datatype/_taskmember.lua: -------------------------------------------------------------------------------- 1 | --- @class taskmember 2 | --- @field public Name MQString # Returns name of the member 3 | --- @field public Leader MQBoolean # Returns true if the member is leader 4 | --- @field public Index MQInt # Returns task index for member (i.e. 1-6) -------------------------------------------------------------------------------- /mq/datatype/_taskobjective.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/macroquest/mq-definitions/d3f332eeca65f73e64053046bb6589c018e433c0/mq/datatype/_taskobjective.lua -------------------------------------------------------------------------------- /mq/datatype/_textureanimation.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class CTextureAnimation 3 | ---@field public SetTextureCell fun(self: CTextureAnimation, id: integer|string) # Set the texture animation to the given icon ID -------------------------------------------------------------------------------- /mq/datatype/_ticks.lua: -------------------------------------------------------------------------------- 1 | --- @class ticks 2 | --- @field public Hours MQInt #The number of hours in HH:MM:SS (0-23) 3 | --- @field public Minutes MQInt #The number of minutes in HH:MM:SS (1-59) 4 | --- @field public Seconds MQInt #The number of seconds in HH:MM:SS (1-59) 5 | --- @field public TotalMinutes MQInt #The total number of minutes 6 | --- @field public TotalSeconds MQInt #The total number of seconds 7 | --- @field public Ticks MQInt #The value in ticks 8 | --- @field public Time MQString #Time in the form MM:SS 9 | --- @field public TimeHMS MQString #Time in the form HH:MM:SS (if there are no hours, the form will be MM:SS) 10 | --- @field public ToString MQString #Same as Ticks -------------------------------------------------------------------------------- /mq/datatype/_time.lua: -------------------------------------------------------------------------------- 1 | --- @class time 2 | --- @field public Date MQString # Date in the format MM/DD/YYYY 3 | --- @field public Day MQInt # Day of the month 4 | --- @field public DayOfWeek MQInt # Day of the week (1=sunday to 7=saturday) 5 | --- @field public Hour MQInt # Hour (0-23) 6 | --- @field public Minute MQInt # Minute (0-59) 7 | --- @field public Month MQInt # Month of the year (1-12) 8 | --- @field public Night MQBoolean # Gives true if the current hour is considered "night" in EQ (7:00pm-6:59am) 9 | --- @field public Second MQInt # Second (0-59) 10 | --- @field public SecondsSinceMidnight MQFloat # Number of seconds since midnight 11 | --- @field public Time12 MQString # Time in 12-hour format (HH:MM:SS) 12 | --- @field public Time24 MQString # Time in 24-hour format (HH:MM:SS) 13 | --- @field public Year MQInt # Year 14 | --- @field public ToString MQString # Same as Time24 -------------------------------------------------------------------------------- /mq/datatype/_timer.lua: -------------------------------------------------------------------------------- 1 | --- @class timer 2 | --- @field public OriginalValue MQInt # Original value of the timer 3 | --- @field public Value MQInt # Current value of the timer 4 | --- @field public ToString MQString # Same as Value -------------------------------------------------------------------------------- /mq/datatype/_timestamp.lua: -------------------------------------------------------------------------------- 1 | --- @class timestamp 2 | --- @field public Hours MQInt # Number of hours in the timestamp (1hr 23min 53 seconds will return 1) 3 | --- @field public Minutes MQInt # Number of Minutes in the timestamp (1hr 23min 53 seconds will return 23) 4 | --- @field public Seconds MQInt # Number of Seconds in the timestamp (1hr 23min 53 seconds will return 53) 5 | --- @field public TimeHMS MQString # Time value formatted in H:M:S 6 | --- @field public Time MQString # Time value formatted in M:S 7 | --- @field public TotalMinutes MQInt # Total number of minutes in the timestamp (1hr 23min 53 seconds will return 83) 8 | --- @field public TotalSeconds MQInt # Total number of minutes in the timestamp (1hr 23min 53 seconds will return 5033) 9 | --- @field public Raw MQFloat # Time value represented in milliseconds 10 | --- @field public Float MQFloat # Timestamp represented in seconds (1hr 23 min 53 seconds will return 5033.00) 11 | --- @field public Ticks MQInt # Time value represented in ticks 12 | --- @field public ToString MQString # Same as Raw -------------------------------------------------------------------------------- /mq/datatype/_type.lua: -------------------------------------------------------------------------------- 1 | --- @class mqtype 2 | --- @field public Name MQString # Type name 3 | --- @field public ToString MQString # Same as Name 4 | --- @field public InheritedType mqtype # Returns the type which this type inherits from 5 | local mqtype = nil 6 | 7 | ---@diagnostic disable: duplicate-set-field 8 | ---@param id integer|string # Internal ID number 9 | ---@return string # Member name based on an internal ID number (based on 1 through N, not all values will be used) 10 | function mqtype.Member(id) end 11 | 12 | ---@param name string 13 | ---@return integer # Member internal ID number based on name (will be a number from 1 to N) 14 | function mqtype.Member(name) end 15 | ---@diagnostic enable: duplicate-set-field -------------------------------------------------------------------------------- /mq/datatype/_window.lua: -------------------------------------------------------------------------------- 1 | ---@class window 2 | ---@field public BGColor argb # Background color 3 | ---@field public Checked MQBoolean # Returns TRUE if the button has been checked 4 | ---@field public Children MQBoolean # Returns TRUE if the window has children 5 | ---@field public CurrentTab MQWindow # Returns current tab as a window object 6 | ---@field public CurrentTabIndex integer # Returns the current tab index as an int 7 | ---@field public Enabled MQBoolean # Returns TRUE if the window is enabled 8 | ---@field public FirstChild MQWindow # First child window 9 | ---@field public GetCurSel fun():integer # Returns the index of the currently selected row 10 | ---@field public Height MQFloat # Height in pixels 11 | ---@field public Highlighted MQBoolean # Returns TRUE if the window is highlighted 12 | ---@field public HisTradeReady MQBoolean # Has the other person clicked the Trade button? 13 | ---@field public HScrollMax MQFloat # Horizontal scrollbar range 14 | ---@field public HScrollPos MQFloat # Horizontal scrollbar position 15 | ---@field public HScrollPct MQFloat # Horizontal scrollbar position in % to range from 0 to 100 16 | ---@field public Items MQFloat # Number of items in a Listbox or Combobox 17 | ---@field public Minimized MQBoolean # Returns TRUE if the window is minimized 18 | ---@field public MouseOver MQBoolean # Returns TRUE if the mouse is currently over the window 19 | ---@field public MyTradeReady MQBoolean # Have I clicked the Trade button? 20 | ---@field public Name MQString # Name of window piece, e.g. "ChatWindow" for top level windows, or the piece name for child windows. Note: this is Custom UI dependent 21 | ---@field public Next MQWindow # Next sibling window 22 | ---@field public Open MQBoolean #R eturns TRUE if the window is open 23 | ---@field public Parent MQWindow Parent window 24 | ---@field public ScreenID MQString # ScreenID of window piece. Note: This is not Custom UI dependent, it must be the same on all UIs 25 | ---@field public Siblings MQBoolean # Returns TRUE if the window has siblings 26 | ---@field public Style MQFloat # Window style code 27 | ---@field public Text MQString # Window's text 28 | ---@field public Tooltip MQString #T ooltipReference text 29 | ---@field public Type MQString # Type of window piece (Screen for top level windows, or Listbox, Button, Gauge, Label, Editbox, Slider, etc) 30 | ---@field public VScrollMax MQFloat # Vertical scrollbar range 31 | ---@field public VScrollPct MQFloat # Vertical scrollbar position in % to range from 0 to 100 32 | ---@field public VScrollPos MQFloat # Vertical scrollbar position 33 | ---@field public Width MQFloat # Width in pixels 34 | ---@field public X MQFloat # Screen X position 35 | ---@field public Y MQFloat # Screen Y position 36 | ---@field public ToString MQBoolean # TRUE if window exists, FALSE if not 37 | local window = nil 38 | 39 | ---@param name string # Child with this name 40 | ---@return MQWindow 41 | function window.Child(name) end 42 | 43 | ---Does the action of closing a window 44 | function window.DoClose() end 45 | 46 | ---Does the action of opening a window 47 | function window.DoOpen() end 48 | 49 | ---Does the action of clicking the left mouse button down 50 | function window.LeftMouseDown() end 51 | 52 | ---Does the action of holding the left mouse button 53 | function window.LeftMouseHeld() end 54 | 55 | ---Does the action of holding the left mouse button up 56 | function window.LeftMouseHeldUp() end 57 | 58 | ---Does the action of clicking the left mouse button up 59 | function window.LeftMouseUp() end 60 | 61 | ---Does the action of clicking the right mouse button 62 | function window.RightMouseDown() end 63 | 64 | ---Does the action of holding the right mouse button 65 | function window.RightMouseHeld() end 66 | 67 | ---Does the action of holding the right mouse button up 68 | function window.RightMouseHeldUp() end 69 | 70 | ---Does the action of clicking the right mouse button up 71 | function window.RightMouseUp() end 72 | 73 | ---@diagnostic disable: duplicate-set-field 74 | ---Selects the specified item inside a ListBox, List, etc 75 | ---@param index integer|string # Index to select 76 | function window.Select(index) end 77 | 78 | ---Selects the specified item inside a ListBox, List, etc 79 | ---@param index string # Index to select 80 | function window.Select(index) end 81 | ---@diagnostic enable: duplicate-set-field 82 | 83 | ---Selects the specified tab 84 | ---@param tabNum integer 85 | function window.SetCurrentTab(tabNum) end 86 | 87 | ---@param text string 88 | function window.SetText(text) end 89 | 90 | ---@diagnostic disable: duplicate-set-field 91 | ---Get the text for the Nth item in a list box. Only works on list boxes. Use of y is optional and allows selection of the column of the window to get text from. 92 | ---@param nthItem integer|string 93 | ---@param column? integer|string 94 | ---@return string 95 | function window.List(nthItem, column) end 96 | 97 | ---Find an item in a list box by partial match (use window.List[=text] for exact). Only works on list boxes. Use of y is optional and allows selection of the column of the window to search in. 98 | ---@param text string 99 | ---@param column? integer|string 100 | ---@return integer 101 | function window.List(text, column) end 102 | ---@diagnostic enable: duplicate-set-field -------------------------------------------------------------------------------- /mq/datatype/_worldlocation.lua: -------------------------------------------------------------------------------- 1 | --- @class worldlocation 2 | --- @field public ID MQInt # The location's ID 3 | --- @field public Heading MQFloat # At the point of binding, what direction was the character facing 4 | --- @field public Zone MQZone # Access to the zone data 5 | --- @field public X MQFloat # The X coordinate 6 | --- @field public Y MQFloat # The Y coordinate 7 | --- @field public Z MQFloat # The Z coordinate -------------------------------------------------------------------------------- /mq/datatype/_xtarget.lua: -------------------------------------------------------------------------------- 1 | --- @class xtarget : spawn 2 | --- @field public ID MQInt # ID of specified XTarget 3 | --- @field public Name MQString # Name of specified XTarget 4 | --- @field public PctAggro MQFloat # PctAggro of specified XTarget 5 | --- @field public TargetType MQString # Extended target type 6 | --- @field public ToString MQString # Number of current extended targets -------------------------------------------------------------------------------- /mq/datatype/_zone.lua: -------------------------------------------------------------------------------- 1 | --- @class zone 2 | --- @field public ID MQInt # ID of the zone 3 | --- @field public Name MQString # Full zone name 4 | --- @field public ShortName MQString # Short zone name 5 | --- @field public ToString MQString # Same as Name -------------------------------------------------------------------------------- /mq/enum/_commands.lua: -------------------------------------------------------------------------------- 1 | --- This most likely needs to be chopped down as there are 2 | --- specific commands for things that are either no longer 3 | --- in MQ core or are part of the MQ Macro language. 4 | 5 | ---@enum commands 6 | local COMMANDS = { 7 | mqclear = "/mqclear", 8 | mqfont = "/mqfont", 9 | mqmin = "/mqmin", 10 | custombind = "/custombind", 11 | classhud = "/classhud", 12 | defaulthud = "/defaulthud", 13 | hud = "/hud", 14 | loadhud = "/loadhud", 15 | zonehud = "/zonehud", 16 | inote = "/inote", 17 | highlight = "/highlight", 18 | mapclick = "/mapclick", 19 | mapfilter = "/mapfilter", 20 | maphide = "/maphide", 21 | mapnames = "/mapnames", 22 | mapshow = "/mapshow", 23 | aa = "/aa", 24 | advloot = "/advloot", 25 | alert = "/alert", 26 | alias = "/alias", 27 | altkey = "/altkey", 28 | banklist = "/banklist", 29 | beep = "/beep", 30 | beepontells = "/beepontells", 31 | bind = "/bind", 32 | call = "/call", 33 | caption = "/caption", 34 | captioncolor = "/captioncolor", 35 | cast = "/cast", 36 | cecho = "/cecho", 37 | charinfo = "/charinfo", 38 | cleanup = "/cleanup", 39 | clearerrors = "/clearerrors", 40 | click = "/click", 41 | combine = "/combine", 42 | continue = "/continue", 43 | ctrlkey = "/ctrlkey", 44 | declare = "/declare", 45 | delay = "/delay", 46 | deletevar = "/deletevar", 47 | destroy = "/destroy", 48 | docommand = "/docommand", 49 | doevents = "/doevents", 50 | doors = "/doors", 51 | doortarget = "/doortarget", 52 | dosocial = "/dosocial", 53 | drop = "/drop", 54 | dumpbinds = "/dumpbinds", 55 | echo = "/echo", 56 | endmacro = "/endmacro", 57 | eqtarget = "/eqtarget", 58 | exec = "/exec", 59 | face = "/face", 60 | filter = "/filter", 61 | flashontells = "/flashontells", 62 | foreground = "/foreground", 63 | gotoz = "/goto", 64 | help = "/help", 65 | hotbutton = "/hotbutton", 66 | identify = "/identify", 67 | ifz = "/if", 68 | ini = "/ini", 69 | invoke = "/invoke", 70 | itemnotify = "/itemnotify", 71 | items = "/items", 72 | itemtarget = "/itemtarget", 73 | keepkeys = "/keepkeys", 74 | keypress = "/keypress", 75 | listmacros = "/listmacros", 76 | loadcfg = "/loadcfg", 77 | loadspells = "/loadspells", 78 | location = "/location", 79 | loginname = "/loginname", 80 | look = "/look", 81 | lootall = "/lootall", 82 | macro = "/macro", 83 | makemevisible = "/makemevisible", 84 | memspell = "/memspell", 85 | mouseto = "/mouseto", 86 | mqcopylayout = "/mqcopylayout", 87 | mqlog = "/mqlog", 88 | mqpause = "/mqpause", 89 | mqtarget = "/mqtarget", 90 | multiline = "/multiline", 91 | netstatusxpos = "/netstatusxpos", 92 | netstatusypos = "/netstatusypos", 93 | nomodkey = "/nomodkey", 94 | noparse = "/noparse", 95 | notify = "/notify", 96 | plugin = "/plugin", 97 | popcustom = "/popcustom", 98 | popup = "/popup", 99 | popupecho = "/popupecho", 100 | ranged = "/ranged", 101 | reloadui = "/reloadui", 102 | removeaura = "/removeaura", 103 | removebuff = "/removebuff", 104 | removelev = "/removelev", 105 | removepetbuff = "/removepetbuff", 106 | screenmode = "/screenmode", 107 | selectitem = "/selectitem", 108 | sellitem = "/sellitem", 109 | setautorun = "/setautorun", 110 | seterror = "/seterror", 111 | setprio = "/setprio", 112 | setwintitle = "/setwintitle", 113 | shiftkey = "/shiftkey", 114 | skills = "/skills", 115 | spellslotinfo = "/spellslotinfo", 116 | spew = "/spew", 117 | squelch = "/squelch", 118 | substitute = "/substitute", 119 | target = "/target", 120 | timed = "/timed", 121 | timestamp = "/timestamp", 122 | unload = "/unload", 123 | updateitems = "/updateitems", 124 | useitem = "/useitem", 125 | varcalc = "/varcalc", 126 | vardata = "/vardata", 127 | varset = "/varset", 128 | where = "/where", 129 | who = "/who", 130 | whofilter = "/whofilter", 131 | whotarget = "/whotarget", 132 | windows = "/windows", 133 | windowstate = "/windowstate", 134 | lootnodrop = "/lootnodrop", 135 | } -------------------------------------------------------------------------------- /mq/global.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---@param format string 4 | ---@vararg any 5 | ---@return string 6 | function printf(format, ...) end 7 | -------------------------------------------------------------------------------- /mq/mq.lua: -------------------------------------------------------------------------------- 1 | ---@meta mq 2 | 3 | ---@class Mq 4 | ---@field public TLO TLO # Top Level Object (TLO) Binding 5 | ---@field public imgui IMGUI # sol2 ImGui Binding 6 | ---@field public configDir string # Path to config directory 7 | ---@field public luaDir string # Path to lua directory 8 | ---@field public moduleDir string # Path to module directory 9 | mq = {} 10 | 11 | ---Performs an ingame slash action provided as a string. Any arguments passed to it are stringified (in lua), concatenated (with a space delimiter), and sent as part of the command. 12 | ---@vararg string # An in-game slash command (including the slash) (e.g. '/keypress DUCK') 13 | function mq.cmd(...) end 14 | 15 | ---Simular to mq.cmd() but provides C/C++ string formatting 16 | ---@param command string # An in-game slash command (including the slash) (e.g. '/keypress %s') 17 | ---@param ...? any # Variables that provide input the formated string 18 | function mq.cmdf(command, ...) end 19 | 20 | ---Provides a Timing delay 21 | ---@param delayValue number|string # A number (milliseconds) or string ending in s, m, or ms (e.g. '2s' or '1m') 22 | ---@param condition? function # An optional condition that can end the delay early with a return of true 23 | function mq.delay(delayValue, condition) end 24 | 25 | ---Returns time in milliseconds 26 | ---@return number 27 | function mq.gettime() end 28 | 29 | ---Joins a number of string-convertable parameters into a single string 30 | ---@vararg number|string 31 | ---@return string 32 | function mq.join(...) end 33 | 34 | ---Force exits the script, ignoring the normal Lua return flow 35 | function mq.exit() end 36 | 37 | ---Binds a command to an in-game slash prompt 38 | ---@param command string # The command including the slash. '/healme' 39 | ---@param callback function # The Lua function to call when the command is entered in-game 40 | function mq.bind(command, callback) end 41 | 42 | ---Unbinds a previously assigned function from a command 43 | ---@param command string e.g /burn 44 | function mq.unbind(command) end 45 | 46 | 47 | ---@class EventOptions 48 | ---@field keepLinks boolean 49 | 50 | ---Creates an event that will execute a Lua function when the provided matcher text is seen in game 51 | ---Note: this needs to be paried with #doevents() to actually process the events during the script execution. 52 | ---@param name string Name of the Event 53 | ---@param matcherText string # This needs an example and reference 54 | ---@param callback function # Function to call when text is matched 55 | ---@param options? EventOptions 56 | function mq.event(name, matcherText, callback, options) end 57 | 58 | ---Unregisters the event by name so that it will no longer react 59 | ---@param name string # Name of the Event 60 | function mq.unevent(name) end 61 | 62 | ---Process queued events 63 | ---@param name? string # Optional name of a single Event to process 64 | function mq.doevents(name) end 65 | 66 | ---Flush events 67 | ---@param name? string # Optional name of a single Event to flush 68 | function mq.flushevents(name) end 69 | 70 | ---@param name string # The name of the texture to find 71 | ---@return CTextureAnimation # The CTextureAnimation with the given name 72 | function mq.FindTextureAnimation(name) end 73 | 74 | ---Returns all spawns 75 | ---@return spawn[] # The spawns 76 | function mq.getAllSpawns() end 77 | 78 | ---Returns all spawns by predicate. 79 | ---@param predicate fun(spawn: spawn): boolean # The filter predicate 80 | ---@return spawn[] # The spawns 81 | function mq.getFilteredSpawns(predicate) end 82 | 83 | ---@param type any # The variable we want to check type of 84 | ---@return mqtype 85 | function mq.gettype(type) end 86 | 87 | ---Retrieves FLT_MIN and FLT_MAX 88 | ---@return number FLT_MIN, number FLT_MAX 89 | function mq.NumericLimits_Float() end 90 | 91 | ---Parses the provided macro script input 92 | ---@return string # The result of the parsed input 93 | function mq.parse(macrostring) end 94 | 95 | ---Serializes a table to the given filepath 96 | ---@param filepath string 97 | ---@param table table 98 | function mq.pickle(filepath, table) end 99 | 100 | ---@class Cmd 101 | ---@field afk fun() 102 | ---@field alt fun() 103 | ---@field anon fun() 104 | ---@field autoinventory fun() 105 | ---@field cast fun() 106 | ---@field destroy fun() 107 | ---@field doability fun() 108 | ---@field echo fun() 109 | ---@field face fun() 110 | ---@field keypress fun() 111 | ---@field nav fun() 112 | ---@field removebuff fun() 113 | ---@field stand fun() 114 | ---@field target fun() 115 | 116 | ---Sol2 ImGui Binding 117 | ---@class IMGUI 118 | ---@field init fun(name: string, render: fun()) 119 | 120 | ---Register the ImGui Callback. Named function that will be called on every ImGui update, 121 | ---usually bound to one function that renders the ImGui window interface in game. 122 | ---@param name string # The name of the callback 123 | ---@param callback function # The callback function 124 | function mq.imgui.init(name, callback) end 125 | 126 | ---Does a a registered ImGui callback exist? 127 | ---@param name string # The name of registered callback 128 | ---@return boolean 129 | function mq.imgui.exists(name) end 130 | 131 | ---Destroy a registered ImGui callback. 132 | ---@param name string # The name of registered callback 133 | function mq.imgui.destroy(name) end 134 | 135 | ---MQ2 Top Level Object Accssor 136 | ---@class TLO 137 | ---@field Achievement Achievement 138 | ---@field AdvLoot AdvLoot 139 | ---@field Alias fun(name:string):boolean # True if alias exists 140 | ---@field AltAbility altability 141 | ---@field Bandoliler fun(name:string) bandolier 142 | ---@field Corpse corpse|fun():corpse|nil # Corpse you are looting 143 | ---@field Cursor MQItem 144 | ---@field CursorAttachment cursorattachment 145 | ---@field DisplayItem fun(): MQItem # Access to all the information in the Item Display window 146 | ---@field DoorTarget MQSwitch # Information on your doortarget 147 | ---@field DynamicZone dynamiczone 148 | ---@field Event any 149 | ---@field EverQuest everquest # Access information about the current Everquest session 150 | ---@field Familiar any 151 | ---@field Float float 152 | ---@field FPS userdata 153 | ---@field FrameLimiter framelimiter | fun(): "TRUE" | "FASLE" 154 | ---@field Friends userdata 155 | ---@field GameTime time 156 | ---@field Ground ground|Ground # References the ground spawn item you have targeted. 157 | ---@field Group group 158 | ---@field GroupLeader any 159 | ---@field GroupLeaderName any 160 | ---@field If any 161 | ---@field Illusion any 162 | ---@field Ini any 163 | ---@field Int any 164 | ---@field Inventory inventory 165 | ---@field Irc any 166 | ---@field ItemTarget ground # Gives access to the ground item that is previously targeted using /itemtarget. 167 | ---@field LastSpawn any 168 | ---@field LineOfSight fun(query: string):boolean # Query is a string with the syntax of "y,x,z:y2,x2,z2" 169 | ---@field Lua Lua 170 | ---@field Macro Macro 171 | ---@field MacroQuest macroquest 172 | ---@field Math math 173 | ---@field Me MQCharacter 174 | ---@field Menu any 175 | ---@field Mercenary mercenary 176 | ---@field Merchant MQMerchant # Interacts with the currently active merchant 177 | ---@field Mount keyring 178 | ---@field Pet pet 179 | ---@field PointMerchant any 180 | ---@field Raid raid 181 | ---@field Range range 182 | ---@field Select fun(target: string, ...): integer # Finds number of matches in [target] 183 | ---@field SelectedItem item # Returns information on the object that is selected in your own inventory while using a merchant. 184 | ---@field String any 185 | ---@field SubDefined any 186 | ---@field Switch MQSwitch 187 | ---@field SwitchTarget any 188 | ---@field Target MQTarget 189 | ---@field Task fun(index?: integer|string): task|nil # Returns the first task, or the current shared task if one exists. 190 | ---@field Time time 191 | ---@field Type fun(type: string): mqtype # Information on data types 192 | ---@field Window fun(name: string): MQWindow # Information on a particular UI window 193 | TLO = {} 194 | 195 | ---@diagnostic disable: duplicate-set-field 196 | ---Returns a pipe | separated list of alert ids 197 | ---@return string 198 | function TLO.Alert() end 199 | 200 | ---Retreive information for the laert category by its id 201 | ---@param id integer 202 | ---@return alert 203 | function TLO.Alert(id) end 204 | 205 | ---@diagnostic enable: duplicate-set-field 206 | 207 | ---@deprecated Use Lua types 208 | function TLO.Bool() end 209 | 210 | ---@param index integer 211 | ---@param filter string 212 | ---@return MQSpawn 213 | ---@overload fun(filter: string): MQSpawn 214 | function TLO.NearestSpawn(index, filter) end 215 | 216 | ---Finds an Item by the item ID 217 | ---@param id integer 218 | ---@return MQItem 219 | function TLO.FindItem(id) end 220 | 221 | ---Finds an Item by the partial item Name (use of '=' infront of name forces exact match) 222 | ---@param name string 223 | ---@return MQItem 224 | function TLO.FindItem(name) end 225 | 226 | ---Finds an Item in the bank by the item ID 227 | ---@param id integer 228 | ---@return MQItem 229 | function TLO.FindItemBank(id) end 230 | 231 | ---Finds an Item in the bank by the partial item Name (use of '=' infront of name forces exact match) 232 | ---@param name string 233 | ---@return MQItem 234 | function TLO.FindItemBank(name) end 235 | 236 | ---Return a counts of Items by the item ID 237 | ---@param id integer 238 | ---@return MQInt 239 | function TLO.FindItemCount(id) end 240 | 241 | ---Return a counts of Items by the item Name 242 | ---@param name string 243 | ---@return MQInt 244 | function TLO.FindItemCount(name) end 245 | 246 | ---Return a counts of Items in the bank by the item ID 247 | ---@param id integer 248 | ---@return MQInt 249 | function TLO.FindItemBankCount(id) end 250 | 251 | ---Return a counts of Items in the bank by the item Name 252 | ---@param name string 253 | ---@return MQInt 254 | function TLO.FindItemBankCount(name) end 255 | 256 | ---@diagnostic disable: duplicate-set-field 257 | ----Creates a heading object using degrees (clockwise) 258 | ---@param degrees integer # Degrees (clockwise) 259 | ---@return heading 260 | function TLO.Heading(degrees) end 261 | 262 | ----Creates a heading object using the heading to this y,x location 263 | ---@param y integer # Y location 264 | ---@param x integer # X location 265 | ---@return heading 266 | function TLO.Heading(y, x) end 267 | 268 | ----Creates a heading object using the heading to this north,west location 269 | ---@param north integer # North location 270 | ---@param west integer # West location 271 | ---@return heading 272 | function TLO.Heading(north, west) end 273 | 274 | ---Return the invslot specified by name 275 | ---@param name string 276 | ---@return invslot 277 | function TLO.InvSlot(name) end 278 | 279 | ---Return the invslot specified by id 280 | ---@param id number 281 | ---@return invslot 282 | function TLO.InvSlot(id) end 283 | ---@diagnostic enable: duplicate-set-field 284 | 285 | ---Returns a Plugin by index, starting with 1 and stopping whenever the list runs out of plugins. 286 | ---@param index integer 287 | ---@return plugin 288 | function TLO.Plugin(index) end 289 | 290 | ----Returns a Plugin by Name 291 | ---@param name string 292 | ---@return plugin 293 | function TLO.Plugin(name) end 294 | 295 | ---Returns a Spawn by ID 296 | ---@param id integer 297 | ---@return MQSpawn 298 | function TLO.Spawn(id) end 299 | 300 | ---Returns a Spawn by use of a [Spawn Search](https://docs.macroquest.org/reference/general/spawn-search/) filter 301 | ---@param filter string 302 | ---@return MQSpawn 303 | function TLO.Spawn(filter) end 304 | 305 | ---Number of items on the ground in this zone (filter is optional) 306 | ---@param filter string 307 | ---@return integer 308 | function TLO.GroundItemCount(filter) end 309 | 310 | ---Retrieves the item in your mount keyring by index 311 | ---@param index integer 312 | ---@return keyringitem 313 | function TLO.Mount(index) end 314 | 315 | ---Retrieves the item in your mount keyring by name. A = can be prepended for an exact name match. 316 | ---@param name string 317 | ---@return keyringitem 318 | function TLO.Mount(name) end 319 | 320 | ----Returns the Socail button at this index (0-119) 321 | ---@param index integer 322 | ---@return social 323 | function TLO.Social(index) end 324 | 325 | ----Returns a count of Spawns by use of a [Spawn Search](https://docs.macroquest.org/reference/general/spawn-search/) filter 326 | ---@param filter string 327 | ---@return MQInt 328 | function TLO.SpawnCount(filter) end 329 | 330 | ---Returns a Spell by ID 331 | ---@param id integer 332 | ---@return MQSpell 333 | function TLO.Spell(id) end 334 | 335 | ----Returns a Spell by Name 336 | ---@param name string 337 | ---@return MQSpell 338 | function TLO.Spell(name) end 339 | 340 | ---Returns a Skill by number 341 | ---@param number integer 342 | ---@return skill 343 | function TLO.Skill(number) end 344 | 345 | ----Returns a Skill by Name 346 | ---@param name string 347 | ---@return skill 348 | function TLO.Skill(name) end 349 | 350 | ----The current zone information 351 | ---@type MQCurrentZone 352 | TLO.Zone = nil 353 | 354 | ---@diagnostic disable: duplicate-set-field 355 | ---@diagnostic disable: assign-type-mismatch 356 | ----Retrieves information about the current zone. 357 | ---@return MQCurrentZone 358 | function TLO.Zone() end 359 | 360 | ---@diagnostic disable: duplicate-set-field 361 | ---@diagnostic disable: assign-type-mismatch 362 | ----Retrieves information about a zone by zone ID. If this zone is the current zone, then this will return currentzone. 363 | ---@param id integer Zone ID 364 | ---@return MQZone 365 | function TLO.Zone(id) end 366 | 367 | ----Retrieves information about a zone by short name. If this zone is the current zone, then this will return currentzone. 368 | ---@param shortName string Zone Short Name 369 | ---@return MQZone 370 | function TLO.Zone(shortName) end 371 | 372 | ---@diagnostic enable: assign-type-mismatch 373 | ---@diagnostic enable: duplicate-set-field 374 | 375 | ---@class MQTexture 376 | ---@field public size ImVec2 Size of the texture 377 | ---@field public fileName string filename of the texture 378 | local MQTexture = {} 379 | 380 | ---Retrieve the texture id for the texture 381 | ---@return ImTextureID 382 | function MQTexture:GetTextureID() end 383 | 384 | ---Create a texture from an image file 385 | ---@param fileName string Texture filename 386 | ---@return MQTexture 387 | function mq.CreateTexture(fileName) end 388 | 389 | return mq 390 | -------------------------------------------------------------------------------- /mq/plugins/DanNet/_TLO.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | --- DanNet Lua Bindings 4 | ---@class TLO.DanNet 5 | ---@field Name MQString # Current node name (fully qualified) 6 | ---@field Version MQString # Current build version 7 | ---@field Debug MQBoolean # Debugging flag 8 | ---@field LocalEcho MQBoolean # Local echo flag (outgoing echo) 9 | ---@field CommandEcho MQBoolean # Command echo (incoming commands) 10 | ---@field FullNames MQBoolean # Print fully qualified names? 11 | ---@field FrontDelim MQBoolean # Use a front | in arrays? 12 | ---@field Timeout MQString # Timeout for implicit delay in /dquery and /dobserve commands 13 | ---@field ObserveDelay MQInt # Delay between observe broadcasts (in ms) 14 | ---@field Evasive MQInt # Time to classify a peer as evasive (in ms) 15 | ---@field EvasiveRefresh MQBoolean 16 | ---@field Expired MQInt # Keepalive time for non-responding peers (in ms) 17 | ---@field Keepalive MQInt # Keepalive time for local actor pipe (in ms) 18 | ---@field PeerCount MQInt # Number of connected peers 19 | ---@field Peers MQString # List of connected peers 20 | ---@field GroupCount MQInt # Number of all groups 21 | ---@field Groups MQString # List of all groups 22 | ---@field JoinedCount MQInt # Number of joined groups 23 | ---@field Joined MQString # List of joined groups 24 | TLO.DanNet = {} 25 | 26 | ---@param peerName string 27 | ---@return peer|fun(): string|nil 28 | function TLO.DanNet(peerName) end 29 | 30 | ---@param groupName string 31 | ---@return string # all peers in the [groupName] group 32 | function TLO.DanNet.Peers(groupName) end 33 | 34 | ---- Observe accessor 35 | ---@return string # List all queries observers have registered 36 | function TLO.DanNet.O() end 37 | 38 | ---- Observe accessor 39 | ---@return string # List all queries that self has registered on peer 40 | function TLO.DanNet.Observe() end 41 | 42 | ---- Observe accessor 43 | ---@param query string 44 | ---@return string # Lists all peers that have registered that query as an observer on self 45 | function TLO.DanNet.O(query) end 46 | 47 | ---- Observe accessor 48 | ---@param query string 49 | ---@return string # Lists all peers that have registered that query as an observer on self 50 | function TLO.DanNet.Observe(query) end 51 | 52 | ---@return integer # Count observed data on self 53 | function TLO.DanNet.OCount() end 54 | 55 | ---@return integer # Count observed data on self 56 | function TLO.DanNet.ObserveCount() end 57 | 58 | ---@return boolean # Determine if query has been set as observed data on self 59 | function TLO.DanNet.OSet() end 60 | 61 | ---@return boolean # Determine if query has been set as observed data on self 62 | function TLO.DanNet.ObserveSet() end 63 | 64 | ---@return observer # Last executed query 65 | function TLO.DanNet.Q() end 66 | 67 | ---@return observer # Last executed query 68 | function TLO.DanNet.Query() end -------------------------------------------------------------------------------- /mq/plugins/DanNet/_datatypes.lua: -------------------------------------------------------------------------------- 1 | ---@class observer 2 | ---@field Received MQInt # The last received timestamp, or 0 for never received 3 | 4 | ---@class peer 5 | peer = nil 6 | 7 | ---- Observe accessor 8 | ---@return string # List all queries that self has registered on peer 9 | function peer.O() end 10 | 11 | ---- Observe accessor 12 | ---@return string # List all queries that self has registered on peer 13 | function peer.Observe() end 14 | 15 | ---- Observe accessor 16 | ---@param query string 17 | ---@return string # attempt to retrieve the data specified on the remote peer 18 | function peer.O(query) end 19 | 20 | ---- Observe accessor 21 | ---@param query string 22 | ---@return observer | fun(): string # Attempt to retrieve the data specified on the remote peer 23 | function peer.Observe(query) end 24 | 25 | ---@return integer # Count observed data on peer 26 | function peer.OCount() end 27 | 28 | ---@return integer # Count observed data on peer 29 | function peer.ObserveCount() end 30 | 31 | ---@param query string 32 | ---@return boolean # Determine if query has been set as observed data on peer 33 | function peer.OSet(query) end 34 | 35 | ---@param query string 36 | ---@return boolean # Determine if query has been set as observed data on peer 37 | function peer.ObserveSet(query) end 38 | 39 | ---@param query string 40 | ---@return observer | fun(): string # Last executed query 41 | function peer.Q(query) end 42 | 43 | ---@param query string 44 | ---@return observer | fun(): string # Last executed query 45 | function peer.Query(query) end -------------------------------------------------------------------------------- /mq/plugins/EQBC/_TLO.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | --- EQBC Lua Bindings 4 | ---@class TLO.EQBC 5 | ---@field Connected MQBoolean #Client connection status 6 | ---@field Names MQString #List of connected characters (space delmited) 7 | ---@field Port MQString #OFFLINE if not connected, port if connected 8 | ---@field Server MQString #Hostname or IP of server you connected to 9 | ---@field ToonName MQString #Character name as seen by EQBC \(may reflect YouPlayer\) 10 | TLO.EQBC = {} 11 | 12 | ---#Option enabled/disabled status. \(see **/bccmd set** for complete list\) 13 | ---@param name string e.g. "localecho" 14 | function TLO.EQBC.Setting(name) end -------------------------------------------------------------------------------- /mq/plugins/MoveUtils/_TLO.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | --- MoveUtils Lua Bindings 4 | ---@class TLO.MoveUtils 5 | ---@field Command MQString #Returns the currently active command. MAKECAMP returns if a camp is setup but no other command is currently in use ["NONE", "STICK", "MOVETO", "MAKECAMP", "CIRCLE"] 6 | ---@field Stuck MQBoolean #Returns true if plugin stucklogic has determined you are currently stuck 7 | ---@field Summoned MQBoolean #Returns true if BreakOnSummon is enabled and has fired due to your character being summoned beyond breakonsummon distance 8 | ---@field StuckLogic MQBoolean #Returns TRUE if stucklogic is enabled 9 | ---@field Verbosity MQBoolean #Returns TRUE if verbosity is enabled 10 | ---@field FullVerbosity MQBoolean #Returns TRUE if fullverbosity is enabled 11 | ---@field TotalSilence MQBoolean #Returns TRUE if totalsilence is enabled 12 | ---@field Aggro MQBoolean #Returns TRUE if you are facing your target and your target is facing you 13 | ---@field TryToJump MQBoolean #Returns TRUE if stucklogic trytojump is enabled 14 | ---@field PauseMinDelay MQInt #Returns the min delay for mousepause and mpause to resume command in ms 15 | ---@field PauseMaxDelay MQInt #Returns the max delay for mousepause and mpause to resume command in ms 16 | ---@field PulseCheck MQInt #Returns the number of pulses used to average movement rate for stucklogic 17 | ---@field PulseUnstuck MQInt #Returns the number of pulses successfully moved forward after being stuck to be considered unstuck 18 | ---@field DistStuck MQFloat #Returns the amount of distance needed to have moved \(compared against pulse average\) or else considered stuck by stucklogic 19 | ---@field Version MQFloat #Returns the version number of the plugin 20 | ---@field MovePause MQBoolean #Returns TRUE if mpause \(PauseKB\) is enabled 21 | ---@field GM MQBoolean #Returns TRUE if BreakOnGM fired 22 | TLO.MoveUtils = {} 23 | 24 | --- Stick Lua Bindings 25 | ---@class Stick 26 | ---@field Status MQString #Returns ON if any form of stick is active ["OFF", "PAUSED" or "ON"] 27 | ---@field Active MQBoolean #Returns TRUE if any form of stick is active 28 | ---@field Broken MQBoolean #Returns TRUE if BreakOnHit event has halted stick prematurely 29 | ---@field Distance MQFloat #Returns current distance used by stick 30 | ---@field MoveBehind MQBoolean #Returns TRUE if stick behind is active 31 | ---@field MoveBack MQBoolean #Returns TRUE if moveback is active 32 | ---@field Loose MQBoolean #Returns TRUE if loose sticking is enabled 33 | ---@field Paused MQBoolean #Returns TRUE if plugin is paused 34 | ---@field Behind MQBoolean #Returns TRUE if currently behind target \(regardless of _/stick behind_\), false if outside of stick dist or not behind 35 | ---@field Stopped MQBoolean #Returns TRUE if stick is within stick distance 36 | ---@field Pin MQBoolean #Returns TRUE if stick pin is active 37 | ---@field StickTarget MQInt #Returns spawnid of stick target if stick id/hold used, else spawnid of current target, 0 if no target and id/hold not used 38 | ---@field StickTargetName MQString #Returns DisplayedName of stick target if stick id/hold used, else current target or NONE if no target and hold/id not used 39 | ---@field DistMod MQFloat #Returns current stickdist modifier 40 | ---@field DistModPercent MQFloat #Returns current stickdist percent modifier 41 | ---@field Always MQBoolean #Returns TRUE if /stick always is active 42 | TLO.Stick = {} 43 | 44 | --- MoveTo Lua Bindings 45 | ---@class TLO.MoveTo 46 | ---@field Moving MQBoolean #Returns TRUE if moveto or camp return is active 47 | ---@field Stopped MQBoolean #Returns TRUE if the last moveto command completed successfully 48 | ---@field CampStopped MQBoolean #Returns TRUE if within moveto distance of makecamp Y X location 49 | ---@field UseWalk MQBoolean #Returns TRUE if UseWalk is enabled 50 | ---@field ArrivalDist MQFloat #Returns acceptable arrival distance 51 | ---@field ArrivalDistY MQFloat #Returns acceptable arrival distance for precisey 52 | ---@field ArrivalDistX MQFloat #Returns acceptable arrival distance for precisex 53 | ---@field Broken MQBoolean #Returns TRUE if BreakOnAggro or BreakOnHit event have halted moveto prematurely 54 | TLO.MoveTo = {} 55 | 56 | --- MakeCamp Lua Bindings 57 | ---@class TLO.MakeCamp 58 | ---@field Status MQString #Returns status of MakeCamp command. AltCamp returns OFF ["OFF", "PAUSED" or "ON"] 59 | ---@field Leash MQBoolean #Returns TRUE if plugin stucklogic has determined you are currently stuck 60 | ---@field AnchorX MQFloat #Returns location of current camp X anchor 61 | ---@field AnchorY MQFloat #Returns location of current camp Y anchor 62 | ---@field LeashLength MQFloat #Returns size of Leash Length 63 | ---@field CampRadius MQFloat #Returns size of camp radius 64 | ---@field MinDelay MQInt #Returns the min delay for auto-returning to camp in ms 65 | ---@field MaxDelay MQInt #Returns the max delay for auto-returning to camp in ms 66 | ---@field Returning MQBoolean #Returns TRUE if /makecamp return issued 67 | ---@field AltAnchorX MQFloat #Returns location of current altcamp X anchor 68 | ---@field AltAnchorY MQFloat #Returns location of current altcamp Y anchor 69 | ---@field CampDist MQFloat #Returns distance to camp anchor from your current location. Returns 0.00 if camp is disabled 70 | ---@field AltCampDist MQFloat #Returns distance to altcamp anchor from your current location. Returns 0.00 if camp is disabled 71 | ---@field AltRadius MQFloat #Returns size of altcamp radius 72 | ---@field Scatter MQBoolean #Returns TRUE if camp scattering enabled 73 | ---@field ReturnNoAggro MQBoolean #Returns TRUE if ReturnNoAggro is enabled 74 | ---@field ReturnNotLooting MQBoolean #Returns TRUE if ReturnNotLooting is enabled 75 | ---@field ReturnHaveTarget MQBoolean #Returns TRUE if ReturnHaveTarget is enabled 76 | ---@field Bearing MQFloat #Returns the bearing \(heading\) of camp scattering 77 | ---@field ScatDist MQFloat #Returns the distance from anchor to perform scatter 78 | ---@field ScatSize MQFloat #Returns the size of scattering radius 79 | TLO.MakeCamp = {} 80 | 81 | --- Circle Lua Bindings 82 | ---@class TLO.Circle 83 | ---@field Status MQString #Returns ON if circling ["OFF", "PAUSED" or "ON"] 84 | ---@field CircleY MQFloat #Returns the location of circle center Y 85 | ---@field CircleX MQFloat #Returns the location of circle center X 86 | ---@field Drunken MQBoolean #Returns TRUE if drunken 87 | ---@field Rotation MQString #Returns CCW if reverse circling ["CW" or "CCW"] 88 | ---@field Direction MQString #Returns movement direction of current circle ["FORWARDS" or "BACKWARDS"] 89 | ---@field Clockwise MQBoolean #Returns FALSE if reverse circling 90 | ---@field Backwards MQBoolean #Returns TRUE if movement direction backwards 91 | ---@field Radius MQFloat #Returns the radius size of circle 92 | TLO.Circle = {} -------------------------------------------------------------------------------- /mq/plugins/NetBots/_TLO.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | --- NetBots Lua Bindings 4 | ---@class TLO.NetBots 5 | ---@field Client fun(index: integer): string The name of the netbot at the given index in the array 6 | ---@field Counts MQInt #The number of connected clients. 7 | ---@field Enable MQBoolean #The plugin status. 8 | ---@field Listen MQBoolean #The grab parameter status. 9 | ---@field Output MQBoolean #The send parameter status. 10 | TLO.NetBots = {} 11 | 12 | ---@param name string # Name of he netbot 13 | ---@return netbot|"NULL" # Returns the netbot with the given name or 'NULL' if not found 14 | function TLO.NetBots(name) end -------------------------------------------------------------------------------- /mq/plugins/NetBots/_datatypes.lua: -------------------------------------------------------------------------------- 1 | --- @class netbot 2 | --- @field public Name MQString #Name of Name. 3 | --- @field public Zone MQInt #Zone ID of Name. 4 | --- @field public Instance MQInt #Instance ID of Name. 5 | --- @field public MQInt Spawn ID of Name. 6 | --- @field public Class class Class of Name. 7 | --- @field public Level MQInt #Level of Name. 8 | --- @field public PctExp MQFloat #Percent Experience of Name. 9 | --- @field public PctAAExp MQFloat #Percent AA Experience of Name. 10 | --- @field public PctGroupLeaderExp MQFloat #Percent Group Leader Experience of Name. EMU servers only. 11 | --- @field public CurrentHPs MQInt #Current Hitpoints of Name. 12 | --- @field public MaxHPs MQInt #Total Hitpoints of Name 13 | --- @field public PctHPs MQInt #Current Hitpoints percentage of Name. 14 | --- @field public CurrentEndurance MQInt #Current Endurace of Name. Requires Extended=1 in the ini. 15 | --- @field public MaxEndurance MQInt #Total Endurance of Name. Requires Extended=1 in the ini. 16 | --- @field public PctEndurace MQInt #Current Endurance percentage of Name. Requires Extended=1 in the ini. 17 | --- @field public CurrentMana MQInt #Current Mana of Name. 18 | --- @field public MaxMana MQInt #Total Mana of Name. 19 | --- @field public PctMana MQInt #Current Mana percentage of Name. 20 | --- @field public PetID MQInt #Spawn ID of Name's pet. 21 | --- @field public PetHP MQInt #Hitpoints of Name's pet. 22 | --- @field public TargetID MQInt #Spawn ID of Name's target. 23 | --- @field public TargetHP MQInt #Hitpoints of Name's target. 24 | --- @field public Casting MQSpell Spell Name is casting. 25 | --- @field public State MQString #State of Name (STUN STAND SIT DUCK BIND FEIGN DEAD UNKNOWN). 26 | --- @field public Attacking MQBoolean #Is Name Attacking? 27 | --- @field public AFK MQBoolean #Is Name AFK? 28 | --- @field public Binding MQBoolean #Is Name kneeling? 29 | --- @field public Ducking MQBoolean #Is Name ducking? 30 | --- @field public Feigning MQBoolean #Is Name feigning? 31 | --- @field public Grouped MQBoolean #Is Name in a group? (not necessarily your own group) 32 | --- @field public Invis MQBoolean #Is Name invis? 33 | --- @field public Levitating MQBoolean #Is Name levitating? 34 | --- @field public LFG MQBoolean #Is Name LFG? 35 | --- @field public Mounted MQBoolean #Is Name on a mount? 36 | --- @field public Moving MQBoolean #Is Name moving? 37 | --- @field public Detrimentals MQInt #Total of detrimental counts for Name. 38 | --- @field public Detrimental MQString #A string list of all detrimental types affecting Name. 39 | --- @field public Raid MQBoolean #Is Name in a raid? 40 | --- @field public Sitting MQBoolean #Is Name sitting? 41 | --- @field public Standing MQBoolean #Is Name standing? 42 | --- @field public Stunned MQBoolean #Is Name stunned? 43 | --- @field public FreeBuffSlots MQInt #Total free buff slots Name has. 44 | --- @field public InZone MQBoolean Is Name in the same zone as you? 45 | --- @field public InGroup MQBoolean #Is Name in your group? 46 | --- @field public Leader MQString #Is Name the group leader? 47 | --- @field public Note MQString #Is Name the group leader? 48 | --- @field public Updated MQInt #Timestamp of last NetBots update from Name. 49 | --- @field public Stacks fun(buffId: integer): boolean Returns true if the buffId will stack on netbot. 50 | --- @field public TotalAA MQInt #Total AAs Name has. 51 | --- @field public UsedAA MQInt #Total spend AAs of Name. 52 | --- @field public UnusedAA MQInt #Total unspent AAs of Name. 53 | --- @field public CombatState MQInt #Combat State of Name. 54 | --- @field public Counters MQInt #Cursed,etc. counters for Name. 55 | --- @field public Cursed MQInt #Cursed counters for Name. 56 | --- @field public Diseased MQInt #Diseased counters for Name. 57 | --- @field public Poisoned MQInt #Poisoned counters for Name. 58 | --- @field public Corrupted MQInt #Corrupted counters for Name. 59 | --- @field public EnduDrain MQInt #Endurance drain counters for Name. 60 | --- @field public LifeDrain MQInt #HP drain counters for Name. 61 | --- @field public ManaDrain MQInt #Mana drain counters for Name. 62 | --- @field public Blinded MQInt #Blinded counters for Name. 63 | --- @field public CastingLevel MQInt #CastingLevel counters for Name. 64 | --- @field public Charmed MQInt #Charmed counters for Name. 65 | --- @field public Feared MQInt #Feared counters for Name. 66 | --- @field public Healing MQInt #Healing counters for Name. 67 | --- @field public Invulnerable MQInt #Invulnerable counters for Name. 68 | --- @field public Mesmerized MQInt #Mesmerized counters for Name. 69 | --- @field public Rooted MQInt #Rooted counters for Name. 70 | --- @field public Silenced MQInt #Silenced counters for Name. 71 | --- @field public Slowed MQInt #Slowed counters for Name. 72 | --- @field public Snared MQInt #Snared counters for Name. 73 | --- @field public SpellCost MQInt #SpellCost counters for Name. 74 | --- @field public SpellSlowed MQInt #SpellSlowed counters for Name. 75 | --- @field public SpellDamage MQInt #SpellDamage counters for Name. 76 | --- @field public Trigger MQInt #Trigger counters for Name. 77 | --- @field public Resistance MQInt #Resistance counters for Name. 78 | --- @field public NoCure MQInt #NoCure counters for Name. 79 | --- @field public Location MQString #The Y,X,Z location of Name. 80 | --- @field public Heading MQString #The Heading of Name. 81 | --- @field public MacroName MQString #The running macro of Name, empty string if none running. 82 | --- @field public MacroState MQInt #The macro state for Name. 0=No macro running, 1=Running, 2=Paused 83 | --- @field public NavigationActive MQBoolean #If running a MQ2Nav path for Name. 84 | --- @field public NavigationPaused MQBoolean #If a MQ2Nav path is paused for Name. 85 | local netbot = {} 86 | 87 | ---@return string Space delmited string with all buff spell IDs 88 | ---@overload fun(buffIndex: integer): spell 89 | function netbot.Buff() end 90 | 91 | ---@return string Space delmited string with all buff spell IDs 92 | ---@overload fun(buffIndex: integer): spell 93 | function netbot.PetBuff() end 94 | 95 | ---@return string Space delmited string with all buff spell IDs 96 | ---@overload fun(buffIndex: integer): spell 97 | function netbot.ShortBuff() end -------------------------------------------------------------------------------- /mq/plugins/Twist/_TLO.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | --- Twist Lua Bindings 4 | ---@class TLO.Twist 5 | ---@field Twisting MQBoolean #Returns TRUE if currently twisting, FALSE if not and NULL if plugin not loaded. 6 | ---@field Current MQInt #Returns the current gem being sung, -1 for item or 0 if not twisting 7 | ---@field Next MQInt #Returns the next gem to be sung, -1 for item or 0 if not twisting 8 | ---@field List MQString #Returns the twist sequence in a format suitable for /twist. 9 | TLO.Twist = {} 10 | -------------------------------------------------------------------------------- /mq/tlo/_Achievement.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | ---@class Achievement Achievement 3 | Achievement = {} 4 | 5 | ---@type achievementmgr 6 | Achievement = nil 7 | 8 | ---Find an achievement by it's name 9 | ---@param name string Name of achievement 10 | ---@return achievement 11 | Achievement = function(name) end 12 | 13 | ---Find an achievement by it's id 14 | ---@param id integer Id of achievement 15 | ---@return achievement 16 | Achievement = function(id) end -------------------------------------------------------------------------------- /mq/tlo/_AdvLoot.lua: -------------------------------------------------------------------------------- 1 | ---@class AdvLoot 2 | ---@field public Filter fun(itemId: integer): itemfilterdata Inspect the loot filter for a given ItemID 3 | ---@field public LootInProgress fun(): boolean True/False if looting from AdvLoot is in progress 4 | ---@field public PCount MQInt Item count from the Personal list 5 | ---@field public PList fun(index: integer): advlootitem Inspect the item at the specified index in the personal loot list 6 | ---@field public PWantCount MQInt Want cound from the personal list (AN + AG + ND + GD) 7 | ---@field public SCount MQInt Item count from the Shared list 8 | ---@field public SList fun(index: integer): advlootitem Inspect the item at the specified index in the shared loot list 9 | ---@field public SWantCount MQInt Want count from the Shared list (AN + AG + ND + GD) -------------------------------------------------------------------------------- /mq/tlo/_AdvPath.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | --- AdvPath Lua Bindings 4 | --- @class TLO.AdvPath 5 | --- @field public Active MQBoolean # Plugin Loaded and ready 6 | --- @field public Fleeing MQBoolean 7 | --- @field public Following MQBoolean # Following spawn 8 | --- @field public Paused MQBoolean 9 | --- @field public Playing MQBoolean 10 | --- @field public Pulling MQBoolean 11 | --- @field public Recording MQBoolean 12 | --- @field public WaitingWarp MQBoolean 13 | --- @field public Length MQFloat # Estimated length off the follow path 14 | --- @field public CustomPaths MQInt # Gives a count filtered by CustomSearch 15 | --- @field public Idle MQInt # Idle time when following and not moving 16 | --- @field public NextWaypoint MQInt # Number of NextWayPoint 17 | --- @field public State MQInt # FollowState, 0 = off, 1 = Following, 2 = Playing, 3 = Recording 18 | --- @field public Status MQInt # Status 0 = off , 1 = on , 2 = paused 19 | --- @field public Waypoints MQInt # Total Number of Waypoints 20 | --- @field public Monitor MQSpawn # spawn you are following 21 | --- @field public CheckPoint MQString # Checkpoint name 22 | --- @field public CustomSearch MQString # contains value used for filtering CustomPaths and /play listcustom 23 | --- @field public Direction MQString # N/R, Normal or Reverse 24 | --- @field public Flag1 MQString # Can access flags 1 through 9 25 | --- @field public Flag2 MQString # Can access flags 1 through 9 26 | --- @field public Flag3 MQString # Can access flags 1 through 9 27 | --- @field public Flag4 MQString # Can access flags 1 through 9 28 | --- @field public Flag5 MQString # Can access flags 1 through 9 29 | --- @field public Flag6 MQString # Can access flags 1 through 9 30 | --- @field public Flag7 MQString # Can access flags 1 through 9 31 | --- @field public Flag8 MQString # Can access flags 1 through 9 32 | --- @field public Flag9 MQString # Can access flags 1 through 9 33 | --- @field public Path MQString # Returns closest path 34 | TLO.AdvPath = {} 35 | 36 | ---@param name string # Checkpoint name 37 | ---@return string # returns LOC 38 | function TLO.AdvPath.X(name) end 39 | 40 | ---@param waypoint integer # Waypoint number 41 | ---@return string # Checkpoint name 42 | function TLO.AdvPath.X(waypoint) end 43 | 44 | ---@param name string # Checkpoint name 45 | ---@return string # returns LOC 46 | function TLO.AdvPath.Y(name) end 47 | 48 | ---@param waypoint integer # Waypoint number 49 | ---@return string # Checkpoint name 50 | function TLO.AdvPath.Y(waypoint) end 51 | 52 | ---@param name string # Checkpoint name 53 | ---@return string # returns LOC 54 | function TLO.AdvPath.Z(name) end 55 | 56 | ---@param waypoint integer # Waypoint number 57 | ---@return string # Checkpoint name 58 | function TLO.AdvPath.Z(waypoint) end -------------------------------------------------------------------------------- /mq/tlo/_Ground.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---Ground TLO 4 | ---@class Ground 5 | ---@field public Search fun(filter: string): MQGround 6 | -------------------------------------------------------------------------------- /mq/tlo/_Navigation.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | --- Navigation Lua Bindings 4 | --- @class TLO.Navigation 5 | --- @field public Active MQBoolean #Returns true if navigation is currently active 6 | --- @field public Paused MQBoolean #Returns true if nativation is currently paused 7 | --- @field public MeshLoaded MQBoolean #Returns true if a mesh is loaded for the zone 8 | --- @field public Velocity MQInt #Returns your current velocity 9 | TLO.Navigation = {} 10 | 11 | ----Returns true if a path exists for the target 12 | ---@param navigationParams string # Navigation parameters are the same parameters that would be passed to /nav 13 | ---@return boolean # Can navigate to the given [navigationParams] 14 | function TLO.Navigation.PathExists(navigationParams) end 15 | 16 | ----Returns true if a path exists for the target 17 | ---@param target target 18 | ---@return boolean # Can navigate to the given [target] 19 | function TLO.Navigation.PathExists(target) end 20 | 21 | ----Returns the length of the path if one is found 22 | ---@param navigationParams string # Navigation parameters are the same parameters that would be passed to /nav 23 | ---@return integer # Length of the path if one is found given [navigationParams] 24 | function TLO.Navigation.PathLength(navigationParams) end 25 | 26 | ----Returns the length of the path if one is found 27 | ---@param target target 28 | ---@return integer # Length of the path if one is found given [target] 29 | function TLO.Navigation.PathLength(target) end -------------------------------------------------------------------------------- /mq/tlo/_PortalSetter.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | --- Navigation Lua Bindings 4 | --- @class TLO.PortalSetter 5 | --- @field public InProgress MQBoolean #Returns true if PortalSetting is in progress 6 | --- @field public Step number #Returns step of the PortalSetter process 7 | TLO.PortalSetter = {} 8 | -------------------------------------------------------------------------------- /zep/zep.lua: -------------------------------------------------------------------------------- 1 | ---@meta Zep 2 | 3 | local Zep = {} 4 | 5 | ---@enum Zep.ConsoleCol 6 | Zep.ConsoleCol = { 7 | Text = 0, 8 | Link = 1, 9 | LinkHover = 2, 10 | } 11 | 12 | ---@enum Zep.LineLocation 13 | Zep.LineLocation = { 14 | None = 0, -- Not any specific location 15 | LineFirstGraphChar = 1, -- First non-blank character 16 | LineLastGraphChar = 2, -- Last non-blank character 17 | LineLastNonCR = 3, -- Last character before carraige return 18 | LineBegin = 4, -- Beginning of line 19 | BeyondLineEnd = 5, -- The line end of the buffer line (for wrapped lines) 20 | LineCRBegin = 6, -- The first carraige return character 21 | } 22 | 23 | ---@enum Zep.BufferFlags 24 | Zep.BufferFlags = { 25 | None = 0x0000, 26 | WindowsLineEndings = 0x0001, -- Buffer has windows line endings (CRLF) 27 | ReadOnly = 0x0004, -- Buffer is read-only 28 | Locked = 0x0008, -- Buffer is locked 29 | Dirty = 0x0010, -- Buffer has been modified 30 | HasWarnings = 0x0040, -- Buffer has warning markers 31 | HasErrors = 0x0080, -- Buffer has error markers 32 | DefaultBuffer = 0x0100, -- Buffer is the default buffer created when the editor is constructed 33 | InsertTabs = 0x0800, -- Buffer is using tabs for indentation 34 | } 35 | 36 | ---@enum Zep.WindowFlags 37 | Zep.WindowFlags = { 38 | None = 0x0000, 39 | ShowWhiteSpace = 0x0001, 40 | ShowCR = 0x0002, 41 | ShowLineNumbers = 0x0004, 42 | ShowIndicators = 0x0008, 43 | ShowLineBackground = 0x0400, 44 | ShowWrappedLineNumbers = 0x0800, 45 | ShowAirLine = 0x1000, -- Show the airline (status bar) 46 | } 47 | 48 | 49 | ---@class Zep.ThemeName 50 | ---@field name string Name of the theme 51 | ---@field id number Id of the theme 52 | 53 | ---Get list of themes. Probably not a good idea to hard code these anywhere in your scripts 54 | ---as they may be subject to change. 55 | ---@return Zep.ThemeName[] 56 | function Zep.GetThemes() end 57 | 58 | -- A buffer holds the text contents that are edited in the editor. A buffer can 59 | -- optionally be assigned a filename for Saving to disk and a buffer can also 60 | -- be assigned a syntax for syntax highlighting. 61 | ---@class Zep.Buffer 62 | ---@field syntax string ID of the syntax provider used by this buffer 63 | ---@field name string Name of the buffer 64 | ---@field displayName string Name or filepath of the buffer used for display purposes 65 | ---@field filePath string Path to the file represented by this buffer, if any. 66 | ---@field fileExtension string Extension of the file being used to select syntax 67 | ---@field dirty boolean True if the buffer has been modified. If this is a file buffer, saving the buffer will clear this dirty flag. 68 | ---@field readonly boolean True if the buffer is read-only. If this is a read-only buffer, it cannot be modified or saved. 69 | local Buffer = {} 70 | 71 | ---Clear the buffer 72 | function Buffer:Clear() end 73 | 74 | ---Replace the contents of the buffer with the provided string. This is 75 | ---an expensive operation and should be performed only when absolutely necessary. 76 | ---@param text string The new contents to place into the buffer 77 | function Buffer:SetText(text) end 78 | 79 | ---Retrieves the text contents of the buffer into a string. This is an 80 | ---expensive operation and should only be performed when absolutely necessary. 81 | ---@return string 82 | function Buffer:GetText() end 83 | 84 | ---Load the provided file into the buffer. If the path does not exist, an empty 85 | ---buffer will be loaded, and the file will be created on save. 86 | function Buffer:Load(filePath) end 87 | 88 | ---Save the buffer to the file associated with the buffer. This action will 89 | ---fail and return false if the buffer is locked, readonly, or if the file write 90 | ---operation fails. 91 | ---@return bool 92 | function Buffer:Save() end 93 | 94 | ---Save the buffer with the given filePath. The buffer's filePath will also be updated. 95 | ---This action will fail and return false if the buffer is locked, readonly, or if 96 | ---the file write operation fails. 97 | ---@param filePath string 98 | ---@return bool 99 | function Buffer:SaveAs(filePath) end 100 | 101 | ---Check if the specified flag is set 102 | ---@param flag Zep.BufferFlags 103 | ---@return boolean 104 | function Buffer:HasFlag(flag) end 105 | 106 | ---Toggle the specified flag on the buffer 107 | ---@param flag Zep.BufferFlags 108 | function Buffer:ToggleFlag(flag) end 109 | 110 | ---Set the specified flags on the buffer 111 | ---@param flags Zep.BufferFlags 112 | ---@param value? boolean Set the flag on or off. Defaults to true (on) 113 | function Buffer:SetFlags(flags, value) end 114 | 115 | ---Clear the specified flags on the buffer 116 | ---@param flags Zep.BufferFlags 117 | function Buffer:ClearFlags(flags) end 118 | 119 | 120 | -- A Zep.GlyphIterator represents the location of a cursor in a buffer. 121 | ---@class Zep.GlyphIterator 122 | ---@field index integer Position of the iterator 123 | ---@field valid boolean Indicates the iterator is valid 124 | ---@operator add(integer): Zep.GlyphIterator 125 | ---@operator sub(integer): Zep.GlyphIterator 126 | ---@operator call: integer # Get the glyph at the current position 127 | local GlyphIterator = {} 128 | 129 | ---Create a new iterator 130 | ---@param buffer? Zep.Buffer Buffer for the iterator. Iterator is not valid if no buffer is provided. 131 | ---@param index? integer Index of the iterator, or zero if not provided. 132 | ---@return Zep.GlyphIterator 133 | function GlyphIterator.new(buffer, index) end 134 | 135 | ---Make the iterator invalid 136 | function GlyphIterator:Invalidate() end 137 | 138 | ---Move the position of the current iterator 139 | ---@param count integer Number of characters to move the current iterator by 140 | ---@return Zep.GlyphIterator iterator The current iterator 141 | function GlyphIterator:Move(count) end 142 | 143 | ---Move the position of the current iterator with clamping 144 | ---@param count integer Number of characters to move the current iterator by 145 | ---@param clamp? Zep.LineLocation Method to clamp the movement by. Defaults to LineLocation.LineLastNonCR 146 | ---@return Zep.GlyphIterator iterator The current iterator 147 | function GlyphIterator:MoveClamped(count, clamp) end 148 | 149 | ---Clamp the position of the current iterator to within the boundaries of the current buffer. 150 | ---@return Zep.GlyphIterator iterator The current iterator 151 | function GlyphIterator:Clamp() end 152 | 153 | ---Create a copy of this iterator 154 | ---@return Zep.GlyphIterator iterator The new iterator 155 | function GlyphIterator.Copy() end 156 | 157 | ---Create a copy of this iterator and move its position by count characters. 158 | ---@param count integer Number of characters to move the new iterator by 159 | ---@return Zep.GlyphIterator iterator The new iterator 160 | function GlyphIterator.Peek(count) end 161 | 162 | ---Create a copy of this iterator and move its position with clamping. 163 | ---@param count integer Number of characters to move the new iterator by 164 | ---@param clamp? Zep.LineLocation Method to clamp the movement by. Defaults to LineLocation.LineLastNonCR 165 | ---@return Zep.GlyphIterator iterator The new iterator 166 | function GlyphIterator.PeekClamped(count, clamp) end 167 | 168 | ---Create a copy of this iterator and clamp it to within the boundaries of the current buffer. 169 | ---@return Zep.GlyphIterator iterator The new iterator 170 | function GlyphIterator.Clamped() end 171 | 172 | ---@class Zep.SyntaxProvider 173 | ---@field id string Id of the syntax provider to pass when setting syntax 174 | ---@field name string Name of the syntax provider for display purposes 175 | 176 | 177 | ---A basic text editor with support for multiple buffers and syntax highlighting. 178 | ---@class Zep.Editor 179 | ---@field windowFlags Zep.WindowFlags Flags for the editor window. 180 | ---@field activeBuffer Zep.Buffer The current active buffer. 181 | ---@field buffers Zep.Buffer[] Readonly, the list of buffers created by this editor. 182 | ---@field beginPos Zep.GlyphIterator Readonly. An iterator pointing to the beginning of the active buffer. 183 | ---@field endPos Zep.GlyphIterator Readonly. An iterator pointing past the end of the active buffer. 184 | ---@field cursor Zep.GlyphIterator Current position of the cursor. 185 | ---@field cursorPos ImVec2 Current line and column of the cursor. 186 | ---@field mouseCursor Zep.GlyphIterator Current position of the mouse cursor. 187 | ---@field theme number Id of the current theme 188 | local Editor = {} 189 | 190 | 191 | ---Creates a new Zep editor widget. `id` is a standard ImGui id and should be unique for 192 | ---the current scope. This `id` will be given to a Child frame (via `BeginChild`) and so 193 | ---it can be styled similarly. 194 | --- 195 | ---Editor documents are called buffers. The editor can have multiple buffers, but only one 196 | ---buffer may be active (visible in the editor) at a time. 197 | --- 198 | ---When an editor is created, it starts with an empty buffer as its default active buffer. 199 | ---If a new buffer is created before this buffer is modified, it will replace this default 200 | ---buffer. It is recommended to create a new buffer when the editor is created. 201 | --- 202 | ---The editor supports multiple tabs and split panes, but this functionality is not currently 203 | ---available to lua. 204 | --- 205 | ---@param id? string Unique ImGui identifier for this editor. If not provided, one must be provided in the render function. 206 | ---@return Zep.Editor 207 | function Editor.new(id) end 208 | 209 | ---Render the editor widget. 210 | --- 211 | ---`displaySize`: The default value is 0, 0. This will cause the widget to fill all 212 | ---available space. Specifying a non-zero height or width will limit the size of the 213 | ---widget in that dimension. 214 | --- 215 | ---This function should only be called from an ImGui update callback. 216 | ---@param id? string Id of this editor for ImGui. 217 | ---@param displaySize? ImVec2 Size of the widget. 218 | function Editor:Render(id, displaySize) end 219 | 220 | ---Render the editor widget. 221 | --- 222 | ---`displaySize`: The default value is 0, 0. This will cause the widget to fill all 223 | ---available space. Specifying a non-zero height or width will limit the size of the 224 | ---widget in that dimension. 225 | --- 226 | ---This function should only be called from an ImGui update callback. 227 | ---@param displaySize? ImVec2 Size of the widget. 228 | function Editor:Render(displaySize) end 229 | 230 | ---Create a new file buffer. The buffer will be added to the editor, but will not be made active unless it is 231 | ---assigned as the activeBuffer. If the file does not exist, an empty buffer will be created, and saving the 232 | ---buffer will attempt to create the file. 233 | ---@param file string The file to load. 234 | ---@return Zep.Buffer 235 | function Editor:CreateFileBuffer(file) end 236 | 237 | ---Create a new empty buffer. The buffer will be added to the editor, but will not be made active unless it is 238 | ---assigned as the activeBuffer 239 | ---@param name string Name of the buffer 240 | ---@param text? string Initial text contents of the buffer 241 | ---@return Zep.Buffer 242 | function Editor:CreateBuffer(name, text) end 243 | 244 | ---Remove the given buffer from the editor. The buffer should no longer be used after being removed. If this 245 | ---function attempts to remove the last buffer, the call will fail and return false. 246 | ---@param buffer Zep.Buffer 247 | ---@return boolean 248 | function Editor:RemoveBuffer(buffer) end 249 | 250 | ---Toggle a flag on the editor 251 | ---@param flag Zep.WindowFlags 252 | function Editor:ToggleFlag(flag) end 253 | 254 | ---Get list of syntax providers that the editor supports. This value won't change while the editor is running 255 | ---so it can be fetched and stored locally only once. 256 | ---@return Zep.SyntaxProvider[] 257 | function Editor:GetSyntaxList() end 258 | 259 | 260 | ---Event data provided to the event callback when a link is clicked 261 | ---@class Zep.EventCallbackLinkData 262 | ---@field button ImGuiMouseButton Mouse button used to click the link 263 | ---@field modifiers ImGuiMod Keyboard modifiers when the link was clicked 264 | ---@field data string Data associated with the link 265 | 266 | ---Identifier representing the type of event being sent 267 | ---@alias Zep.EventCallbackType 268 | ---| '"link"' # The event is a link event, see Zep.EventCallbackLinkData 269 | 270 | ---@alias Zep.EventCallbackData 271 | ---| Zep.EventCallbackLinkData 272 | 273 | ---Event callback used to receive events from the console. The value of `type` determines the structure 274 | ---of the event payload in `data`. Return `true` to indicate the event was handled. Return `false` or `nil` otherwise. 275 | ---@alias Zep.ConsoleEventCallback fun(type: Zep.EventCallbackType, data: Zep.EventCallbackData): boolean|nil 276 | 277 | ---A console widget which displays a console buffer of colored text in a scrollable 278 | ---view. The Render function may only be called from an ImGui update function. It is 279 | ---safe to call any other function from anywhere in the script. 280 | ---@class Zep.Console 281 | ---Controls autoscroll. If autoscroll is enabled, then 282 | ---the view will stick to the end if it is already scrolled to the end. 283 | ---@field public autoScroll boolean 284 | ---Sets/Gets the maximum number of lines held in the console buffer. 285 | ---@field public maxBufferLines number 286 | ---Sets/Gets the the opacity of the console. 287 | ---@field public opacity number 288 | ---Callback function used to receive events from the console 289 | ---@field public eventCallback Zep.ConsoleEventCallback 290 | local Console = {} 291 | 292 | ---Creates a new Zep console widget. `id` is a standard ImGui id and should be unique for 293 | ---the current scope. This `id` will be given to a Child frame (via `BeginChild`) and so 294 | ---it can be styled similarly. 295 | ---@param id? string Id of the console widget 296 | ---@return Zep.Console 297 | function Console.new(id) end 298 | 299 | ---Render the editor widget. 300 | --- 301 | ---`displaySize`: The default value is 0, 0. This will cause the widget to fill all 302 | ---available space. Specifying a non-zero height or width will limit the size of the 303 | ---widget in that dimension. 304 | --- 305 | ---This function should only be called from an ImGui update callback. 306 | ---@param id? string Id of this editor for ImGui. 307 | ---@param displaySize? ImVec2 Size of the widget. 308 | function Console:Render(id, displaySize) end 309 | 310 | ---Render the console widget. 311 | --- 312 | ---`displaySize`: The default value is 0, 0. This will cause the widget to fill all 313 | ---available space. Specifying a non-zero height or width will limit the size of the 314 | ---widget in that dimension. 315 | --- 316 | ---This function should only be called from an ImGui update callback. 317 | ---@param displaySize? ImVec2 Size of the widget. 318 | function Console:Render(displaySize) end 319 | 320 | ---Clears the console buffer. 321 | function Console:Clear() end 322 | 323 | ---Returns true if the console is scrolled to the bottom of the buffer. 324 | ---@return boolean 325 | function Console:IsCursorAtEnd() end 326 | 327 | ---Scrolls the view to the bottom of the buffer during the next render call. 328 | function Console:ScrollToBottom() end 329 | 330 | ---Append a line of text to the buffer using the current text color. 331 | ---@param text string text string to append to the console buffer. 332 | ---@return Zep.Console 333 | function Console:AppendText(text) end 334 | 335 | ---Append a line of text to the buffer using a format string and the current text color. 336 | ---Follows the same pattern of behavior as string.format. 337 | ---@param format string Format string to append to the console buffer. 338 | ---@vararg any 339 | ---@return Zep.Console 340 | function Console:AppendText(format, ...) end 341 | 342 | ---Append a line of colored text to the buffer. 343 | ---@param color ImVec4|ImU32 The default color of the text. 344 | ---@param text string text string to append to the console buffer. 345 | ---@return Zep.Console 346 | function Console:AppendText(color, text) end 347 | 348 | ---Append a line of colored, formatted text to the buffer. 349 | ---@param color ImVec4|ImU32 The default color of the text. 350 | ---@param format string Format string to append to the console buffer 351 | ---@vararg any 352 | ---@return Zep.Console 353 | function Console:AppendText(color, format, ...) end 354 | 355 | ---Append unformatted text to the buffer. The line is not terminated, so multiple 356 | ---calls will continue on the same line. 357 | ---@param text string Text string to append to the buffer. 358 | ---@return Zep.Console 359 | function Console:AppendTextUnformatted(text) end 360 | 361 | ---Append unformatted text to the buffer. The line is not terminated, so multiple 362 | ---calls will continue on the same line. 363 | ---@param color ImVec4|ImU32 Optional: The default color of the text. 364 | ---@param text string Text string to append to the buffer. 365 | ---@return Zep.Console 366 | function Console:AppendTextUnformatted(color, text) end 367 | 368 | ---Append a hyperlink to the console buffer. Clicking the link will send an event through the 369 | ---`eventCallback` set on the Console with the provided data string. The color of the link can 370 | ---be modified with PushStyleColor. 371 | ---@param data string Data string to associate with the link. 372 | ---@param text string Text for the link. 373 | ---@return Zep.Console 374 | function Console:AppendHyperlink(data, text) end 375 | 376 | ---Append a hyperlink to the console buffer. Clicking the link will send an event through the 377 | ---`eventCallback` set on the Console with the provided data string. The color of the link can 378 | ---be modified with PushStyleColor. 379 | ---@param data string Data string to associate with the link. 380 | ---@param text string Format string to append to the console buffer. 381 | ---@vararg any 382 | ---@return Zep.Console 383 | function Console:AppendHyperlink(data, text, ...) end 384 | 385 | -- Modify a style color. Push a new value for the given style color index onto the stack 386 | ---@param idx Zep.ConsoleCol Style color index 387 | ---@param col ImVec4|ImU32 RGBA Color 388 | function Console:PushStyleColor(idx, col) end 389 | 390 | -- Modify a style color. Push a new value for the given style color index onto the stack 391 | ---@param idx Zep.ConsoleCol Style color index 392 | ---@param colR number Red 393 | ---@param colG number Green 394 | ---@param colB number Blue 395 | ---@param colA number Alpha 396 | function Console:PushStyleColor(idx, colR, colG, colB, colA) end 397 | 398 | -- Pop one or more style color changes off of the stack 399 | ---@param count? number Default = 1 400 | function Console:PopStyleColor(count) end 401 | 402 | Zep.Buffer = Buffer 403 | Zep.Console = Console 404 | Zep.Editor = Editor 405 | Zep.GlyphIterator = GlyphIterator 406 | 407 | return Zep --------------------------------------------------------------------------------