Skip to content

Commit

Permalink
Merge pull request #6 from projecteon/master
Browse files Browse the repository at this point in the history
Added more fixes
  • Loading branch information
johnfking committed Sep 12, 2022
2 parents 8d1e0a5 + 485cac7 commit b61d7fd
Show file tree
Hide file tree
Showing 19 changed files with 278 additions and 179 deletions.
22 changes: 11 additions & 11 deletions datatype/_class.lua
@@ -1,12 +1,12 @@
---@class class
---@field public CanCast boolean Can cast seplls, including Bard
---@field public ClericType boolean Cleric/Paladin?
---@field public DruidType boolean Druid/Ranger?
---@field public HealerType boolean Cleric/Druid/Shaman?
---@field public ID number The class's ID #
---@field public MercType boolean Mercenary?
---@field public Name string The long name, as in "Ranger"
---@field public NecromancerType boolean Necromancer/Shadow Knight?
---@field public PureCaster boolean Any one of: Cleric, Druid, Shaman, Necromancer, Wizard, Mage, Enchanter
---@field public ShamanType boolean Shaman/Beastlord?
---@field public ShortName string The short name as in "RNG"
---@field public CanCast fun(): boolean Can cast seplls, including Bard
---@field public ClericType fun(): boolean Cleric/Paladin?
---@field public DruidType fun(): boolean Druid/Ranger?
---@field public HealerType fun(): boolean Cleric/Druid/Shaman?
---@field public ID fun(): integer The class's ID #
---@field public MercType fun(): boolean Mercenary?
---@field public Name fun(): string The long name, as in "Ranger"
---@field public NecromancerType fun(): boolean Necromancer/Shadow Knight?
---@field public PureCaster fun(): boolean Any one of: Cleric, Druid, Shaman, Necromancer, Wizard, Mage, Enchanter
---@field public ShamanType fun(): boolean Shaman/Beastlord?
---@field public ShortName fun(): string The short name as in "RNG"
8 changes: 4 additions & 4 deletions datatype/_invslot.lua
@@ -1,7 +1,7 @@
--- @class invslot
--- @field public ID number ID of this item slot (usable directly by /itemnotify)
--- @field public ID fun(): integer ID of this item slot (usable directly by /itemnotify)
--- @field public Item item Item data for the item in this slot
--- @field public Name string For inventory slots not inside packs, the slot name, otherwise NULL
--- @field public Name fun(): string For inventory slots not inside packs, the slot name, otherwise NULL
--- @field public Pack invslot Container that must be opened to access the slot with /itemnotify
--- @field public Slot number Slot number inside the pack which holds the item, otherwise NULL
--- @field public ToString number Same as ID
--- @field public Slot fun(): integer Slot number inside the pack which holds the item, otherwise NULL
--- @field public ToString fun(): string Same as ID
18 changes: 9 additions & 9 deletions datatype/_pet.lua
Expand Up @@ -2,16 +2,16 @@

---@diagnostic disable: duplicate-set-field
---@class pet
---@field Combat boolean Combat state
---@field Ghold boolean GHold state
---@field Hold boolean Hold state
---@field ReGroup boolean ReGroup state
---@field Stance string Returns the pet's current stance (e.g. FOLLOW, GUARD)
---@field Stop boolean Stop state
---@field Combat fun(): boolean Combat state
---@field Ghold fun(): boolean GHold state
---@field Hold fun(): boolean Hold state
---@field ReGroup fun(): boolean ReGroup state
---@field Stance fun(): string Returns the pet's current stance (e.g. FOLLOW, GUARD)
---@field Stop fun(): boolean Stop state
---@field Target spawn Returns the pet's current target
---@field Taunt boolean Taunt state
---@field Focus boolean Focus state
---@field ID int returns pet ID
---@field Taunt fun(): boolean Taunt state
---@field Focus fun(): boolean Focus state
---@field ID fun(): integer returns pet ID
local pet = {}

---Returns the slot number for the buff name
Expand Down
4 changes: 2 additions & 2 deletions datatype/_plugin.lua
@@ -1,4 +1,4 @@
--- @class plugin
--- @field public Name string Name of the plugin
--- @field public Name fun(): string Name of the plugin
--- @field public Version float Version number of the plugin
--- @field public ToString string Same as Name
--- @field public ToString fun(): string Same as Name
6 changes: 3 additions & 3 deletions datatype/_race.lua
@@ -1,4 +1,4 @@
--- @class race
--- @field public ID number The ID of the race
--- @field public Name string The name of the race
--- @field public ToString string The name of the race
--- @field public ID fun(): integer The ID of the race
--- @field public Name fun(): string The name of the race
--- @field public ToString fun(): string The name of the race
17 changes: 15 additions & 2 deletions datatype/_range.lua
@@ -1,3 +1,16 @@
--- @class range
--- @field public Between boolean is n Between the range of #1 and #2 both numbers included
--- @field public Inside boolean is n Inside the range of #1 and #2 both number excluded
range = nil

----True if N is between the range of #1 and #2, inclusive.
----Is 50 between 33 and 66? ${Range.Between[33,66:50]} returns TRUE
---@param n integer
---@param range string
---@return boolean is n Between the range of #1 and #2 both numbers included
function range.Between(n, range) end

----True if N is within the range of #1 and #2, exclusive.
----Is 50 Inside 33 and 66? ${Range.Inside[33,66:50]} returns TRUE
---@param n integer
---@param range string
---@return boolean is n Inside the range of #1 and #2 both number excluded
function range.Inside(n, range) end
16 changes: 8 additions & 8 deletions datatype/_skill.lua
@@ -1,10 +1,10 @@
--- @class skill
--- @field public Activated boolean Returns TRUE if the skill has been activated
--- @field public AltTimer boolean Returns TRUE if the skill uses the kick/bash/slam/backstab/frenzy timer
--- @field public Activated fun(): boolean Returns TRUE if the skill has been activated
--- @field public AltTimer fun(): boolean Returns TRUE if the skill uses the kick/bash/slam/backstab/frenzy timer
--- @field public ID number Skill number
--- @field public MinLevel number Minimum level for your class
--- @field public Name string Name of the skill
--- @field public ReuseTime number Reuse timer (what number format? ticks, seconds, deciseconds?)
--- @field public SkillCap number Skill cap based on your current level and class.
--- @field public StartingSkill number Base skill level for your class
--- @field public ToString string Same as Name
--- @field public MinLevel fun(): integer Minimum level for your class
--- @field public Name fun(): string Name of the skill
--- @field public ReuseTime fun(): number Reuse timer (what number format? ticks, seconds, deciseconds?)
--- @field public SkillCap fun(): integer Skill cap based on your current level and class.
--- @field public StartingSkill fun(): integer Base skill level for your class
--- @field public ToString fun(): string Same as Name
2 changes: 1 addition & 1 deletion datatype/_spawn.lua
Expand Up @@ -111,7 +111,7 @@
--- @field public Next spawn Next spawn in the list
--- @field public Owner spawn Owner, if mercenary
--- @field public Prev spawn Previous spawn in the list
--- @field public Pet spawn Pet
--- @field public Pet pet Pet
--- @field public PctHPs number Percent hit points
--- @field public PlayerState number 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
--- @field public Primary number Item ID of anything that may be in the Primary slot
Expand Down
26 changes: 13 additions & 13 deletions datatype/_time.lua
@@ -1,14 +1,14 @@
--- @class time
--- @field public Date string Date in the format MM/DD/YYYY
--- @field public Day number Day of the month
--- @field public DayOfWeek number Day of the week (1=sunday to 7=saturday)
--- @field public Hour number Hour (0-23)
--- @field public Minute number Minute (0-59)
--- @field public Month number Month of the year (1-12)
--- @field public Night boolean Gives true if the current hour is considered "night" in EQ (7:00pm-6:59am)
--- @field public Second number Second (0-59)
--- @field public SecondsSinceMidnight number Number of seconds since midnight
--- @field public Time12 string Time in 12-hour format (HH:MM:SS)
--- @field public Time24 string Time in 24-hour format (HH:MM:SS)
--- @field public Year number Year
--- @field public ToString string Same as Time24
--- @field public Date fun(): string #Date in the format MM/DD/YYYY
--- @field public Day fun(): integer #Day of the month
--- @field public DayOfWeek fun(): integer #Day of the week (1=sunday to 7=saturday)
--- @field public Hour fun(): integer #Hour (0-23)
--- @field public Minute fun(): integer #Minute (0-59)
--- @field public Month fun(): integer #Month of the year (1-12)
--- @field public Night fun(): boolean #Gives true if the current hour is considered "night" in EQ (7:00pm-6:59am)
--- @field public Second fun(): integer #Second (0-59)
--- @field public SecondsSinceMidnight fun(): number #Number of seconds since midnight
--- @field public Time12 fun(): string #Time in 12-hour format (HH:MM:SS)
--- @field public Time24 fun(): string #Time in 24-hour format (HH:MM:SS)
--- @field public Year fun(): integer #Year
--- @field public ToString fun(): string #Same as Time24
12 changes: 12 additions & 0 deletions datatype/_type.lua
@@ -0,0 +1,12 @@
--- @class mqtype
--- @field public Name fun(): string Type name
--- @field public ToString fun(): string Same as Name
mqtype = nil

---@param id integer # Internal ID number
---@return string # Member name based on an internal ID number (based on 1 through N, not all values will be used)
function mqtype.Member(id) end

---@param name string
---@return integer # Member internal ID number based on name (will be a number from 1 to N)
function mqtype.Member(name) end
2 changes: 1 addition & 1 deletion datatype/_window.lua
Expand Up @@ -3,7 +3,7 @@
--- @field public Checked boolean Returns TRUE if the button has been checked
--- @field public Child window Child with this name
--- @field public Children boolean Returns TRUE if the window has children
--- @field public DoClose fun() Does the ction of closing a window
--- @field public DoClose fun() Does the action of closing a window
--- @field public DoOpen fun() Does the action of opening a window
--- @field public Enabled boolean Returns TRUE if the window is enabled
--- @field public FirstChild window First child window
Expand Down
8 changes: 4 additions & 4 deletions datatype/_zone.lua
@@ -1,5 +1,5 @@
--- @class zone
--- @field public ID number ID of the zone
--- @field public Name string Full zone name
--- @field public ShortName string Short zone name
--- @field public ToString string Same as Name
--- @field public ID fun(): integer ID of the zone
--- @field public Name fun(): string Full zone name
--- @field public ShortName fun(): string Short zone name
--- @field public ToString fun(): string Same as Name
94 changes: 73 additions & 21 deletions mq.lua
Expand Up @@ -104,8 +104,8 @@ function mq.imgui.destory(name) end
---@field Bandoliler any
---@field Corpse corpse|fun():corpse|nil Corpse you are looting
---@field Cursor item|fun():string|nil
---@field DisplayItem fun():item
---@field DoorTarget fun():spawn
---@field DisplayItem fun():item Access to all the information in the Item Display window
---@field DoorTarget spawn|fun():string|nil Information on your doortarget
---@field DynamicZone dynamiczone
---@field Event any
---@field EverQuest any
Expand All @@ -114,19 +114,18 @@ function mq.imgui.destory(name) end
---@field FPS userdata
---@field FrameLimiter userdata
---@field Friends userdata
---@field GameTime any
---@field Ground any
---@field Group any
---@field GameTime time
---@field Ground ground #References the ground spawn item you have targeted.
---@field Group group
---@field GroupLeader any
---@field GroupLeaderName any
---@field Heading heading
---@field If any
---@field Illusion any
---@field Ini any
---@field Int any
---@field InvSlot any
---@field Irc any
---@field ItemTarget any
---@field ItemTarget ground #Gives access to the ground item that is previously targeted using /itemtarget.
---@field LastSpawn any
---@field LineOfSight any
---@field Lua Lua
Expand All @@ -136,28 +135,24 @@ function mq.imgui.destory(name) end
---@field Me character
---@field Menu any
---@field Mercenary mercenary
---@field Merchant merchant
---@field Merchant merchant #Interacts with the currently active merchant
---@field Mount any
---@field Navigation Navigation
---@field Pet pet
---@field Plugin plugin
---@field PointMerchant any
---@field Raid raid
---@field Range any
---@field Select any
---@field SelectedItem item
---@field Skill skill
---@field Range range
---@field Select fun(target: string, ...): integer #Finds number of matches in [target]
---@field SelectedItem item #Returns information on the object that is selected in your own inventory while using a merchant.
---@field String any
---@field SubDefined any
---@field Switch any
---@field Switch switch
---@field SwitchTarget any
---@field Target target
---@field Task any
---@field Time any
---@field Type type
---@field Window window
---@field Zone zone
local TLO = {}
---@field Task fun(index?: integer): task|nil #Returns the first task, or the current shared task if one exists.
---@field Time time
---@field Type fun(type: string): mqtype #Information on data types
---@field Window fun(name: string): window #Information on a particular UI window
TLO = {}

---@diagnostic disable: duplicate-set-field
---Returns a pipe | separated list of alert ids
Expand Down Expand Up @@ -219,6 +214,35 @@ function mq.TLO.FindItemBankCount(id)end
---@return integer
function mq.TLO.FindItemBankCount(name)end

---@diagnostic disable: duplicate-set-field
----Creates a heading object using degrees (clockwise)
---@param degrees integer Degrees (clockwise)
---@return heading
function TLO.Heading(degrees) end

----Creates a heading object using the heading to this y,x location
---@param y integer #Y location
---@param x integer #X location
---@return heading
function TLO.Heading(y, x) end

----Creates a heading object using the heading to this north,west location
---@param north integer #North location
---@param west integer #West location
---@return heading
function TLO.Heading(north, west) end
---@diagnostic enable: duplicate-set-field

---Returns a Plugin by index, starting with 1 and stopping whenever the list runs out of plugins.
---@param index integer
---@return plugin
function mq.TLO.Plugin(index)end

----Returns a Plugin by Name
---@param name string
---@return plugin
function mq.TLO.Plugin(name)end

---Returns a Spawn by ID
---@param id integer
---@return spawn
Expand Down Expand Up @@ -249,4 +273,32 @@ function mq.TLO.Spell(id)end
---@return spell
function mq.TLO.Spell(name)end

---Returns a Skill by number
---@param number integer
---@return skill
function mq.TLO.Skill(number)end

----Returns a Skill by Name
---@param name string
---@return skill
function mq.TLO.Skill(name)end

----The current zone information
---@type zone
TLO.Zone = nil

---@diagnostic disable: duplicate-set-field
---@diagnostic disable: assign-type-mismatch
----Retrieves information about a zone by zone ID. If this zone is the current zone, then this will return currentzone.
---@param id integer Zone ID
---@return zone|nil
function TLO.Zone(id) end

----Retrieves information about a zone by short name. If this zone is the current zone, then this will return currentzone.
---@param shortName string Zone Short Name
---@return zone|nil
function TLO.Zone(shortName) end
---@diagnostic enable: assign-type-mismatch
---@diagnostic enable: duplicate-set-field

return mq
2 changes: 1 addition & 1 deletion plugins/EQBC/_TLO.lua
Expand Up @@ -8,4 +8,4 @@
---@field Server fun(): string Hostname or IP of server you connected to
---@field ToonName fun(): string Character name as seen by EQBC \(may reflect YouPlayer\)
---@field Setting fun(): boolean Option enabled/disabled status. \(see **/bccmd set** for complete list\)
mq.TLO.EQBC = {}
TLO.EQBC = {}
10 changes: 5 additions & 5 deletions plugins/MoveUtils/_TLO.lua
Expand Up @@ -19,7 +19,7 @@
---@field Version fun(): number Returns the version number of the plugin
---@field MovePause fun(): boolean Returns TRUE if mpause \(PauseKB\) is enabled
---@field GM fun(): boolean Returns TRUE if BreakOnGM fired
mq.TLO.MoveUtils = {}
TLO.MoveUtils = {}

--- Stick Lua Bindings
---@class Stick
Expand All @@ -39,7 +39,7 @@ mq.TLO.MoveUtils = {}
---@field DistMod fun(): number Returns current stickdist modifier
---@field DistModPercent fun(): number Returns current stickdist percent modifier
---@field Always fun(): boolean Returns TRUE if /stick always is active
mq.TLO.Stick = {}
TLO.Stick = {}

--- MoveTo Lua Bindings
---@class TLO.MoveTo
Expand All @@ -51,7 +51,7 @@ mq.TLO.Stick = {}
---@field ArrivalDistY fun(): number Returns acceptable arrival distance for precisey
---@field ArrivalDistX fun(): number Returns acceptable arrival distance for precisex
---@field Broken fun(): boolean Returns TRUE if BreakOnAggro or BreakOnHit event have halted moveto prematurely
mq.TLO.MoveTo = {}
TLO.MoveTo = {}

--- MakeCamp Lua Bindings
---@class TLO.MakeCamp
Expand All @@ -76,7 +76,7 @@ mq.TLO.MoveTo = {}
---@field Bearing fun(): number Returns the bearing \(heading\) of camp scattering
---@field ScatDist fun(): number Returns the distance from anchor to perform scatter
---@field ScatSize fun(): number Returns the size of scattering radius
mq.TLO.MakeCamp = {}
TLO.MakeCamp = {}

--- Circle Lua Bindings
---@class TLO.Circle
Expand All @@ -89,4 +89,4 @@ mq.TLO.MakeCamp = {}
---@field Clockwise fun(): boolean Returns FALSE if reverse circling
---@field Backwards fun(): boolean Returns TRUE if movement direction backwards
---@field Radius fun(): number Returns the radius size of circle
mq.TLO.Circle = {}
TLO.Circle = {}

0 comments on commit b61d7fd

Please sign in to comment.