Your browser does not support JavaScript or its disabled!
Please turn it on, or be aware that some features on this website will not work correctly.
445
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).
File: Loader_All.lua | 585b | 22 lines.
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

10 Oct 2022
Ads