User Tools

Site Tools



mashlib

This is an old revision of the document!


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! :D

Structure

MashLib = {
    Helpers, -- Helpful stuff
    System, -- FFXIV related stuff (servers, regions, etc)
    Powershell, -- Powershell related functions
    Character, -- Character related stuff
    API, -- API Requests
    Crafting, -- Crafting related stuff
    Gathering, -- Gathering related stuff
    Misc, -- Temporary values
    Battle, -- Battle related stuff
    Hacks -- Useful hacks
}

API

Helpers

--[[
    Logs string to console and file
    @param {string} log
    @param {string} type = 'string' or 'block'
]]
MashLib.Helpers.Log(log, type)
 
--[[
    Get current time
    @param {type} type = 'epoch' or 'formatted'
    @return {string}
]]
MashLib.Helpers.GetTime(type)
 
--[[
    Returns the time since the param
    @param {string} time
    @return {int}
]]
MashLib.Helpers.TimeSince(time)
 
--[[
    Get a keyboard's key info
    @param {string} key
    @returns {table}
]]
MashLib.Helpers.GetKeyInfo(key)
 
 
--[[
    Get a map's name
    @param {int} id
    @param {string} mode - 'default' or 'to_log'
    @returns {string}
]]
MashLib.Helpers.GetMapName(id, mode)
 
--[[
    Return current map coordinates
    @param {bool} float
    @returns {int}
]]
MashLib.Helpers.ToFixed(float)
 
--[[
    Return the size of the table
    @param {tbl} table
    @returns {int}
]]
MashLib.Helpers.SizeOf(tbl)

System

--[[
    Get a Job's name by it's ID
    @param {int} id
    @returns {string}
]]
MashLib.System.GetJob(id)
 
--[[
    Get most common keys from the keyboard.
    @returns {Table}
]]
MashLib.System.GetCommonKeys()
 
--[[
    Get a Server by it's ID
    @param {int} id
    @returns {table}
]]
MashLib.System.GetServer(id)
 
--[[
    Get a Region by it's ID
    @param {int} id
    @returns {string}
]]
MashLib.System.GetRegion(id)
 
--[[
    Get a Job's ID by it's name
    @param {string} name
    @returns {int}
]]
MashLib.System.GetJobId(name)
 
--[[
    Check if the character is logged in or not
    @returns {boolean}
]]
MashLib.System.CheckLogin()
 
--[[
    Get current map's ID by name
    @param {string} name
    @return {int}
]]
MashLib.System.GetMap(name)
 
--[[
    Get player info
    @return {table}
]]
MashLib.System.GetUserInfo()

Powershell

--[[
    Execute a powershell file (.ps1)
    @param {string} path
]]
MashLib.Powershell.ExecuteFile(path)
 
--[[
    Downloads a file
    @param {string} url
    @param {string} path on system
]]
MashLib.Powershell.DownloadFile(url, path)
 
--[[
    Opens a url in your browser
    @param {string} url
]]
MashLib.Powershell.OpenLink(url)

Character

--[[
    Get the list of buffs on your character
    @return {table}
]]
MashLib.Character.GetBuffList()
 
--[[
    Return current map coordinates
    @param {bool} exact
    @returns {table}
]]
MashLib.Character.GetMapCoords(exact)

API

--[[
    Get an API endpoint's info by name
    @param {string} name
    @return {table}
]]
MashLib.API.GetEndpoint(name)

Crafting

--[[
    Get a craft condition by name
    @param {string} name
    @return {table}
]]
MashLib.Crafting.GetCondition(name)

Gathering

Battle

--[[
    Get an encounter info by ID
    @param {int} id
    @return {table}
]]
MashLib.Battle.GetEncounter(id)

Hacks

--[[
    Set character's speed
    @param {int} fly
    @param {int} walk
    @param {int} mount
]]
MashLib.Hacks.SpeedHacks.Set(fly, walk, mount)
 
--[[
    Reset character's speed
]]
MashLib.Hacks.SpeedHacks.Reset()
mashlib.1610656699.txt.gz · Last modified: 2021/01/14 20:38 by masshirodev