Jump to content

Autofarm server bot like L2Warland


Recommended Posts

Hello

 

From time to time I like to pick one of the things that are being sold but are really easy to code and I like to code them real quick and share them.

Today's share is L2Warland's server-side Autofarm feature.

 

How it works

 

You set a few skills on the 10th shortcut skill bar

Each section represents a skill type

DanYtk4.png

 

  • Skill usage is prioritised (Feel free to change the order to whatever works for you)
    • Chance
    • Low life
    • Self skills
    • Attacks
  • You can toggle it or turn it on and of with voice commands .farm, .farmon, .farmoff
  • If HP or MP pots are present they will be used after the configurable thresholds are met
  • They will only target monsters that they can move to in order to attack
  • Players will automatically auto attack if the "Attack" action is on any bar. If not they will only use skills
  • Spoiler classes will spoil and sweeper
  • Self spells will be used if the effect is not present and the cooldown is not reached
  • Self spells will trigger toggle skills

 

I tested just the basics and it looks like it's working fine. If you find any issues please report them.

 

Video preview:

 

Coded for aCis 382

Source code: https://gist.github.com/Elfocrash/2afaa14089dfba2d2199c9d22f06d0d5

 

Disclaimer: This shares absolutely no code with the Autobots engine

 

Thanks, Elfo

  • Like 7
  • Thanks 2
  • Upvote 6
  • Downvote 1
Link to comment
Share on other sites

I have the impression that you are not uploading this code to do us the favor of getting to know us, you just want to improve your password in the audience... I don't have you for such a good person Because what you have donated here is all in your interest

  • Like 1
Link to comment
Share on other sites

5 hours ago, ShinichiYao said:

Nice share! Anyway to disable user action while autofarm is on such as mouse click move action use etc?

You could add the isAutoFarming check in the actions related packets and return. However, in case the autofarming gets stuck because of getodata or targeting I think it is a good idea to not block user actions while farming.

Link to comment
Share on other sites

stop at teleport is missing, also l2off auto combat changes target if it hits "cannot see target" few times in row (due to idle monsters movements mid-casting, non LOS mobs are skipped there too) which is nice addition, simple ignoring of target if hp didnt change for set timeout would be good enough.

 

But yeah, another feature taken from classic client, instead of using classic client in the first place xD

Link to comment
Share on other sites

l2off does LOS check only on target, then keeps using skils until target is dead.

I meant using classic client for beloved F1 interlude gameplay, not necessarily using anything else of classic

Link to comment
Share on other sites

  • 2 months later...

Excellent mod, thanks for sharing !!
I should emphasize that I am a newbie to java development.
I have the following errors:

https://subefotos.com/ver/?fe6483091f3fb07495243e420548e312o.jpg

https://subefotos.com/ver/?b22846297d4afa6f2cd4b8282fb36280o.jpg

I would appreciate your help .. And sorry for my bad English. rev acis 382.

Edited by massedev
Link to comment
Share on other sites

Dear Elfocrash, you are the MVP of MXC L2j development, if not on whole L2j

I remember seeing your work waaaay back like 10 years ago when I got into L2j myself

Huge thumbs up and thanks!

Edited by Griunvaldas
  • Upvote 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now



×
×
  • Create New...