This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| mashlib [2021/01/08 12:24] – masshirodev | mashlib [2021/12/25 22:01] (current) – masshirodev | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ===== 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 ==== | ||
| + | If you need support with this library or just wanna chat, join my [Discord Server](https:// | ||
| ==== Structure ==== | ==== Structure ==== | ||
| - | + | <code lua> | |
| - | MashLib = { | + | MashLib = { |
| - | Helpers, -- Helpful stuff | + | Helpers, -- Helpful stuff |
| - | System, -- FFXIV related stuff (servers, regions, etc) | + | System, -- FFXIV related stuff (servers, regions, etc) |
| - | Character, -- Character related stuff | + | |
| - | API, -- API Requests | + | |
| - | Crafting, -- Crafting related stuff | + | API, -- API Requests |
| - | Gathering, -- Gathering related stuff | + | Crafting, -- Crafting related stuff |
| - | Misc, -- Temporary values | + | Gathering, -- Gathering related stuff |
| - | Battle, -- Battle related stuff | + | Misc, -- Temporary values |
| - | Hacks -- Useful hacks | + | Battle, -- Battle related stuff |
| - | } | + | Hacks, -- Useful hacks |
| + | Hunt, -- The Hunt related stuff | ||
| + | Logging, -- Entity Logging | ||
| + | Space, -- 2D and 3D space related stuff | ||
| + | } | ||
| + | </ | ||
| ==== API ==== | ==== API ==== | ||
| + | === Helpers === | ||
| + | <code lua> | ||
| + | --[[ | ||
| + | Get current time | ||
| + | @param {type} type = ' | ||
| + | @return {string} | ||
| + | ]] | ||
| + | function MashLib.Helpers.GetTime(type) | ||
| + | |||
| + | --[[ | ||
| + | Get current date | ||
| + | @param {type} type ' | ||
| + | @return {string} | ||
| + | ]] | ||
| + | function MashLib.Helpers.GetDate(type) | ||
| + | |||
| + | --[[ | ||
| + | Returns the time since the param | ||
| + | @param {string} time | ||
| + | @return {int} | ||
| + | ]] | ||
| + | function MashLib.Helpers.TimeSince(time) | ||
| + | |||
| + | --[[ | ||
| + | Get a keyboard' | ||
| + | @param {string} key | ||
| + | @returns {table} | ||
| + | ]] | ||
| + | function MashLib.Helpers.GetKeyInfo(key) | ||
| + | |||
| + | --[[ | ||
| + | Get a map's name | ||
| + | @param {int} id | ||
| + | @param {string} mode - ' | ||
| + | @returns {string} | ||
| + | ]] | ||
| + | function MashLib.Helpers.GetMapName(id, | ||
| + | |||
| + | --[[ | ||
| + | Returns float with a specific decimal | ||
| + | @param {bool} float | ||
| + | @returns {int} | ||
| + | ]] | ||
| + | function MashLib.Helpers.ToFixed(float, | ||
| + | |||
| + | --[[ | ||
| + | Return the size of the table | ||
| + | @param {table} tbl | ||
| + | @returns {int} | ||
| + | ]] | ||
| + | function MashLib.Helpers.SizeOf(tbl) | ||
| + | |||
| + | --[[ | ||
| + | Turns seconds into milliseconds | ||
| + | @param {int} time | ||
| + | @returns {int} | ||
| + | ]] | ||
| + | function MashLib.Helpers.HandleCoolDowns(time) | ||
| + | |||
| + | --[[ | ||
| + | Get the highest value from table | ||
| + | @param {table} tbl | ||
| + | @returns {int} | ||
| + | ]] | ||
| + | function MashLib.Helpers.GetMax(tbl) | ||
| + | |||
| + | --[[ | ||
| + | Get the lowest value from table | ||
| + | @param {table} tbl | ||
| + | @returns {int} | ||
| + | ]] | ||
| + | function MashLib.Helpers.GetMin(tbl) | ||
| + | |||
| + | --[[ | ||
| + | Get the normalization translation table | ||
| + | @returns {table} | ||
| + | ]] | ||
| + | function MashLib.Helpers.GetNormalizationTable() | ||
| + | |||
| + | --[[ | ||
| + | Get the special char normalization translation table | ||
| + | @returns {table} | ||
| + | ]] | ||
| + | function MashLib.Helpers.GetSpecialCharTable() | ||
| + | |||
| + | --[[ | ||
| + | Normalizes a string | ||
| + | @param {string} string | ||
| + | @param {boolean} parameterize | ||
| + | @returns {string} | ||
| + | ]] | ||
| + | function MashLib.Helpers.Normalize(string, | ||
| + | |||
| + | --[[ | ||
| + | Returns the file name from path | ||
| + | @param {string} path | ||
| + | @returns {string} | ||
| + | ]] | ||
| + | function MashLib.Helpers.GetFileNameFromPath(path) | ||
| + | |||
| + | --[[ | ||
| + | Split string | ||
| + | @param {string} inputstr | ||
| + | @param {string} separator | ||
| + | @param {string} datatype | ||
| + | @returns {string} | ||
| + | ]] | ||
| + | function MashLib.Helpers.SplitString(inputstr, | ||
| + | |||
| + | --[[ | ||
| + | Join table into a string | ||
| + | @param {string} delimiter | ||
| + | @param {table} table | ||
| + | @returns {table} | ||
| + | ]] | ||
| + | function MashLib.Helpers.Join(delimiter, | ||
| + | |||
| + | --[[ | ||
| + | Limit a string length | ||
| + | @param {string} string | ||
| + | @param {int} length | ||
| + | @returns {string} | ||
| + | ]] | ||
| + | function MashLib.Helpers.LimitLength(string, | ||
| + | |||
| + | --[[ | ||
| + | Validates an email string | ||
| + | @param {string} str | ||
| + | @returns {boolean} | ||
| + | ]] | ||
| + | function MashLib.Helpers.ValidateEmail(str) | ||
| + | |||
| + | --[[ | ||
| + | Returns the percentage of a value | ||
| + | @param {number} percent | ||
| + | @param {number} value | ||
| + | @returns {number} | ||
| + | ]] | ||
| + | function MashLib.Helpers.PercentOf(percent, | ||
| + | |||
| + | --[[ | ||
| + | Removes a value from a table | ||
| + | @param {table} table | ||
| + | @param {string} value | ||
| + | @returns {table} | ||
| + | ]] | ||
| + | function MashLib.Helpers.RemoveByValue(table, | ||
| + | |||
| + | --[[ | ||
| + | Gets a key/value from a value | ||
| + | @param {table} table | ||
| + | @param {string} value | ||
| + | @param {boolean} keyonly | ||
| + | @returns {table} | ||
| + | ]] | ||
| + | function MashLib.Helpers.GetByValue(table, | ||
| + | |||
| + | --[[ | ||
| + | Formats a number with commas | ||
| + | @param {string} number | ||
| + | @returns {string} | ||
| + | ]] | ||
| + | function MashLib.Helpers.FormatNumber(number) | ||
| + | |||
| + | --[[ | ||
| + | Escapes slashes / | ||
| + | @param {string} string | ||
| + | ]] | ||
| + | function MashLib.Helpers.EscapeSlash(string) | ||
| + | |||
| + | --[[ | ||
| + | Returns the first entry in a table | ||
| + | @param {table} table | ||
| + | @param {bool} key | ||
| + | ]] | ||
| + | function MashLib.Helpers.First(table, | ||
| + | |||
| + | --[[ | ||
| + | Returns the last entry in a table | ||
| + | @param {table} table | ||
| + | @param {bool} key | ||
| + | ]] | ||
| + | function MashLib.Helpers.Last(table, | ||
| + | |||
| + | --[[ | ||
| + | Returns the table without empty key/values | ||
| + | @param {table} table | ||
| + | @return {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 === | ||
| + | <code lua> | ||
| + | --[[ | ||
| + | Get most common keys from the keyboard. | ||
| + | @returns {Table} | ||
| + | ]] | ||
| + | function MashLib.System.GetCommonKeys() | ||
| + | |||
| + | --[[ | ||
| + | Get a Server by it's ID | ||
| + | @param {int} id | ||
| + | @returns {table} | ||
| + | ]] | ||
| + | function MashLib.System.GetServer(id) | ||
| + | |||
| + | --[[ | ||
| + | Get channel list | ||
| + | @param {int} id | ||
| + | @returns {table} | ||
| + | ]] | ||
| + | function MashLib.System.GetChannelList() | ||
| + | |||
| + | --[[ | ||
| + | Get channel by id | ||
| + | @returns {table} | ||
| + | ]] | ||
| + | function MashLib.System.GetChannel(id) | ||
| + | |||
| + | --[[ | ||
| + | Get a Region by it's ID | ||
| + | @param {int} id | ||
| + | @returns {string} | ||
| + | ]] | ||
| + | function MashLib.System.GetRegion(id) | ||
| + | |||
| + | --[[ | ||
| + | Get a Job's name by it's ID | ||
| + | @param {int} id | ||
| + | @returns {string} | ||
| + | ]] | ||
| + | function MashLib.System.GetJob(id) | ||
| + | |||
| + | --[[ | ||
| + | Get a Job's ID by it's name | ||
| + | @param {string} name | ||
| + | @returns {int} | ||
| + | ]] | ||
| + | function MashLib.System.GetJobId(name) | ||
| + | |||
| + | --[[ | ||
| + | Get the job list by all or by dominion | ||
| + | @param {string} dominion - ' | ||
| + | @returns {int} | ||
| + | ]] | ||
| + | function MashLib.System.GetJobList(dominion) | ||
| + | |||
| + | --[[ | ||
| + | Check if the character is logged in or not | ||
| + | @returns {boolean} | ||
| + | ]] | ||
| + | function MashLib.System.CheckLogin() | ||
| + | |||
| + | --[[ | ||
| + | Check if the game is loading | ||
| + | @returns {boolean} | ||
| + | ]] | ||
| + | function MashLib.System.IsLoading() | ||
| + | |||
| + | --[[ | ||
| + | Get map's ID by name | ||
| + | @param {string} name | ||
| + | @return {int} | ||
| + | ]] | ||
| + | function MashLib.System.GetMapId(name) | ||
| + | |||
| + | --[[ | ||
| + | Get current map's info by Id | ||
| + | @param {int} id | ||
| + | @return {table} | ||
| + | ]] | ||
| + | function MashLib.System.GetMap(id) | ||
| + | |||
| + | --[[ | ||
| + | Loads and run a lua file | ||
| + | @param {string} filePath | ||
| + | @return {variant} Code return | ||
| + | ]] | ||
| + | function MashLib.System.Require(filePath) | ||
| + | |||
| + | --[[ | ||
| + | Converts TerritoryId to MapId | ||
| + | @param {int} territoryid | ||
| + | @return {int} | ||
| + | ]] | ||
| + | function MashLib.System.GetMapIDFromTerritoryID(id) | ||
| + | |||
| + | --[[ | ||
| + | Get expansion list | ||
| + | @param {string} type | ||
| + | @return {table} | ||
| + | ]] | ||
| + | function MashLib.System.GetExpansionList(type) | ||
| + | |||
| + | --[[ | ||
| + | Get expansion by id | ||
| + | @param {int} expansionid | ||
| + | @return {table} | ||
| + | ]] | ||
| + | function MashLib.System.GetExpansionByID(expansionid) | ||
| + | |||
| + | --[[ | ||
| + | Returns the file names inside a folder, and the files inside subfolders | ||
| + | Thanks to xSalice! <3 | ||
| + | @param {string} folder path | ||
| + | @return {table} | ||
| + | ]] | ||
| + | function MashLib.System.GetFilesInside(folder) | ||
| + | |||
| + | --[[ | ||
| + | Changes to and enables Assist Bot Mode | ||
| + | ]] | ||
| + | function MashLib.System.EnableAssistMode() | ||
| + | |||
| + | --[[ | ||
| + | Disables Bot Mode | ||
| + | ]] | ||
| + | function MashLib.System.TurnOffBotMode() | ||
| + | |||
| + | --[[ | ||
| + | Searchs for an action by Name | ||
| + | @param {int} type | ||
| + | @param {string} name | ||
| + | ]] | ||
| + | function MashLib.System.SearchAction(type, | ||
| + | |||
| + | --[[ | ||
| + | Searchs for an action by Id | ||
| + | @param {int} type | ||
| + | @param {int} id | ||
| + | ]] | ||
| + | function MashLib.System.SearchActionById(type, | ||
| + | |||
| + | --[[ | ||
| + | Searchs for an entity nearby | ||
| + | @param {int} contentId | ||
| + | ]] | ||
| + | function MashLib.System.FindEntityAroundPlayer(contentId) | ||
| + | </ | ||
| + | |||
| + | === Powershell === | ||
| + | <code lua> | ||
| + | --[[ | ||
| + | Execute a powershell file (.ps1) | ||
| + | @param {string} path | ||
| + | ]] | ||
| + | function MashLib.Powershell.ExecuteFile(path) | ||
| + | |||
| + | --[[ | ||
| + | Downloads a file | ||
| + | @param {string} url | ||
| + | @param {string} path on system | ||
| + | ]] | ||
| + | function MashLib.Powershell.DownloadFile(url, | ||
| + | |||
| + | --[[ | ||
| + | Opens a url in your browser | ||
| + | @param {string} url | ||
| + | ]] | ||
| + | function MashLib.Powershell.OpenLink(url) | ||
| + | |||
| + | --[[ | ||
| + | Executes a command on powershell | ||
| + | @param {string} command | ||
| + | ]] | ||
| + | function MashLib.Powershell.Execute(command) | ||
| + | |||
| + | --[[ | ||
| + | Plays a sound | ||
| + | @NOTE: Not yet implemented | ||
| + | ]] | ||
| + | function MashLib.Powershell.PlaySound() | ||
| + | </ | ||
| + | |||
| + | === Character === | ||
| + | <code lua> | ||
| + | --[[ | ||
| + | Get the list of buffs on your character | ||
| + | @return {table} | ||
| + | ]] | ||
| + | function MashLib.Character.GetBuffList() | ||
| + | |||
| + | --[[ | ||
| + | Get the list of buffs on your character | ||
| + | @return {table} | ||
| + | ]] | ||
| + | function MashLib.Character.HasBuff(id) | ||
| + | |||
| + | --[[ | ||
| + | Teleports the player to the map with corresponding id | ||
| + | @param {int} aetheryteid | ||
| + | ]] | ||
| + | function MashLib.Character.TeleportTo(aetheryteid) | ||
| + | |||
| + | --[[ | ||
| + | Teleports the player to the first aetheryte of a map | ||
| + | @param {int} mapid | ||
| + | ]] | ||
| + | function MashLib.Character.TeleportToFirst(mapid) | ||
| + | |||
| + | --[[ | ||
| + | Teleports the player to the first aetheryte of a map, skips if already there | ||
| + | @param {int} mapid | ||
| + | ]] | ||
| + | function MashLib.Character.TeleportToMap(mapid) | ||
| + | |||
| + | --[[ | ||
| + | Checks if character is casting teleport | ||
| + | @return {boolean} | ||
| + | ]] | ||
| + | function MashLib.Character.IsCastingTeleport() | ||
| + | |||
| + | --[[ | ||
| + | Switch between Standard (0) and Legacy (1) move modes | ||
| + | @param {int} id | ||
| + | ]] | ||
| + | function MashLib.Character.SetMoveModeTo(id) | ||
| + | </ | ||
| + | |||
| + | === Character.Inventory === | ||
| + | <code lua> | ||
| + | --[[ | ||
| + | Return an inventory item info by id | ||
| + | @param {int} id | ||
| + | @returns {table} | ||
| + | ResultObject | ||
| + | .category | ||
| + | .uicategory | ||
| + | .searchcategory | ||
| + | .name | ||
| + | .max | ||
| + | .level | ||
| + | .requiredlevel | ||
| + | .canequip | ||
| + | .equipslot | ||
| + | .class | ||
| + | .price | ||
| + | .rarity | ||
| + | .isunique | ||
| + | .desynthvalue | ||
| + | .replairclassjob | ||
| + | .repairitem | ||
| + | .iscollectable | ||
| + | .isuntradeable | ||
| + | .isbinding | ||
| + | ]] | ||
| + | function MashLib.Character.Inventory.GetItemDetails(id) | ||
| + | |||
| + | --[[ | ||
| + | Get inventory item list to a txt file for speeder | ||
| + | @param {string} search | ||
| + | @param {string} norepeat | ||
| + | ]] | ||
| + | function MashLib.Character.Inventory.GetSpeederInventory(search, | ||
| + | |||
| + | --[[ | ||
| + | Get inventory item list or search | ||
| + | @param {string} search | ||
| + | @param {string} norepeat | ||
| + | @return {table} items | ||
| + | ]] | ||
| + | function MashLib.Character.Inventory.Get(search, | ||
| + | |||
| + | --[[ | ||
| + | Get item from inventory by Id if quantity == 1 | ||
| + | @param {string} id | ||
| + | @return {table} | ||
| + | ]] | ||
| + | function MashLib.Character.Inventory.GetOneById(id) | ||
| + | |||
| + | --[[ | ||
| + | Get item from inventory by Id | ||
| + | @param {string} id | ||
| + | @param {string} norepeat | ||
| + | @return {table} | ||
| + | ]] | ||
| + | function MashLib.Character.Inventory.GetById(id, | ||
| + | |||
| + | --[[ | ||
| + | Get item list or search in a specific inventory | ||
| + | @param {string} inventory | ||
| + | @param {string} search | ||
| + | @param {boolean} norepeat | ||
| + | @return {table} items | ||
| + | ]] | ||
| + | function MashLib.Character.Inventory.GetFromSpecific(inventory, | ||
| + | |||
| + | --[[ | ||
| + | Move an item to another slot | ||
| + | @param {int} inventory | ||
| + | @param {int} slot | ||
| + | @param {int} toinventory | ||
| + | @param {int} toslot | ||
| + | ]] | ||
| + | function MashLib.Character.Inventory.Move(inventory, | ||
| + | |||
| + | --[[ | ||
| + | Move an item object to another slot | ||
| + | @param {int} toinventory | ||
| + | @param {int} toslot | ||
| + | ]] | ||
| + | function MashLib.Character.Inventory.MoveObject(object, | ||
| + | </ | ||
| + | |||
| + | === API === | ||
| + | <code lua> | ||
| + | --[[ | ||
| + | Get an API endpoint' | ||
| + | @param {string} name | ||
| + | @return {table} | ||
| + | ]] | ||
| + | function MashLib.API.GetEndpoint(name) | ||
| + | </ | ||
| + | |||
| + | === Crafting === | ||
| + | <code lua> | ||
| + | --[[ | ||
| + | Get a craft condition by name | ||
| + | @param {string} name | ||
| + | @return {table} | ||
| + | ]] | ||
| + | function MashLib.Crafting.GetCondition(name) | ||
| + | </ | ||
| + | |||
| + | === Gathering === | ||
| + | === Battle === | ||
| + | <code lua> | ||
| + | --[[ | ||
| + | Get an encounter info by ID | ||
| + | @param {int} id | ||
| + | @return {table} | ||
| + | ]] | ||
| + | function MashLib.Battle.GetEncounter(id) | ||
| + | |||
| + | --[[ | ||
| + | Get a list of skills on a specific job | ||
| + | @param {int} job | ||
| + | @return {table} | ||
| + | ]] | ||
| + | function MashLib.Battle.GetSkillListByJobID(job) | ||
| + | </ | ||
| + | |||
| + | === Hacks === | ||
| + | <code lua> | ||
| + | --[[ | ||
| + | Set character' | ||
| + | @param {int|nil} fly | ||
| + | @param {int|nil} walk | ||
| + | @param {int|nil} mount | ||
| + | ]] | ||
| + | function MashLib.Hacks.Speed.Set(fly, | ||
| + | </ | ||
| + | |||
| + | === Hunt === | ||
| + | <code lua> | ||
| + | --[[ | ||
| + | Get a mark's name by it's id | ||
| + | @param {string} expansion | ||
| + | @param {string} rank | ||
| + | @param {int} contentid | ||
| + | @retun {string} | ||
| + | ]] | ||
| + | function MashLib.Hunt.GetMarkNameByID(expansion, | ||
| + | |||
| + | --[[ | ||
| + | Get mark list | ||
| + | @param {string} expansion | ||
| + | @param {string} rank | ||
| + | @retun {table} | ||
| + | ]] | ||
| + | function MashLib.Hunt.GetMarkList(expansion, | ||
| + | |||
| + | --[[ | ||
| + | Gets the mark list on a map | ||
| + | @param {int} mapid | ||
| + | @retun {table} | ||
| + | ]] | ||
| + | function MashLib.Hunt.GetMarkListOnMap(mapid) | ||
| + | |||
| + | --[[ | ||
| + | Gets the mark list per map | ||
| + | @param {string} option | to_combo | ||
| + | @retun {table} | ||
| + | ]] | ||
| + | function MashLib.Hunt.GetMarkListPerMap(option) | ||
| + | </ | ||
| + | |||
| + | === Space === | ||
| + | <code lua> | ||
| + | --[[ | ||
| + | Moves character to coords | ||
| + | @param {table} coords | ||
| + | ]] | ||
| + | function MashLib.Space.MoveTo(coords) | ||
| + | |||
| + | --[[ | ||
| + | Stops character from moving | ||
| + | ]] | ||
| + | function MashLib.Space.Stop() | ||
| + | |||
| + | --[[ | ||
| + | Get random coordinates around another coordinates, | ||
| + | Thanks to Kitanoi <3 | ||
| + | @param {table} coords | ||
| + | @param {int} radius | ||
| + | @return {table} | ||
| + | ]] | ||
| + | function MashLib.Space.RandomPosCloseToCoords(coords, | ||
| + | |||
| + | --[[ | ||
| + | Calculates the 2D distance between two points | ||
| + | Thanks to Kali <3 | ||
| + | @param {table} pos | ||
| + | @param {table} pos2 | ||
| + | @param {bool} ignoreradius | ||
| + | @return {int} | ||
| + | ]] | ||
| + | function MashLib.Space.Distance2D(pos, | ||
| + | |||
| + | --[[ | ||
| + | Calculates the 3D distance between two points | ||
| + | Thanks to Kali <3 | ||
| + | @param {table} pos | ||
| + | @param {table} pos2 | ||
| + | @param {bool} ignoreradius | ||
| + | @return {int} | ||
| + | ]] | ||
| + | function MashLib.Space.Distance3D(pos, | ||
| + | |||
| + | --[[ | ||
| + | Places a flag in the map | ||
| + | @param {int} territoryid | ||
| + | @param {table} world coords -> x, z | ||
| + | @param optinal {int} mapid | ||
| + | ]] | ||
| + | function MashLib.Space.SetMapFlag(territoryid, | ||
| + | |||
| + | --[[ | ||
| + | Gets the flag position in the map | ||
| + | @return {table} | ||
| + | ]] | ||
| + | function MashLib.Space.GetMapFlag() | ||
| + | |||
| + | --[[ | ||
| + | Converts world coordinates to map coordinates | ||
| + | @param optional {table} world coords | ||
| + | @param optional {int} mapid | ||
| + | @param optional {bool} exact | ||
| + | @return {table} | ||
| + | ]] | ||
| + | function MashLib.Space.WorldToMap(coords, | ||
| + | |||
| + | --[[ | ||
| + | Converts map coordinates to world coordinates | ||
| + | Thanks to Kali and Kitano <3 | ||
| + | @param {table} map coords | ||
| + | @param {int} scale | ||
| + | @return {table} | ||
| + | ]] | ||
| + | function MashLib.Space.MapToWorld(coords, | ||
| + | |||
| + | --[[ | ||
| + | Gets a specific map's scale | ||
| + | @param {int} mapid | ||
| + | @return {int} | ||
| + | ]] | ||
| + | function MashLib.Space.GetMapScale(id) | ||
| + | </ | ||
| - | # Helpers// | + | === Logging === |
| - | # Prints to the console (or file if enabled) | + | <code lua> |
| - | # log -> Text to log | + | --[[ |
| - | # type -> string or block | + | |
| - | MashLib.Helpers.Log(log, | + | |
| - | # Returns the time | + | |
| - | # type -> epoch or formatted | + | ]] |
| - | MashLib.Helpers.GetTime(type) | + | function |
| - | # Returns the time since | + | </code> |
| - | MashLib.Helpers.TimeSince(time) | + | |
| - | # Plays a soung -- NOT YET IMPLEMENTED | + | |
| - | MashLib.Helpers.PlaySound() | + | |
| - | # Returns this keyboard key's info | + | |
| - | MashLib.Helpers.GetKeyInfo(key)// | + | |
| - | # System// | + | |
| - | # Get an Encounter by ID | + | |
| - | | + | |
| - | # Get a Job by ID | + | |
| - | | + | |
| - | # Get the Job's ID by Name | + | |
| - | MashLib.System.GetJobId(name) | + | |
| - | # Get a Server by ID | + | |
| - | MashLib.System.GetServer(id) | + | |
| - | # Get a Region by Datacenter ID | + | |
| - | MashLib.System.GetRegion(id) | + | |
| - | # Returns the usable (most common) keys from keyboard | + | |
| - | MashLib.System.GetUsableKeys()// | + | |
| - | # Character// | + | |
| - | # Returns this character' | + | |
| - | MashLib.Character.GetBuffList()// | + | |
| - | # API// | + | |
| - | # Get the API's info by Name | + | |
| - | MashLib.API.GetEndpoint(name)// | + | |
| - | # Crafting// | + | |
| - | # Gets a specific Condition' | + | |
| - | MashLib.Crafting.GetCondition(name)// | + | |
| - | # Gathering// | + | |
| - | # Battle// | + | |
| - | # Gets the encounter' | + | |
| - | MashLib.Battle.GetEncounter(id)// | + | |
| - | # Hacks// | + | |
| - | # Sets speed hacks | + | |
| - | # Default values -> 20, 6, 9 | + | |
| - | MashLib.Hacks.SpeedHacks.Set(fly, | + | |
| - | # Resets speed hacks to default values | + | |
| - | MashLib.Hacks.SpeedHacks.Reset() | + | |