auto trade and auto bandit
This commit is contained in:
@@ -28,8 +28,9 @@ async function pollAndExecute() {
|
||||
return;
|
||||
}
|
||||
|
||||
// Cache farm settings so autoFarmLoop can read them without an extra call
|
||||
// Cache farm + bot settings so autonomous loops can read them without extra calls
|
||||
lastKnownFarmSettings = cmdData.farm_settings || {};
|
||||
lastKnownBotSettings = cmdData.bot_settings || {};
|
||||
|
||||
// Feature flags — default to all on if server doesn't send them (backward compatible)
|
||||
const features = cmdData.enabled_features || ['farm', 'admin'];
|
||||
@@ -190,12 +191,14 @@ async function autoFarmLoop() {
|
||||
// so we check readyState and boot immediately in that case.
|
||||
// ----------------------------------------------------------------
|
||||
function boot() {
|
||||
log('Grepolis Remote Control v4.1.0 (remote) loaded');
|
||||
log('Grepolis Remote Control v4.2.0 (remote) loaded');
|
||||
detectCaptcha();
|
||||
setTimeout(pushState, 5000);
|
||||
jitterLoop(pushState, 60000, 120000); // state sync every 1-2 min
|
||||
jitterLoop(pollAndExecute, 8000, 18000); // command poll every 8-18 s
|
||||
jitterLoop(autoFarmLoop, 60000, 120000); // auto-farm every 1-2 min (independent)
|
||||
jitterLoop(pushState, 60000, 120000); // state sync every 1–2 min
|
||||
jitterLoop(pollAndExecute, 8000, 18000); // command poll every 8–18 s
|
||||
jitterLoop(autoFarmLoop, 60000, 120000); // auto-farm every 1–2 min
|
||||
jitterLoop(autoBootcampLoop, 720000, 1320000); // bootcamp every 12–22 min
|
||||
jitterLoop(autoRuralTradeLoop, 1500000, 2700000); // rural trade every 25–45 min
|
||||
}
|
||||
|
||||
if (document.readyState === 'complete') {
|
||||
|
||||
Reference in New Issue
Block a user