WIP
Simple Lineage II bot that uses CV to find possible targets and monitor HP/MP/CP.
Demonstration video:
Features
- Near and far NPC detection
- HP/MP/CP monitoring
- Mouse and keyboard emulation
Stuck resolvingTTS alarm subsystem (captcha, low HP, CP decreasing, etc.)Custom behavior support (LUA scripts)Buffs/debuffs monitoring
How to use
Interception driver is required for mouse and keyboard emulation.
- Install Interception driver (start
cmd.exe
as Administrator, then runinstall-interception.exe /install
) and reboot. - Run Lineage II client, select character and teleport to any exp/farm location.
- Run
run.bat "<title of the Lineage II client window>"
. - HP/CP/MP bars must be 100% at the moment of bot start, but if not, you should wait until they will be 100% and then press Space to reset bars position.
- To stop press ESC or move mouse.
Default keyboard layout:
- F1 - Primary attack
- F2 - Next target
- F3 - Spoil
- F4 - Sweep
- F5 - Pick up
- F6 - Restore HP when <70%
- F7 - Restore MP when <70%
- F8 - Restore CP when <90%
Command line options
l2-cv-bot.exe
:
--window Lineage II window title or part of the title. Default: "Lineage II"
--debug Show window with debug information. Default: true
run.bat
only accepts window title.
Customization
Current version developed and tested using Windows 10 and Gracia Epilogue client, so with another Windows or Lineage II client it may not work.
- Edit
run.bat
to customize CV or keyboard layout for another client. Note that for colors are used HSV and BGR color models. - Edit
Brain.cpp
to customize bot behavior and timings. Custom runtime behavior scripts currently aren't supported. - OS related stuff placed in these files:
Window.cpp
,Capture.cpp
,Input.cpp
,Intercept.cpp
.
Building
Using CMake and MSVC (Visual Studio 2017) on Windows:
- Download and install CMake.
- Download OpenCV binaries or build OpenCV manually (tested with OpenCV 3.4.2).
- Set
OpenCV_DIR
environment variable to path of the OpenCV binaries. - Run
build-vs15x64.bat
for 64-bit OpenCV orbuild-vs15x32.bat
for 32-bit OpenCV (orbuild.bat
to provide custom arch, project generator and configuration). - Built executable and dependent dynamic libraries can be found in
build-<arch>/<configuration>
directory (e.g.build-x64/Release
).
If Interception library building fails, try to install WDK.