---@meta
--#region TinkrTypes
--- Example: "!00038"
---@alias TinkrObjectManagerId string
---@class WowGameObject : userdata
---@field unit fun(): UnitIds
---@field guid fun(): string
---@field id fun(): number | boolean, ...: number|nil
---@alias TinkrObjectReference WowGameObject | UnitIds
---@alias spellId integer
---@enum PathTypes
local PathTypes = {
PATHFIND_BLANK = 0x00 , -- path not built yet
PATHFIND_NORMAL = 0x01 , -- normal path
PATHFIND_SHORTCUT = 0x02 , -- travel through obstacles, terrain, air, etc (old behavior)
PATHFIND_INCOMPLETE = 0x04 , -- we have partial path to follow - getting closer to target
PATHFIND_NOPATH = 0x08 , -- no valid path at all or error in generating one
PATHFIND_NOT_USING_PATH = 0x10 , -- used when we are either flying/swiming or on map w/o mmaps
PATHFIND_SHORT = 0x20 , -- path is longer or equal to its limited path length
}
---@class Missle
---@field cx number # current x
---@field cy number # current y
---@field cz number # current z
---@field hx number # hit x
---@field hy number # hit y
---@field hz number # hit z
---@field ix number # init x
---@field iy number # init y
---@field iz number # init z
---@field mx? number # model x
---@field my? number # model y
---@field mz? number # model z
---@enum SkinType
local SkinType = {
HERBALISM = 0x100 ,
MINING = 0x200 ,
ENGINEERING = 0x8000 ,
}
--@alias ObjTypes | ObjectTypes.Object | ObjectTypes.Item | ObjectTypes.Container | ObjectTypes.AzeriteEmpoweredItem | ObjectTypes.AzeriteItem | ObjectTypes.Unit | ObjectTypes.Player | ObjectTypes.ActivePlayer | ObjectTypes.GameObject | ObjectTypes.DynamicObject | ObjectTypes.Corpse | ObjectTypes.AreaTrigger | ObjectTypes.SceneObject | ObjectTypes.Conversation | ObjectTypes.AiGroup | ObjectTypes.Scenario | ObjectTypes.Loot | ObjectTypes.Invalid
---@alias Position {x: number, y: number, z: number}
---@alias PositionArray Position[]
---@alias HttpGetRequestParams { method: 'GET', url: string, headers?: string[], callback: fun(status: number, res: string) }
---@alias HttpPostRequestParams { method: 'POST', url: string, fields: { [string]: any }, body?: string, files?: { [string]: string }, headers?: string[], callback: fun(status: number, res: string) }
---@enum TinkrCollisionFlags
local TinkrCollisionFlags = {
M2Collision = 0x1 ,
M2Render = 0x2 ,
WMOCollision = 0x10 ,
WMORender = 0x20 ,
Terrain = 0x100 ,
WaterWalkableLiquid = 0x10000 ,
Liquid = 0x20000 ,
EntityCollision = 0x100000 ,
}
--#endregion TinkrTypes
--#region Tinkr.Util
--#region Tinkr.Util.Http
---@class Tinkr.Util.Http
local TinkrUtilHttp = {
---Make a HTTP request
---@param self Tinkr.Util.Http
---@param parms HttpGetRequestParams | HttpPostRequestParams
Request = function ( self , parms ) end ,
}
--#endregion Tinkr.Util.Http
--#region Tinkr.Util.Commands
--#region Tinkr.Util.Commands.New.Register
---@class Tinkr.Util.Commands.New.Register
local TinkrUtilCommandsNewRegister = {
---@param self Tinkr.Util.Commands.New.Register
---@param command string | string[],
---@param handler fun(...),
---@param help string,
---@param arguments? string[]
Register = function ( self , command , handler , help , arguments ) end ,
}
--#endregion Tinkr.Util.Commands.New.Register
---@class Tinkr.Util.Commands
local TinkrUtilCommands = {
---Create a new command
---@param self Tinkr.Util.Commands
---@param prefix string
---@return Tinkr.Util.Commands.New.Register
New = function ( self , prefix ) end ,
}
--#endregion Tinkr.Util.Commands
--#region Tinkr.Util.GUIBuilder
--#region Tinkr.Util.GUIBuilder.Reusable
---@class Tinkr.Util.GUIBuilder.Base.Keyable
---@field key string
---@class Tinkr.Util.GUIBuilder.Base.Sizable
---@field width number
---@field height number
---@alias Tinkr.Util.GUIBuilderChildElement Tinkr.Util.GUIBuilder.Element.SimpleGroup.Config | Tinkr.Util.GUIBuilder.Element.Tab.Config | Tinkr.Util.GUIBuilder.Element.Radio.Config | Tinkr.Util.GUIBuilder.Element.ScrollGroup.Config | Tinkr.Util.GUIBuilder.Element.Image.Config | Tinkr.Util.GUIBuilder.Element.TreeBranch.Config | Tinkr.Util.GUIBuilder.Element.Slider.Config | Tinkr.Util.GUIBuilder.Element.Heading.Config | Tinkr.Util.GUIBuilder.Element.Padding.Config | Tinkr.Util.GUIBuilder.Element.Radio.Config | Tinkr.Util.GUIBuilder.Element.Spacer.Config | Tinkr.Util.GUIBuilder.Element.Dropdown.Config | Tinkr.Util.GUIBuilder.Element.EditBox.Config | Tinkr.Util.GUIBuilder.Element.Group.Config | Tinkr.Util.GUIBuilder.Element.TabGroup.Config | Tinkr.Util.GUIBuilder.Element.Window.Config | Tinkr.Util.GUIBuilder.Element.Text.Config | Tinkr.Util.GUIBuilder.Element.Columns.Config | Tinkr.Util.GUIBuilder.Element.Rows.Config | Tinkr.Util.GUIBuilder.Element.HTML.Config | Tinkr.Util.GUIBuilder.Element.ColorPicker.Config | Tinkr.Util.GUIBuilder.Element.TreeGroup.Config
---@class Tinkr.Util.GUIBuilder.Base.GroupElement.Options
---@field content Tinkr.Util.GUIBuilderChildElement[]
--#endregion Tinkr.Util.GUIBuilder.Reusable
--#region Tinkr.Util.GUIBuilder.Element.Button
---@class Tinkr.Util.GUIBuilder.Element.Button.Options : Tinkr.Util.GUIBuilder.Base.Keyable
---@field text string
---@field disabled? boolean
---@field fullwidth boolean
---@class Tinkr.Util.GUIBuilder.Element.Button.Config : Tinkr.Util.GUIBuilder.Element.Button.Options
---@field type "Button"
---@class Tinkr.Util.GUIBuilder.Element.Button.Instance : Button
---@class Tinkr.Util.GUIBuilder.Element.Button.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.Button.Config): Tinkr.Util.GUIBuilder.Element.Button.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.Button
--#region Tinkr.Util.GUIBuilder.Element.Window
---@class Tinkr.Util.GUIBuilder.Element.Window.Options : Tinkr.Util.GUIBuilder.Base.Keyable, Tinkr.Util.GUIBuilder.Base.Sizable, Tinkr.Util.GUIBuilder.Base.GroupElement.Options
---@field title string
---@class Tinkr.Util.GUIBuilder.Element.Window.Config : Tinkr.Util.GUIBuilder.Element.Window.Options
---@field type "Window"
---@class Tinkr.Util.GUIBuilder.Element.Window.Instance : AceGUIWindow, AceGUIWidget
---@field Release fun()
---@field Hide fun()
---@field Show fun()
---@field closebutton Tinkr.Util.GUIBuilder.Element.Button.Instance
---@field SetTitle fun(title: string)
---@field OnRelease fun()
---@field OnAcquire fun()
---@field SetStatusText fun(text: string)
---@field SetStatusTable fun(status: table)
---@field ApplyStatus fun()
---@field OnWidthSet fun(width: number)
---@field OnHeightSet fun(height: number)
---@field EnableResize fun(state: boolean)
---@class Tinkr.Util.GUIBuilder.Element.Window.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.Window.Config): Tinkr.Util.GUIBuilder.Element.Window.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.Window
--#region Tinkr.Util.GUIBuilder.Element.Text
---@class Tinkr.Util.GUIBuilder.Element.Text.Options
---@field text string
---@field size? number
---@field color? string
---@field font? string
---@class Tinkr.Util.GUIBuilder.Element.Text.Config : Tinkr.Util.GUIBuilder.Element.Text.Options
---@field type "Text"
---@class Tinkr.Util.GUIBuilder.Element.Text.Instance : FontString
---@class Tinkr.Util.GUIBuilder.Element.Text.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.Text.Config): Tinkr.Util.GUIBuilder.Element.Text.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.Text
--#region Tinkr.Util.GUIBuilder.Element.Tab
---@class Tinkr.Util.GUIBuilder.Element.Tab.Options : Tinkr.Util.GUIBuilder.Base.GroupElement.Options
---@field title string
---@class Tinkr.Util.GUIBuilder.Element.Tab.Config : Tinkr.Util.GUIBuilder.Element.Tab.Options
---@field type "Tab"
---@class Tinkr.Util.GUIBuilder.Element.Tab.Instance
---@class Tinkr.Util.GUIBuilder.Element.Tab.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.Tab.Config): Tinkr.Util.GUIBuilder.Element.Tab.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.Tab
--#region Tinkr.Util.GUIBuilder.Element.TabGroup
---@class Tinkr.Util.GUIBuilder.Element.TabGroup.Options : Tinkr.Util.GUIBuilder.Base.Keyable
---@field tabs Tinkr.Util.GUIBuilder.Element.Tab.Config[]
---@class Tinkr.Util.GUIBuilder.Element.TabGroup.Config : Tinkr.Util.GUIBuilder.Element.TabGroup.Options
---@field type "TabGroup"
---@class Tinkr.Util.GUIBuilder.Element.TabGroup.Instance
---@class Tinkr.Util.GUIBuilder.Element.Tab.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.Tab.Config): Tinkr.Util.GUIBuilder.Element.Tab.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.TabGroup
--#region Tinkr.Util.GUIBuilder.Element.Spacer
---@class Tinkr.Util.GUIBuilder.Element.Spacer.Options
---@field height? number
---@class Tinkr.Util.GUIBuilder.Element.Spacer.Config
---@field type "Spacer"
---@class Tinkr.Util.GUIBuilder.Element.Spacer.Instance
---@class Tinkr.Util.GUIBuilder.Element.Tab.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.Tab.Config): Tinkr.Util.GUIBuilder.Element.Tab.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.Spacer
--#region Tinkr.Util.GUIBuilder.Element.Checkbox
---@class Tinkr.Util.GUIBuilder.Element.Checkbox.Options : Tinkr.Util.GUIBuilder.Base.Keyable
---@field label string
---@field description? string
---@field tristate? boolean
---@field default? 'yes' | 'no' | 'half'
---@class Tinkr.Util.GUIBuilder.Element.Checkbox.Config : Tinkr.Util.GUIBuilder.Element.Checkbox.Options
---@field type "Checkbox"
---@class Tinkr.Util.GUIBuilder.Element.Checkbox.Instance
---@class Tinkr.Util.GUIBuilder.Element.Checkbox.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.Checkbox.Config): Tinkr.Util.GUIBuilder.Element.Checkbox.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.Checkbox
--#region Tinkr.Util.GUIBuilder.Element.Radio
---@class Tinkr.Util.GUIBuilder.Element.Radio.Options : Tinkr.Util.GUIBuilder.Base.Keyable
---@field stacked? boolean
---@field values string[]
---@class Tinkr.Util.GUIBuilder.Element.Radio.Config : Tinkr.Util.GUIBuilder.Element.Radio.Options
---@field type "Radio"
---@class Tinkr.Util.GUIBuilder.Element.Radio.Instance
---@class Tinkr.Util.GUIBuilder.Element.Radio.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.Radio.Config): Tinkr.Util.GUIBuilder.Element.Radio.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.Radio
--#region Tinkr.Util.GUIBuilder.Element.Group
---@class Tinkr.Util.GUIBuilder.Element.Group.Options : Tinkr.Util.GUIBuilder.Base.GroupElement.Options
---@field title string
---@class Tinkr.Util.GUIBuilder.Element.Group.Config : Tinkr.Util.GUIBuilder.Element.Group.Options
---@field type "Group"
---@class Tinkr.Util.GUIBuilder.Element.Group.Instance
---@class Tinkr.Util.GUIBuilder.Element.Group.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.Group.Config): Tinkr.Util.GUIBuilder.Element.Group.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.Group
--#region Tinkr.Util.GUIBuilder.Element.EditBox
---@class Tinkr.Util.GUIBuilder.Element.EditBox.Options : Tinkr.Util.GUIBuilder.Base.Keyable
---@field label string
---@field description? string
---@field placeholder? string
---@field button? boolean
---@field multiline? boolean
---@field lines? number
---@class Tinkr.Util.GUIBuilder.Element.EditBox.Config : Tinkr.Util.GUIBuilder.Element.EditBox.Options
---@field type "EditBox"
---@class Tinkr.Util.GUIBuilder.Element.EditBox.Instance
---@class Tinkr.Util.GUIBuilder.Element.EditBox.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.EditBox.Config): Tinkr.Util.GUIBuilder.Element.EditBox.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.EditBox
--#region Tinkr.Util.GUIBuilder.Element.Dropdown
---@class Tinkr.Util.GUIBuilder.Element.Dropdown.Options : Tinkr.Util.GUIBuilder.Base.Keyable
---@field label string
---@field description? string
---@field default? string
---@field values string[]
---@field multi? boolean
---@class Tinkr.Util.GUIBuilder.Element.Dropdown.Config : Tinkr.Util.GUIBuilder.Element.Dropdown.Options
---@field type "Dropdown"
---@class Tinkr.Util.GUIBuilder.Element.Dropdown.Instance
---@class Tinkr.Util.GUIBuilder.Element.Dropdown.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.Dropdown.Config): Tinkr.Util.GUIBuilder.Element.Dropdown.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.Dropdown
--#region Tinkr.Util.GUIBuilder.Element.Padding
---@class Tinkr.Util.GUIBuilder.Element.Padding.Options : Tinkr.Util.GUIBuilder.Base.Keyable, Tinkr.Util.GUIBuilder.Base.GroupElement.Options
---@field padding number
---@class Tinkr.Util.GUIBuilder.Element.Padding.Config : Tinkr.Util.GUIBuilder.Element.Padding.Options
---@field type "Padding"
---@class Tinkr.Util.GUIBuilder.Element.Padding.Instance
---@class Tinkr.Util.GUIBuilder.Element.Padding.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.Padding.Config): Tinkr.Util.GUIBuilder.Element.Padding.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.Padding
--#region Tinkr.Util.GUIBuilder.Element.Rows
---@class Tinkr.Util.GUIBuilder.Element.Rows.Options
---@class Tinkr.Util.GUIBuilder.Element.Rows.Config : Tinkr.Util.GUIBuilder.Element.Rows.Options
---@field type "Rows"
---@class Tinkr.Util.GUIBuilder.Element.Rows.Instance
---@class Tinkr.Util.GUIBuilder.Element.Rows.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.Rows.Config): Tinkr.Util.GUIBuilder.Element.Rows.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.Rows
--#region Tinkr.Util.GUIBuilder.Element.Columns
---@class Tinkr.Util.GUIBuilder.Element.Columns.Options
---@class Tinkr.Util.GUIBuilder.Element.Columns.Config : Tinkr.Util.GUIBuilder.Element.Columns.Options
---@field type "Columns"
---@class Tinkr.Util.GUIBuilder.Element.Columns.Instance
---@class Tinkr.Util.GUIBuilder.Element.Columns.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.Columns.Config): Tinkr.Util.GUIBuilder.Element.Columns.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.Columns
--#region Tinkr.Util.GUIBuilder.Element.Image
---@class Tinkr.Util.GUIBuilder.Element.Image.Options : Tinkr.Util.GUIBuilder.Base.Sizable
---@field image string
---@field fit? boolean
---@class Tinkr.Util.GUIBuilder.Element.Image.Config : Tinkr.Util.GUIBuilder.Element.Image.Options
---@field type "Image"
---@class Tinkr.Util.GUIBuilder.Element.Image.Instance
---@class Tinkr.Util.GUIBuilder.Element.Image.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.Image.Config): Tinkr.Util.GUIBuilder.Element.Image.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.Image
--#region Tinkr.Util.GUIBuilder.Element.TreeBranch
---@class Tinkr.Util.GUIBuilder.Element.TreeBranch.Options : Tinkr.Util.GUIBuilder.Base.Keyable
---@field title string
---@field icon number
---@class Tinkr.Util.GUIBuilder.Element.TreeBranch.Config : Tinkr.Util.GUIBuilder.Element.TreeBranch.Options
---@field type "TreeBranch"
---@class Tinkr.Util.GUIBuilder.Element.TreeBranch.Instance
---@class Tinkr.Util.GUIBuilder.Element.TreeBranch.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.TreeBranch.Config): Tinkr.Util.GUIBuilder.Element.TreeBranch.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.TreeBranch
--#region Tinkr.Util.GUIBuilder.Element.TreeGroup
---@class Tinkr.Util.GUIBuilder.Element.TreeGroup.Options : Tinkr.Util.GUIBuilder.Base.Keyable
---@field branches Tinkr.Util.GUIBuilder.Element.TreeBranch.Config[]
---@class Tinkr.Util.GUIBuilder.Element.TreeGroup.Config : Tinkr.Util.GUIBuilder.Element.TreeGroup.Options
---@field type "TreeGroup"
---@class Tinkr.Util.GUIBuilder.Element.TreeGroup.Instance
---@class Tinkr.Util.GUIBuilder.Element.TreeGroup.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.TreeGroup.Config): Tinkr.Util.GUIBuilder.Element.TreeGroup.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.TreeGroup
--#region Tinkr.Util.GUIBuilder.Element.Slider
---@class Tinkr.Util.GUIBuilder.Element.Slider.Options : Tinkr.Util.GUIBuilder.Base.Keyable
---@field label string
---@field description? string
---@field min? number
---@field max? number
---@field step? number
---@field default? number
---@field percent? boolean
---@class Tinkr.Util.GUIBuilder.Element.Slider.Config : Tinkr.Util.GUIBuilder.Element.Slider.Options
---@field type "Slider"
---@class Tinkr.Util.GUIBuilder.Element.Slider.Instance
---@class Tinkr.Util.GUIBuilder.Element.Slider.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.Slider.Config): Tinkr.Util.GUIBuilder.Element.Slider.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.Slider
--#region Tinkr.Util.GUIBuilder.Element.ColorPicker
---@class Tinkr.Util.GUIBuilder.Element.ColorPicker.Options : Tinkr.Util.GUIBuilder.Base.Keyable
---@field label string
---@field description? string
---@field alpha? boolean
---@field default? string
---@class Tinkr.Util.GUIBuilder.Element.ColorPicker.Config : Tinkr.Util.GUIBuilder.Element.ColorPicker.Options
---@field type "ColorPicker"
---@class Tinkr.Util.GUIBuilder.Element.ColorPicker.Instance
---@class Tinkr.Util.GUIBuilder.Element.ColorPicker.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.ColorPicker.Config): Tinkr.Util.GUIBuilder.Element.ColorPicker.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.ColorPicker
--#region Tinkr.Util.GUIBuilder.Element.SimpleGroup
---@class Tinkr.Util.GUIBuilder.Element.SimpleGroup.Options
---@class Tinkr.Util.GUIBuilder.Element.SimpleGroup.Config : Tinkr.Util.GUIBuilder.Element.SimpleGroup.Options
---@field type "SimpleGroup"
---@class Tinkr.Util.GUIBuilder.Element.SimpleGroup.Instance
---@class Tinkr.Util.GUIBuilder.Element.SimpleGroup.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.SimpleGroup.Config): Tinkr.Util.GUIBuilder.Element.SimpleGroup.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.SimpleGroup
--#region Tinkr.Util.GUIBuilder.Element.Heading
---@class Tinkr.Util.GUIBuilder.Element.Heading.Options : string
---@class Tinkr.Util.GUIBuilder.Element.Heading.Config : Tinkr.Util.GUIBuilder.Element.Heading.Options
---@field text string
---@field type "Heading"
---@class Tinkr.Util.GUIBuilder.Element.Heading.Instance
---@class Tinkr.Util.GUIBuilder.Element.Heading.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.Heading.Config): Tinkr.Util.GUIBuilder.Element.Heading.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.Heading
--#region Tinkr.Util.GUIBuilder.Element.ScrollGroup
---@class Tinkr.Util.GUIBuilder.Element.ScrollGroup.Options : Tinkr.Util.GUIBuilder.Base.GroupElement.Options
---@class Tinkr.Util.GUIBuilder.Element.ScrollGroup.Config : Tinkr.Util.GUIBuilder.Element.ScrollGroup.Options
---@field type "ScrollGroup"
---@class Tinkr.Util.GUIBuilder.Element.ScrollGroup.Instance
---@class Tinkr.Util.GUIBuilder.Element.ScrollGroup.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.ScrollGroup.Config): Tinkr.Util.GUIBuilder.Element.ScrollGroup.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.ScrollGroup
--#region Tinkr.Util.GUIBuilder.Element.HTML
---@class Tinkr.Util.GUIBuilder.Element.HTML.Options : string
---@class Tinkr.Util.GUIBuilder.Element.HTML.Config
---@field html string
---@field type "HTML"
---@class Tinkr.Util.GUIBuilder.Element.HTML.Instance
---@class Tinkr.Util.GUIBuilder.Element.HTML.Factory
---@overload fun(self: Tinkr.Util.GUIBuilder, options: Tinkr.Util.GUIBuilder.Element.HTML.Config): Tinkr.Util.GUIBuilder.Element.HTML.Instance
--#endregion Tinkr.Util.GUIBuilder.Element.HTML
---@class Tinkr.Util.GUIBuilder.Listener
---@field to_source boolean
---@field callback fun()
---@class Tinkr.Util.GUIBuilder
local GUIBuilder = {
---@param self Tinkr.Util.GUIBuilder
Factory = function ( self ) end ,
---@param self Tinkr.Util.GUIBuilder
---@param config { config: string }
---@return Tinkr.Util.GUIBuilder.Instance
New = function ( self , config ) end ,
---@param self Tinkr.Util.GUIBuilder
---@param name string
---@param factoryFunc fun(self: Tinkr.Util.GUIBuilder, options: table): Tinkr.Util.GUIBuilderChildElement
RegisterElementFactory = function ( self , name , factoryFunc ) end ,
}
---@class Tinkr.Util.GUIBuilder.Instance
local GUIBuilderInstance = {
---@param self Tinkr.Util.GUIBuilder.Instance
---@param config Tinkr.Util.GUIBuilder.Builder.Config
---@return Tinkr.Util.GUIBuilder.Element.Window.Instance
Build = function ( self , config ) end ,
---@generic D
---@param self Tinkr.Util.GUIBuilder.Instance
---@param key string
---@param default? D | any
---@return D
GetConfig = function ( self , key , default ) end ,
}
---@class Tinkr.Util.GUIBuilder.Element.Factory
---@field Button fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.Button.Config): Tinkr.Util.GUIBuilder.Element.Button.Instance
---@field Checkbox fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.Checkbox.Config): Tinkr.Util.GUIBuilder.Element.Checkbox.Instance
---@field ColorPicker fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.ColorPicker.Config): Tinkr.Util.GUIBuilder.Element.ColorPicker.Instance
---@field Columns fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.Columns.Config): Tinkr.Util.GUIBuilder.Element.Columns.Instance
---@field Dropdown fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.Dropdown.Config): Tinkr.Util.GUIBuilder.Element.Dropdown.Instance
---@field EditBox fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.EditBox.Config): Tinkr.Util.GUIBuilder.Element.EditBox.Instance
---@field Group fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.Group.Config): Tinkr.Util.GUIBuilder.Element.Group.Instance
---@field HTML fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.HTML.Config): Tinkr.Util.GUIBuilder.Element.HTML.Instance
---@field Heading fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.Heading.Config): Tinkr.Util.GUIBuilder.Element.Heading.Instance
---@field Image fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.Image.Config): Tinkr.Util.GUIBuilder.Element.Image.Instance
---@field Padding fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.Padding.Config): Tinkr.Util.GUIBuilder.Element.Padding.Instance
---@field Radio fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.Radio.Config): Tinkr.Util.GUIBuilder.Element.Radio.Instance
---@field Rows fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.Rows.Config): Tinkr.Util.GUIBuilder.Element.Rows.Instance
---@field ScrollGroup fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.ScrollGroup.Config): Tinkr.Util.GUIBuilder.Element.ScrollGroup.Instance
---@field SimpleGroup fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.SimpleGroup.Config): Tinkr.Util.GUIBuilder.Element.SimpleGroup.Instance
---@field Slider fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.Slider.Config): Tinkr.Util.GUIBuilder.Element.Slider.Instance
---@field Spacer fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.Spacer.Config): Tinkr.Util.GUIBuilder.Element.Spacer.Instance
---@field TabGroup fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.TabGroup.Config): Tinkr.Util.GUIBuilder.Element.TabGroup.Instance
---@field Text fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.Text.Config): Tinkr.Util.GUIBuilder.Element.Text.Instance
---@field TreeGroup fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.TreeGroup.Config): Tinkr.Util.GUIBuilder.Element.TreeGroup.Instance
---@field Window fun(self: Tinkr.Util.GUIBuilder.Instance, config: Tinkr.Util.GUIBuilder.Element.Window.Config): Tinkr.Util.GUIBuilder.Element.Window.Instance
---@class Tinkr.Util.GUIBuilder.Instance : Tinkr.Util.GUIBuilder
---@field Button fun(self: Tinkr.Util.GUIBuilder.Instance, buttonOptions: Tinkr.Util.GUIBuilder.Element.Button.Options): Tinkr.Util.GUIBuilder.Element.Button.Config
---@field Checkbox fun(self: Tinkr.Util.GUIBuilder.Instance, checkboxOptions: Tinkr.Util.GUIBuilder.Element.Checkbox.Options): Tinkr.Util.GUIBuilder.Element.Checkbox.Config
---@field ColorPicker fun(self: Tinkr.Util.GUIBuilder.Instance, colorPickerOptions: Tinkr.Util.GUIBuilder.Element.ColorPicker.Options): Tinkr.Util.GUIBuilder.Element.ColorPicker.Config
---@field Columns fun(self: Tinkr.Util.GUIBuilder.Instance, columnsOptions: Tinkr.Util.GUIBuilder.Element.Columns.Options): Tinkr.Util.GUIBuilder.Element.Columns.Config
---@field Dropdown fun(self: Tinkr.Util.GUIBuilder.Instance, dropdownOptions: Tinkr.Util.GUIBuilder.Element.Dropdown.Options): Tinkr.Util.GUIBuilder.Element.Dropdown.Config
---@field EditBox fun(self: Tinkr.Util.GUIBuilder.Instance, editBoxOptions: Tinkr.Util.GUIBuilder.Element.EditBox.Options): Tinkr.Util.GUIBuilder.Element.EditBox.Config
---@field Emit fun(self: Tinkr.Util.GUIBuilder.Instance, key: string, value: any, toSource?: boolean)
---@field Group fun(self: Tinkr.Util.GUIBuilder.Instance, groupOptions: Tinkr.Util.GUIBuilder.Element.Group.Options): Tinkr.Util.GUIBuilder.Element.Group.Config
---@field HTML fun(self: Tinkr.Util.GUIBuilder.Instance, htmlOptions: Tinkr.Util.GUIBuilder.Element.HTML.Options): Tinkr.Util.GUIBuilder.Element.HTML.Config
---@field Heading fun(self: Tinkr.Util.GUIBuilder.Instance, headingOptions: Tinkr.Util.GUIBuilder.Element.Heading.Options): Tinkr.Util.GUIBuilder.Element.Heading.Config
---@field Image fun(self: Tinkr.Util.GUIBuilder.Instance, imageOptions: Tinkr.Util.GUIBuilder.Element.Image.Options): Tinkr.Util.GUIBuilder.Element.Image.Config
---@field Listen fun(self: Tinkr.Util.GUIBuilder.Instance, key: string, callback: fun(key: string, value: any)): Tinkr.Util.GUIBuilder.Listener
---@field Padding fun(self: Tinkr.Util.GUIBuilder.Instance, paddingOptions: Tinkr.Util.GUIBuilder.Element.Padding.Options): Tinkr.Util.GUIBuilder.Element.Padding.Config
---@field Radio fun(self: Tinkr.Util.GUIBuilder.Instance, radioOptions: Tinkr.Util.GUIBuilder.Element.Radio.Options): Tinkr.Util.GUIBuilder.Element.Radio.Config
---@field ReadConfig fun(self: Tinkr.Util.GUIBuilder.Instance, name: string, default?: any): any
---@field RemoveListener fun(self: Tinkr.Util.GUIBuilder.Instance, key: string, listener: Tinkr.Util.GUIBuilder.Listener)
---@field Rows fun(self: Tinkr.Util.GUIBuilder.Instance, rowsOptions: Tinkr.Util.GUIBuilder.Element.Rows.Options): Tinkr.Util.GUIBuilder.Element.Rows.Config
---@field ScrollGroup fun(self: Tinkr.Util.GUIBuilder.Instance, scrollGroupOptions: Tinkr.Util.GUIBuilder.Element.ScrollGroup.Options): Tinkr.Util.GUIBuilder.Element.ScrollGroup.Config
---@field SetConfig fun(self: Tinkr.Util.GUIBuilder.Instance, name: string)
---@field SimpleGroup fun(self: Tinkr.Util.GUIBuilder.Instance, simpleGroupOptions: Tinkr.Util.GUIBuilder.Element.SimpleGroup.Options): Tinkr.Util.GUIBuilder.Element.SimpleGroup.Config
---@field Slider fun(self: Tinkr.Util.GUIBuilder.Instance, sliderOptions: Tinkr.Util.GUIBuilder.Element.Slider.Options): Tinkr.Util.GUIBuilder.Element.Slider.Config
---@field Spacer fun(self: Tinkr.Util.GUIBuilder.Instance, spacerOptions: Tinkr.Util.GUIBuilder.Element.Spacer.Options): Tinkr.Util.GUIBuilder.Element.Spacer.Config
---@field Tab fun(self: Tinkr.Util.GUIBuilder.Instance, tabOptions: Tinkr.Util.GUIBuilder.Element.Tab.Options): Tinkr.Util.GUIBuilder.Element.Tab.Config
---@field TabGroup fun(self: Tinkr.Util.GUIBuilder.Instance, tabGroupOptions: Tinkr.Util.GUIBuilder.Element.TabGroup.Options): Tinkr.Util.GUIBuilder.Element.TabGroup.Config
---@field Text fun(self: Tinkr.Util.GUIBuilder.Instance, textOptions: Tinkr.Util.GUIBuilder.Element.Text.Options | string): Tinkr.Util.GUIBuilder.Element.Text.Config
---@field TreeBranch fun(self: Tinkr.Util.GUIBuilder.Instance, treeBranchOptions: Tinkr.Util.GUIBuilder.Element.TreeBranch.Options): Tinkr.Util.GUIBuilder.Element.TreeBranch.Config
---@field TreeGroup fun(self: Tinkr.Util.GUIBuilder.Instance, treeGroupOptions: Tinkr.Util.GUIBuilder.Element.TreeGroup.Options): Tinkr.Util.GUIBuilder.Element.TreeGroup.Config
---@field validate fun(self: Tinkr.Util.GUIBuilder.Instance, options: string[])
---@field validateRule fun(self: Tinkr.Util.GUIBuilder.Instance, options: string[], rule: string, value: any): boolean
---@field Window fun(self: Tinkr.Util.GUIBuilder.Instance, windowOptions: Tinkr.Util.GUIBuilder.Element.Window.Options): Tinkr.Util.GUIBuilder.Element.Window.Config
---@field WriteConfig fun(self: Tinkr.Util.GUIBuilder.Instance, name: string, value: any)
---@field atomic table
---@field config Tinkr.Util.Config.Instance
---@field key string
---@field keys { [string]: boolean }
---@field listeners { [string]: Tinkr.Util.GUIBuilder.Listener[] }
---@field elements Tinkr.Util.GUIBuilder.Element.Factory
---@alias Tinkr.Util.GUIBuilder.Builder.Config Tinkr.Util.GUIBuilder.Element.Window.Config
--#endregion Tinkr.Util.GUIBuilder
--#region Tinkr.Util.Common
---@class Tinkr.Util.Common
local TinkrUtilCommon = {
HitFlags = TinkrCollisionFlags ,
---@param number number
---@param decimals number
---@return number
Round = function ( number , decimals ) end ,
---@param x number
---@param y number
---@param hitFlags CollisionFlags
---@return number x, number y, number z
ScreenToWorld = function ( x , y , hitFlags ) end ,
---@param length number
---@return string
RandomVariable = function ( length ) end ,
---@param x1 number
---@param y1 number
---@param z1 number
---@param x2 number
---@param y2 number
---@param z2 number
---@return number
GetAnglesBetweenPositions = function ( x1 , y1 , z1 , x2 , y2 , z2 ) end ,
}
--#endregion Tinkr.Util.Common
--#region Tinkr.Util.Config
--#region Tinkr.Util.Config.Instance
---@class Tinkr.Util.Config.Instance : Tinkr.Util.Config
---@field data table
---@field file string
--#endregion Tinkr.Util.Config.Instance
---@class Tinkr.Util.Config
---@field New fun(self: Tinkr.Util.Config, name: string): Tinkr.Util.Config.Instance
---@field Read fun(self: Tinkr.Util.Config.Instance, key: string, default: any): any
---@field Sync fun(self: Tinkr.Util.Config.Instance, key: string)
---@field Write fun(self: Tinkr.Util.Config.Instance, key: string, value: any)
--#endregion Tinkr.Util.Config
--#region Tinkr.Util.Crypto
--#region Tinkr.Util.Crypto.AES
---@class Tinkr.Util.Crypto.AES
local TinkrUtilCryptoAES = {
---@param self Tinkr.Util.Crypto.AES
---@return string
IV = function ( self ) end ,
---@param self Tinkr.Util.Crypto.AES
---@param input string
---@param key string
---@param iv string
---@return string
Encrypt = function ( self , input , key , iv ) end ,
---@param self Tinkr.Util.Crypto.AES
---@param input string
---@param key string
---@param iv string
---@return string
Decrypt = function ( self , input , key , iv ) end ,
}
--#endregion Tinkr.Util.Crypto.AES
--#region Tinkr.Util.Crypto.Hash
---@class Tinkr.Util.Crypto.Hash
local TinkrUtilCryptoHash = {
---@param self Tinkr.Util.Crypto.Hash
---@param input string
---@return string
MD5 = function ( self , input ) end ,
---@param self Tinkr.Util.Crypto.Hash
---@param input string
---@return string
SHA1 = function ( self , input ) end ,
---@param self Tinkr.Util.Crypto.Hash
---@param input string
---@return string
SHA2 = function ( self , input ) end ,
---@param self Tinkr.Util.Crypto.Hash
---@param input string
---@return string
SHA256 = function ( self , input ) end ,
---@param self Tinkr.Util.Crypto.Hash
---@param input string
---@return string
SHA3 = function ( self , input ) end ,
---@param self Tinkr.Util.Crypto.Hash
---@param algo HMacHashType
---@param input string
---@param key string
---@return string
HMAC = function ( self , algo , input , key ) end ,
}
--#endregion Tinkr.Util.Crypto.Hash
--#region Tinkr.Util.Crypto.Base64
---@class Tinkr.Util.Crypto.Base64
local TinkrUtilCryptoBase64 = {
---@param self Tinkr.Util.Crypto.Base64
---@param input string
---@return string
Encode = function ( self , input ) end ,
---@param self Tinkr.Util.Crypto.Base64
---@param input string
---@return string
Decode = function ( self , input ) end ,
}
--#endregion Tinkr.Util.Crypto.Base64
---@class Tinkr.Util.Crypto
local TinkrUtilCrypto = {
---@type Tinkr.Util.Crypto.AES
AES = { } ,
---@type Tinkr.Util.Crypto.Hash
Hash = { } ,
---@type Tinkr.Util.Crypto.Base64
Base64 = { } ,
}
--#endregion Tinkr.Util.Crypto
--#region Tinkr.Util.Modules
--#region Tinkr.Util.Modules.Detour
---@class Tinkr.Util.Modules.Detour
local TinkrUtilModulesDetour = {
---@param self Tinkr.Util.Modules.Detour
---@param path Position[]
---@return Position[]
SmoothPath = function ( self , path ) end ,
---@param self Tinkr.Util.Modules.Detour
---@param path Position[]
---@return Position[]
FlattenPath = function ( self , path ) end ,
---@param self Tinkr.Util.Modules.Detour
---@param path Position[]
---@return Position[]
PreparePath = function ( self , path ) end ,
---@param self Tinkr.Util.Modules.Detour
---@param object TinkrObjectReference
---@return Position[]
ToObject = function ( self , object ) end ,
---@param self Tinkr.Util.Modules.Detour
---@param x number
---@param y number
---@param z number
---@return Position[]
ToPosition = function ( self , x , y , z ) end ,
---@param self Tinkr.Util.Modules.Detour
---@param startX number
---@param startY number
---@param startZ number
---@param destX number
---@param destY number
---@param destZ number
---@return Position[]
Raw = function ( self , startX , startY , startZ , destX , destY , destZ ) end ,
---@param self Tinkr.Util.Modules.Detour
---@param route Position[]
---@param close Position
---@return Position[]
ConnectWaypoints = function ( self , route , close ) end ,
---@param self Tinkr.Util.Modules.Detour
---@param path Position[]
---@param color string
DebugPath = function ( self , path , color ) end ,
---@param self Tinkr.Util.Modules.Detour
---@param path Position[]
---@param color string
DebugTiles = function ( self , path , color ) end ,
}
--#endregion Tinkr.Util.Modules.Detour
--#region Tinkr.Util.Modules.Draw
---@class Tinkr.Util.Modules.Draw
local TinkrUtilModulesDraw = {
---@param self Tinkr.Util.Modules.Draw
---@param x number
---@param y number
---@param z number
---@param size number
---@param arc number
---@param rotation number
Arc = function ( self , x , y , z , size , arc , rotation ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param vectors Position[]
---@param x number
---@param y number
---@param z number
---@param rotationX number
---@param rotationY number
---@param rotationZ number
Array = function ( self , vectors , x , y , z , rotationX , rotationY , rotationZ ) end ,
---@param self Tinkr.Util.Modules.Draw
---@return number x, number y, number z
CameraPosition = function ( self ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param x number
---@param y number
---@param z number
---@param radius number
---@param steps number
Circle = function ( self , x , y , z , radius , steps ) end ,
---@param self Tinkr.Util.Modules.Draw
ClearCanvas = function ( self ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param x number
---@param y number
---@param z number
---@param radius number
---@param height number
Cylinder = function ( self , x , y , z , radius , height ) end ,
---@param self Tinkr.Util.Modules.Draw
DashedLine = function ( self ) end ,
---@param self Tinkr.Util.Modules.Draw
Disable = function ( self ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param ax number
---@param ay number
---@param az number
---@param bx number
---@param by number
---@param bz number
---@return number
Distance = function ( self , ax , ay , az , bx , by , bz ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param x1 number
---@param y1 number
---@param x2 number
---@return number
Distance2D = function ( self , x1 , y1 , x2 , y2 ) end ,
---@param self Tinkr.Util.Modules.Draw
Draw3DTexture = function ( self ) end ,
---@param self Tinkr.Util.Modules.Draw
Enable = function ( self ) end ,
---@param self Tinkr.Util.Modules.Draw
---@return boolean
Enabled = function ( self ) end ,
---@param self Tinkr.Util.Modules.Draw
FilledArc = function ( self ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param x number
---@param y number
---@param z number
---@param radius number
FilledCircle = function ( self , x , y , z , radius ) end ,
---@param self Tinkr.Util.Modules.Draw
FilledRectangle = function ( self ) end ,
---@param self Tinkr.Util.Modules.Draw
FilledRectangleOffset = function ( self ) end ,
---@param self Tinkr.Util.Modules.Draw
FilledRing = function ( self ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param object TinkrObjectReference
---@return number r, number g, number b
GetColorFromObject = function ( self , object ) end ,
---@param self Tinkr.Util.Modules.Draw
Helper = function ( self ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param hex string
---@return number r, number g, number b
HexToRGB = function ( self , hex ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param x1 number
---@param y1 number
---@param z1 number
---@param x2 number
---@param y2 number
---@param z2 number
---@param maxD number
Line = function ( self , x1 , y1 , z1 , x2 , y2 , z2 , maxD ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param sx number
---@param sy number
---@param ex number
---@param ey number
Line2D = function ( self , sx , sy , ex , ey ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param x1 number
---@param y1 number
---@param z1 number
---@param x2 number
---@param y2 number
---@param z2 number
LineRaw = function ( self , x1 , y1 , z1 , x2 , y2 , z2 ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param value number
---@param fromLow number
---@param fromHigh number
---@param toLow number
---@param toHigh number
Map = function ( self , value , fromLow , fromHigh , toLow , toHigh ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param canvas? table
---@return Tinkr.Util.Modules.Draw.Canvas
New = function ( self , canvas ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param x number
---@param y number
---@param z number
---@param radius number
Outline = function ( self , x , y , z , radius ) end ,
ProjectedTexture = function ( self ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param x number
---@param y number
---@param z number
---@param w number
---@param l number
---@param rot number
Rectangle = function ( self , x , y , z , w , l , rot ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param x number
---@param y number
---@param z number
---@param w number
---@param l number
---@param rot number
RectangleOffset = function ( self , x , y , z , w , l , rot ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param cx number
---@param cy number
---@param cz number
---@param px number
---@param py number
---@param pz number
---@param r number
RotateX = function ( self , cx , cy , cz , px , py , pz , r ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param cx number
---@param cy number
---@param cz number
---@param px number
---@param py number
---@param pz number
---@param r number
RotateY = function ( self , cx , cy , cz , px , py , pz , r ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param cx number
---@param cy number
---@param cz number
---@param px number
---@param py number
---@param pz number
---@param r number
RotateZ = function ( self , cx , cy , cz , px , py , pz , r ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param a number
SetAlpha = function ( self , a ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param a number
SetAlphaRaw = function ( self , a ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param r number
---@param g number
---@param b number
---@param a number
SetColor = function ( self , r , g , b , a ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param object TinkrObjectReference
SetColorFromObject = function ( self , object ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param r number
---@param g number
---@param b number
---@param a number
SetColorRaw = function ( self , r , g , b , a ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param width number
SetWidth = function ( self , width ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param callback fun(draw: Tinkr.Util.Modules.Draw.Canvas)
Sync = function ( self , callback ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param text string
---@param font string
---@param x number
---@param y number
---@param z number
Text = function ( self , text , font , x , y , z ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param config table
---@param x number
---@param y number
---@param z number
---@param alphaA number
Texture = function ( self , config , x , y , z , alphaA ) end ,
TracedCircle = function ( ) end ,
Triangle = function ( ) end ,
Triangle2D = function ( ) end ,
TriangleAbsolut = function ( ) end ,
TriangleAbsolute = function ( ) end ,
---@param self Tinkr.Util.Modules.Draw
Update = function ( self ) end ,
---@param self Tinkr.Util.Modules.Draw
---@param wx number
---@param wy number
---@param wz number
WorldToScreen = function ( self , wx , wy , wz ) end ,
mixColors = function ( ) end
}
---@class Tinkr.Util.Modules.Draw.Canvas : Tinkr.Util.Modules.Draw
---@field enabled boolean
---@field height number
---@field line_width number
---@field scale number
---@field width number
---@field callbacks fun(self: Tinkr.Util.Modules.Draw.Canvas)[]
---@field color { [1]: number, [2]: number, [3]: number, [4]: number }
---@field lines table
---@field lines_used table
---@field strings FontString[]
---@field strings_used FontString[]
---@field textures Texture[]
---@field textures_used Texture[]
---@field triangles table
---@field triangles_used table
---@field canvas Frame
---@field relative Frame
local TinkrUtilDrawCanvas = {
}
--#endregion Tinkr.Util.Modules.Draw
--#region Tinkr.Util.Modules.Evaluator
---@class Tinkr.Util.Modules.Evaluator
local TinkrUtilModulesEvaluator = {
---@param self Tinkr.Util.Modules.Evaluator
---@param length number
---@return string
RandomVariable = function ( self , length ) end ,
---@param self Tinkr.Util.Modules.Evaluator
---@param func function
InjectGlobals = function ( self , func ) end ,
---@param self Tinkr.Util.Modules.Evaluator
---@param file string
---@param args ...
LoadEncrypted = function ( self , file , args ) end ,
---@param self Tinkr.Util.Modules.Evaluator
---@param input string
---@return function
Load = function ( self , input , ... ) end ,
---@param self Tinkr.Util.Modules.Evaluator
---@param input string
---@param args any[]
---@param path string
---@return ...
LoadString = function ( self , input , args , path ) end ,
---@param self Tinkr.Util.Modules.Evaluator
---@param func function
---@param ... any
CallProtectedFunction = function ( self , func , ... ) end ,
---@param self Tinkr.Util.Modules.Evaluator
---@param buffer string
---@param args ...
---@param path string
LoadEncBuffer = function ( self , buffer , args , path ) end ,
---@param self Tinkr.Util.Modules.Evaluator
---@param global string
EmplaceGlobals = function ( self , global ) end ,
}
--#endregion Tinkr.Util.Modules.Evaluator
--#region Tinkr.Util.Modules.Event
---@class Tinkr.Util.Modules.Event
local TinkrUtilModulesEvent = {
---@param self Tinkr.Util.Modules.Event
---@param event string
---@param callback fun(...)
Register = function ( self , event , callback ) end ,
---@param self Tinkr.Util.Modules.Event
---@param event string
---@param ... any
Emit = function ( self , event , ... ) end ,
---@param self Tinkr.Util.Modules.Event
---@param id string
---@param callback fun(...)
RemoveListener = function ( self , id , callback ) end ,
---@param self Tinkr.Util.Modules.Event
---@param event string
---@return number[] ids
GetListeners = function ( self , event ) end ,
}
--#endregion Tinkr.Util.Modules.Event
--#region Tinkr.Util.Modules.File
---@class Tinkr.Util.Modules.File
local TinkrUtilModulesFile = {
---List all files in a given directory.
---@param self Tinkr.Util.Modules.File
---@param dir string
---@return string[]
List = function ( self , dir ) end ,
---List all files in a given directory.
---@param self Tinkr.Util.Modules.File
---@param dir string
---@param recurse boolean
---@return string[]
ListDirectory = function ( self , dir , recurse ) end ,
---Writes the data to a given file.
---@param self Tinkr.Util.Modules.File
---@param file string
---@param data string
---@param append boolean
---@return boolean
Write = function ( self , file , data , append ) end ,
---Read the data in a given file.
---@param self Tinkr.Util.Modules.File
---@param file string
---@return string
Read = function ( self , file ) end ,
---Delete the given file.
---@param self Tinkr.Util.Modules.File
---@param file string
---@return string
Delete = function ( self , file ) end ,
---Run the given file.
---@param self Tinkr.Util.Modules.File
---@param file string
---@param args ...
---@return string
Run = function ( self , file , args ) end ,
---Load the given package.
---@param self Tinkr.Util.Modules.File
---@param file string
---@param args ...
---@return string
LoadPackage = function ( self , file , args ) end ,
}
--#endregion Tinkr.Util.Modules.File
--#region Tinkr.Util.Modules.Fly
---@class Tinkr.Util.Modules.Fly
local TinkrUtilModulesFly = { }
--#endregion Tinkr.Util.Modules.Fly
--#region Tinkr.Util.Modules.FrameEvent
---@class Tinkr.Util.Modules.FrameEvent
local TinkrUtilModulesFrameEvent = { }
--#endregion Tinkr.Util.Modules.FrameEvent
--#region Tinkr.Util.Modules.HTTP
---@class Tinkr.Util.Modules.HTTP
local TinkrUtilModulesHTTP = { }
--#endregion Tinkr.Util.Modules.HTTP
--#region Tinkr.Util.Modules.JSON
---@class Tinkr.Util.Modules.JSON
local TinkrUtilModulesJSON = {
---@param json string
Decode = function ( self , json ) end ,
---@param luatable table
Encode = function ( self , luatable ) end ,
}
--#endregion Tinkr.Util.Modules.JSON
--#region Tinkr.Util.Modules.LibStub
---@class Tinkr.Util.Modules.LibStub
local TinkrUtilModulesLibStub = { }
--#endregion Tinkr.Util.Modules.LibStub
--#region Tinkr.Util.Modules.Movement
---@class Tinkr.Util.Modules.Movement
local TinkrUtilModulesMovement = { }
--#endregion Tinkr.Util.Modules.Movement
--#region Tinkr.Util.Modules.ObjectManager
---@class Tinkr.Util.Modules.ObjectManager
local TinkrUtilModulesObjectManager = { }
--#endregion Tinkr.Util.Modules.ObjectManager
--#region Tinkr.Util.Modules.Script
---@class Tinkr.Util.Modules.Script
local TinkrUtilModulesScript = { }
--#endregion Tinkr.Util.Modules.Script
--#region Tinkr.Util.Modules.Vector3
---@class Tinkr.Util.Modules.Vector3
local TinkrUtilModulesVector3 = { }
--#endregion Tinkr.Util.Modules.Vector3
---@class Tinkr.Util.Modules
local TinkrUtilModules = {
---@type Tinkr.Util.Modules.Detour
Detour = { } ,
---@type Tinkr.Util.Modules.Draw
Draw = { } ,
---@type Tinkr.Util.Modules.Evaluator
Evaluator = { } ,
---@type Tinkr.Util.Modules.Event
Event = { } ,
---@type Tinkr.Util.Modules.File
File = { } ,
---@type Tinkr.Util.Modules.Fly
Fly = { } ,
---@type Tinkr.Util.Modules.FrameEvent
FrameEvent = { } ,
---@type Tinkr.Util.Modules.HTTP
HTTP = { } ,
---@type Tinkr.Util.Modules.JSON
JSON = { } ,
---@type Tinkr.Util.Modules.LibStub
LibStub = { } ,
---@type Tinkr.Util.Modules.Movement
Movement = { } ,
---@type Tinkr.Util.Modules.ObjectManager
ObjectManager = { } ,
---@type Tinkr.Util.Modules.Script
Script = { } ,
---@type Tinkr.Util.Modules.Vector3
Vector3 = { } ,
}
--#endregion Tinkr.Util.Modules
---@class Tinkr.Util.Class.Static
---@field allocate fun(self: Tinkr.Util.Class.Instance): Tinkr.Util.Class.Instance
---@field new fun(self: Tinkr.Util.Class.Instance, ...: any ): Tinkr.Util.Class.Instance | any
---@field subclass fun(self: Tinkr.Util.Class.Instance, name: string): Tinkr.Util.Class.Instance
---@field isSubclassOf fun(self: Tinkr.Util.Class.Instance, other: Tinkr.Util.Class.Instance): boolean
---@field subclassed fun(self: Tinkr.Util.Class.Instance, other: Tinkr.Util.Class.Instance): boolean
---@field include fun(self: Tinkr.Util.Class.Instance, ...): Tinkr.Util.Class.Instance
---@class Tinkr.Util.Class.DefaultMixin
---@field __tostring fun(self: Tinkr.Util.Class.Instance): string
---@field initialize fun(self: Tinkr.Util.Class.Instance, ...)
---@field isInstanceOf fun(self: Tinkr.Util.Class.Instance, aClass: Tinkr.Util.Class.Instance): boolean
---@field static? Tinkr.Util.Class.Static
---@class Tinkr.Util.Class.Instance : Tinkr.Util.Class.DefaultMixin, Tinkr.Util.Class.Static
---@field name string
---@field super? Tinkr.Util.Class
---@field __declaredMethods table<string, function>
---@field __instanceDict table
---@field __newindex fun(self: Tinkr.Util.Class.Instance, name: string, f: function)
---@overload fun()
---@class Tinkr.Util.Class
---@field class fun(self: Tinkr.Util.Class, name: string, super?: Tinkr.Util.Class.Instance): Tinkr.Util.Class.Instance
---@overload fun(self: Tinkr.Util.Class, name: string, super?: Tinkr.Util.Class.Instance): Tinkr.Util.Class.Instance
---@class Tinkr.Util.File
---@field List fun(self: Tinkr.Util.File, dir: string): string[]
---@field Read fun(self: Tinkr.Util.File, file: string): string
---@class Tinkr.Util.Serialize
---@field Load fun(self: Tinkr.Util.Serialize, string: string): any
---@field Serialize fun(self: Tinkr.Util.Serialize, value: any): string
---@class Tinkr.Util
---@field File Tinkr.Util.File
local TinkrUtil = {
---@class Tinkr.Util.Class
Class = { } ,
---@type Tinkr.Util.Http
HTTP = { } ,
---@type Tinkr.Util.Modules.Evaluator
Evaluator = { } ,
---@type Tinkr.Util.Commands
Commands = { } ,
---@type Tinkr.Util.Common
Common = { } ,
---@type Tinkr.Util.Config
Config = { } ,
---@type Tinkr.Util.Crypto
Crypto = { } ,
---@type Tinkr.Util.Modules
Modules = { } ,
---@type Tinkr.Util.GUIBuilder
GUIBuilder = { } ,
---@type Tinkr.Util.Modules.Draw
Draw = { } ,
LibStub = LibStub ,
JSON = Tinkr.Util . JSON ,
Serialize = { } ,
}
--#endregion Tinkr.Util
--#region Tinkr.FileSystem
---@class Tinkr.FileSystem
local TinkrFileSystem = {
---Attempts to create a given directory.
---@param path string
---@return boolean
CreateDirectory = function ( path ) end ,
---Attempts to create a given directory.
---@param path string
---@return boolean
CreateFolder = function ( path ) end ,
---Deletes a file from the system.
---@param path string
---@return boolean
DeleteFile = function ( path ) end ,
---Checks if the given directory exists.
---@param path string
---@return boolean
DirectoryExists = function ( path ) end ,
---Checks if the given directory exists.
---@param path string
---@return boolean
FolderExists = function ( path ) end ,
---Checks if the given file exists.
---@param path string
---@return boolean
FileExists = function ( path ) end ,
---List all directories in a given directory.
---@param path string
---@return string[]
ListDirectories = function ( path ) end ,
---List all directories in a given directory.
---@param path string
---@return string[]
ListFolders = function ( path ) end ,
---List all files in a given directory.
---@param path string
---@return string[]
ListFiles = function ( path ) end ,
---List all files in a given zip.
---@param path string
---@return string[]
ListZipEntries = function ( path ) end ,
---Reads the contents of a given file.
---@param path string
---@return string
ReadFile = function ( path ) end ,
---a given file inside a zip archive.
---@param zip string
---@param entry string
---@return boolean
ReadZipEntry = function ( zip , entry ) end ,
---Writes the data to a given file.
---@param path string
---@param data string
---@param append boolean
---@return boolean
WriteFile = function ( path , data , append ) end ,
---Loads file and returns the result.
---@param path string
---@param ... any
---@return any ...
require = function ( path , ... ) end ,
}
CreateDirectory = TinkrFileSystem.CreateDirectory
CreateFolder = TinkrFileSystem.CreateFolder
DeleteFile = TinkrFileSystem.DeleteFile
DirectoryExists = TinkrFileSystem.DirectoryExists
FolderExists = TinkrFileSystem.FolderExists
FileExists = TinkrFileSystem.FileExists
ListDirectories = TinkrFileSystem.ListDirectories
ListFolders = TinkrFileSystem.ListFolders
ListFiles = TinkrFileSystem.ListFiles
ListZipEntries = TinkrFileSystem.ListZipEntries
ReadFile = TinkrFileSystem.ReadFile
ReadZipEntry = TinkrFileSystem.ReadZipEntry
WriteFile = TinkrFileSystem.WriteFile
require = TinkrFileSystem.require
--#endregion Tinkr.FileSystem
--#region Tinkr.Interaction
---@class Tinkr.Interaction
local TinkrInteraction = {
---Sends an afk clear packet to the server. This is like typing /afk
---@return boolean
ClearAFK = function ( ) end ,
---Clears the target object.
---@param objectRef TinkrObjectReference
---@return boolean
ClearNPCObject = function ( objectRef ) end ,
---Clears the target object.
---@param objectRef TinkrObjectReference
---@return boolean
ClearTargetObject = function ( objectRef ) end ,
---Clicks the ground at the given position. This is useful for casting spells on the ground.
---@param x number
---@param y number
---@param z number
Click = function ( x , y , z ) end ,
---Interact with a unit.
---@param objectRef TinkrObjectReference
---@return boolean
InteractUnit = function ( objectRef ) end ,
---Checks if a cursor spell cast is pending.
---@return number
IsSpellPending = function ( ) end ,
---Right click an object.
---@param objectRef TinkrObjectReference
---@return boolean
LeftClickObject = function ( objectRef ) end ,
---Releases an empowered spell.
---@param spellID spellId
ReleaseEmpoweredSpell = function ( spellID ) end ,
---Right click an object.
---@param objectRef TinkrObjectReference
---@return boolean
RightClickObject = function ( objectRef ) end ,
---Sends a heartbeat packet to the server. This is useful for doing things like disengaging backwards.
---@return boolean
SendMovementHeartbeat = function ( ) end ,
---Sets the mouseover to a WowGameObject.
---@param objectRef TinkrObjectReference
---@return boolean
SetMouseover = function ( objectRef ) end ,
---Sets the target object to a WowGameObject.
---@param objectRef TinkrObjectReference
---@return boolean
SetNPCObject = function ( objectRef ) end ,
---Sets the target object to a WowGameObject.
---@param objectRef TinkrObjectReference
---@return boolean
SetTargetObject = function ( objectRef ) end ,
}
ClearAFK = TinkrInteraction.ClearAFK
ClearNPCObject = TinkrInteraction.ClearNPCObject
ClearTargetObject = TinkrInteraction.ClearTargetObject
Click = TinkrInteraction.Click
InteractUnit = TinkrInteraction.InteractUnit
IsSpellPending = TinkrInteraction.IsSpellPending
LeftClickObject = TinkrInteraction.LeftClickObject
ReleaseEmpoweredSpell = TinkrInteraction.ReleaseEmpoweredSpell
RightClickObject = TinkrInteraction.RightClickObject
SendMovementHeartbeat = TinkrInteraction.SendMovementHeartbeat
SetMouseover = TinkrInteraction.SetMouseover
SetNPCObject = TinkrInteraction.SetNPCObject
SetTargetObject = TinkrInteraction.SetTargetObject
--#endregion Tinkr.Interaction
--#region Tinkr.Movement
---@class Tinkr.Movement
local TinkrMovement = {
---Returns the position of the camera.
---@return number x, number y, number z
CameraPosition = function ( ) end ,
---Face the player in the direction given (in radians).
---@param dir number
---@param update boolean
FaceDirection = function ( dir , update ) end ,
---Face the player at a WowGameObject.
---@param objectRef TinkrObjectReference
FaceObject = function ( objectRef ) end ,
---GeneratePath a path between two positions for the given map ID.
---@param x1 number
---@param y1 number
---@param z1 number
---@param x2 number
---@param y2 number
---@param z2 number
---@param mapId integer
---@return PositionArray path, PathTypes pathType
GeneratePath = function ( x1 , y1 , z1 , x2 , y2 , z2 , mapId ) end ,
---GeneratePath a path between two positions for the given map ID, attaching an extra weight to each poly edge examined.
---@param x1 number
---@param y1 number
---@param z1 number
---@param x2 number
---@param y2 number
---@param z2 number
---@param mapId integer
---@param weightCalc fun(ax: number, ay: number, az: number, bx: number, by: number, bz: number): number
---@return PositionArray path
GeneratePathWeighted = function ( x1 , y1 , z1 , x2 , y2 , z2 , mapId , weightCalc ) end ,
---Returns the current area info.
---@return { continentID: integer, areaID: integer, parentAreaID: integer }
GetAreaInfo = function ( ) end ,
---Returns the position of the players corpse.
---@return number x, number y, number z
GetCorpsePosition = function ( ) end ,
---Returns the position of the players corpse.
---@return number x, number y, number z
GetCorpseLocation = function ( ) end ,
---Returns the current mapID for use with GeneratePath.
---@return integer
GetMapID = function ( ) end ,
---Get the players current pitch
---@return number
GetPitch = function ( ) end ,
---Click to Move to a given position.
---@param x number
---@param y number
---@param z number
MoveTo = function ( x , y , z ) end ,
---Click to Move to a raw position ignoring transport world relativity
---@param x number
---@param y number
---@param z number
MoveToRaw = function ( x , y , z ) end ,
---Set your players rotation instantly to face a direction using the games input controller
---@param theta number
SetHeading = function ( theta ) end ,
---Set your players rotation instantly to face a direction using the games input controller
---@param theta number
SetPitch = function ( theta ) end ,
}
CameraPosition = TinkrMovement.CameraPosition
FaceDirection = TinkrMovement.FaceDirection
FaceObject = TinkrMovement.FaceObject
GeneratePath = TinkrMovement.GeneratePath
GeneratePathWeighted = TinkrMovement.GeneratePathWeighted
GetAreaInfo = TinkrMovement.GetAreaInfo
GetCorpseLocation = TinkrMovement.GetCorpseLocation
GetCorpsePosition = TinkrMovement.GetCorpsePosition
GetMapID = TinkrMovement.GetMapID
GetPitch = TinkrMovement.GetPitch
MoveTo = TinkrMovement.MoveTo
MoveToRaw = TinkrMovement.MoveToRaw
SetHeading = TinkrMovement.SetHeading
SetPitch = TinkrMovement.SetPitch
--#endregion Tinkr.Movement
--#region Tinkr.Objects
---@class Tinkr.Objects
local TinkrObjects = {
---Returns the spellID of a WowGameObject representation of an Area Trigger
---@param objectRef TinkrObjectReference
---@return { spellID1: number, spellID2: number } | false
AreaTriggerSpell = function ( objectRef ) end ,
---Returns the gameobject type of a WowGameObject.
---@param objectRef TinkrObjectReference
---@return ObjectType | false
GameObjectType = function ( objectRef ) end ,
---Gets a list of all Missiles.
---@return Missle[]
Missiles = function ( ) end ,
---Gets a single object.
---@param unitId TinkrObjectReference
---@return WowGameObject | false
Object = function ( unitId ) end ,
---Get an objects hidden aura
---@param objectRef TinkrObjectReference
---@param index integer
---@return string name, number icon, number count, (DispelType | nil) displType, number duration, number expirationTime, UnitId source, boolean isStealable, boolean nameplateShowPersonal, spellId spellId, boolean canApplyAura, boolean isBossDebuff, boolean castByPlayer, boolean nameplateShowAll, number timeMod
---@overload fun(objectRef: TinkrObjectReference, index: integer): nil
ObjectAura = function ( objectRef , index ) end ,
---Returns the bounding radius of a WowGameObject in radians.
---@param objectRef TinkrObjectReference
---@return number | false
ObjectBoundingRadius = function ( objectRef ) end ,
---Returns the casting and channeling spell of a WowGameObject.
---@param objectRef TinkrObjectReference
---@return number[] | false
ObjectCastingInfo = function ( objectRef ) end ,
---Returns a WowGameObject representing the destination for a units current spell cast.
---@param objectRef TinkrObjectReference
---@return WowGameObject | false
ObjectCastingTarget = function ( objectRef ) end ,
---Returns the combat reach of a WowGameObject.
---@param objectRef TinkrObjectReference
---@return number | false
ObjectCombatReach = function ( objectRef ) end ,
---Returns the creator of the WowGameObject.
---@param objectRef TinkrObjectReference
---@return TinkrObjectReference | false
ObjectCreator = function ( objectRef ) end ,
---Returns the creature type of a WowGameObject.
---@param objectRef TinkrObjectReference
---@return UnitCreatureType | false
ObjectCreatureType = function ( objectRef ) end ,
---Returns the distance between two WowGameObject's.
---@param fromObjectRef TinkrObjectReference
---@param toObjectRef TinkrObjectReference
---@return number | false
ObjectDistance = function ( fromObjectRef , toObjectRef ) end ,
---Returns the flags of a WowGameObject.
---@param objectRef TinkrObjectReference
---@return number flags1, number flags2, number flags3, number flags4, number unitFlags1, number unitFlags2, number dynamicFlags
---@overload fun(objectRef: TinkrObjectReference): false
ObjectFlags = function ( objectRef ) end ,
---Returns the GUID of a WowGameObject. This is equal to UnitGUID but supports any object
---@param objectRef TinkrObjectReference
---@return string | false
ObjectGUID = function ( objectRef ) end ,
---Returns the hight of a WowGameObject.
---@param objectRef TinkrObjectReference
---@return number | false
ObjectHeight = function ( objectRef ) end ,
---Returns the NPC ID of a WowGameObject.
---@param objectRef TinkrObjectReference
---@return (number | boolean), (number?) ...
ObjectID = function ( objectRef ) end ,
---Check if a WowGameObject is outside (AKA not in a cave).
---@param objectRef TinkrObjectReference
---@return boolean
ObjectIsOutdoors = function ( objectRef ) end ,
---Check if a WowGameObject is submerged (AKA in the water).
---@param objectRef TinkrObjectReference
---@return boolean
ObjectIsSubmerged = function ( objectRef ) end ,
---Returns if a WowGameObject is lootable or not.
---@param objectRef TinkrObjectReference
---@return boolean
ObjectLootable = function ( objectRef ) end ,
---Returns the current movement state of a Unit
---@param objectRef TinkrObjectReference
---@return MovementFlags
ObjectMovementFlag = function ( objectRef ) end ,
---Returns the objectReference that the WowGameObject is moving on.
---@param objectRef TinkrObjectReference
---@return TinkrObjectReference | false
ObjectMover = function ( objectRef ) end ,
---Returns the name of a WowGameObject.
---@param objectRef TinkrObjectReference
---@return string | false
ObjectName = function ( objectRef ) end ,
---Returns the position of a WowGameObject.
---@param objectRef TinkrObjectReference
---@return number x, number y, number z
ObjectPosition = function ( objectRef ) end ,
---Returns the raw position of a WowGameObject.
---@param objectRef TinkrObjectReference
---@return number x, number y, number z
ObjectRawPosition = function ( objectRef ) end ,
---Returns the raw rotation of a WowGameObject in radians.
---@param objectRef TinkrObjectReference
---@return number | false
ObjectRawRotation = function ( objectRef ) end ,
---Returns the rotation of a WowGameObject in radians.
---@param objectRef TinkrObjectReference
---@return number | false
ObjectRotation = function ( objectRef ) end ,
---Returns if a WowGameObject is skinned or not.
---@param objectRef TinkrObjectReference
---@return boolean
ObjectSkinnable = function ( objectRef ) end ,
---Returns the skinning type of a WowGameObject.
---@param objectRef TinkrObjectReference
---@return SkinType | false
ObjectSkinningType = function ( objectRef ) end ,
---Returns the spec ID of a WowGameObject.
---@param objectRef TinkrObjectReference
---@return number | false
ObjectSpecializationID = function ( objectRef ) end ,
---Returns the type of a WowGameObject.
---@param objectRef TinkrObjectReference
---@return ObjectType | false
ObjectType = function ( objectRef ) end ,
---@param objectRef TinkrObjectReference
---@return string
ObjectUnit = function ( objectRef ) end ,
---Returns a WowGameObject representing the current target of an object.
---@param objectRef TinkrObjectReference
---@return WowGameObject | false
ObjectTarget = function ( objectRef ) end ,
---Returns the world position of a WowGameObject.
---@param objectRef TinkrObjectReference
---@return number x, number y, number z
ObjectWorldPosition = function ( objectRef ) end ,
---Gets a list of all objects.
---@param filterTypeId? ObjectType
---@return WowGameObject[]
Objects = function ( filterTypeId ) end ,
---Returns the duel team of a WowGameObject.
---@param objectRef TinkrObjectReference
---@return number
UnitDuelTeam = function ( objectRef ) end ,
---Check if a WowGameObject is mounted.
---@param objectRef TinkrObjectReference
---@return boolean
UnitIsMounted = function ( objectRef ) end ,
---Check if a WowGameObject is sitting.
---@param objectRef TinkrObjectReference
---@return boolean
UnitIsSitting = function ( objectRef ) end ,
---Return item levels for a WowGameObject.
---@param objectRef TinkrObjectReference
---@return number equipped, number current, number avg, number max
UnitItemLevels = function ( objectRef ) end ,
---Returns a WowGameObject representing the current loot target of an object.
---@param objectRef TinkrObjectReference
---@return WowGameObject | false
ObjectLootTarget = function ( objectRef ) end ,
---Returns a WowGameObject shapeshift ID.
---@param objectRef TinkrObjectReference
---@return number | false
UnitShapeShiftID = function ( objectRef ) end ,
--A more "advanced" way to find the "top" of the mob where you could possibly cast a spell towards.
---@param objectRef TinkrObjectReference
---@param typeID number
---@return number, number, number
GetUnitAttachmentPosition = function ( objectRef , typeID ) end ,
---Returns the model id of the object.
---@param objectRef TinkrObjectReference
---@return number
ObjectModelId = function ( objectRef ) end ,
}
AreaTriggerSpell = TinkrObjects.AreaTriggerSpell
GameObjectType = TinkrObjects.GameObjectType
Missiles = TinkrObjects.Missiles
Object = TinkrObjects.Object
ObjectAura = TinkrObjects.ObjectAura
ObjectBoundingRadius = TinkrObjects.ObjectBoundingRadius
ObjectCastingInfo = TinkrObjects.ObjectCastingInfo
ObjectCastingTarget = TinkrObjects.ObjectCastingTarget
ObjectCombatReach = TinkrObjects.ObjectCombatReach
ObjectCreator = TinkrObjects.ObjectCreator
ObjectCreatureType = TinkrObjects.ObjectCreatureType
ObjectDistance = TinkrObjects.ObjectDistance
ObjectFlags = TinkrObjects.ObjectFlags
ObjectGUID = TinkrObjects.ObjectGUID
ObjectHeight = TinkrObjects.ObjectHeight
ObjectID = TinkrObjects.ObjectID
ObjectIsOutdoors = TinkrObjects.ObjectIsOutdoors
ObjectIsSubmerged = TinkrObjects.ObjectIsSubmerged
ObjectLootTarget = TinkrObjects.ObjectLootTarget
ObjectLootable = TinkrObjects.ObjectLootable
ObjectModelId = TinkrObjects.ObjectModelId
ObjectMovementFlag = TinkrObjects.ObjectMovementFlag
ObjectMover = TinkrObjects.ObjectMover
ObjectName = TinkrObjects.ObjectName
ObjectPosition = TinkrObjects.ObjectPosition
ObjectRawPosition = TinkrObjects.ObjectRawPosition
ObjectRawRotation = TinkrObjects.ObjectRawRotation
ObjectRotation = TinkrObjects.ObjectRotation
ObjectSkinnable = TinkrObjects.ObjectSkinnable
ObjectSkinningType = TinkrObjects.ObjectSkinningType
ObjectSpecializationID = TinkrObjects.ObjectSpecializationID
ObjectTarget = TinkrObjects.ObjectTarget
ObjectType = TinkrObjects.ObjectType
ObjectUnit = TinkrObjects.ObjectUnit
ObjectWorldPosition = TinkrObjects.ObjectWorldPosition
Objects = TinkrObjects.Objects
UnitDuelTeam = TinkrObjects.UnitDuelTeam
UnitIsMounted = TinkrObjects.UnitIsMounted
UnitIsSitting = TinkrObjects.UnitIsSitting
UnitItemLevels = TinkrObjects.UnitItemLevels
UnitShapeShiftID = TinkrObjects.UnitShapeShiftID
GetUnitAttachmentPosition = TinkrObjects.GetUnitAttachmentPosition
---@enum Tinkr.KeyCodes
local KeyCodes = {
ANSI_A = 0x00 ,
ANSI_S = 0x01 ,
ANSI_D = 0x02 ,
ANSI_F = 0x03 ,
ANSI_H = 0x04 ,
ANSI_G = 0x05 ,
ANSI_Z = 0x06 ,
ANSI_X = 0x07 ,
ANSI_C = 0x08 ,
ANSI_V = 0x09 ,
ANSI_B = 0x0B ,
ANSI_Q = 0x0C ,
ANSI_W = 0x0D ,
ANSI_E = 0x0E ,
ANSI_R = 0x0F ,
ANSI_Y = 0x10 ,
ANSI_T = 0x11 ,
ANSI_1 = 0x12 ,
ANSI_2 = 0x13 ,
ANSI_3 = 0x14 ,
ANSI_4 = 0x15 ,
ANSI_6 = 0x16 ,
ANSI_5 = 0x17 ,
ANSI_Equal = 0x18 ,
ANSI_9 = 0x19 ,
ANSI_7 = 0x1A ,
ANSI_Minus = 0x1B ,
ANSI_8 = 0x1C ,
ANSI_0 = 0x1D ,
ANSI_RightBracket = 0x1E ,
ANSI_O = 0x1F ,
ANSI_U = 0x20 ,
ANSI_LeftBracket = 0x21 ,
ANSI_I = 0x22 ,
ANSI_P = 0x23 ,
ANSI_L = 0x25 ,
ANSI_J = 0x26 ,
ANSI_Quote = 0x27 ,
ANSI_K = 0x28 ,
ANSI_Semicolon = 0x29 ,
ANSI_Backslash = 0x2A ,
ANSI_Comma = 0x2B ,
ANSI_Slash = 0x2C ,
ANSI_N = 0x2D ,
ANSI_M = 0x2E ,
ANSI_Period = 0x2F ,
ANSI_Grave = 0x32 ,
ANSI_KeypadDecimal = 0x41 ,
ANSI_KeypadMultiply = 0x43 ,
ANSI_KeypadPlus = 0x45 ,
ANSI_KeypadClear = 0x47 ,
ANSI_KeypadDivide = 0x4B ,
ANSI_KeypadEnter = 0x4C ,
ANSI_KeypadMinus = 0x4E ,
ANSI_KeypadEquals = 0x51 ,
ANSI_Keypad0 = 0x52 ,
ANSI_Keypad1 = 0x53 ,
ANSI_Keypad2 = 0x54 ,
ANSI_Keypad3 = 0x55 ,
ANSI_Keypad4 = 0x56 ,
ANSI_Keypad5 = 0x57 ,
ANSI_Keypad6 = 0x58 ,
ANSI_Keypad7 = 0x59 ,
ANSI_Keypad8 = 0x5B ,
ANSI_Keypad9 = 0x5C ,
Return = 0x24 ,
Tab = 0x30 ,
Space = 0x31 ,
Delete = 0x33 ,
Escape = 0x35 ,
Command = 0x37 ,
Shift = 0x38 ,
CapsLock = 0x39 ,
Option = 0x3A ,
Control = 0x3B ,
RightShift = 0x3C ,
RightOption = 0x3D ,
RightControl = 0x3E ,
Function = 0x3F ,
F17 = 0x40 ,
VolumeUp = 0x48 ,
VolumeDown = 0x49 ,
Mute = 0x4A ,
F18 = 0x4F ,
F19 = 0x50 ,
F20 = 0x5A ,
F5 = 0x60 ,
F6 = 0x61 ,
F7 = 0x62 ,
F3 = 0x63 ,
F8 = 0x64 ,
F9 = 0x65 ,
F11 = 0x67 ,
F13 = 0x69 ,
F16 = 0x6A ,
F14 = 0x6B ,
F10 = 0x6D ,
F12 = 0x6F ,
F15 = 0x71 ,
Help = 0x72 ,
Home = 0x73 ,
PageUp = 0x74 ,
ForwardDelete = 0x75 ,
F4 = 0x76 ,
End = 0x77 ,
F2 = 0x78 ,
PageDown = 0x79 ,
F1 = 0x7A ,
LeftArrow = 0x7B ,
RightArrow = 0x7C ,
DownArrow = 0x7D ,
UpArrow = 0x7E ,
}
--#endregion Tinkr.Objects
--#region Tinkr.Utility
---@class Tinkr.Utility
local TinkrUtility = {
---Bring a window to the foreground
---@return boolean
BringWindowToForeground = function ( ) end ,
---Crash a client
---@return nil
Crash = function ( ) end ,
---Runs lua code in a unprotected environment.
---@param code string
---@param debugName? string
Eval = function ( code , debugName ) end ,
---Calculates the distance in C land quicker than it can be done in Lua.
---@param x1 number
---@param y1 number
---@param z1 number
---@param x2 number
---@param y2 number
---@param z2 number
---@return number
FastDistance = function ( x1 , y1 , z1 , x2 , y2 , z2 ) end ,
---Calculates the 2D distance in C land quicker than it can be done in Lua.
---@param x1 number
---@param y1 number
---@param x2 number
---@param y2 number
---@return number
FastDistance2D = function ( x1 , y1 , x2 , y2 ) end ,
---Returns the architecture of a tinkr build
---@return 'arm64' | 'x86_64'
GetArchitecture = function ( ) end ,
---Gets information about an auction (this is classic only).
---@param type 'list' | 'bidder' | 'owner'
---@param index number
---@return number itemID, number expiresAt, string expiresAtString, number currentBid, string currentBidString, number buyout, string buyoutString, string creator
GetAuctionInfo = function ( type , index ) end ,
---Gets the last time a game tick happened.
---@return number
GetGameTick = function ( ) end ,
---Get the state of a key
---@param key Tinkr.KeyCodes
---@return boolean
GetKeyState = function ( key ) end ,
---GetLastHardwareActionTime returns the last time your game client received a hardware interaction
---@return number
GetLastHardwareActionTime = function ( ) end ,
---Check if a window is in the foreground
---@return boolean
GetWindowStatus = function ( ) end ,
---Check if a the player is in the game world
---@return boolean
IsInGame = function ( ) end ,
---Do JSON decoding in C land.
---@param string string
---@return table
JsonDecode = function ( string ) end ,
---Do JSON encoding in C land.
---@param table table
---@return string
JsonEncode = function ( table ) end ,
---Do BSON decoding in C land.
---@param data string
---@return table
BsonDecode = function ( data ) end ,
---Do BSON encoding in C land.
---@param table table
---@return string
BsonEncode = function ( table ) end ,
---Kill a client
Kill = function ( ) end ,
---Log output to the console
---@param str string
Log = function ( str ) end ,
---Rotate a vector (x: number, y: number, z: number) and apply a distance calculation to it.
---@param x number
---@param y number
---@param z number
---@param theta number
---@param distance number
---@return number x, number y, number z
RotateVector = function ( x , y , z , theta , distance ) end ,
---Returns the world position of a screen coordinate.
---@param x number
---@param y number
---@param hitFlags CollisionFlags
---@return number x, number y, number z
ScreenToWorld = function ( x , y , hitFlags ) end ,
---Force a frame to not be forbidden, allowing lua interactions on it
---@param frame Frame
---@return boolean
SetForbiddenFrame = function ( frame ) end ,
---SetLastHardwareActionTime updates the last input interaction time in the game client, mainly used to prevent AFK behaviors
---@param time number
SetLastHardwareActionTime = function ( time ) end ,
---Returns the position of the camera.
---@param x1 number
---@param y1 number
---@param z1 number
---@param x2 number
---@param y2 number
---@param z2 number
---@param hitFlags integer
---@return number x, number y, number z
TraceLine = function ( x1 , y1 , z1 , x2 , y2 , z2 , hitFlags ) end ,
---Returns the screen position of a world coordinate.
---@param x number
---@param y number
---@param z number
---@return number x, number y
WorldToScreen = function ( x , y , z ) end ,
---Check if tinkr would have injected lua into the client (Sanity check mainly, if it would return false it wouldn't exist (probably))
---@return boolean
WouldInject = function ( ) end ,
---Zlip compression in C land.
---@param string string
---@param level number
---@return string
Deflate = function ( string , level ) end ,
---Zlib compression in C land.
---@param data string
---@return string
Inflate = function ( data ) end ,
---loadstring but without lua taint.
---@param code string
---@return function
loadstringsecure = function ( code ) end ,
}
BringWindowToForeground = TinkrUtility.BringWindowToForeground
BsonDecode = TinkrUtility.BsonDecode
BsonEncode = TinkrUtility.BsonEncode
Crash = TinkrUtility.Crash
Deflate = TinkrUtility.Deflate
Eval = TinkrUtility.Eval
FastDistance = TinkrUtility.FastDistance
FastDistance2D = TinkrUtility.FastDistance2D
GetArchitecture = TinkrUtility.GetArchitecture
GetAuctionInfo = TinkrUtility.GetAuctionInfo
GetGameTick = TinkrUtility.GetGameTick
GetKeyState = TinkrUtility.GetKeyState
GetLastHardwareActionTime = TinkrUtility.GetLastHardwareActionTime
GetWindowStatus = TinkrUtility.GetWindowStatus
Inflate = TinkrUtility.Inflate
IsInGame = TinkrUtility.IsInGame
JsonDecode = TinkrUtility.JsonDecode
JsonEncode = TinkrUtility.JsonEncode
Kill = TinkrUtility.Kill
Log = TinkrUtility.Log
RotateVector = TinkrUtility.RotateVector
ScreenToWorld = TinkrUtility.ScreenToWorld
SetForbiddenFrame = TinkrUtility.SetForbiddenFrame
SetLastHardwareActionTime = TinkrUtility.SetLastHardwareActionTime
TraceLine = TinkrUtility.TraceLine
WorldToScreen = TinkrUtility.WorldToScreen
WouldInject = TinkrUtility.WouldInject
loadstringsecure = TinkrUtility.loadstringsecure
--#endregion Tinkr.Utility
---@class Tinkr.Routine
---@field active_routine boolean
---@field enabled boolean
---@field timer boolean
---@field update_rate number
---@field Disable fun()
---@field Enable fun()
---@field Inject fun(metatable: metatable, libName?: string, Class?: Tinkr.Routine.Classes )
---@field InjectLib fun(...:any)
---@field InjectLibrary fun(...:any)
---@field LoadLib fun(...: any)
---@field LoadLibrary fun(...: any)
---@field RegisterLib fun(...: any)
---@field RegisterLibrary fun(...: any)
---@field RegisterRoutine fun(callback: fun(...:any), class: Tinkr.Routine.Classes, spec: number)
---@field RegisterSpellBook fun(spellbook: table, class: Tinkr.Routine.Classes)
---@field LoadForSpec fun()
---@field LoadRoutine fun(id: number)
---@field RegisterLocalRoutines fun()
---@field RegisterLocalSpellbooks fun()
---@field RegisterLocal fun()
---@field Toggle fun(state: boolean)
local TinkrRoutine = {
---@enum Tinkr.Routine.Classes
Classes = {
Warrior = 1 ,
Paladin = 2 ,
Hunter = 3 ,
Rogue = 4 ,
Priest = 5 ,
DeathKnight = 6 ,
Shaman = 7 ,
Mage = 8 ,
Warlock = 9 ,
Monk = 10 ,
Druid = 11 ,
DemonHunter = 12 ,
Evoker = 13 ,
Shared = 999
} ,
Exports = { } ,
RoutineCache = { } ,
Specs = {
Warrior = {
Arms = 71 ,
Fury = 72 ,
Protection = 73
} ,
Paladin = {
Holy = 65 ,
Protection = 66 ,
Retribution = 70
} ,
Hunter = {
BeastMastery = 253 ,
Marksmanship = 254 ,
Survival = 255
} ,
Rogue = {
Assassination = 259 ,
Outlaw = 260 ,
Subtlety = 261
} ,
Priest = {
Discipline = 256 ,
Holy = 257 ,
Shadow = 258
} ,
DeathKnight = {
Blood = 250 ,
Frost = 251 ,
Unholy = 252
} ,
Shaman = {
Elemental = 262 ,
Enhancement = 263 ,
Restoration = 264
} ,
Mage = {
Arcane = 62 ,
Fire = 63 ,
Frost = 64
} ,
Warlock = {
Affliction = 265 ,
Demonology = 266 ,
Destruction = 267
} ,
Monk = {
Brewmaster = 268 ,
Mistweaver = 270 ,
Windwalker = 269
} ,
Druid = {
Balance = 102 ,
Feral = 103 ,
Guardian = 104 ,
Restoration = 105
} ,
DemonHunter = {
Havoc = 577 ,
Vengeance = 581
} ,
Evoker = {
Devastation = 1467 ,
Preservation = 1468 ,
} ,
} ,
export_cache = { } ,
injected_libs = { } ,
routine_data = { } ,
routine_hooks = { } ,
routines = { } ,
spellbooks = { } ,
}
---@class Tinkr : Tinkr.Utility
---@field classic boolean
---@field dragonflight boolean
---@field era boolean
---@field retail boolean
---@field shadowlands boolean
---@field init_at 0
---@field build string
---@field color string
---@field name "Tinkr"
---@field name_locale string
---@field release "release"
---@field Routine Tinkr.Routine
---@field Util Tinkr.Util
local Tinkr = {
Common = { } ,
---@param path string
---@return string, string
resolvePath = function ( path ) end ,
Automator = { } ,
Commands = { } ,
globals = { } ,
modules = { } ,
}
AuraUtil_ForEachAura = AuraUtil.ForEachAura
C_UnitAuras_GetAuraDataByAuraInstanceID = C_UnitAuras.GetAuraDataByAuraInstanceID