This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mashlib [2021/12/14 12:20] – masshirodev | mashlib [2021/12/25 22:01] (current) – masshirodev | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | # MashLib | + | ===== MashLib |
A collection of useful commands that are going to be necessary to run my future addons. | A collection of useful commands that are going to be necessary to run my future addons. | ||
- | ## Support | + | ==== Support |
If you need support with this library or just wanna chat, join my [Discord Server](https:// | If you need support with this library or just wanna chat, join my [Discord Server](https:// | ||
- | ## Structure | + | ==== Structure |
- | ```lua | + | < |
MashLib = { | MashLib = { | ||
Helpers, -- Helpful stuff | Helpers, -- Helpful stuff | ||
Line 22: | Line 22: | ||
Space, -- 2D and 3D space related stuff | Space, -- 2D and 3D space related stuff | ||
} | } | ||
- | ``` | + | </ |
- | ## API | + | ==== API ==== |
- | ### Helpers | + | === Helpers |
- | ```lua | + | < |
--[[ | --[[ | ||
Get current time | Get current time | ||
Line 216: | Line 216: | ||
function MashLib.Helpers.DeleteEmpty(table) | function MashLib.Helpers.DeleteEmpty(table) | ||
- | ``` | + | --[[ |
+ | Returns a table without the key/value passed | ||
+ | @param {table} table | ||
+ | @param {string} key | ||
+ | @return {table} | ||
+ | ]] | ||
+ | function MashLib.Helpers.DeleteByKey(table, | ||
+ | |||
+ | --[[ | ||
+ | Returns a table without the key/value passed | ||
+ | @param {table} table | ||
+ | @param {any} value | ||
+ | @return {table} | ||
+ | ]] | ||
+ | function MashLib.Helpers.DeleteByValue(table, | ||
+ | |||
+ | --[[ | ||
+ | Returns minion' | ||
+ | @param {int} questId | ||
+ | @return {int} | ||
+ | ]] | ||
+ | function MashLib.Helpers.GetMinionQuestId(questId) | ||
+ | |||
+ | </ | ||
- | ### System | + | === System |
- | ```lua | + | < |
--[[ | --[[ | ||
Get most common keys from the keyboard. | Get most common keys from the keyboard. | ||
Line 365: | Line 388: | ||
]] | ]] | ||
function MashLib.System.FindEntityAroundPlayer(contentId) | function MashLib.System.FindEntityAroundPlayer(contentId) | ||
- | ``` | + | </ |
- | ### Powershell | + | === Powershell |
- | ```lua | + | < |
--[[ | --[[ | ||
Execute a powershell file (.ps1) | Execute a powershell file (.ps1) | ||
Line 399: | Line 422: | ||
]] | ]] | ||
function MashLib.Powershell.PlaySound() | function MashLib.Powershell.PlaySound() | ||
- | ``` | + | </ |
- | ### Character | + | === Character |
- | ```lua | + | < |
--[[ | --[[ | ||
Get the list of buffs on your character | Get the list of buffs on your character | ||
Line 444: | Line 467: | ||
]] | ]] | ||
function MashLib.Character.SetMoveModeTo(id) | function MashLib.Character.SetMoveModeTo(id) | ||
- | ``` | + | </ |
- | ### Character.Inventory | + | === Character.Inventory |
- | ```lua | + | < |
--[[ | --[[ | ||
Return an inventory item info by id | Return an inventory item info by id | ||
Line 529: | Line 552: | ||
]] | ]] | ||
function MashLib.Character.Inventory.MoveObject(object, | function MashLib.Character.Inventory.MoveObject(object, | ||
- | ``` | + | </ |
- | ### API | + | === API === |
- | ```lua | + | < |
--[[ | --[[ | ||
Get an API endpoint' | Get an API endpoint' | ||
Line 539: | Line 562: | ||
]] | ]] | ||
function MashLib.API.GetEndpoint(name) | function MashLib.API.GetEndpoint(name) | ||
- | ``` | + | </ |
- | ### Crafting | + | === Crafting |
- | ```lua | + | < |
--[[ | --[[ | ||
Get a craft condition by name | Get a craft condition by name | ||
Line 549: | Line 572: | ||
]] | ]] | ||
function MashLib.Crafting.GetCondition(name) | function MashLib.Crafting.GetCondition(name) | ||
- | ``` | + | </ |
- | ### Gathering | + | === Gathering |
- | ### Battle | + | === Battle |
- | ```lua | + | < |
--[[ | --[[ | ||
Get an encounter info by ID | Get an encounter info by ID | ||
Line 567: | Line 590: | ||
]] | ]] | ||
function MashLib.Battle.GetSkillListByJobID(job) | function MashLib.Battle.GetSkillListByJobID(job) | ||
- | ``` | + | </ |
- | ### Hacks | + | === Hacks === |
- | ```lua | + | < |
--[[ | --[[ | ||
Set character' | Set character' | ||
Line 578: | Line 601: | ||
]] | ]] | ||
function MashLib.Hacks.Speed.Set(fly, | function MashLib.Hacks.Speed.Set(fly, | ||
- | ``` | + | </ |
- | ### Hunt | + | === Hunt === |
- | ```lua | + | < |
--[[ | --[[ | ||
Get a mark's name by it's id | Get a mark's name by it's id | ||
Line 612: | Line 635: | ||
]] | ]] | ||
function MashLib.Hunt.GetMarkListPerMap(option) | function MashLib.Hunt.GetMarkListPerMap(option) | ||
- | ``` | + | </ |
- | ### Space | + | === Space === |
- | ```lua | + | < |
--[[ | --[[ | ||
Moves character to coords | Moves character to coords | ||
Line 694: | Line 717: | ||
]] | ]] | ||
function MashLib.Space.GetMapScale(id) | function MashLib.Space.GetMapScale(id) | ||
- | ``` | + | </ |
- | ### Logging | + | === Logging |
- | ```lua | + | < |
--[[ | --[[ | ||
Logs an entity | Logs an entity | ||
Line 704: | Line 727: | ||
]] | ]] | ||
function MashLib.Logging.Entity(target) | function MashLib.Logging.Entity(target) | ||
- | ``` | + | </ |