Jump to content

Simple Lineage 2 bot based on OpenCV


verbrannt

Recommended Posts

 

Simple Lineage II bot that uses Computer Vision to find possible targets and monitor HP/MP/CP.

Written to learn C++ basics, but can be useful for someone.

Download: https://github.com/madyanov/l2-cv-bot/releases

 

Features

 

  • NPC detection
  • HP/MP/CP monitoring
  • Mouse and keyboard emulation
  • Stuck resolving
  • TTS 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 run `install-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

 

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` file to customize CV for another client. Note that for colors used HSV and BGR color models
  • Edit `Brain.cpp` to customize bot behavior. Custom runtime behavior scripts are not supported
  • OS related stuff placed in these files: `Window.cpp`, `Capture.cpp`, `Input.cpp`, `Intercept.cpp`
Edited by verbrannt
  • Thanks 1
Link to comment
Share on other sites

Thx guys.

I'm working now on far target detection algorithm, so hopefully it will be included in next release.
 

 

It has much more false positives, but can be used as secondary target detection algorithm (with some heuristic rules) when primary can't find anything.

Edited by verbrannt
Link to comment
Share on other sites

  • 2 weeks later...

New version: https://github.com/madyanov/l2-cv-bot/releases/tag/v0.2

Features:

* Far targets detection
* NextTarget command support
* Spoil & drop support
* HP/CP/MP restoring

Demo video:

 

 

 

Edited by verbrannt
  • Like 3
Link to comment
Share on other sites

  • 4 weeks later...
19 hours ago, xsonic said:

Excelente, aunque no puedo hacerlo funcionar podrias hacer un video guia por favor de como instalar todo lo que se requiere. gracias 

 

Thank you. Right now I can't record installation & configuration video tutorial. But you still can read documentation here: https://github.com/madyanov/l2-cv-bot/blob/master/README.md

12 hours ago, Soyyo14 said:

Thanks bro, great work, i have one problem,  dont run in windows 32 bits 

 

Yeah. You need to compile for 32-bit arch to get work. Also don't forget to use 32-bit OpenCV binaries. To compile read instructions in link I've provided above.

Edited by verbrannt
Link to comment
Share on other sites

On 9/25/2018 at 1:27 AM, xsonic said:

Tienes idea de por qué no selecciona la mafia, no ataca, no detecta hp mp y cp, sera por la proctecion del servidor, el server es https://l2crest.com/

 

 

 

On 8/10/2018 at 8:55 PM, verbrannt said:

 

Current version developed and tested using Windows 10 and Gracia Epilogue client, so with another Windows or Lineage II client it may not work.

 

 

  • Upvote 1
Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • do anyone knows a solution for ALT key to not block the movement on newer clients/classic ? lot of players are useing the key for push to talk and is annoying and rly problematic in PVP
    • You just need time and dedication - if you don't have those, you probably shouldn't lose your time developing. Moreover with the astronomical amount of shared customs, guides and alike content over all L2J related forums / youtube channels. If you don't want to "academically" learn Java, but get some fun learning how L2J (and Java) works, the best is to simply try to adapt customs over a vanilla source. Second step would be to modify it as you like, and the third step would be to code your own. Start with easy to adapt customs, then go into more complex stuff. You have to read first about basic Java concepts, called OOPs concepts, to avoid to waste your time. It's mandatory and will save you some time. L2J is 30% Java and 70% project hierarchy understanding, seeing how bad and lame some "developers" are, strictly anyone with some time can become a "L2J developer" (which is mostly copy-pasting code made by other, talented, people and reselling it). A good source is normally organized and Javadoc documented. If not, avoid to use that. Finally, client and server are two entirely different concepts (one is illegal and the other legal, btw :D), and generally ppl tend to "subclass" on either one or the other.
    • Hello and greetings guys, i come from the scene of L2OFF    so today i will share with you on how to make a custom quest in L2OFF  Lets get started. You will need the GMPanel for decompiling AIs can be downloaded here: https://filebin.net/650x1g0vvbzcon5o   so lets open The AI Editor. To make the quest repeatable we need to base our quest in an already repeatable one, lets say the Ghost Explorer one (Relics of the Old Empire) so the NPC that has the quest in AI is  explorer_ghost_a , find it and decompile it , you should have this code above https://pastebin.com/WjvYxi6E  so the quest is as this above.    now we are gonna make our changes   first we need to copy the code and have it in a notepad close completely the AI editor or just recompile it , reopen the gmpanel / ai editor and the ai.obj itself   and press on the " New " or Ctrl + N  class name = for example put "quest_daily_npc" and parent  "citizen" and press ok .. so your base is ready. https://ibb.co/3MfPHfW <- example is here Now i will explain you everything related on this in order to adjust it by yourself:   first of all :   you paste the code from the previous quest that we copied.   Now your quest must look like this:   https://pastebin.com/YY3uUXDS   so lets make the modifications     https://pastebin.com/c871yGdQ       619 is the quest id you can change it with your desired or you can delete the already existing and just modify this one     ------------------------------------------------------------------------- https://pastebin.com/9knBBGwG   on the case2: is the check for the reward.. practicly this quest is non stop , it checks if you have at least 1000 broken antiques and regarding the check it opens the html pages that correspond to the checks, if you want to replace the number with another amount and the quest item just do it by checking my comments on the pastebin link       now lets move to the :      https://pastebin.com/qirhF0Fn     you can change again here the html with your desired   so  we are finally in the time of the reward    the reward code is here: https://pastebin.com/BRB4F19Y you can add/ make less rewards   If you want to make it like:  You get rewarded then cooldown until next day you must edit   if( myself::GetCurrentTick() - talker.quest_last_reward_time > 1 ) { talker.quest_last_reward_time = myself::GetCurrentTick();   to if( myself::GetCurrentTick() - talker.quest_last_reward_time > 12 * 60 * 60 ) { talker.quest_last_reward_time = myself::GetCurrentTick(); I hope i gave you a good base.. Sincerely thank you , if you find my guide bad, i can edit some parts of it to be more clear  
    • Seuranasi is a scammer, don't buy from him
  • Topics

×
×
  • Create New...