A free, open-source computer-vision bot that automatically plays the Dota 2 Pick the Lock mini-game from the Dark Carnival event. It tracks the rotating lock-pick around the dial and left-clicks the instant it crosses a highlighted bar โ scoring points hands-free โ while holding right-click to keep the pick at max speed.
Keywords: Dota 2 Pick the Lock bot ยท Dark Carnival minigame auto-player ยท rotating lock-pick auto-clicker ยท Dota 2 event script ยท OpenCV screen-capture game bot ยท Python Windows game automation ยท Slark emoji minigame.
โญ If it helps you rack up points, please star the repo โ it helps others find it!
๐ฅพ Also check out its sibling: Boot Breaker Bot for the other Dark Carnival minigame.
A lock-pick rotates around a circular dial. You left-click the moment it passes over a highlighted bar:
- Yellow bar โ +1,000 points
- Blue bar โ +1.5 seconds on the timer
- The pick reverses direction after each bonus hit.
- Holding right-click speeds the pick up.
- Clicking off a bar slows the pick and briefly disables picking โ so timing is everything.
Point goals: 6,000 to advance, 12k / 18k for tickets, 24,000 for the Slark emoji.
This bot does the timing for you.
- ๐ฏ Angle tracking โ locks onto the spinning pick and measures its angle + speed every frame.
- โก Lead-predicted clicks โ fires the left-click a hair early to beat capture + click latency, so it lands on the bar.
- ๐ก๐ต Bar detection โ finds the yellow and blue bars by colour around the ring.
- ๐ Right-click speed boost โ holds RMB for max spin (configurable:
always/smart/off). - ๐๏ธ Live preview โ shows the dial, detected bars, the pick, and the predicted click point.
- ๐ง One-time calibration โ click the dial's centre and edge once; saved for next time.
- ๐ฑ๏ธ Global hotkeys โ start/stop with F8.
- โฌ๏ธ Download
pick-the-lock-bot.exefrom the latest release. - Double-click it. (Windows SmartScreen may warn about an unrecognized app โ click More info โ Run anyway. The full source is in this repo.)
- Follow the on-screen calibration (below), then press F8 in Dota to let it play.
Don't have Python? The launcher installs it for you.
- Click the green
< > Codebutton above โ Download ZIP, and unzip anywhere. - Double-click
run.batโ the first launch auto-installs Python (if missing) and all packages into a local folder. - Follow calibration, then press F8.
๐ก Nothing is installed system-wide โ everything lives in a local
.venvfolder next to the bot.
- Dota console:
fps_max_ui 30โ the bars are FPS-timed; lower FPS makes them catchable (and the bot far more accurate). - Run Dota in Borderless / Windowed-Fullscreen.
- Open the Pick the Lock mini-game so the dial is visible.
Run calibrate.bat (or press F7 in the bot). With the dial on screen:
| Step | Do this |
|---|---|
| 1 | Mouse to the top-left of the dial area โ F1 |
| 2 | Mouse to the bottom-right of the dial area โ F2 |
| 3 | Mouse to the centre of the dial โ F3 |
| 4 | Mouse onto the ring where the pick travels (any point on the circle) โ F4 |
Saved to config.json. Then run run.bat, put your cursor over the dial, focus Dota, and press F8.
Preview markers: ๐ข green = the pick (with a line to centre) ยท ๐ก yellow dots = detected bars ยท ๐ฃ magenta cross = predicted click point.
| Key | Action |
|---|---|
| F8 | Toggle bot ON / OFF (starts OFF) |
| F10 | Show / hide the preview |
| F7 | Re-run calibration |
| F9 / Esc | Quit |
| Field | Meaning |
|---|---|
boost_mode |
"always" (max speed), "smart" (release before a bar), or "off" |
sat_min / v_min |
How "colourful"/bright a pixel must be to count as a bar โ lower these if bars aren't detected |
bar_inner_margin / bar_outer_margin |
Width of the ring band searched for bars (around the calibrated radius) |
bar_persist_frames |
Frames a bar must persist to count (rejects the moving pick/sparks); lower for faster reaction |
latency_frames |
How far ahead the click is predicted โ raise if it clicks late, lower if early |
click_margin_deg |
Click window width in degrees around a bar |
click_cooldown |
Min seconds between clicks (raise if it double-clicks one pass) |
smart_release_deg |
(smart mode) how far ahead of a bar to ease off the boost |
| Problem | Fix |
|---|---|
Nothing clicks / bars=0 in preview |
Bars aren't bright enough to register. Lower sat_min and v_min, or widen bar_inner_margin / bar_outer_margin. Re-check calibration (F4 should be on the bar ring). |
| Clicks land just before/after the bar | Adjust latency_frames (raise = later, lower = earlier). |
| The green pick marker jitters / is lost | Lower diff_thresh, or widen pick_inner_margin / pick_outer_margin. Make sure fps_max_ui 30 is set. |
| It double-clicks one pass | Raise click_cooldown. |
| Too many misses at max speed | Set boost_mode to "smart" or "off". |
| Still stuck? | Run capture.bat and open an issue with the image. |
The bot screen-captures the calibrated dial, then each frame: (1) frame-differences inside the ring to find the moving pick and compute its angle + angular velocity; (2) samples colours around the ring to locate the yellow/blue bars; (3) predicts the pick's angle a couple of frames ahead and left-clicks when that prediction lands on a bar; (4) holds right-click for the speed boost. Pure OpenCV + NumPy โ no game memory reading or injection; it only looks at the screen and clicks, like a human.
Handled automatically by run.bat. For reference: Windows, Python 3.12, and the packages in requirements.txt (numpy, opencv-python, mss, pywin32, keyboard).
A hobby / educational computer-vision project for a single-player mini-game. Use at your own risk and in accordance with the Dota 2 / Steam Terms of Service. Not affiliated with or endorsed by Valve.
Released under the MIT License. Contributions welcome โ open an issue or PR!