Jump to content

Recommended Posts

Posted

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
Posted

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
Posted
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.

Posted

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

Posted

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

  • 2 months later...
Posted (edited)

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
Posted (edited)

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.




×
×
  • Create New...