Jump to content
  • 0

Limit max attack AutoFarm


Orochy

Question

I'm having a problem with the maximum limit at which the character attacks the monster, above 900 radius the character receives this message for being too far away!
there are no barriers between the monster and the character.

Sem_titulo.png?ex=6538470e&is=6525d20e&h

any solutions? the code is made in Cis 382. 

sorry for my bad english.

https://www.mediafire.com/file/tmazk81pndn2u3v/farm.txt/file

  • Like 1
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0
6 hours ago, Orochy said:

I'm having a problem with the maximum limit at which the character attacks the monster, above 900 radius the character receives this message for being too far away!
there are no barriers between the monster and the character.


Target radius is basically saying to ur bot to search for monsters in that radius. Your problem is skill radius, you have to make ur bot move closer to the target if skill range is lower than your target distance.

Link to comment
Share on other sites

  • 0

I spent some time researching the subject and the answer was in front of me... lol 

thanks for help guys!  resolved..

 

private void doSkill(L2Skill skill, boolean isSelfSkill) {

if (skill == null) {

return;

}

 

if (isNecessarySkill(skill)) {

if (_actor.isAttackingNow() || _actor.isCastingNow()) {

_actor.getAI().setNextAction(new NextAction(AiEventType.READY_TO_ACT, IntentionType.CAST, () -> _actor.useMagic(skill, true, true)));

} else {

_actor.useMagic(skill, isSelfSkill, false);

}

}

}

  • Haha 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...