Skip to content

LoadGhostFile

The LoadGhostFile function loads a .ghost file from the specified path. When calling this API, the base directory is where the scripts directory is located. This function is useful for loading scripts, configurations, or other data stored in .ghost files.

Parameters

  • filePath: The relative path to the .ghost file to be loaded, starting from the base directory where the scripts directory is located.

Example Usage in Lua

Here is an example of how to use the LoadGhostFile function in Lua:

local api = ...

-- Function to load a .ghost file from the specified path
function LoadMyCoolBotCore()
    api.LoadGhostFile('myCoolBot/libs/ui.ghost')
    api.LoadGhostFile('myCoolBot/constants/gatherables.ghost')
    api.LoadGhostFile('myCoolBot/constants/spells.ghost')

    local filePath = 'myCoolBot/core.ghost'
    api.LoadGhostFile(filePath)

end

-- Call the function to load the .ghost file
LoadMyCoolBotCore()