Loader All
#106
This allows you to have a single folder called .all, which contains the normal every day scripts, follow, party, etc etc in my %appdata%\otclientv8\CLIENT\bot folder.
This allows for cross profile scripts with only 1 edits needed, then just drop the code into Loader_All.lua (code modified from the otclientv8 loader).
This allows for cross profile scripts with only 1 edits needed, then just drop the code into Loader_All.lua (code modified from the otclientv8 loader).
local fullPath = "/bot/.all"
local luaFiles = {}
local uiFiles = {}
local configFiles = g_resources.listDirectoryFiles(fullPath, true, false)
for i, file in ipairs(configFiles) do
local ext = file:split(".")
if ext[#ext]:lower() == "lua" then
table.insert(luaFiles, file)
end
if ext[#ext]:lower() == "ui" or ext[#ext]:lower() == "otui" then
table.insert(uiFiles, file)
end
end
for i, file in ipairs(uiFiles) do
g_ui.importStyle(file)
end
for i, file in ipairs(luaFiles) do
load(g_resources.readFileContents(file), file, nil, context)()
end
- remove | + add
10 Oct 2022