AutoLoader- vBot extensions
#75
This allows you to drag and drop extensions into vBot without editing the vBot cavebot.lua file to load them.
Find tile CONFIGNAME\vBot\cavebot.lua
Find --dofile("/cavebot/extension_template.lua")
And add the code below on the line below it.
Create a folder called "extensions" in path CONFIGNAME\vBot\cavebot
Find tile CONFIGNAME\vBot\cavebot.lua
Find --dofile("/cavebot/extension_template.lua")
And add the code below on the line below it.
Create a folder called "extensions" in path CONFIGNAME\vBot\cavebot
--dofile("/cavebot/extension_template.lua")
local configName = modules.game_bot.contentsPanel.config:getCurrentOption().text
local extFiles = g_resources.listDirectoryFiles("/bot/" .. configName .. "/cavebot/extensions", false, false)
for i, file in ipairs(extFiles) do
local ext = file:split(".")
if ext[#ext]:lower() == "lua" then
dofile('/cavebot/extensions/'..file)
end
end
24 Dec 2021