Build a full bot
The capstone. Take the pieces from the earlier labs and chain them into one loop against Outpost: detect an enemy, act on it, respect a cooldown before the next key press, verify the result, and retry if it did not take. An OCR readout of the score tells the loop when to stop.
Each earlier lab taught one piece, and this lab puts them in one graph. Outpost is built for exactly that: enemies you can detect and click, a shockwave key on a five second cooldown, chests that sometimes need a second click, and a big KILLS readout you can read with OCR. Nothing here is invented busywork, each mechanic maps to one detection feature, so a finished loop is a real bot.
Open the target first. It opens in a new tab. Point QHuman at it and read its score as you go.
Open OutpostPress Enter to start a run, Space to fire the shockwave, and R to reset. Red enemies walk straight at the blue base. A click within about 18 pixels of one kills it and ticks Kills up. The shockwave shoves them all back, but it recharges for five seconds, and pressing early prints NOT READY above the base instead of firing: that is the visible mistake this lab teaches the bot not to make.
#c0444eclick the nearest to the base
Ring, 125pxa breach fires the shockwave
Chest #ffd54averify, then retry
OCR stop
Between waves an amber chest drops somewhere random, and about one in three is locked and needs a second click. It vanishes 4.5 seconds later, so a retry has to be quick. The base has ten HP, shown as a row of pips, and every enemy that reaches it takes one. A wave clears once its enemies are gone, whether you killed them or let them walk into the base, so the Wave number climbs either way. The pips are what tell you the bot is working: kill the enemies before they land and the HP holds; do nothing and the base is overrun by wave 2.
Build the bot
-
Open the detection graph Click New Detection on the toolbar and name it outpost. Open Detection in the left rail, pick it under Macro:, then click Edit Detection... to open the canvas. The line across the top of the canvas is the whole interaction model: a step is a node, so you double-click a node to edit it, drag its handle onto another step to connect the two, and right-click a node for more. Everything the bot does lives on this canvas, and no recorded macro is needed: the clicks and keypresses are actions you add to a step. Nothing saves until you click OK on the canvas, so build freely.
-
Find the enemy and chest by colour Press Enter so a wave is on screen. Click Add step..., name it Hunt, and double-click the node to open it. A step editor holds two lists: Do: on entry, in order (what the step does) and Then: go to the next step (where it goes after). In Do: on entry, in order click Add click... to open the Click on detected target dialog. Set Find: to Pixel colour, click Pick colour..., and type the enemy's red
#c0444e(the target's legend lists every colour) or eyedrop a red disc. Then tick Limit detection to a screen region, click Select region on screen..., and draw a box around the game canvas: every target in this bot reuses that same region, so it only ever reads the board, not the page around it. The colour and that region are all you touch here; leave the other fields at their defaults. Leave this dialog open, the next step keeps configuring it. Matching the flat colour is what reads these moving sprites, and it is what stops the bot ever mistaking the red enemy for the orange wave lamp beside it, which a grayscale picture does. The Do row shows the colour as its raw BGR triple, blue-green-red. The first step you add becomes the start on its own; to move it, right-click a node and pick Set as start. (You point the Loot step at the amber chest,#ffd54a, the same way later.) -
Kill the enemy nearest the base Which enemy you kill matters, because the one about to reach the base is the one that hurts you. Still in the Click on detected target dialog, tick Pick a specific match (instead of best / all), set Choose the: to Nearest to the anchor, tick Measure from an anchor target, and set the anchor to Pixel colour
#4e98c6, the base's blue, limited to the same game-canvas region. Its square dwarfs the same-blue HP pips, so nudge the anchor's Minimum area up to a few hundred and only the base counts (leave its other fields default). Click OK to close the dialog. Now "nearest" has something to be near. Back in Hunt's editor, wire it to re-arm: in Then: go to the next step (first match wins) click Add, set Go to step: to Hunt and Move on: to Always (every time), then OK. This catch-all loop is what makes Hunt clear the board from the inside out; you slot the other exits above it as you build them.Click on detected targetFind:Pixel colourPick colour...#c0444e (enemy red)Region:the game canvasPick a specific match (instead of best / all)Choose the:Nearest to the anchorAnchor:Pixel #4e98c6 (base), Minimum area raisedWhich matches:Best match onlyOKCancelHunt's click, set to the enemy's colour but aimed at the one Nearest to the anchor, where the anchor is the base. The raised anchor Minimum area is what keeps the base's big blue square from being confused with its own same-blue HP pips. -
Fire the shockwave on a breach Add a step called Shock and double-click it. In its Do list, click Add advanced ▾ then Press a key..., capture Space, leave Hold key for: at 0.00 s, and OK. Shock should go back to hunting the instant it fires, so in Shock's Then list click Add, set Go to step: to Hunt and Move on: to Always (every time), then close Shock. Now build the arrow that reaches Shock, and here is the rule that keeps transitions straight: an arrow always lives on the step it leaves from. This one goes from Hunt to Shock, so you build it inside Hunt. Double-click Hunt, and in Then: go to the next step (first match wins) click Add. Set Go to step: to Shock and Move on: to Advanced condition (AND / OR / NOT). In the condition tree click Add advanced ▾ → Proximity (near another target).... Proximity has two target pickers and a distance; set these three and leave the rest alone. Anchor (the reference target) is the base: Find Pixel colour
#4e98c6, the same game-canvas region, and raise its Minimum area like you did for the click's anchor, so it locks onto the base square and not the HP pips. Other (measured against the anchor) is the enemy: Find Pixel colour#c0444e, same region. Within distance: 125 px (the ring's size on screen at 1920×1080, so nudge it if your window is a different size). Leave No closer than, Measure, the direction cone, Min confidence and Fires when in range at their defaults. Click OK. The arrow now fires exactly when an enemy is inside the ring. Driving a key from a detection is Pro, but the dry run shows it working for free. -
Respect the five second cooldown Mash the key and Outpost prints NOT READY instead of firing. Do not solve that by parking the bot: a five second timed transition out of Shock would stop it killing anything for five seconds while the wave walks in. Gate the press instead. First stamp the moment it fires: double-click Shock, add a second Do row with Add advanced ▾ → Stamp the current time..., set its Variable name: to shock, click OK, then close Shock. Now reopen the arrow you built: double-click the Hunt → Shock arrow on the canvas. Your proximity condition is already in the tree, so click Add AND group to wrap it (the tree now reads ALL of these must match (AND)). Select that group, click Add advanced ▾ → Cooldown (time since last fire)..., set Timer name: to shock and Cooldown: to 5.00 s, leave Fires once the cooldown has elapsed ticked, then OK. The arrow now reads "an enemy is inside the ring and the shockwave is charged", and Hunt keeps killing the whole time it is not.When to move onGo to step:ShockMove on:Advanced condition (AND / OR / NOT)ALL of these must match (AND)Proximity:enemy within 125 px of the baseCooldown:timer shock, 5.00 sOKCancel
The gate that stops NOT READY: the shockwave fires only when an enemy is inside the ring and the five second cooldown on shock has elapsed. Wrapping the proximity leaf in an Add AND group is what lets you add the second requirement beside it. -
Verify the chest, then retry Add a Loot step and double-click it. In Do, click Add click... and point it at the chest's colour
#ffd54a, set up like the enemy in step 2 (colour plus the same canvas region), then OK. About one chest in three is locked and needs a second click, so let the action check itself instead of wiring a loop by hand. Select the click row in the Do list and click Verify... to open the Verify this action dialog. Tick Confirm this action worked before continuing; under Expected on screen after the action: add a pixel leaf on the chest's#ffd54a(same canvas region) with Target must be present unticked, so it means "no chest left"; set Retry the action: to 1; and send If it never confirms: to Hunt. Click OK. A locked chest fails the check once, gets clicked again, and passes. Last, give Loot a Then transition back to Hunt with Move on: Always (every time) so it returns after looting, and close Loot. Then wire Hunt to reach it: double-click Hunt, in Then click Add, set Go to step: to Loot, and set Move on: to When a target is found / absent on the chest's#ffd54a.Verify this actionVerify:Confirm this action worked before continuingExpected on screen after the action:Pixel:#ffd54a (match when ABSENT)Confirm within:Wait up to 2.0 sRetry the action:1 timesIf it never confirms:Go to 'Hunt'OKCancel"Click it, then prove the chest is gone, and if it is not, click once more." The chest only lives 4.5 seconds, so keep Confirm within short and send If it never confirms back to Hunt. -
Read the score with OCR and stop The Kills number is drawn top-right in big high-contrast digits. Add a Done step, double-click it, tick Terminal (entering it ends the run), and OK. This arrow leaves Hunt, so build it in Hunt: double-click Hunt, in Then click Add, set Go to step: to Done and Move on: to Advanced condition (AND / OR / NOT), then click Add Number (OCR). This leaf reads text, not colour, so give it its own tight region: Select region on screen... and box just the Kills digits, top-right (not the whole canvas). Set Read as:
int, Compare:>=, Against value:25, leave Min OCR confidence at its default, then OK. One last thing while you are in Hunt: its Then list is checked top to bottom and the first match wins, and an Always exit always matches, so anything listed below it never runs. Use the Up and Down buttons under the list to order the four exits Done, Shock, Loot, Always: the stop sits first and the catch-all loop sits last. Reading a number to decide is Pro, and previews free. -
Rehearse with the dry run, then run it Hit Try it (dry run). It walks the real flow against the live board with every action suppressed: nothing clicks, nothing presses, but every detection and every transition is logged, so you can watch the Pro steps work before you decide to buy any of it. When the log looks right, run it for real and take your hands off.startHunt Click pixel BGR(78, 68, 192) at CENTER (select nearest)↓When number >= 25 → go to Done↓When ALL(enemy within 125px of base, cooldown 5s elapsed) → go to Shock↓When pixel #ffd54a found → go to Loot↻Always → go to HuntShock Press SPACE Stamp time → shock Always → go to HuntLoot Click pixel BGR(74, 213, 255) at CENTER (best) ✓ verify (→ Hunt) Always → go to HuntendDoneterminal, the run stops here
The whole bot on one canvas. Hunt is the heart of it: it kills, and everything else is a branch off it that does one job and comes straight back. Read the edge order top to bottom, because that is the order the app tries them in and the first match wins.
Watch the Outpost cards while it runs. Kills climbs steadily as Hunt works, and NOT READY never appears once the cooldown gate is in: seeing it even once means the shockwave transition is firing without checking the stamp. A bot that keeps the base clear may rarely fire the shockwave at all in a live run, because enemies die before they breach the ring: that is the bot winning, not a wiring fault. The dry run is where you confirm the shock works, since nothing clicks there, enemies reach the ring and the shock transition fires in the timeline. Chests ticks up on locked ones too, which is the verify landing its second click.
Read the base's HP pips, not the Wave number. A wave clears once its enemies are gone by either route, killed or walked into the base, so the wave climbs whether the bot works or not: a bot that never clicks does not sit on wave 1, it rolls on and its base is overrun by wave 2. A bot that is really working keeps the pips up, because it kills each enemy before it lands, and Kills is the number that climbs to show for it.
The run ends when Kills hits your OCR target and the loop stops itself, hands off. Best wave, Most kills and Longest run persist, so the honest test is whether your bot beats your own manual best. Press R and run it again.
Now push the bot past the template. Raise the OCR stop from 25 to 50, then add one mechanic of your own: gate the shockwave step behind a tighter enemy-near-base region, or add a second verify pass on locked chests. Run the dry run, confirm every new transition fires, and check the loop still stops clean and never flashes NOT READY.
If it went wrong
- NOT READY keeps appearing The press is firing inside the cooldown, so the gate is not doing its job. Check Shock really has the Stamp the current time... row after the press, and that the transition into it is an AND of the proximity leaf and the Cooldown leaf over the same name.
- Locked chests never open The verify is backwards. Expected on screen after the action is what should be true once it worked, so the chest image needs Target must be present unticked: you are waiting for the chest to be gone. Ticked, it passes on the first click and never retries.
- Chests keep timing out A chest only lives 4.5 seconds and lands somewhere random each wave. Keep Confirm within short, do not put a wait in front of the click, and let If it never confirms go back to Hunt so an expired chest costs you nothing.
- The loop never stops The Kills digits are drawn on a canvas that scales with the window, so a region drawn at one window size reads the wrong pixels at another. Leave the tab alone once the region is set, and check the stop transition sits above the others in the Then list.
- It clicks enemies but Kills does not move Two causes. The click has to land within about 18 pixels of the enemy's centre; a colour match aims at the blob's centre, so that lands on its own. The other is the board's rule, not a bug: a chest sitting under an enemy wins the click outright, scoring no kill.
- Clicks land on empty board Use Test detection... to check the match against the live screen without running anything; the preview boxes what it found, so you can see whether it is looking at an enemy or at nothing.
Stuck?
Grab the finished bot. Download it and open QHuman's Import shared file... to load the whole graph. It runs as-is: every target is a colour, not a screen-grabbed snippet, so nothing is tied to the machine it was built on. This is the most geometry-sensitive lab, though: its canvas region and the ring distance are absolute pixels for 1920x1080 at 100% zoom, so open Outpost at that size, or redraw the region and re-check the ring, before you set it running.
Download the solution (.qhz)Keep going
Want the full detail behind every node, transition, and action here? Read the detection guide, which walks through the graph editor knob by knob. Then loop back through Outpost and push your Best wave and Most kills records higher with a tighter bot.
These practice targets are ordinary web pages, so every macro here just works. A real game adds three things to check first:
- Direct input is off by defaultQHuman sends input the normal way, which reaches almost every app. Full-screen and anti-cheat-aware games often only listen to the lower-level path, so if a macro does nothing inside the game, turn on direct input (Pro).
- Elevated windows ignore ordinary clicksA game or launcher running as administrator will not accept synthetic input from a non-elevated app. Run QHuman as administrator too, or the clicks and keypresses land nowhere.
- Full-screen vs windowed, and play fairBorderless-windowed is the easiest to detect and click against; exclusive full-screen can hide the pixels QHuman reads, so windowed or borderless is the safe start. Automating an online game can break its rules or trip anti-cheat, up to a ban, so only automate games where you own the risk.