Page 1 of 1
AutoAttack AI
Posted: Wed Jul 22, 2009 8:00 am
by streamsss
[en] When i play Turantom on server and at a spam abill charms should not attack by pressing "the camp" button for example, I press abill = it stuned and continues to attack, so should not be.
[ru] Когда я юзаю абилку, например нажимаю стан, он станит, а после продолжает атаковать. Как можно это отключить? Где это в AI?
http://www.l2jserver.com/trac/ticket/4005
Re: AutoAttack AI
Posted: Mon Jul 27, 2009 8:50 am
by streamsss
up
Re: AutoAttack AI
Posted: Tue Jul 28, 2009 7:22 pm
by streamsss
up up
Re: AutoAttack AI
Posted: Sun Aug 02, 2009 12:17 pm
by streamsss
L2Character
* auto-attack after casting only if the skill was a melee skill, or the target is almost inside the attack range
* for example won't start auto-attacking automatically after a sonic attack was fired from it's cast range (500+)
L2character.java
Code: Select all
final L2Object currentTarget = L2Object.getActingCharacter(getTarget()); +L2Object newTarget = null; if (originalSkillTarget != null && originalSkillTarget != this && originalSkillTarget == currentTarget) -getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, originalSkillTarget); +newTarget = originalSkillTarget; else if (originalTarget != null && originalTarget != this && originalTarget == currentTarget) -getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, originalTarget); +newTarget = originalTarget; if (//As far as I remember, you can move away after launching a skill without hitting getAI().getIntention() != AI_INTENTION_MOVE_TO //And you will not auto-attack a non-flagged player after launching a skill && newTarget != null && newTarget.isAutoAttackable(this)) { double distance = Util.calculateDistance(this, newTarget, false); // if the skill is melee, or almost in the range of a normal attack if (getMagicalAttackRange(skill) < 200 || getPhysicalAttackRange() + 200 > distance) getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, newTarget); }