-
Notifications
You must be signed in to change notification settings - Fork 1
/
harvestTrees.lua
36 lines (32 loc) · 1.17 KB
/
harvestTrees.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
-- initialization
-- ensure imports are from file instead of cache
local function import(path)
package.loaded[path] = nil
local imported = require (path)
package.loaded[path] = nil
return imported
end
-- import denendencies
local botTools = import("./AM-BotTools/botTools")
local compTools = import("./AM-CompTools/compTools")
local treeBot = import("./TreeBot")
--initialize GLBL table if needed
if GLBL == nil then
GLBL = {}
end
--initialize SCRIPT table
--Stores global variables for just this script
local SCRIPT = {}
-- main program
-- toggle this script off it it is already on
if compTools.anotherInstanceOfThisScriptIsRunning() then
compTools.stopOtherInstancesOfThisScript()
log("&7[&6Bots&7] &6* &cStopping Tree Farm...")
botTools.freezeAllMotorFunctions()
-- silently end this script
return 0
end
log("Harvesting trees")
treeBot.harvestTrees(41,36, 4,4)
log("Finished harvesting Trees")
botTools.disconnectIfAfkForTenSeconds()