diff --git a/aard_inventory.xml b/aard_inventory.xml index a31e150..b653aa3 100644 --- a/aard_inventory.xml +++ b/aard_inventory.xml @@ -89,7 +89,7 @@ dbot.version : Module to track version and changelog information and update the save_state="y" date_written="2017-08-12 08:45:15" requires="4.98" - version="2.0042" + version="2.0043" > = dbot.autoQueuePkg.maxCommands) or - (dbot.getTime() - startTime > dbot.autoQueuePkg.totalTimeout) or - (dbot.gmcp.getState() ~= dbot.autoQueuePkg.state) then - dbot.autoQueueEnable = false - end -- if + elseif (currentState ~= dbot.autoQueuePkg.state) and (not useCombatKickstart) then + dbot.info("@YAuto queue @WHALTED " .. haltInfo .. "@Y You are not in the @G" .. stateName .. + "@Y state") + dbot.autoQueueState = dbot.autoQueueDisabled + retval = DRL_RET_HALTED + + else + dbot.debug("@YAuto queue @Wstarted " .. iterInfo) + + check (Execute(dbot.autoQueuePkg.command)) + check (Execute("echo " .. fence)) + + local line, wildcards = wait.regexp("^" .. fence .. "$", + dbot.autoQueuePkg.commandTimeout, + trigger_flag.OmitFromOutput) + + if (line == nil) or (line == "") or (dbot.getTime() - startTime > dbot.autoQueuePkg.totalTimeout) then + dbot.info("@YAuto queue @WHALTED " .. haltInfo .. "@Y Request timed out") + dbot.autoQueueState = dbot.autoQueueDisabled + retval = DRL_RET_TIMEOUT + + else + dbot.info("@YAuto queue @Wcompleted " .. iterInfo) - dbot.info("@YAuto Queue: @C" .. dbot.autoQueuePkg.command .. " @W" .. numCmds .. "@w/@W" .. - dbot.autoQueuePkg.maxCommands) + -- Break if we completed all of the requested commands + if (numCmds >= dbot.autoQueuePkg.maxCommands) then + dbot.autoQueueState = dbot.autoQueueDisabled + end -- if + end -- if + + end -- if numCmds = numCmds + 1 end -- while + if (dbot.autoQueueState == dbot.autoQueueHalted) then + retval = DRL_RET_HALTED + end -- if + dbot.autoQueuePkg = nil return inv.tags.stop(invTagsAutoQueue, endTag, retval) end -- dbot.autoQueueCR