fix for buildinds
This commit is contained in:
@@ -833,8 +833,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
// Build queue, Recruit queue and Market queue are independent
|
||||
const buildCmd = cmdData.build;
|
||||
// Build queue: one command per town (all towns build in the same poll cycle)
|
||||
const buildCmds = cmdData.builds || [];
|
||||
const recruitCmd = cmdData.recruit;
|
||||
const marketCmd = cmdData.market;
|
||||
const researchCmd = cmdData.research;
|
||||
@@ -873,8 +873,16 @@
|
||||
reportResult(cmd.id, finalStatus, result.msg);
|
||||
};
|
||||
|
||||
// Run sequentially — humans cannot perform 3 actions simultaneously!
|
||||
await execute(buildCmd);
|
||||
// Execute ALL town build commands (one per town, sequential with inter-town delay)
|
||||
for (let i = 0; i < buildCmds.length; i++) {
|
||||
await execute(buildCmds[i]);
|
||||
if (i < buildCmds.length - 1) {
|
||||
// Random gap between towns so it doesn't look like a macro
|
||||
const gap = randInt(1500, 3000);
|
||||
log(`Build: town done. Waiting ${gap}ms before next town...`);
|
||||
await sleep(gap);
|
||||
}
|
||||
}
|
||||
await execute(recruitCmd);
|
||||
await execute(marketCmd);
|
||||
await execute(researchCmd);
|
||||
|
||||
Reference in New Issue
Block a user